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

Former Member
0 Likes
1,794

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

Former Member
0 Likes
1,430

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

Former Member
0 Likes
1,431

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

Read only

andreas_mann3
Active Contributor
0 Likes
1,430

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

Read only

Former Member
0 Likes
1,430

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.

Read only

Former Member
0 Likes
1,430

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.

Read only

Former Member
0 Likes
1,430

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.

Read only

Former Member
0 Likes
1,430

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

Thanks