cancel
Showing results for 
Search instead for 
Did you mean: 

FILE CONTENT CONVERTION HELP...?

Former Member
0 Kudos

Hi folks,

can anyone help mre giving file content conversion parameters for the below example.

case 1 : ID, NAME, AGE

201, ABCDE,25

for the above case we use row.fieldNames, row.fieldSeperator, row.endSeperator.

but if the case is like below.

case 2 : ID,"NAME1,NAME2",AGE

202,"ABC,DEF",26

what content parameters should be use for the above case. Here field seperator is expected between the quote's.

thanks in advance.

Srinivas reddy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you want to use NAME1 & NAME2 as single field then use xml.enclosureSign=" and xml.enclosureSignEsc=" " in your FCC.

u can also refer http://help.sap.com/saphelp_nw04/helpdata/EN/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

&

Reg,

NJ

Edited by: nishu jain on Apr 7, 2010 10:49 AM

Edited by: nishu jain on Apr 7, 2010 10:49 AM

Answers (1)

Answers (1)

former_member200962
Active Contributor
0 Kudos

Read "NAME1,NAME2" as a single field and then during the mapping split it accordingly.....so in source field you will have ABC, DEF. Then during mapping use substring function to get the required values ABC and DEF.

Former Member
0 Kudos

Thanks for quick reply abhishek.

But while reading file itself system will split the name field at ',' wright.?

it does't know about the " character open and close. I mean source field will contain "ABC and another will contain DEF" and know age filed i guess.

Correct me if i am wrong.

Thanks in advance.

Srinivas Reddy

Former Member
0 Kudos

Hi, yes you are correct.

if you use the field separator as "," than it will only read ID ,Name 1 ,Name 2 and it wont read age.

if you are sure that the name will come as Name 1 and Name2 than define 4 field like ID,Name 1 ,Name2,Age

and give the field separator as ",".

and do rest of the thing in mapping.

here in your case name 1 and name 2 will be read as "ABC & DEF".

regards,

Navneet

Former Member
0 Kudos

Hi sumit thanks,

No its a runtime expected error or unexpected formate. How to handle this. My regular file is case 1 , but in case 1 how to handle case 2, thats my point.

regards

Srinivas Reddy

former_member200962
Active Contributor
0 Kudos

I was referring to this method: http://wiki.sdn.sap.com/wiki/display/XI/XI_File_Content

the only restriction that seems over here is that all the fields are enclosed within " "

Regards,

Abhishek.