Skip to Content

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.

 

Prerequisites:

  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.

Note:

  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.  

image
Figure 1 IDoc structure used in scenario.

image
Figure 2 Final output data type

 

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

image
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.

image
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.

image
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.

image
Figure 6 FTP details of communication channel

image
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.

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

 

  1. Create Receiver Determination as shown in figure 9

image
Figure 9 Receiver Determination

 

  1. Create Interface Determination as shown in figure 10.

image
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.

 

Testing:

  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.  
To report this post you need to login first.

12 Comments

You must be Logged on to comment or reply to a post.

  1. Pooja Pandey
    HI prateek ,
    really worth reading weblog ……easy and thorough steps will be really helpful in handling the similar senarios.

    POoja

    (0) 
  2. Anonymous
    Hi Prateek,
              That was a great weblog, and its my favourite senario too.Keep bloging.
    anirban.
    (0) 
  3. Anonymous
    Hi Prateek,
    I would love to appreciate your wonderful efforts towards preparing this blog. This is very easy to walk through and explains this interphase with perfect mannter. Thanks a lot. Please keep blogging.
    Anand More.
    (0) 
  4. Leela Morampudi
    The explaination very undrstandable for the begginers who started to learn idoc to file scenario.but it will be more good if u explain the SLD part and partner profile.(pre-requites).
    i am waiting for the details of that.
    (0) 

Leave a Reply