Skip to Content
author's profile photo Former Member
Former Member

Delete file in SAP/XI

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 06:18 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.