问题
I am currently using the SAP .NET Connector 3.0 in C# and I want to get the parameters like Import, Export and Table from a given function module.
Is there any way in C# while using the SAP .NET Connector to do this?
回答1:
Assuming that you are referring to a function module's interface definition, the functionality to query and interpret this RFC meta data from a SAP system is already contained in the connector library.
As an entry point for NCo 3.0, have a look into its official API documentation NCo30APIDocumentation.chm at class RfcFunctionMetadata
and loop over its Items. You can get the RfcFunctionMetadata
object for a specific ABAP function module from method RfcRepository.GetFunctionMetadata(string functionName)
.
回答2:
The most official and efficient way is to call the function RFC_METADATA_GET
. It's explained in the SAP note 1456826 - Reduction in roundtrips with SAP Connectors
来源:https://stackoverflow.com/questions/51473491/getting-rfc-function-module-parameters-in-c-sharp