cancel
Showing results for 
Search instead for 
Did you mean: 

XML2Plain Module Configuration

Former Member
0 Kudos

Hi Experts,

I am encountering some errors while using the XML2Plain Module Configuration. My target recordset is as follows:

LEADDATA – Leading Data Segment

EDI_DC40 – IDOC segment

H – Header Segment

L – Line Item Segment

    SL – Customized Line Item Segment (sub segment of the ‘L’ segment)

For every recordset, I would have one LEADDATA, EDI_DC40 and H Segment. There would be multiple line items L but one SL segment per line item L.

Occurrences are as follows:

LEADDATA – 0..1

EDI_DC40 – 0..1

H – 0..1

L – 0..unbounded

                SL – 0..1

Note: The ‘SL’  is created within the L segment in the ‘Data Type’.

In the communication channel XML Module configuration, I have used the following:

Module KeyParameter NameParameter Value
XML2PlainTransform.Classcom.sap.aii.messaging.adapter.Conversion
XML2PlainTransform.ContentTypetext/plain;charset=utf-8
XML2Plainxml.L.endSeparator
XML2Plainxml.L.fieldFixedLengths30,3,16,6,8,18,4,4,10,15,3,8,10,50,12,25,1,1,1,40,32,10,756
XML2Plainxml.L.fixedLengthTooShortHandlingCut
XML2Plainxml.L.SL.endSeparator
XML2Plainxml.L.SL.fieldFixedLengths30,3,16,6,8,4,4,1,1,990
XML2Plainxml.L.SL.fixedLengthTooShortHandlingCut
XML2Plainxml.H.endSeparator
XML2Plainxml.H.fieldFixedLengths30,3,16,6,8,10,4,8,12,3,12,10,12,4,12,10,6,4,4,4,8,12,10,10,24,12,10,8,10,14,2,4,10,4,4,4,739
XML2Plainxml.H.fixedLengthTooShortHandlingCut
XML2Plainxml.EDI_DC40.endSeparator
XML2Plainxml.EDI_DC40.fieldFixedLengths10,3,16,4,2,1,1,1,1,30,30,30,3,3,1,6,6,10,2,2,10,21,70,10,2,2,10,21,70,8,6,14,14,14,70,20
XML2Plainxml.EDI_DC40.fixedLengthTooShortHandlingCut
XML2Plainxml.LEADDATA.endSeparator
XML2Plainxml.LEADDATA.fieldFixedLengths108
XML2Plainxml.LEADDATA.fixedLengthTooShortHandlingCut
XML2Plainxml.addHeaderLine0
XML2Plainxml.conversionTypeStructXML2Plain
XML2Plainxml.recordsetStructureLEADDATA,EDI_DC40,H,L,L.SL

The SL segment also like xml.L.SL.endSeparator ? Do I need to indicate any other attributes? Am I missing something? I am not sure of those highlighted in RED colour  I am getting the following error in the runtime workbench.

Message processing failed. Cause: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'SL' found in document', probably configuration error in file adapter (XML parser error)''; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'SL' found in document', probably configuration error in file adapter (XML parser error)'

Please let me know if you need any further information. I have other XML2Plain module configuration which consists of only H and L segments (no SL segments). The XML2Plain transform works perfectly !!

Any advise on the above would be appreciated. Thanks in advance.

Regards,

Bhanu.

Accepted Solutions (0)

Answers (5)

Answers (5)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Use conversion agent tool for this. You cannot handle hierarchy conversion using PI.

Shabarish_Nair
Active Contributor
0 Kudos

Do note that Subsegmentation and content conversion is not possible. Currently there is no support for Hierarchy XML conversion.

xavisanse
Active Participant
0 Kudos

Hi,

This document seems to say that it's not possible. http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm

"The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes."

Maybe you should do a middle message mapping to change the structure to a "plain xml" without subnodes.

Former Member
0 Kudos

Hi.

Remove L.SL substructures only put header structures.

According SAP : http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

  • Recordset Structure

Enter the substructures using the pattern NameA,NameB,....

If you want to convert all substructures using the same parameters, you only have to specify one structure. The specifications are automatically applied to all substructures.

If you specify more than one structure, the list must contain all the structures occurring in the document. The list must be complete, otherwise a processing error will be triggered at runtime.

Former Member
0 Kudos

Hi Luiz,

Thanks for your response. But my L and SL structures have different parameters like field lengths et.al.

I have a current scenario with H and L and I have used the same XML as above and it seems to be working perfectly. My problem is when I introduce a sub-segment into the L structure.

Thanks for your assistance

Former Member
0 Kudos

Hi.

Remove  L.SL (header and detail)

only put like this.

XML2Plain
XML2Plainxml.SL.endSeparator
XML2Plainxml.SL.fieldFixedLengths30,3,16,6,8,4,4,1,1,990
XML2Plainxml.SL.fixedLengthTooShortHandlingCut

Also you can put 'nl' to .endSeparator

GabrielSagaya
Active Contributor
0 Kudos

Can you use the recordset structure as below. Remove dot inside L and SL

XML2Plainxml.recordsetStructureLEADDATA,EDI_DC40,H,L,SL
Former Member
0 Kudos

Thanks for your immediate responses.

If I use :

XML2Plainxml.recordsetStructureLEADDATA,EDI_DC40,H,L,SL

Do I have to use the following ?

XML2Plainxml.L.SL.endSeparator
XML2Plainxml.L.SL.fieldFixedLengths30,3,16,6,8,4,4,1,1,990
XML2Plainxml.L.SL.fixedLengthTooShortHandlingCut

Are there any other attributes other than endSeparator, fieldFixedLengths, fixedLengthTooShortHandling ?

My target is to get the Plain structure look like the following:

LEADDATA

EDI_DC40

H

L1

     SL1

L2

     SL2

L3

     SL3

....

...