javasaprfcjco

What minimum permissions/access rights does a SAP user need to be able to make RFC calls using JCo?


I'm trying to call a SAP function RFC_SYSTEM_INFO from Java application. I am using JCo 3.0 for that. I'm using the example code provided from JCo documentation.

I get an exception

Caused by: RfcException: [IA1|CZVBIIN101] 
message: No RFC authorization for function module DDIF_FIELDINFO_GET. 
Return code: RFC_SYS_EXCEPTION(3) 
error group: 104 
key: RFC_ERROR_SYSTEM_FAILURE 
message class: 00 
message type: X 
message number: 341 
message parameter 0: RFC_NO_AUTHORITY 

According to my colleague who was looking in the SAP log (I know nothing about SAP, he knows), before calling the function RFC_SYSTEM_INFO, JCo makes about 7 calls, some of which require the "developer's permissions". So, what we don't understand is why we would need developer's permissions for such a simple call? Why does JCo make so many calls instead of making only one call?

For example, I don't understand why we need to call the function module DDIF_FIELDINFO_GET? I just want to call RFC_SYSTEM_INFO, not DDIF_FIELDINFO_GET. Is it possible to call RFC_SYSTEM_INFO without calling RFC_SYSTEM_INFO?

What are the minimum access rights the user should have to be able to make RFC calls?


Solution

  • It's all in the documentation. :-)

    The Java connector needs some basic permissions to read the metadata of the function module - otherwise it wouldn't know how to encode and decode the data for this specific backend system. DDIF_FIELDINFO_GET is a part of that process.

    (One has to keep in mind that besides the release-dependent changes, many structures can be extended or modified, so even if you're calling the same function module in different systems, there's no guarantee that the structures will be exactly the same.)