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

RFC call to a program on local machine

Former Member
0 Likes
1,107

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
Read only

Former Member
0 Likes
1,049

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 ).

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,049

hi

try to see the post "unix user for SAP"

I think it'll help you.

Bye enzo

Read only

Former Member
0 Likes
1,050

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 ).

Read only

Former Member
0 Likes
1,049

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

Read only

0 Likes
1,049

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

Read only

0 Likes
1,049

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

Read only

Former Member
0 Likes
1,049

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