cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion

anita_r
Explorer
0 Kudos

Hi All,

I am doing a File - to - JDBC scenario. In this I am getting a CSV file from source.

What is the required information I have to ask the client to convert this flat file to an XML file using XI like file structure, lenths. what are all the other information required for this.

Could anybody please tell me what is csv file, how to convert it to xml.

If possible, please suggest screen shots.

Thanks in advance.

Regards,

Anu.

Accepted Solutions (1)

Accepted Solutions (1)

madanmohan_agrawal
Contributor
0 Kudos

Hi Anu,

You need only one sample CSV file. So you just ask your client to provide you one sample CSV file that they are going to send to XI. Looking into the CSV file you can configure the FCC adapter.

Pls reward points if it helps.

Br,

Madan Agrawal

anita_r
Explorer
0 Kudos

Hi Madan,

1) What does delimiter mean, is it the seperator between field values of the file. If it is, then in case of CSV file it should be ','(comma).

2) So a CSV file is nothing but a text file (.txt) with the seperator between the field values as ','(comma).

Please correct me in the above sentences if I am wrong.

3) So no need to ask the client for the delimiter of the file?

4) How can I see the data of the CSV file, infact how can I open it in my system.

Can I see the seperator i.e ','(comma) if I open a CSV file.

So if I am correct in the above sentences 1 and 2, then what are the conversion parameters to be given for a csv file conversion on sender file adapter.

Can I give the fine name as 'a.txt ' if my file name is 'a' in the file name parameter of source tab and the row.fieldSeparator parameter as ',' in the content conversion tab?

Please help me.

Regards,

Anu.

Edited by: Anu P on May 25, 2008 11:56 AM

Former Member
0 Kudos

Hi Anu,

1. What does delimiter mean, is it the seperator between field values of the file. If it is, then in case of CSV file it should be ','(comma).

Please correct me in the above sentence if I am wrong.

A. yeh its a comma delimiter file.

For eg open your EXCEL sheet and write your names in each column and then save as CSV file you will see when you save it, then oven that csv file in notepad then you will see that comma delimter file. You got it right.

2. So no need to ask for the delimiter of the file?

A. Yes you ask for delimiter file.

3.How can I see the data of the CSV file, infact how can I open it (with which icon it will be displayed in our system).

Can I see the seperator i.e ','(comma) if I open a CSV file.

A. You need to open in notepad you can see the comma delimited file.

Ask your client for .CSV file and then proceed for scenario.

Hey sry i didnt answer this question

2) So a CSV file is nothing but a text file (.txt) with the seperator between the field values as ','(comma).

A. Exartly you are correct

Please Rewards points if it helps.

Thanks

Vikranth

Edited by: Khimavath Vikranth on May 25, 2008 12:17 PM

anita_r
Explorer
0 Kudos

Hi Vikranth,

So if I am correct in the above sentences 1 and 2, then what are the conversion parameters to be given for a csv file conversion on sender file adapter as well as receiver file adapter.

Can I give the fine name as 'a.txt ' if my file name is 'a' in the file name parameter and the row.fieldSeparator parameter as ',' in the content conversion tab?

Please help me.

Regards,

Anita.

ambili_jose
Explorer
0 Kudos

Hi Anita,

In the sender file adapter, provide the foll parameters:-

<node>.fieldSeparator = ,

<node>.fieldNames = field1,field2

Kindly refer the following blog

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1150] [original link is broken] [original link is broken] [original link is broken];

Regards,

Ambili

Answers (4)

Answers (4)

Former Member
0 Kudos

hi anitha

go thru the below weblogs for FCC

Just go through this blogs & links.

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Note: reward points if solution found helpfull

Regards

Chandrakanth.k

Former Member
0 Kudos

Hi Anu,

CSV File :- "Comma Seperator Value" CSV file is nothing but a text file (.txt) with the seperator between the field values as ',' comma.

- You need only one sample CSV file. So you just ask your client to provide you one sample CSV file that they are going to send to XI.

Suppose we have a flat file that looks like this:

"X22",01,"REN",69910,272527,09

"Z11","VR",13245,20050

"Z11","VR",12345,90090

"B16","VR00027"

With various field lengths and have a variable number of substructures for Recordset Structure, then the substructures can occur multiple times,must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. You must specify a key field and the key fields are A1,sub1 and sub2 and the constant values X22, Z11 AND B16.

In the configuration part

1) Specify the adapter type as sender

2) Message protocol to file content conversion

3) Set the Content conversion parameters

a) Document Name-Message Type (mi_test) inserted in the message as the main XML tag

b) Document Namespace-http://wipro/venksworkshop, namespace is added to the name of the document

c) Recordset Name- Root, Specify the name of the structure.

d) Recordset Structure-specify the sequence and the number of substructures A1,1, sub1,, sub2,

e) Key Field Name - KF

f) Key Field Type u2013 String

4) Define the additional parameters

-A1.fieldNames:F1,F2,F3,F4,F5,F6

-A1.fieldSeparator: ,

-A1.endSeparator:'nl'

-A1.processFieldNames: fromConfiguration because in our example the flat file does not contain any header

Add similar Parameters for sub1 and sub2

Add key field value parameters to identify the substructures in the recordset

-A1.keyFieldValue: "X22"

-sub1.keyFieldValue: "Z11"

-sub2.keyFieldValue: "B16"

This configuration should convert the flat file into an XML message like this:

Regards,

Abid Mazhar

sunil_singh13
Active Contributor
0 Kudos

Hi Anu,

CSV means Comma separated values and "Not Comma delimated file".

there is difference between these two.

you can give "," as a field separator between two fields

you can give "nl"(new line) as a delimator value.

Well required info from client can be

what would be the separator for two Rows (It Won't be comma)

To Convert csv file to xml the links given by above Friends are useful.

reward Points if Helpful

Thanks

Sunil Singh

Former Member
0 Kudos

Hi Anu,

.CSV file is nothing but Comma delimited file.

only an excel file can be saved as a CSV file

File content conversion is used for converting flat files (fixed lenght, comma seperated) into XML messages for further processing by an integration engine. The internal XI processing (mapping, routing etc) is based on XML messages hence you need messages to be converted to XML.

Look this document

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

This is other way around its XML - CSV conversion. I will send some more releated to your scenario.

Integration Engine understands only XML messages.Now if u r handling normal text file such as 'tab separated' file,'# separated' file, or a CSV file, you need to convert the content of the file to XML and File Content Conversion mechanism helps to do this job.This File Content conversion mechanism(option)is present with the File Adapters.both Sender and Receiver.

Below are the other blogs go through these blogs

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Please Reward points if it helps

Thanks

Vikranth

Edited by: Khimavath Vikranth on May 25, 2008 10:57 AM

Edited by: Khimavath Vikranth on May 25, 2008 10:59 AM

Edited by: Khimavath Vikranth on May 25, 2008 11:03 AM

Edited by: Khimavath Vikranth on May 25, 2008 11:06 AM