on 05-06-2008 2:51 PM
Hi There,
I was implementing a scenario where I need to create multiple IDocs from one file (which I plan to do with IDoc bundling). But I came accros a 'issue':
I have a flat file like this
header
x items
trailer
Nothing special so far, but because the rows of the items contain more than one data group (fields for general data/sales data/.. I see as different groups), I created substructures for this groups in the item structure.. Now I found out that you cannot specify such 'deep' hierarchies in the standard file content conversion parameters!? I know I can use other conversion methods or I can simply put all fields in the same structure, but is there no way to do this with file content conversion?
So the target file should look like this:
<MT_MESSAGE>
<HEADER>
some header fields
</HEADER>
<ITEM>
<GENERAL_DATA>
some general data fields
</GENERAL_DATA>
<SALES_DATA>
some sales data fields
</SALES_DATA>
</ITEM>
<ITEM>
<GENERAL_DATA>
some general data fields
</GENERAL_DATA>
<SALES_DATA>
some sales data fields
</SALES_DATA>
</ITEM>
<TRAILER>
</TRAILER>
</MT_MESSAGE>
Thanks a lot in advance!
Regards,
Sven
hi Sven
first of all go thru /people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts which shows that upto 3 level nested structure content conversion is possible in receiver adapter.
any how, some indirect way to achieve it are given in these blogs
File Content Conversion for Multi Hierarchical Structure
/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure
Generic mapping to convert nested XML to flat - Receiver file adatper
/people/krishnakumar.ramamoorthy3/blog/2007/01/27/generic-mapping-to-convert-nested-xml-to-flat--receiver-file-adatper
hope it helps you
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for your helpful replies, but in my case I need to do it for a sender adapter (File-to-IDoc-scenario).
Example of source file (limited number of fields, but to get the idea):
TH;20080506;163900
TD;Sven;Janssens;SO01;Belgium
TD;Jan;Svenssens;SO02;Denmark
TT;4
With TH being the header, TD the items and TT the trailer records.
And this I would like to convert into the following structure:
<TH>
<DATE>20080506</DATE>
<TIME>163900</TIME>
</TH>
<TD>
<GENERAL_DATA>
<FIRST_NAME>Sven</FIRST_NAME>
<LAST_NAME>Janssens</LAST_NAME>
</GENERAL_DATA>
<SALES_DATA>
<SALES_ORG>SO01</SALES_ORG>
<COUNTRY>Belgium</COUNTRY>
</SALES_DATA>
</TD>
<TD>
<GENERAL_DATA>
<FIRST_NAME>Jan</FIRST_NAME>
<LAST_NAME>Svenssens</LAST_NAME>
</GENERAL_DATA>
<SALES_DATA>
<SALES_ORG>SO02</SALES_ORG>
<COUNTRY>Denmark</COUNTRY>
</SALES_DATA>
</TD>
<TT>
</TT>
Thanks a lot in advance!
The input file strcutre looks fine
TH;20080506;163900
TD;Sven;Janssens;SO01;Belgium
TD;Jan;Svenssens;SO02;Denmark
TT;4
Can you please tell me any specific reason for putting the FIRSTNAME nad LASTNAME in GENERALDATA and putting SALES_DATA separatley.....
the reason i am asking this is any how the occurence of the GENERAL_DATA and SALES_DATA is same as the TD when compared to the input file strucutre.....
<TD>
<GENERAL_DATA>
<FIRST_NAME>Sven</FIRST_NAME>
<LAST_NAME>Janssens</LAST_NAME>
</GENERAL_DATA>
<SALES_DATA>
<SALES_ORG>SO01</SALES_ORG>
<COUNTRY>Belgium</COUNTRY>
</SALES_DATA>
</TD>
you might have to write an module which is read the file TD into single strucutre and then put that into the Outbound in the above strucutre...
kindly let me know the reason for creating the GENERAL_DATA and SALES_DATA when all are in the same heirarcy
Can u please post the file data i mean couple of records....want to check how data is coming with respect to the stricitre you have.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.