IDoc extension is concept used when there are some sort of requirement from client when client wants some additional fields to be present into the already defined standard IDoc structure and to achieve this, we use the concept called as IDoc extension, which is add-on into the standard IDoc.
IDoc extension is technically achieved with help of concept called as ENHANCEMENT.
We do find the EXIT and add our own customized program into the standard code.
Steps for creation of Idoc extension are as follow:
1. Create logical system. (T-CODE BD54)
2. Create RFC and test RFC (T-CODE SM59)
- Select appropriate RFC type as per communication
- i. TYPE 3 for ABAP TO ABAP
- ii. G for http to external, etc.
3. Create port and assign RFC to port (T-CODE WE21)
4. Create custom segment and add fields to segment(T-CODE WE31)
a. Set release the segment as per the SAP version and requirement version
5. Create extension type and assign segment to basic type (T-CODE WE30)
a. Once extension is created, then click on hierarchy, create one segment, and assign segment to parent node of segment hierarchy.
6. Create distribution model view for the extension and add sender and receiver information into it. (T-CODE BD64)
7. Assign message type – basic type and extension(T-CODE WE82)
8. Create partner profile and add the inbound/outbound parameters as per requirement (TCODE WE20).
9.Enhance the standard Tcode as per requirement in USER_EXIT/CUSTOMER_EXIT.
10.As per the standard extension, execute the T-code, eg for MATMAS, execute BD10 and give logical system name and execute.
In detail overview:
Create logical system:
Create RFC and choosing proper RFC type:
Enter login details
Test the RFC connection
Create port:
Create segment
Create an IDoc extension
click on create
Insert segment into standard Idoc message type
Create distribution model view and assign sender receiver:
Click on create model view
after that click on Add message type
Assign message type, basic type and extension in WE82
Add new entry here
Create partner profile
click on outbound parameter
save partner profile.Find the user_exit (enhancement)
goto standard t-code (bd10 in case for MATMAS) and find package name.
Find the program for enhancement and change the program as per requirement
Trigger material IDoc using BD10 tcodeExecute the standard t-code and check in we02 if the IDoc is behaving as per requirement.
We can see that the data has been transferred in add-on extension ZSEG_ADY2 with fieldname material.
0 Comments