cancel
Showing results for 
Search instead for 
Did you mean: 

Problems loading IDOC Flat file to IDOC XML format

Former Member
0 Kudos

Hi All.

I have a scenario that I created an interface to convert standard IDOC flat files to a XML IDOC using the module SAP_XI_IDOC/IDOCFlatToXmlConvertor

However the Flat file IDOC which I want to load is 640 version as you can the header below it doesnt work. I tried to import a file in 702 version with some minor differences in the content of the file and it worked, but we CAN`T apply these minor differences hence we can´t load these 702 file. it should be able to load this 640 file as the image shows below.

Has someone already seen similar scenario like mine?

Appreciate your help.

Regards,

Diego

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Diego

Did you try changing the parameter SAPRelease = 640?

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee.

Yes, it doesn´t change anything. It seems there are 4 administrative colunms in the file that are required to PI load the file. If you compare the 2 images below, you will note, the file is the same.

However the picture 2 has blank spaces and the picture 1 (which is the file that PI loads successfully) contain these ADM fields that I´m talking about, such as IDOC number, a progressive counter, etc.

However the provider can´t change this file to PI format and I´d like to know if someone has experiecied this and somehow has loaded this without these ADM fields in the file or any other suggestion.

Appreciate.

Diego

engswee
Active Contributor
0 Kudos

Hi Diego

I managed to find one IDoc flat file that was used during testing on one of my previous projects. This file loads fine using the converter module.

From the screenshot below, you can see that at the segment level, the file requires the IDoc no, segment no and parent segment no at each line.

Without all these info, the converter will not be able to form the correct hierarchy in the XML file - how can it figure out which parent segment each line belongs to?

Do note that the IDoc flat file format is an SAP proprietary format, so if you want this to work, the provider has to follow SAP's format. This format has been around since before PI days, when integration of IDoc at ECC side was directly done via IDoc flat files.

For further details, you can also refer to my reply on the following thread. It is something similar where the third party is generating the IDoc flat file but not fully following the requirement.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng.

Exaclty....These fields relates to child-Parent nodes as well as the IDOC number, I adjusted their files with these extra fields to be able to load them. However I had been alerted that these files had been sucessfully loaded in SAP PI for other companies, but either it's not true or it was used convencional mapping for that.

Thank you Eng, this was exaclty my answer to them.If they want to work with IDOCflat files using SA PI they must follow what PI requires.

Good to see that my answer was like what you would do.

Thank you for your help on this.

Regards,

Diego

engswee
Active Contributor
0 Kudos

Hi Diego

I haven't worked with a third party using non-SAP technology to generate IDoc flat files, but I'm curious with the claim that such the formatting was successful for other companies - how do they determine the segment hierarchy if the parent-child relationship is not provided?

Anyway, glad to have been of assistance - hopefully you can get the third party to make the necessary changes

Rgds

Eng Swee

Answers (0)