09-23-2011 1:00 PM
Hi,
I have a Requirement to Insert the Source code to Remote System. I know it is possible in local system with syntax 'INSERT REPORT' . But I want to insert source to Remote system . Is there any Function Module through which I can Insert Source through RFC ?
Regards,
Sachin
09-23-2011 1:37 PM
Hi,
I doubt it but you can create your own RFC...
Oh..In fact perhaps the function RFC_ABAP_INSTALL_AND_RUN would do the trick... Found this a bit dangerous altough...
Kr,
m.
Edited by: Manu D'Haeyer on Sep 23, 2011 2:44 PM
09-26-2011 6:30 AM
09-26-2011 8:22 AM
What are you actually trying to achieve? What is the business problem you are solving? Because what you are proposing is incredibly dangerous. Knowledge of the RFC user used in the connection would allow anyone to run anything on your system.
While I'm at it, anyone reading this message, check if you have a function group ZAW0 installed. If you do, raise a message with SAP asking how this should be secured...
(It's supplied with SAP BO Data services, in the Z space, and, if not carefully handled is very insecure).
Edited by: Matt on Sep 26, 2011 9:22 AM
09-26-2011 10:06 AM
Hi,
Thanks Manu for the response.
Well 'RFC_ABAP_INSTALL_AND_RUN' function module is not working. The Program Name is Hard code named 'Z$$$XRFC' . Even if we pass the 'PROGRAMNAME' parameter it takes the hard code value. Is there any other RFC Function module to insert the source code ?
Regards,
Sachin
09-26-2011 10:16 AM
Despite Mat's warning you still want to proceed?
If you had a look at the BAPI you would have noticed that the program to be inserted only lasts until it has been executed (and then it's deleted). With that in mind: who cares of the program name is hardcoded Z$$$XRFC, ZRUINYOURSYS or ZLOOSEYOURJOB.
Since you insist on having a fixed name, i can only imagine the program you wish to inject is not a temporary one. In which case i wonder why creating and transporting a program the normal way is not sufficient.
...function module is not working.
Trust me it works. It only doesn't work like you want it to.
Edited by: Maen Anachronos on Sep 26, 2011 11:17 AM
09-26-2011 11:31 AM
Despite Mat's warning you still want to proceed?
There's no teaching some people. If the client wants there system wide open to abuse, that's up to them. What will they do if someone uses the function module to send a program that does something like this?
DELETE t000 WHERE mandt NE space
So, here's some more rope, and further demonstration of the huge risk.
You want to create a program dynamically, with a name of your choosing. Simple, send the FM the source code of a program that generates the program you want, with the fixed name. I suggest SAPMSYST as a really good one to play with.