cancel
Showing results for 
Search instead for 
Did you mean: 

Sender file adapter, file existence check in archive folder if exists rename the same and proceed with current file

nageswararao_v2
Participant
0 Kudos

Dear SAP Gurus

Interface flow:

File --> File and RFC.

We have a requirment where PI needs to check the file existency in archive folder and if there is a file already exists with same name we need to rename that file and archive the current file as is...

Note* Customer don't want to add time stamp!!!!

For ex today first message processed with file name "UBMO_delta20140626.xml" and archived as is- UBMO_delta20140626.xml

and customer sends a second file on the same day with same name(UBMO_delta20140626.xml) in this case before archiving PI needs to check whether there is a file exists already in archive folder or not if there is, then it should rename the same like(UBMO_delta20140626_1.xml) and proceed with current message processing and archive the same name(UBMO_delta20140626.xml).

Many Thanks in advance...

Nagesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi Nagesh,

AFAIK - there is no standard way to achieve this in file adapter. you either needs to develop the adapter module or create FTP script to rename the file/move the file.

regards,

Harish

nageswararao_v2
Participant
0 Kudos

Thank you much for your quick prompt Harish,

Can we achieve this using "Run Operating System Command Before Message Processing"?

If so can you please guide me how could I...

Regards,

Nagesh

Harish
Active Contributor
0 Kudos

Hi Nagesh,

I think you can use the feature of run operating system command before message processing. you can refer the below wiki for information.

SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki

regards,

Harish

naveen_chichili
Active Contributor
0 Kudos

Hi Nagesh,

You can achieve this by writing OS level script and execute within your channel.

Thanks and Regards,

Naveen