cancel
Showing results for 
Search instead for 
Did you mean: 

IDOCFlatToXMLConvertor related issues

Former Member
0 Kudos

Hi experts,

I have 2 confusions with this powful module, which converts IDoc flat file to Idoc XML.

1.

SAP official documents clearly mentions "Payload in IDoc Flat format should have only one IDoc document" as important notes, but we have done POC that it can converts flat file with multiple IDoc..... The sender channel can convert these IDocs into one XML and send to IE for further processing.

Adding IDOCFlatToXmlConvertor in the Module Processor - SAP NetWeaver Process Integration - SAP Libr...

This should be a good news, but why sometimes it can convert multiple IDocs correctly, sometimes not - we are sure there is no data issue with the flat file because the same file can be converted by another tool(content master).

The error information is so simple with only 2 words in sender channel - "Error: null", no more information since file still remains in the posting folder.

Totally get lost with such error information...

2.

I believe the flat to xml conversion is achieved by "fixedLength" method, say the module will parse the flat file based on the length of each field of IDoc metadata.

However, seems this module will discard the xml nodes which doesn't hold any value after conversion, for example:

<A></A>

We can't see this element "A" in the converted xml because it doesn't hold any value, and this IDoc XML will be sent to IE for further processing, and will raise error if some fields should occur but discarded by the module.

Below are the different xml, the first one is generated by IDocToXMLConvertor module, the second one is converted by other methods, which retains all the IDoc fields even it has no value.

Could you please share any thoughts for these 2 concerns above?

thanks a lot !!

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Hailong

Since the official document says that the flat file should have only 1 IDoc, you should adhere to that. Even if it does successfully convert multiple IDoc in 1 file, it will be considered an unsupported feature by SAP (read: use at own risk.) That might be the cause of the vague error message, since it is an unsupported feature.

For issue 2, not generating the XML field for the corresponding IDoc empty field would result in a smaller XML payload size. I suspect that this might be the reason to do so, otherwise the XML becomes too big and especially for segments with a lot of fields, you end up having a huge XML with many unrelevant fields. With the current approach, it is much easier to view the IDoc XML as you only see the fields with value. If empty fields causes problem at message mapping, you can just handle them with MapWithDefault function.

Rgds

Eng Swee

Former Member
0 Kudos

Thank you so much for the inputs!

For issue 2, maybe SAP should provide a parameter that can decide if it will discard these empty IDoc fields

engswee
Active Contributor
0 Kudos

You can request for it in SAP: Enterprise Home and see how it goes.

Answers (0)