cancel
Showing results for 
Search instead for 
Did you mean: 

CSV File Conversion

Former Member
0 Kudos

Hi Experts,

My requirement is CSV to XML.

CSV file Data:

__________________

H,Header_data

H,Header_data1,Header_data2,

I,AAAA,BBBB,CCCC,DDDD,

I,XXXX,YYYY,ZZZZ,

____________________

Acording to the XML requirement i need to generate only one header information i.e 1st record of the csv (Header_data). but in CSV i have two rows for header, I want to ignore second header record(Header_data1,Header_data2). is it possible with file content conversion paramaters.

Thanks,

Srimani.....

Accepted Solutions (0)

Answers (3)

Answers (3)

VijayKonam
Active Contributor
0 Kudos

Why dont you convert everything in XML and ignore the unwanted record in mapping?

VJ

Former Member
0 Kudos

Hi srimani9,

I think the following should do the trick...

Recordset Structure: Header,1,Info,*

If you do like that you should get 1 Header and all the info segments.

you could look at this thread for more info about keys to distinguish headers from lines

http://wiki.sdn.sap.com/wiki/display/XI/BasicFileAdapterContentConversion

Edited by: Christian Vilhelm Henriksen on Feb 17, 2010 6:14 PM

former_member182004
Contributor
0 Kudos

Hi Srimani,

Is it possible that someone can change the ID of the 2nd row? For example

H,Header_data

H2,Header_data1,Header_data2,

I,AAAA,BBBB,CCCC,DDDD,

I,XXXX,YYYY,ZZZZ,

So, in this case if you name it "H2" you can picke the whole file, also the H2 line, but in the later mapping, you just ingnore that node.

regards,

Juan.