cancel
Showing results for 
Search instead for 
Did you mean: 

Delete file in SAP/XI

Former Member
0 Kudos

Hi,

I have the following scenery: File -> XI -> RFC

My need is to read the file, to call the present rfc in R/3 and

if the function be executed with success, I will have to delete the file.

How do I make that?

Is it necessary to use BPM or not?

Thanks,

Sérgio

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sergio,

After your RFC call you can check the response of the RFC and execute a OS command. To execute a OS command you can have dummy message mapping step after your send step and call this shell script inside user defined function in the message mapping. You need a BPM for this.

The other alternative is after you pick the file delete it and archive into another directory. Even if your RFC fails the original file will still be available in Archive directory for manual reprocessing.

Regards

Anand

Former Member
0 Kudos

Hi Anand,

Do you have any example of how I make that using bpm?

Thanks

Former Member
0 Kudos

Hi Sergio,

I don't have any similar example.

may be i could answer any specific qustions you have.

you can use this java code to call the shell script from message mapping.

String command = "/home/test/scriptname.sh"

Runtime rt = Runtime,getRuntime();

rt.exec(command);

Simply append the parameters like file name to be deleted (separated by spaces) to the command String.

Regards

Anand