Author: Chandana Wijetunga
Configuration steps in Integration Repository:
This is the IDOC structure we are going to use in our scenario.
Figure 1 IDoc structure used in scenario.
- P.N – Since we are using input as IDOC we do not require to create input datatype.
Figure 2 Final output data type
- Create Message Type for the final data type as shown in figure 3
Figure 3 Message Type for final data type
- 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
- 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.
- 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:
- 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
- No Sender Agreement is required in this scenario as IDoc sits on the ABAP stack.
- Create the Receiver Agreement as shown in figure 8.
Figure 8 Receiver Agreement with SAPISU as sender and file as receiver
- Create Receiver Determination as shown in figure 9
Figure 9 Receiver Determination
- 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.
Monitoring the flow
- 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.