Skip to Content
avatar image
Former Member

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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • 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 comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded