cancel
Showing results for 
Search instead for 
Did you mean: 

Infopackage routine to rename flat file and move to different directory

Former Member
0 Kudos

Hi Guys,

I have a problem where I am loading flat file into ODS from application server. I need to load the file everyday, rename it and move it to a different directory on server. The new file will always have the same file name.

Can somebody please tell me how to write routine in the Infopackage.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

former_member205352
Active Contributor
0 Kudos

Dont move the file to different folder all the time instead replace your old file with new file in the application server and load.

Hope this helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sneralla,

It's usually the basis who has access to the application server. You can overwrite the file with the same name that should not be problem.

Regards,

Hima

Former Member
0 Kudos

Hi Hima.

I am looking for the code in which I can move the file to a different folder on application server and keep the same filename and path for the file that would be next scheduled.

Any ideas?

Thanks

Former Member
0 Kudos

Hi sneralla,

Infopackage selection routine is to pick up right file based on name of the file.

You can not use this option to move file from one folder to another. You can only move file to another folder once data has been loaded successfully.

I suggest,

Option1: Create an ABAP program(which moves file to another folder) and include in Process Chain after above infopackage. ABAP program has some performance issues.

Option2: Check with your Basis, and use some OS level commands to move file to another folder(its faster).

Option3: Using shell script and FTP files can be moved to another folder.

Or better way, add date in file name, then you need to move as file name changes every day.

Hope it Helps

Srini