cancel
Showing results for 
Search instead for 
Did you mean: 

file to file scenario

Former Member
0 Kudos

hi all,

I have a file-to -file scenario which is working fine for a single input file.Now my requirement is :

In the input FTP folder we have around 20files.Xi has to take the latest file based on timestamp as the input file and create the output file.

I tried to make changes in sender file adapter-->Processing sequence->By Date, but it didnt work!!!

Can anybody please help me out with this....

regards,

Nisheeta

Ps:Points sure to be awarded

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nisheeta,

Please follow the below thread.. It may be helpful to you..

/people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi

Another solution for this is to create a file using UDF based on timestamp.

The UDF for creating a file with timestamp is below:

Calendar cal = new GregorianCalendar();

int intHour24 = cal.get(Calendar.HOUR_OF_DAY); // 0..23

int intMin = cal.get(Calendar.MINUTE); // 0..59

int intSec = cal.get(Calendar.SECOND); // 0..59

String strTime = intHour24":"intMin":"intSec;

return strTime;

So, after creating the file with the time stamp, you can pick that file.

Regards

Kiran..

Answers (4)

Answers (4)

Former Member
0 Kudos

hi all,

Thanks a lot for the response .Let me try the various possibilities that you all have suggested and i'll come back to u

regards,

Nisheeta

Former Member
0 Kudos

Hi:

From doku:

http://help.sap.com/saphelp_erp2005vp/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

>If you select By Date, files are processed according to their time stamp in the file system, starting with the <i><b>oldest</b></i> file.<

Does this work?

Regards Mario

prabhu_s2
Active Contributor
0 Kudos

hmmmm i can think of variable substitution. based on this it is 'yes' we can do it.

prabhu_s2
Active Contributor
0 Kudos

Using variable substituion: Have a node for file name (say a UDF generating the file name with dattime stamp to it). And in the sender CC use the variable substituion. You can refer to the link below:

In this blog you can ignore the RFC or the UDF for calling the RFC. Inplace have ur UDF for filename generation based on date and time stamp.

<a href="/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i:///people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

Former Member
0 Kudos

Hi

All are same file names ? different ?

In the sender cc which file name you have given ?

All 20 files at a time you wnat to send to the traget ?

One by One means ....let assume your files are file1,file2,file3.....file20

then in the Sender CC just give file name: file*

based on the pickup time it will pick all files one by one

Regards

Prasad