Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Starting an exe file from ABAP program

Former Member
0 Kudos
229

Hi,

I need to start an exe file which is there on the application server from an ABAP program. Kindly give me your suggestions.

Thiru

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos
110

Hi,

1) client

look to class CL_GUI_FRONTEND_SERVICES

method: EXECUTE

or fm WS_EXECUTE (but not released!)

2) server

fm SXPG_COMMAND_EXECUTE and TA SM69.

regards Andreas

5 REPLIES 5

andreas_mann3
Active Contributor
0 Kudos
111

Hi,

1) client

look to class CL_GUI_FRONTEND_SERVICES

method: EXECUTE

or fm WS_EXECUTE (but not released!)

2) server

fm SXPG_COMMAND_EXECUTE and TA SM69.

regards Andreas

Former Member
0 Kudos
110

Hi.

you can find something you want.

refer this site.

http://www.sapdevelopment.co.uk/programs/programssap.htm

and look at program <b>RSBDCOS0</b>(Execute OS Command (Logged in SYSLOG and Trace Files)).

in the code snippet, first, find your os type, and then do it.

* Change working directory
  if not cd_path is initial.
    case opsysgroup.
      when 'AS/400'.
      when 'UNIX'.
        concatenate 'cd' cd_path ';' cmd into cmd
          separated by space.
      when 'WINDOWS NT'.
        concatenate 'cd' cd_path '&' cmd into cmd
          separated by space.
      when others.
    endcase.
  endif.

* Execute command
  REFRESH RESULT.
  CALL 'SYSTEM' ID 'COMMAND' FIELD CMD
                ID 'TAB'     FIELD RESULT-*SYS*.

I wish I could help you

regards

kyung woo

0 Kudos
110

I use command cd in abap.It can't work.How do I do

jayanthi_jayaraman
Active Contributor
0 Kudos
110

Hi,

Here is the sample coding for the method suggested by Andreas.

Call web address from within SAP

DATA: gd_webaddr TYPE string VALUE 'www.sapdevelopment.co.uk'.

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = gd_webaddr

EXCEPTIONS

OTHERS = 1.

0 Kudos
110

Thanks, It works fine.