Skip to Content

Introduction to IDoc-XI-File scenario and complete walk through for starters.

The document deals with outbound integration scenario from IDoc to File. The IDoc’s are pushed from SAP ISU system to XI. The content conversion is used at receiver side to convert IDoc data to CSV file. XSLT is used for mapping to retain the context of the segments.



  1. One Business System is required to be configured of type 3rd party in SLD (System Landscape Directory).
  2. Partner Profile should be configured for the outbound IDoc.
  3. FTP configuration should be in place to transfer the output file to desired location.


  1. Business System configured in SLD is not covered in detail.
  2. Partner Profile configuration is not covered in detail.


Configuration steps in Integration Repository:


  1. The basic IDoc structure is shown in figure 1. Create the data type for individual segments of the IDoc and create one final data type for output using the segment data type as shown in figure 2.  

Figure 1 IDoc structure used in scenario.

Figure 2 Final output data type


  1. Create Message Type for the final data type as shown in figure 3

Figure 3 Message Type for final data type


  1. Only one message interface is required for file which will be asynchronous inbound message interface. Message interface for sender system is not required as IDoc sits on the ABAP stack. The message is directly triggered from sender system to integration pipeline. The message interface is created as shown in figure 4.

Figure 4 Inbound-Asynchronous Message Interface


  1. No Message Mapping is required as XSL will be used as mapping program.   Since Segment Asset appears multiple times in IDoc, to retain the context of the segment XSLT program will be used which will convert the hierarchy of the IDoc to the flat structure and will retain order of the segment in which it appears. For XSLT mapping refer to XSLT: Recursive Templates by Udo Martens as base.


  1. Create the Interface Mapping with source as IDoc and data type created as target. Use XSL program as mapping program as shown in fig 5.

Fig 5 Interface Mapping using XSL Program




Configuration steps in Integration Directory:


  1. a> Create one communication channel as shown in figure 6. Make sure that the service selected is of 3rd party in System Landscape Directory.  


b> Specify the FTP parameters and set the Connection Mode as permanently because we want to generate the CSV file as soon as IDoc is generated. Specify the directory in which you want to specify the file.


c> Specify the content conversion on receiver side as shown in figure 7 for all the segments. Specify field names, field separator and end separator in the content conversion for the segments including header and trailer.

Figure 6 FTP details of communication channel

Figure 7 Content conversion on receiver side


  1. No Sender Agreement is required in this scenario as IDoc sits on the ABAP stack.


  1. Create the Receiver Agreement as shown in figure 8.

Figure 8 Receiver Agreement with SAPISU as sender and file as receiver


  1. Create Receiver Determination as shown in figure 9

Figure 9 Receiver Determination


  1. Create Interface Determination as shown in figure 10.

Figure 10 Interface Determination for IDoc to File Scenario



All the objects created should be activated without any error. Make sure of the following steps to test the scenario.



  1. Log in to Adaptor Monitor and check for the file adaptor. The status of the adaptor should be green and working.
  2. Check the ftp connection, it should connect to destination folder without any error.
  3. Log in to sender system, go to transaction WE19 (test tool to generate IDoc), generate Idoc of the required message type.
  4. Log in to Xi system and execute transaction SXMB_MONI and check for the XML messages. Use your source and destination system to filter messages, it should have chequered flag.
  5. Check the destination directory, it should have file with the name specified along with the time stamp. Check the file, it should have data for all segments.  
You must be Logged on to comment or reply to a post.