cancel
Showing results for 
Search instead for 
Did you mean: 

Automate the loading process from application server for flat file data

Former Member
0 Kudos

Hi,

We are loading data from Application Server for flat files. Weu2019ve three folders, one for Initial folder, 2nd one for back up folder and 3rd for error folder. When I run the process chain if the data load is successful then I needs to move the file from Initial folder to back up folder. If load fails then it has to move to error folder. Do you have any program to automate this process like If the load is successful move to back up folder and In case of error move to error folder. OR can we handle it any other way?

Advance thank you very much.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sharsha,

I do not have any tips for program right now, but I think, this is possible.

Create a process chain, with an infopackage that reads data from the application server.

Then create two ABAP programs and create two ABAP process variants in the process chain.

These process variants will be connected to the infopackage process variant through a successful and error event respectively.

One ABAP process which will run after the successful event was passed by the preceeding process(infopackage execution) in this case, will read the file in the initial folder and create a file with the same name in the back up folder and delete the file from the initial folder after the copy.

Other ABAP process which runs after unsuccessful completion of preceeding process type(ie infopackage execution) will read the file in the initial folder and make a copy of this file in the error folder and delete the file in the initial folder on the application server.

Brows on the net for ABAP File interface.

You will find the ABAP statements - OPEN DATASET, CLOSE DATASET, READDATASET, GET DATASET, SET DATASET, DELETE DATASET which you could use to create the programs.

Hope it helps you,

Best regards,

Sunmit.

Former Member
0 Kudos

Could you please provide the code and sequence of steps for that?

Once again thank you very much.

Answers (1)

Answers (1)

former_member184494
Active Contributor
0 Kudos

Instead of doing the same in an ABAP program - use the file in the app servere itself.

Use a UNIX or OS Script to do this. Have two scripts - one for successful load and one for erroneous load - then use the OS Command to call the requisite script in your process chain.