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: 

RFC call to a program on local machine

Former Member
0 Kudos

Hi,

I need to invoke an application from SAP GUI, and this application resides on the each local machine that is using SAP GUI. I assume it is possible using the RFC calls, but since I am a beginner in this area I dont have much clues about the same. Therefore I requests the experts to provide me any pointers or step by step guide that could help me in accomplishing the same.

thanks and regards,

Piyush

1 ACCEPTED SOLUTION

Former Member
0 Kudos

CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE

EXPORTING

  • DOCUMENT =

APPLICATION = 'excel'

  • PARAMETER =

  • DEFAULT_DIRECTORY =

  • MAXIMIZED =

  • MINIMIZED =

  • SYNCHRONOUS =

  • OPERATION = 'OPEN'

  • EXCEPTIONS

  • CNTL_ERROR = 1

  • ERROR_NO_GUI = 2

  • BAD_PARAMETER = 3

  • FILE_NOT_FOUND = 4

  • PATH_NOT_FOUND = 5

  • FILE_EXTENSION_UNKNOWN = 6

  • ERROR_EXECUTE_FAILED = 7

  • SYNCHRONOUS_FAILED = 8

  • NOT_SUPPORTED_BY_GUI = 9

  • others = 10

.

You can use a document like 'C:/test.xls' or application as above to start an application on your PC.

Cheers.

( Dont forget to reward if answers were helpful ).

6 REPLIES 6

Former Member
0 Kudos

hi

try to see the post "unix user for SAP"

I think it'll help you.

Bye enzo

Former Member
0 Kudos

CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE

EXPORTING

  • DOCUMENT =

APPLICATION = 'excel'

  • PARAMETER =

  • DEFAULT_DIRECTORY =

  • MAXIMIZED =

  • MINIMIZED =

  • SYNCHRONOUS =

  • OPERATION = 'OPEN'

  • EXCEPTIONS

  • CNTL_ERROR = 1

  • ERROR_NO_GUI = 2

  • BAD_PARAMETER = 3

  • FILE_NOT_FOUND = 4

  • PATH_NOT_FOUND = 5

  • FILE_EXTENSION_UNKNOWN = 6

  • ERROR_EXECUTE_FAILED = 7

  • SYNCHRONOUS_FAILED = 8

  • NOT_SUPPORTED_BY_GUI = 9

  • others = 10

.

You can use a document like 'C:/test.xls' or application as above to start an application on your PC.

Cheers.

( Dont forget to reward if answers were helpful ).

Former Member
0 Kudos

Hi Sanjay,

though it did help to invoke the exe on the front-end machine, but I also need to accept a return value from the exe. I was just wondering if there is a way to accept the return value as well?

thanks

Piyush

0 Kudos

Not knowing what program you are calling, it's difficult to say, but if the program could save a file either to unix or the local PC, the ABAP could upload it after the program has been closed.

Rob

0 Kudos

I guess the poster is talking about some activex dll or ocx. in this case yes you can communicate with these programs.

check out the following weblog for details.

<a href="/people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework">Using Classic ActiveX Controls in the ABAP Control Framework</a>

Regards

Raja

Former Member
0 Kudos

Hi,

is the exe in your control, like is it something you wrote or is it word or something?

If you own the exe one way is to change it so that it calls SAP back and tells it what it returned, this is like a remote shell to the exe then it uses RFC to put the data back to sap?

If this is what you need it can help you but will need a bit more info.

Kieran