cancel
Showing results for 
Search instead for 
Did you mean: 

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

anand_sampath2
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

anand_sampath2
Participant
0 Kudos

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).

ChrisSolomon
Active Contributor
0 Kudos

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.

former_member184578
Active Contributor
0 Kudos

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

former_member221827
Active Participant
0 Kudos

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.