Skip to Content

whether there exists a Remote Function Module to call any given regular function module

Hello All,

Is there a way to dynamically call any given regular function module via a Remote Function Module (RFM) ? I need to use various regular function modules externally and cannot create/convert them to RFMs in each of these external SAP systems.

In a related case, to dynamically access tables remotely from my scripts, I use the RFM RFC_READ_TABLE and supply table and field names to read the tables.

Similarly is there any available RFM with which I can dynamically execute any given regular function module? I understand that I cannot use regular function module which produce GUI output. I only want to remotely call some regular function modules in any given SAP system.

Thank you

-Regards,

Arvind

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Dec 27, 2016 at 03:55 PM

    I don't believe there exists a function which can do what you're asking, not that you couldn't create one (dynamic function calling within an RFC). I feel like this would be a security concern being able to call any SAP function remotely.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 27, 2016 at 04:24 PM

    Hi,

    There is no standard function. You could create one Wrapper RFC to dynamically call any FM via the wrapper RFC.

    Check the below wiki to call Function dynamically. Create a wrapper RFC which accepts the Function module name and the parameters. https://wiki.scn.sap.com/wiki/display/Snippets/ABAP+-+Dynamic+Function+Call

    Regards,

    Kiran

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 27, 2016 at 06:14 PM

    There is a way (function) to send in "code" to the function and have it execute the code ....which can be anything including calling some function itself. However, this is a BIG security hole/risk that was addressed years ago and THAT particular functionality is usually locked down and only used in extreme circumstances (none I have even heard!). So in the "old days", yes, you could do this. Now? Not so sure it would fly with a security team.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 28, 2016 at 11:33 AM

    Thanks guys for the answers. I realize that it is a security issue to allow users to call regular FMs via RFMs. I was hoping that there may be some authorization object for function modules like S_TABU_DIS is for tables (restricts table access and activity).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.