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

EXE program execution on server

Former Member
0 Likes
959

Dear experts,

I have an exe application to execute, that exe application is on the ERP server, I'm using WS_EXECUTE but it is trying to run the application on client not server. For example, the path for the exe application that I'm giving to WS_EXECUTE is being check per my local PC directory not the server directory. can you please advice with a solution? or a refinement for WS_EXECUTE to look up in server not client?

Thanks in advance

Samir

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
890

You can write a OS command to execute the exe file, then configure it in sm49 and then execute the command from your program.

7 REPLIES 7
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
891

You can write a OS command to execute the exe file, then configure it in sm49 and then execute the command from your program.

Read only

0 Likes
890

Dear keshav, thank you for your answer, but can you please complete the figure to me!!

the ERP server is Windows Server 2008, so how the OS command will look like and how to execute it from ABAP?

suppose the appliction is in: c:\sap\test.exe, can you please give me a sample command to run this exe file?

can you please give a sample code how to call that command in ABAP?

thanks in advance

Read only

0 Likes
890

Hi ,

for windows you can use the DOS command to execute the file.

for executing the command from your program use fm SXPG_COMMAND_EXECUTE

Read only

0 Likes
890

>

> suppose the appliction is in: c:\sap\test.exe, can you please give me a sample command to run this exe file?

If it is in the C drive, why are you saying it is on the server ? For this type of .EXE file you've to use the static method: CL_GUI_FRONTEND_SERVICES=>EXECUTE.

Else if it is on server you've to use SXPG_CALL_SYSTEM as already mentioned by Keshav.

BR,

Suhas

Read only

0 Likes
890

Hello Suhas,

The ERP server is a Widnows 2008 Server so it has a C Drive. For interfacing purposes, I have a .NET application as an EXE file to execute in order to post txt files from certain terminals. So all I need is to execute this EXE file which is located in a path like: C:\SAP\Terminal\SAP.exe

So would CL_GUI_FRONTEND_SERVICES=>EXECUTE fit? or I have to create a command and then run the command?

Best Regards,

Read only

0 Likes
890

No, CL_GUI_FRONTEND_SERVICES=>EXECUTE won't work for app server.

You've to create a command to execute the EXE on the app server.

BR,

Suhas

Read only

0 Likes
890

Thank you indeed Keshav, Suhas.