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 to execute a program

Former Member
0 Kudos
726

Hi everyone.

Does anyone know if there's a ready made RFC function for executing an ABAP program.

I need to run a program on a remote system with parameters from my local system.

Any ideas?

Thanks, Nachshon.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
362

Hi Nachshon,

as you will also pass some values to parameters of the program I think you have to create your own rfc-fm in the other system.

regards

Siggi

6 REPLIES 6

Former Member
0 Kudos
363

Hi Nachshon,

as you will also pass some values to parameters of the program I think you have to create your own rfc-fm in the other system.

regards

Siggi

andreas_mann3
Active Contributor
0 Kudos
362

Hi ,

here's a very <b>dangerous</b> fm

<b>RFC_ABAP_INSTALL_AND_RUN</b>

I'd not use fm on a productive remote system !

regards Andreas

Former Member
0 Kudos
362

Hi Nachshon,

Take a look at FM RFC_ABAP_INSTALL_AND_RUN; you will have to add a little logic to include selection parameters.

Regards,

John.

Former Member
0 Kudos
362

Thanks for the replays.

In order to use FM RFC_ABAP_INSTALL_AND_RUN I will have to pass the program code in the table, and that as mentioned, is not a safe thing to do.

I guess I'll have to write a dedicated FM .

Thanks, Nachshon.

Former Member
0 Kudos
362

Also, perhaps, you can write an RFC enabled function that accepts a program name to run and a table of structure RSPARAMS. Then the function can execute the program via:

SUBMIT rep WITH SELECTION-TABLE seltab

This way you can run any program remotely through this one function. Other parameters could be used to set standard program execution options. See the help documentation for SUBMIT.

The down side is that there could be security concerns with this solution. That should be considered before trying this.

Hope this helps.

Former Member
0 Kudos
362

Do you want to run online / (or) execute the program in batch.

Thanks