Skip to Content
avatar image
Former Member

Running windows batch file from abap

Hi all.

Does anyone know a way to activate a batch file threw abap?

Thanks in advance,

Rebeka

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 31, 2008 at 08:06 AM

    Hi Rebeka,

    Have a look at function module GUI_EXECUTE or WS_EXECUTE. Another way to do this if the batch file is on the server is to use transactions SM69 and SM49 and then function module SXPG_COMMAND_EXECUTE.

    Regards,

    C.A

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Preconditions / Restrictions, for example:

      - Available from R/3 Release 2.1.

      - You can execute extensions .com/.exe/.bat.

      - Install the RFC server program RFCEXEC.EXE with the Desktop Development Kit.

      - The destination (in the example, LOCAL_EXEC) was created with transaction SM59

      Example 1: call the program TEST1.EXE. report ztest1.

      data: Path1(256) type c value 'C:\PROGRAM FILES\TEST1.EXE' .

      call function 'RFC_REMOTE_EXEC'

      destination

      'LOCAL_EXEC'

      exporting

      COMMAND = Path1 .

      Most probably you would have the rfcsdk installed on your desktop

      Regards,

      C.A