cancel
Showing results for 
Search instead for 
Did you mean: 

RFC to File scenario Concatenate and sort files

Former Member
0 Kudos

Hi,

I have an RFC->File Scenario where I am supposed to pick the multiple flat files ABC<MsgGUID>.txt from a directory on the FTP server and concatenate the multiple flat files into a single one and sort the flat file based on the some key fields as key.

If the file has multiple lines with same values for the key fields then i am suppposed to write only a single line by discarding duplicate lines with the same key and the field quantity has to be summed up.

How can I go about this kindly help me

Thank you,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

can u please clearly expalin ur scenario?u r telling sender is RFC?Wht is ur exact requirement?

Best Regards,

Harleen Kaur Chadha

Former Member
0 Kudos

Its RFC to File.

I am talking about the receiver side

I need to pick multiples files which are in a directory on FTP server and then i need to concatenate multiple files into a single file and then sort the files based on some key fields and if i find multiple lines with same values for the key fields i am supposed to fetch one only line out of the multiple lines(which have same values for the key fields) and at the same time i need to sum the QUANTITY field.

I hope you have got some idea

Kindly explain

Thank you

Former Member
0 Kudos

Hi Deepak,

your scenario is RFC to file,but once the files has reached ftp server its out of XI boundary u cant do anything from XI side,this can be done in Xi only once u have created multiple files fom there u can generate single file using bpm and post it to file server.Please ask any further questions?

Best Regards,

Harleen Kaur Chadha

Edited by: Harleen Chadha on May 8, 2008 7:22 AM

Former Member
0 Kudos

Hey,

Create a message mapping between the file structures.

Write a udf(user defined funtion)

Take the key field value as input and compare it with the subsequent inputs.

filter out the duplicate values.

use the udf for the other values so as to forward the values or nt.

reward points if helpful..