One of my requirement is to convert an EDI file to an Idoc. I have take to an Orders EDI file which is present in a FTP server and send it to SAP system as an DELIVRY Idoc.
I have used following services.Please tell me whether i am right in my approach or not.
First I used following services to read data from FTP server.
I could successfully read the file stored in FTP server using above services.
To convert the EDI file to Idoc i followed the steps below.
LOOP over ‘/UNEDI_HEADER/UNB’
(Map UNB segments to IDOc Header EDI_DC40). Till this place Mapping is Successful.
After using above services. Mapping is done from UNH segment to FTX segment(still some more segments are to be mapped). The problem is that i unable Map data from this segments to Idoc segments. I approached mapping in the following order.
Map( Map data of BGM segment to E1EDL20 segment)
LOOP over ‘/UNEDIORDERS/UNH/DTM’
Map( Map data of BGM segment to Idoc segment)
LOOP over ‘/UNEDIORDERS/UNH/FTX’
Map( Map data of FTX segment to Idoc segment)
The problem is that the values of variable in segment BGM,DTM and FTX are not being copied to Variables of Idoc. Giving Initial values to Idoc variables are being accepted in the Mapping statements(I mean initial values are displayed in output).I debugged the service, i could see that loops are processed and map statements are also getting executed, but output i meaning values are not copied( i am mapping proper variables which have data).
Could any one tell me what could the problem?
I am also attaching the file ORDERS of EDI format.
Thanks in advance
Orders EDI File
EDI_850.txt (0.7 k)