‎2010 Aug 09 11:09 AM
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
‎2010 Aug 09 11:25 AM
You can write a OS command to execute the exe file, then configure it in sm49 and then execute the command from your program.
‎2010 Aug 09 11:25 AM
You can write a OS command to execute the exe file, then configure it in sm49 and then execute the command from your program.
‎2010 Aug 09 11:33 AM
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
‎2010 Aug 09 11:43 AM
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
‎2010 Aug 09 11:51 AM
>
> 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
‎2010 Aug 09 12:14 PM
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,
‎2010 Aug 09 12:24 PM
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
‎2010 Aug 09 12:34 PM