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: 

How To execute a Remote EXE from SAP ?

Former Member
0 Kudos
145

How To execute a Remote EXE from SAP ?

Hi,

We are having a case where in from SAP(ABAP) we have to execute a remote

EXE. This Remote EXE can be accessable by sharing the Drives or mapping the drive. i tried using WS_EXECUTE or GUI_EXEC it is not working it gives me the following error.

Component MSWINSK.OCX or one of its dependicies not correctly registered: a file is missing or invalid.

Is it that WS_EXECUTE or GUI_EXEC expect the exe to be available locally. ?

or do i have to create the RFC destination ?

we are on win2K.

Regards,

Umesh

8 REPLIES 8

Former Member
0 Kudos
110

You can use SXPG_COMMAND_EXECUTE after defining command for particular OS in SAP.

0 Kudos
110

Sanjay,

to explain you more on this. Actually the O/s we are having in HP/UNIX but the desktop are all win2k. So from GUI we want to execute some EXE with parameter. can you tell me in detailed how to do this step by step or some sample code if you can give.

Regards,

Umesh

0 Kudos
110

maintain your command in SM69. You can search this forum with FM name to find example...

0 Kudos
110

sanjay,

I think still you have not understood my point. Though our SAP is on HP/Unix but the frontend we are having is all Windows. The FM which you have specified is look like more to Unix or application server oriented. For me i have to execute an EXE on presentation server with some parameters.

Again kindly note that this EXE can be accessable by sharing a remote drive. it is not residing on my presnetation server. (e.g. G: or I: etc.)

when i am using ws_execute it is giving me the invalid path error.

kindly help.

0 Kudos
110

did you try

CL_GUI_FRONTEND_SERVICES=>execute method?

0 Kudos
110

FM which i suggested it mostly for application server but since you want it on presentation server you can try what previous poster have suggested....

It seems it may be due to your shared drive or permission etc..

0 Kudos
110

NO i have not try this.... Method.

Do u have any code which can show how to execute an EXE with some parameters.

kindly help me....

0 Kudos
110

Hi Sanjay,

Thanx for your reply.... Actually i tried using GUI_EXEC or other GUI related FM. but as i told u earlier it is having some path problem. & more over it is bit risky also. so now we have decided to go for Machine to machine via WAN.

first of all is this option right.? if yes the following is the update.

first of all our sap is on HP\UNIX the EXE which i want to execute is on windows machine which is Remote machine. This Exe expect some parameters.

It also expect some file to be created in that remote machine which is an input to this exe.

can you pl. tell me step by step how i can do this. & even a progam or FM which can create a file on the remote machine. i dont want to do the shared drive business. because it could be risky.

how abt. RFC port ?