on 07-27-2007 9:51 PM
All,
we have an input file in the following format. (This is a fixed length file structure, where the first character is the type of the record and the rest is the data)
0XXXX
1YYYY
2MasterRow-1
3Childrow 1
3Childrow 2
4Childrow 1
4Childrow 2
2MasterRow-2
3Childrow 21
3Childrow 22
4Childrow 21
5XXXXX
we need this converted as follows, (all records are master records, only record 2 can have children. and the records of type 3 & 4 that follow record type 2 (till the next occurence of record type 2) are the children of that record.
<record><type>0</type><data>XXXX</data></record>
<record><type>1</type><data>YYYY</data></record>
<record><type>2</type><data>MasterRow-1</data>
<children>><type>3</type><data>Childrow 1</data></children>
<children>><type>3</type><data>Childrow 2</data></children>
<children>><type>4</type><data>Childrow 1</data></children>
<children>><type>4</type><data>Childrow 2</data></children>
</record>
<record><type>2</type><data>MasterRow-2</data>
<children>><type>3</type><data>Childrow 21</data></children>
<children>><type>3</type><data>Childrow 22</data></children>
<children>><type>4</type><data>Childrow 21</data></children>
</record>
<record><type>5</type><data>XXXX</data></record>
Can we do this using content conversion? or should we go for multi step mapping?
Thanks,
Hi,
Ref. this doc. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd618818d0">How to Handle Unstructured Source Contents for Adapters</a>
Regards,
Jakub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How did anyone handle the hierarchial data types that come through Flat file using content conversion?
(i think the complexity in our scenario just might be that there are some optional nodes)
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.