05-27-2016 7:04 AM
Hi,
I have a requirement like, i need to run a program in system B from system A. I need to create a program in system A to execute program in system B by background job and save in a spool list.
Later i need to send the list to a email address. Kindly guide how can i approach this.
Thanks in advance.
Regards,
Gopi.
05-27-2016 9:16 AM
Directly program cannot be executed by RFC. First you need to create a RFC function module in System B inside u can call the program using submit statement. In calling system A you can call this RFC FM in a program and schedule in background job.
Thanks,
Rajeev Goswami
05-27-2016 9:51 AM
Thanks Rajeev,
So we don't have any other way to write a program only in System A to call program in System B.?
Regards,
Gopi
05-27-2016 10:11 AM
As Rajeev said, we need a RFC function module to communicate between one system to another. Direct program call in another system cannot be done by RFC.
05-27-2016 10:27 AM
Hi Gopi,
there are options to achieve what you try to do. See ,for example, Execute code from a text file ... | SCN.
However, using the mentioned function modules are not recommanded from a security point of view.
Christian
06-06-2016 3:21 PM
Solution 1
Build a RFC enabled FM, this FM will be called from program in system A with destination System B.
In this wrapper FM:
Solution 2
If you are not allowed to develop in system B, you cannot create the wrapper FM in target system, so in your program in system A you have to call some standard RFC enabled FM to do the same: for example BAPI_XBP_JOB_OPEN, BAPI_XBP_JOB_ADD_ABAP_STEP and BAPI_XBP_JOB_CLOSE.
Regards,
Raymond