on 03-13-2012 2:41 PM
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 Key | Parameter Name | Parameter Value |
XML2Plain | Transform.Class | com.sap.aii.messaging.adapter.Conversion |
XML2Plain | Transform.ContentType | text/plain;charset=utf-8 |
XML2Plain | xml.L.endSeparator | |
XML2Plain | xml.L.fieldFixedLengths | 30,3,16,6,8,18,4,4,10,15,3,8,10,50,12,25,1,1,1,40,32,10,756 |
XML2Plain | xml.L.fixedLengthTooShortHandling | Cut |
XML2Plain | xml.L.SL.endSeparator | |
XML2Plain | xml.L.SL.fieldFixedLengths | 30,3,16,6,8,4,4,1,1,990 |
XML2Plain | xml.L.SL.fixedLengthTooShortHandling | Cut |
XML2Plain | xml.H.endSeparator | |
XML2Plain | xml.H.fieldFixedLengths | 30,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 |
XML2Plain | xml.H.fixedLengthTooShortHandling | Cut |
XML2Plain | xml.EDI_DC40.endSeparator | |
XML2Plain | xml.EDI_DC40.fieldFixedLengths | 10,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 |
XML2Plain | xml.EDI_DC40.fixedLengthTooShortHandling | Cut |
XML2Plain | xml.LEADDATA.endSeparator | |
XML2Plain | xml.LEADDATA.fieldFixedLengths | 108 |
XML2Plain | xml.LEADDATA.fixedLengthTooShortHandling | Cut |
XML2Plain | xml.addHeaderLine | 0 |
XML2Plain | xml.conversionType | StructXML2Plain |
XML2Plain | xml.recordsetStructure | LEADDATA,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.
Use conversion agent tool for this. You cannot handle hierarchy conversion using PI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do note that Subsegmentation and content conversion is not possible. Currently there is no support for Hierarchy XML conversion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
Remove L.SL substructures only put header structures.
According SAP : http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Can you use the recordset structure as below. Remove dot inside L and SL
XML2Plain | xml.recordsetStructure | LEADDATA,EDI_DC40,H,L,SL |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your immediate responses.
If I use :
XML2Plain | xml.recordsetStructure | LEADDATA,EDI_DC40,H,L,SL |
Do I have to use the following ?
XML2Plain | xml.L.SL.endSeparator | |
XML2Plain | xml.L.SL.fieldFixedLengths | 30,3,16,6,8,4,4,1,1,990 |
XML2Plain | xml.L.SL.fixedLengthTooShortHandling | Cut |
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
....
...
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.