Create Configure Custom IDoc Type in SAP 1732100365
Create Configure Custom IDoc Type in SAP 1732100365
https://sapintegrationhub.com/abap/ale-idoc/how-to-create-configure-custom-idoc-type-in-sap/
Although we should always try to reuse iDoc Message Types and iDoc Types provided with standard
SAP content, there could be scenarios where you need to create a completely new Message Type
and iDoc type with your own custom processing logic. Let’s look at how to create and configure a
completely new custom iDoc Type in SAP.
You could also directly register the Logical System using transaction bd54.
Using Segment Editor configure the fields of each segment. Set the field names and assign a data
type for each field.
Using Create button, add segments created in the previous step to iDoc Basic Type.
Set iDoc segment properties ‘Maximum Number’ and ‘Minimum Number’. These two settings
correspond to maximum number of occurrences and minimum number of occurrences of the iDoc
segment. If you want to configure a segment as mandatory, set the ‘Minimum Number’ as one.
Signature of the inbound iDoc processing Function Module should be in below format.
1 IMPORTING
4 EXPORTING
9 TABLES
15 EXCEPTIONS
16 WRONG_FUNCTION_CALLED
Find any standard inbound iDoc processing Function Module using transaction we57 and copy it to a
custom Z function module in transaction se37. In this example I am using the standard Function
Module ‘BAPI_iDoc_Input1’ to create my custom Z function module.
Copy inbound iDoc processing function module to custom z function module.
Custom inbound iDoc Processing Function Module format and ABAP logic
Write your own ABAP logic using IMPORT and TABLES parameters. Table IDOC_DATA contain iDoc
segment data.
Bind custom iDoc Function Module with Message Type and iDoc Type created
Step 9: Using Transaction bd51 Configure
Characteristics of Inbound Function Module.
Fill data to iDoc segment by double clicking on each segment and execute the iDoc using ‘Inbound
Function Module’ option.
Test custom iDoc Type and Process Code in we19