Im trying to send a semicolon separated complex flat file to XI 3.0 using the file adapter and file content conversion.
When I create a simple conversion it works fine, for example:
Input file data like:
1000000251;Jim Smith;0000010860;Jones
Document Name: Debmas_msg
Document Namespace: http://sap.com/xi/FiletoDebmas
Recordset Name: Debmas_msg
Recordset Structure: Debmas_STR,1
Records per Message: 1
Name Value
Debmas_STR.fieldSeparator ;
Debmas_STR.fieldnames kunnr, Name, parnr, parnr_lastname
Debmas_STR.processFieldNames fromConfiguration
This gives the following Inbound Payload MainDocument.
<?xml version="1.0" encoding="utf-8" ?>
- http://sap.com/xi/FiletoDebmas">
- <Debmas_msg>
- <Debmas_STR>
<kunnr>1000000251</kunnr>
<Name>Jim Smith</Name>
<parnr>0000010860</parnr>
<parnr_lastname>Jones</parnr_lastname>
</Debmas_STR>
</Debmas_msg>
</ns:Debmas_msg>
However, I need a complex Inbound Payload MainDocument like the following:
<?xml version="1.0" encoding="UTF-8" ?>
- http://sap.com/xi/FiletoDebmas">
<kunnr>1000000251</kunnr>
<Name>Jim Smith</Name>
- <Contact>
<parnr>0000000726</parnr>
<parnr_lastname>Smith</parnr_lastname>
</Contact>
- <Contact>
<parnr>0000010860</parnr>
<parnr_lastname>Jones</parnr_lastname>
</Contact>
</ns:Debmas_msg>
<b>When I try to create a complex conversion my file never gets polled</b>.
Here is an example of my complex conversion:
Document Name: Debmas_msg
Document Namespace: http://sap.com/xi/FiletoDebmas
Recordset Name: Debmas_msg
Recordset Structure: Debmas_STR, 1, Contact, *
Records per Message: 1
Name Value
Debmas_STR.fieldSeparator ;
Debmas_STR.fieldnames kunnr, Name, Contact
Debmas_STR.processFieldNames fromConfiguration
Contact.fieldSeparator ;
Contact.fieldnames parnr, parnr_lastname
Contact.processFieldNames fromConfiguration
My input file would look like:
1000000251;Jim Smith;
0000000726;Smith
0000010860;Jones
OR
1000000251;Jim Smith;0000000726;Smith;0000010860;Jones
I'd prefer the multi-line input file, but can live with the single line version. However, currently I can't get either to work.
Obviously Im not setting up my complex conversion correctly. Any help would be appreciated.
Thanks,
Jeff
When you check the Adapter Monitor:
http://<YourHost>:<YourPort>/AdapterFramework
you will find the problems in your configuration easily.
In your example the conversion cannot work, as you have no key fields to distinguish between the different lines.
If your file would look like
10;1000000251;Jim Smith;
20;0000000726;Smith
20;0000010860;Jones
you could add the parameters
Key Field Name: ID
Key Field Type: String
and
Debmas_STR.fieldSeparator ;
Debmas_STR.fieldnames ID,kunnr,Name,Contact
Debmas_STR.keyFieldValue: 10
Contact.fieldSeparator ;
Contact.fieldnames ID,parnr,parnr_lastname
Contact.keyFieldValue: 20
Regards
Stefan
Hi Jeff
Try to setup the file adapter configuration based on these lines. It works fine for me with the multiline file structure you have mentioned.
conversion specific settings
for mode=FILE2XMBWITHSTRUCTURECONVERSION
xml.recordsetStructure=row,1,column,1
xml.recordsetName=BLAH
xml.recordsetsPerMessage=*
xml.documentSkipFirstRows=1
xml.row.fieldSeparator=;
xml.column.fieldSeparator=;
xml.documentName=BLAH
xml.documentNamespace=http://sap.com/xi/CMDM
xml.structureTitle=BLAHBLAH
xml.row.fieldNames=AAA
xml.column.fieldNames=BBB,CCC
Regards
Venu
Add a comment