By
Published: 09 Jul 2006
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
Explaining the difference between BAPIs and RFCs, how to find BAPIs in SAP and how to determine errors made from BAPI/RFC calls
Continue Reading
Is there a way to view a list of SAP interfaces such as RFC, BAPI and ALE?
Continue Reading
A list of SAP ports for JCo usage.
Continue Reading