Problem solve Get help with specific problems with your technologies, process and projects.

Retrieving parameters for a remote function module using JCo connector

Retrieving a list of parameters for a specific remote function module using JCo connector.

How do I retrieve a list of parameters for a specific remote function module using SAP's JCo connector?
This can be a little tricky due to the nature of the RFC/RFM interface. Because an RFC is made up of parameters, structures and tables you will actually need to use two separate RFCs to retrieve all structural data. The first RFC retrieves a list of names of all the various import/export parameters, structures, and tables used to invoke the RFC itself. In order to get this list you would call "RFC_GET_FUNCTION_INTERFACE" passing in the name of the RFC you want to look up.

The second RFC retrieves a list of individual data elements associated with a specific structure or table. Obviously, you don't need to invoke this RFC for import/export parameters as these are single fields and not structures. You would need to call "RFC_GET_STRUCTURE_DEFINITION" for each individual structure name returned from the previous RFC call.

I have already provided the code for this application as part of a SearchSAP.com IT checklist. Do a search for "jco cookbook" on SearchSAP.com for the complete source code.

Dig Deeper on SAP integration