Configuration Steps in IDOC (2024)

IDOC or Intermediate Documents are commonly used in case of data migration between SAP systems or between SAP and legacy system or vice versa.This blog details the steps involved in configuring a new IDOC and also list's down the various transactions that are used while working with IDOCs.

IDOCs can be classified into two . Inbound IDOCs and Outbound IDOCs.

Inbound IDOC : These are IDOCs which get the data into SAP system from external source i.e PI system or any other external system.

Outbound IDOC: These are IDOCs which are sent out from SAP system to any other system. i.e PI system or any other external system.

Step 1 : We need to check the RFC connections to the target system , it can be PI system or any external system. If it is to a PI system then we need to check the connection under ABAP connections in SM59 transaction and for external system under HTTP Connections to External System.

Configuration Steps in IDOC (1)

Configuration Steps in IDOC (2)

Step 2: Create a port in transaction WE21 which shows the target system’s RFC destination.

Configuration Steps in IDOC (3)

Step 3 : In transaction WE20, create a partner profile and mention the message tpe details .In case of Oubound IDOC’s , mention the message types under Outbound Parameters.In case of Inbound IDOC’s , mention the message types under Inbound Parameters. For outbound parameters ,maintain port and IDOC details, because port describes to which system the IDOC has to flow. Whereas in Inbound IDOC,mention the process code details which determines the inbound function module for processing the data.

Configuration Steps in IDOC (4)

Step 4 : Message type SYNCH is the default message type for outbound parameters. Choose a particular message type and maintain the below settings. Under the receiver port mention the port created in transaction WE21. In Output mode, choose Transfer IDOC immediately. In IDOC type mention the IDOC associated with the Message Type.

Configuration Steps in IDOC (5)

Configuration Steps in IDOC (6)

Step 5: For Inbound IDOCs, mention the process code as APL1 and choose option Trigger Immediately under Processing by Function Module.

Configuration Steps in IDOC (7)

Step 6 : In transaction BDFG, we can see which ALE function module we need to enhance for our requirement. In case, we are working with Business Partner we can choose the FM as CRMXIF_PARTNER_SAVE and the Business Object Type as ‘BUS1006’. In IDOCs , SAP by standard provides us to exchange the business partner master data details , BP relationships and BP Hierarchies.

Configuration Steps in IDOC (8)

Step 7: In case we are working with Business Transactions we can choose the FM as CRMXIF_ORDER_SAVE and the Business Object Type as ‘BUS20001’.

Configuration Steps in IDOC (9)

Step 8 : In our example let us work upon Business Partners. Select the FM name and the Business Object type and click enter. By default all standard messages types would be displayed out.Now to create a new message type , click on Create button as shown below. You will get a popu where in you can enter a Z name.

Configuration Steps in IDOC (10)

Step 9 : Once the Z message type is created. Release it as shown.

Configuration Steps in IDOC (11)

Step 10 : Select the Z message type and click on the Display button to view the details.

Configuration Steps in IDOC (12)

Step 11 : With Z Message Type , Z FM’s for both Inbound and Outbound gets created.

Configuration Steps in IDOC (13)

Step 12 : In transaction WE30 we can check the IDOC created.

Configuration Steps in IDOC (14)

Configuration Steps in IDOC (15)

Step 13 : In transaction WE31 we can check the IDOC segment .

Configuration Steps in IDOC (16)

Step 14 : For Inbound IDOCs in transaction code WE42 , select the process code APL1 and click on display . Assign a Z Fm-ZAPPL_IDOC_INPUTI . Create a copy of the standard FM APPL_IDOC_INPUTI into ZAPPL_IDOC_INPUTI .

Configuration Steps in IDOC (17)

Configuration Steps in IDOC (18)

Configuration Steps in IDOC (19)

Step 15 : Under Logical Message , mention the Z message type created.

Configuration Steps in IDOC (20)

Configuration Steps in IDOC (21)

Step 16 : In transaction WE81 , we can see the message type details.

Configuration Steps in IDOC (22)

Step 17 : In transaction WE82 , we can see the message type and basic type details.

Configuration Steps in IDOC (23)

Step 18 : For outbound IDOCs in transaction BD64 , create a distribution model. Goto change mode and click on 'Create Model View'. Enter a description and Technical name.

Configuration Steps in IDOC (24)

Step 19 : Add the message type under the Distribution Model and maintain the sender and receiver system details.

Configuration Steps in IDOC (25)

Step 20 : In transaction BD82, generate the partner profile for the newly created distribution model.

Configuration Steps in IDOC (26)

Step 21 : In transaction SMOEAC , we create the sites and subscriptions.Site is the destination where the data needs to be sent. Subsricption is to identify what is the object to be exchanged. (In case of BP data it will be All Business Partner MESG).Subscriptions are assigned under Sites. Type would vary based on our need.

Configuration Steps in IDOC (27)

Configuration Steps in IDOC (28)

Configuration Steps in IDOC (29)

Step 22 : In transaction CRMXIF_C1 , we maintain the message type details against the Site name.

Configuration Steps in IDOC (30)

Step 23 : We can even restrict an Outbound IDOC flow based on any condition to a particular Site. A times there could be multiple sites in a system , we can control the flow of IDOC here as well.This can be achieved by maintaining an entry in table - SMW3FDCUST, we assign a copy of standard FM - SMW3_OUTBOUNDADP_CALLADAPTERS against BDoc Type BUPA_MAIN, which is used to do any further customizations. We can do the same for other IDOC types.In the Z FM ,input parameter HEADER we get the Site ID details , based on that we can control the changing parameter - RECEPIENTS.

Step 24 : Apart from the above steps we can use Transaction WE02/WE05 to display any IDOC and WE60 for IDOC Documentation.To reprocess any IDOC use transaction WE19 adn inoput teh IDOC number, a new number gets generated.

Step 25 : Any IDOC has 3 records types - Control, Data and Status.Control Records displays the direction of the IDOC, message type/basic type details.

Data record display the data under multiple segments. In Status Record we can check the IDOC status whether it is a success or failure.

Tables for these 3 record types are as below.

Control Record - EDIDC

Data Records - EDIDD

Status Record - EDIDS

Configuration Steps in IDOC (2024)
Top Articles
Latest Posts
Article information

Author: Dan Stracke

Last Updated:

Views: 5830

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Dan Stracke

Birthday: 1992-08-25

Address: 2253 Brown Springs, East Alla, OH 38634-0309

Phone: +398735162064

Job: Investor Government Associate

Hobby: Shopping, LARPing, Scrapbooking, Surfing, Slacklining, Dance, Glassblowing

Introduction: My name is Dan Stracke, I am a homely, gleaming, glamorous, inquisitive, homely, gorgeous, light person who loves writing and wants to share my knowledge and understanding with you.