cancel
Showing results for 
Search instead for 
Did you mean: 

How to count the total lines of the file (including the file header)

Former Member
0 Kudos

Hi all,

I am working with Idoc to file scenario(FCC).

I need to map one of the field with a recound count ie.., count of the total lines of the file (including the file header).

Eg:Record Count-- mapping area:Total number of records in the file including file header The total line of the file (including the file header).

Can i get a help on this.

Thanks and Regards,

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi !

If there is a tag of your IDOC that occurs the same quantity of times as file lines you have to create in your target file, you could make a Java user defined function in graphical mapping that "caches the entire queue" (use the corresponding option button), that receives as input that field of the IDOC, and returns the "lenght" (.length property value) of that input parameter (it is an array) as output..that should be the file line quantity..you may also add 1 to that count, for the header.

Hope it helps.

Regards,

Matias.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Use counter in the mapping and map the source node to target element Counter.

For every iteration of the node Counter is incremented.

When mapping is done you will get the last value populated in the element and thats the count.

Regards,