on 06-20-2013 11:18 AM
Hello! All
I have the following File Format and do not have and fieldFixedLengths specified - Can you please help with any inputs on Content Conversion parameters to use to convert XML to Flat File as I need to Identify Header and Detail and ONLY need the whole of the line to be passed as one string based on the record type:
RecordType Values:
Header -- 111
LineItem -- 222
RecordSet Structure:
Header,1,Detail,*
endSeparator:
"|"
fieldFixedLengths:
Unknown - will vary for every line as seen below
File Sample:
111099900006/20/2013399900000039990000003999010000003999000000000000000|
222425000000042500000004250000000425001000000425425000000042500000004250000000425001000000425|
2224250000000425000000042500000004250010000004254250000000425000000042500000004250010000004254250000000425001000000425|
22242500000004250000000425000000042500100000042542500000004250000000425|
22242500000004250000000425000000042500100000042542|
2224250000000425000000042500000004250010000004254250000000425000000042500000004250010000004254250000000425001000000425000425|
Fields:
I only need to get the Header record Type & the rest of the string or even the whole string is fine - which I can sub-string later in the mapping.
Final XML should looks like:
<Header>
<String1>
111
</String1>
<String2>
099900006/20/2013399900000039990000003999010000003999000000000000000
</String2>
</Header>
<Detail>
<String1>
222
</String1>
<String2>
425000000042500000004250000000425001000000425425000000042500000004250000000425001000000425
</String2>
</Detail>
.
.
.
.
<Detail>
<String1>
222
</String1>
<String2>
2224250000000425000000042500000004250010000004254250000000425000000042500000004250010000004254250000000425001000000425000425
</String2>
</Detail>
Can you please let me know if we can identify the record type without specifying the FiledFixedLenghts - and ONLY going by endSeparator.
Your help is greatly appreciated!!
Thank you,
Ritu
Hi Ritu,
I think you can achieve what you need, by doing the following:
1. Use Recordset Structure: Line,*
2. Configure the separator as: Line.endSeparator = "|".
The negative consequence is that you need to differentiate the header and items in the mapping, but I can see no other option to successfully convert the flat file of your structure to XML.
Alternatively, you could ask for including some separator between the key 111/222 and the contents.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ritu,
You can try reading the file as a fixed length file.
Header,1, Item,*
Structure as below
Header
key
Detail
Item
key
Detail
KeyFieldName should be key
FCC
Header.fieldFixedLengths | 3,100 |
Header.endSeparator | 'nl' |
Header.keyFieldValue | 111 |
I have given 100 as length for Detail but you can take anything (upper limit). You can still idnetify the end of record by '|'
Similarly for Item....
FCC
Item.fieldFixedLengths | 3,100 |
Item.endSeparator | 'nl' |
Item.keyFieldValue | 111 |
Hope it helps!
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
check if it helps you.
http://scn.sap.com/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.