EDI interface between SAP unicode system and Non SAP system in Japanese
This tutorial explains the implementation of the project between SAP Unicode system and Japanese retailer, it cover the design, mapping and integration of SAP IDOC file and flat file from Japanese retailer. We use FTP to transfer the flat file and idoc file between different systems. I use sales order as a sample.
Mapping between the IDOC file and flat file
I’m not going to show the original flat file because it’s different for each client, I asked the subsystem to finish the mapping based on my design and requirement. The fact is the PI /XI/EAI also has the same function to finish the mapping.
The most important thing is setting the control record based on the partner profile and port of the sap system.
There are several mandatory fields of structure EDI_DC are very important:
TABNAM must be EDI_DC40_U because we use the Japanese characters in the IDOC file.
DIRECT must be 2, which means inbound.
IDOCTYP, CIMTYP, MESTYP based on the requirement of the interface.
MESCOD is used to separate the customers within 1 interface.
SNDPOR is determined by PORT configuration.
SNDPRT and SNDPFC is determined by Partner profile configuration.
RCVPFC is LS, RCVPRN is current system determined by the SAP.
The data record mapping is based on the message type and idoc type.
Configure port on the SAP system
As you can see in the port I check the Unicode and add the function module to generate the IDOC file name based on the client for outbound, but I didn’t add the function module for the inbound., actually I escape this step because I didn’t use the shell script to trigger the inbound IDOC.
Configure partner profile on the SAP system
As you can see the partner profile and inbound idoc process code is normal
Trigger the inbound idoc
Now the main thing is how to trigger the inbound idoc. I didn’t shell script as I had already explained, I used the FTP to schedule the job to put the idoc file into SAP application from Sub system after the mapping.
As you can see, I defined the name based on the client and date, I write a program first to call the function module RZL_READ_DIR to check the file based on the client and date, then call the function module EDI_DATA_INCOMING to process the multiple inbound idoc
Outbound idoc from SAP system to Sub system
Outbound idoc from SAP system to sub system is much easier, I configure the output determination, partner profile, process code as normal. I add the view to limit the data has been sent out per idoc and use rseout00 to send out multiple idoc at the same time.