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.
- One Business System is required to be configured of type 3rd party in SLD (System Landscape Directory).
- Partner Profile should be configured for the outbound IDoc.
- FTP configuration should be in place to transfer the output file to desired location.
- Business System configured in SLD is not covered in detail.
- Partner Profile configuration is not covered in detail.
Configuration steps in Integration Repository:
- 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.
- Create Message Type for the final data type as shown in figure 3
- 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.
- 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.
- 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.
Configuration steps in Integration Directory:
- 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.
- No Sender Agreement is required in this scenario as IDoc sits on the ABAP stack.
- Create the Receiver Agreement as shown in figure 8.
- Create Receiver Determination as shown in figure 9
- Create Interface Determination as shown in figure 10.
All the objects created should be activated without any error. Make sure of the following steps to test the scenario.
- Log in to Adaptor Monitor and check for the file adaptor. The status of the adaptor should be green and working.
- Check the ftp connection, it should connect to destination folder without any error.
- Log in to sender system, go to transaction WE19 (test tool to generate IDoc), generate Idoc of the required message type.
- 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.
- 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.