Retrieving parameters for a remote function module using JCo connector

Retrieving parameters for a 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?

    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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.

This was first published in July 2006