cancel
Showing results for 
Search instead for 
Did you mean: 

Flat file whitout id

Former Member
0 Kudos

Hi all!

I have to proccess a Flat file like this:

7093;20090330;2358519924.42;2639024511.62;782986063.72;1063490650.92;8

20090330;26100741.00;1;15;Nota Débito

20090330;756875163.00;1;15;Nota Débito

20090330;739214135.00;2;18;Nota Crédito

20090330;276225232.00;2;18;Nota Crédito

where the 1st row is always Header and the flolow rows are always Lines..

I don't know how to set this in the communication channel beacose i don't have a ID for the rows.

Thaks!!!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

I am not sure whether we can achieve this with using FCC without Kieyfield value.

Instead you can use Java Mapping,

1. Use For loop and read a file by each line.

2. if i==o assign the values to Header node else to Records.

3. Use split function(java) to store the values for each elements.

Regards

Ramg

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Correct me if wrong.

You have a flat file with the data which you have mentioned.You dont have any source structure

already defined and you want to create the structure in such a way that the first line is taken as

header and all the other lines comes as line items under the header.Basically you are trying to

read line by line (not using the ; delimiter in your file.)

What is the target structure ? is it similar to header and line Item?

You can try one thing ,read the file Line by Line , you can try the FCC as mentioned in this [Blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2174] [original link is broken] [original link is broken] [original link is broken];.

You can have a temporary structure first and then you can map the fields as required to the original structure.

Regards,

Srinivas

stefan_grube
Active Contributor
0 Kudos

you could create a generic structure for header and lines and identify the header in mapping for example with index or count function.