Application Development and Automation 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: 
Read only

How Abap run the external EXE file on SAP server?

Former Member
0 Kudos
1,514

Dear All,

I have a external EXE file ,I need use ABAP to run this EXE file.

I know used below code can run external on current user computer,But I want to run the FILE in SAP server ,not user computer client.How to Upload this file to SAP Server? Is it T-CODE:FILE?

CALL FUNCTION 'GUI_EXEC'

EXPORTING

command = 'C:\TEST.EXE'

PARAMETER = P_DATA

IMPORTING

RETURNCODE = RETURNCODE .

Thanks

Sun

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Kudos
831

try to run using CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE.

9 REPLIES 9
Read only

former_member156446
Active Contributor
0 Kudos
832

try to run using CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE.

Read only

0 Kudos
831

hi,J@Y

thanks ,

but how can i upload the EXE file to SAP SERVER?

GUI_UPLOAD ?

Read only

0 Kudos
831

your basis team would best help you...

Read only

carlos_zhang3
Participant
0 Kudos
831

it is very easy :

- 1. copy the program into your server .

- 2. goto sm69 and define the command

- 3. try below abap program

<< Cut and paste without attribution from http://www.sap-basis-abap.com/sapbs029.htm removed; points unassigned >>

carlos

Edited by: Rob Burbank on Mar 27, 2009 6:08 PM

Read only

0 Kudos
831

thanks very much.

close this issue and assigned point to every one.

Read only

Former Member
0 Kudos
831

hi,

use CG3Y uploading files to sap server.

david

Read only

0 Kudos
831

hi,zhan zhaoxin

Thanks a lot.

the CG3z is upload

CG3y is download.

Sun

Read only

0 Kudos
831

Dear all,

our company have no basis to help upload this file.

so i used CG3z upload the TEST.EXE to G:\usr\sap\MND\SYS\global\test,when i use

CL_GUI_FRONTEND_SERVICES->EXECUTE

CALL METHOD Z_CL_GUI_FRONTEND_SERVICES->EXECUTE

EXPORTING

  • DOCUMENT = 'test.exe'

APPLICATION = 'G:\usr\sap\MCD\SYS\global\test.exe'

PARAMETER = PARA

  • MAXIMIZED = ''

  • MINIMIZED = ''

SYNCHRONOUS = 'X'

OPERATION = 'OPEN'.

it said no file in 'G:\usr\sap\MCD\SYS\global\test.exe',i don't konw how to call the EXE file on sap server?

Could you give me some help ?

Thanks

Sun

Read only

0 Kudos
831

CL_GUI_FRONTEND_SERVICES->EXECUTE will only run applications on the presentation server

Use the method provided by Carlos few posts ago