on 10-04-2007 10:18 AM
Hi
In text to xml scenario...how to eliminate the headers in text file
Text file data is like
H1-header line1
H2-header line 2
E100 Rahul - Data
E101 Siva - Data.
I need only data in xml file..what setting i have to make in file content conversion parameters in sender side..In blogs it is given for text to xml..In those i am not getting regarding header line removal from text file (sender)
Give some suggestion to get this scenario
Regards
Prakash
Hi
if you want only the data in the XML file do not map the header data during the mapping, only map the data nodes. and you will get only the data part in the target.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thanks for replying..if i get the headers in middle of document..how to skip that headers in output file..
Sample data..
H1
H2
S100
S102
H1
H2
S03
H1
H2
S04
S05
How to eliminate H1 and H2..to get only data(S100,S102,S03..)
Regards
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prakash,
Use the Document Offset to specify the number of lines that are to be ignored at the beginning of the document in your case it is going to be 2. This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.
If the header lines are going to vary between files i.e 2 lines in one file and n lines in someother file then it is better to leave the source header node unmapped with the target node.
Regards
San
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prakash,
Create the Data type with all fields (Headr & Item) but while mapping do not map the header filds to target. But in your Content Conversion Define every thing (Header & Item filed lengths etc.) so this way your file will be ficked up by adapter and while mapping only Item values will be mapped and you will get only item data in your XML file.
Below is the example when you have HEADER & ITEM structure.
FCC is case sensitive, give all the names in FCC same as your Data Type.
In Recordset Structure = Header,1,Item,*
Header.fieldFixedLengths = (field lengths) e.g. 1, 4, 7
Header.fixedLengthTooShortHandling=ignore
Header.endSeperator='nl'
Item.fieldFixedLengths = give the item field length as shown above
Item.endSeparator = 'nl'
Item.lastFieldsOptional = YES
Regards,
Sarvesh
****Reward points, if found helpfull.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prakash,
Refer this help..
http://help.sap.com/saphelp_nw04s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
Hope it helps..
Kumar.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.