on 10-29-2008 8:59 AM
Hi
in a i/b scenario my file has the following csv structure
1#XI_DOC#XI_DOC#XI_DOC
2#Amit#Kumar#shivhare
i need this to be converted in to the form
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_FILE xmlns:ns0="http://SAPBPMTesting.com">
<DT_Header>
<File_Type>XI_DOC</File_Type>
<File_Name>XI_DOC</File_Name>
<File_Ext>XI_DOC</File_Ext>
</DT_Header>
<DT_CONTENT>
<FisrtName>Amit</FisrtName>
<MiddleName>Kumar</MiddleName>
<LastName>Shivhare</LastName>
</DT_CONTENT>
</ns0:MT_FILE>
so in the content conversion tab i have given the following values
doc name MT_FILE
doc name space http://SAPBPMTesting.com
doc offset
recordset name DT_File
recordset namespace
recordset structure DT_Header,DT_CONTENT,*
recordset sequence ascending
record sets per message 1
key field name KZ
key field type integer
DT_Header.fieldSeparator #
DT_Header.endSeparator 'nl'
DT_Header.fieldNames KZ,File_Type,File_Name,File_Ext
DT_Header.keyFieldValue 1
DT_Header.keyFieldInStructure ignore
DT_CONTENT.fieldSeparator #
DT_CONTENT.endSeparator 'nl'
DT_CONTENT.fieldNames KZ,FisrtName,MiddleName,LastName
DT_CONTENT.keyFieldValue 2
DT_CONTENT.keyFieldInStructure ignore
ignoreRecordsetName true
i get an error in file sender adaptor as
Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Format error in 'xml.recordset' argument: incomplete structure (name,number) pair
can u pls suggest if the procedure followed is correct
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
recordset structure DT_Header,DT_CONTENT,*
you need to specify,
recordset structure
DT_Header,1,DT_CONTENT,*
or
DT_Header,*,DT_CONTENT,*
* means it is repeating.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thnaks Vijay
that problem solved
but one problem still comming when i have sent data like
1#XI_DOC#XI_DOC#XI_DOC
2#Amit#Kumar#shivhare
2#Snit#Kumar#dasarahe
then in output structure only following XML is generated
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_FILE xmlns:ns0="http://SAPBPMTesting.com">
- <DT_Header>
<File_Type>XI_DOC</File_Type>
<File_Name>XI_DOC</File_Name>
<File_Ext>XI_DOC</File_Ext>
</DT_Header>
- <DT_CONTENT>
<FisrtName>Amit</FisrtName>
<MiddleName>Kumar</MiddleName>
<LastName>shivhare</LastName>
</DT_CONTENT>
</ns0:MT_FILE>
i.e last line of input file not come in XML structure
Thanks
Amit
I think u have not defined the correct structure, ur recordset or root node is missing.
check the below link for strucutre for sender file adapter.
http://help.sap.com/saphelp_nw04/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
also i can not see DT_File in ur XML structure.
chirag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi...
Check the below links.
http://www.riyaz.net/blog/xipi-file-content-conversion-for-simple-structure/
Regards,
Leela
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.