SAP NetWeaver RFC SDK 7.50
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Metadata for function modules

Functions for creating, reading and traversing through function module descriptions. More...

Functions

DECL_EXP
RFC_FUNCTION_DESC_HANDLE
SAP_API 
RfcCreateFunctionDesc (SAP_UC const *name, RFC_ERROR_INFO *errorInfo)
 Creates an empty function description with the given name. More...
 
DECL_EXP RFC_RC SAP_API RfcGetFunctionName (RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO *errorInfo)
 Returns a function module's DDIC name. More...
 
DECL_EXP RFC_RC SAP_API RfcAddParameter (RFC_FUNCTION_DESC_HANDLE funcDesc, const RFC_PARAMETER_DESC *paramDescr, RFC_ERROR_INFO *errorInfo)
 Adds a new parameter (IMPORTING, EXPORTING, CHANGING, TABLES) to the function description. More...
 
DECL_EXP RFC_RC SAP_API RfcGetParameterCount (RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned *count, RFC_ERROR_INFO *errorInfo)
 Returns the number of parameters in the function module definition. More...
 
DECL_EXP RFC_RC SAP_API RfcGetParameterDescByIndex (RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned index, RFC_PARAMETER_DESC *paramDesc, RFC_ERROR_INFO *errorInfo)
 Reads the metadata description of the function module's ith parameter. More...
 
DECL_EXP RFC_RC SAP_API RfcGetParameterDescByName (RFC_FUNCTION_DESC_HANDLE funcDesc, SAP_UC const *name, RFC_PARAMETER_DESC *paramDesc, RFC_ERROR_INFO *errorInfo)
 Reads the metadata description of a function module parameter given by name. More...
 
DECL_EXP RFC_RC SAP_API RfcAddException (RFC_FUNCTION_DESC_HANDLE funcDesc, const RFC_EXCEPTION_DESC *excDesc, RFC_ERROR_INFO *errorInfo)
 Adds a new ABAP Exception to the function description. More...
 
DECL_EXP RFC_RC SAP_API RfcGetExceptionCount (RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned *count, RFC_ERROR_INFO *errorInfo)
 Returns the number of ABAP Exceptions of the function module. More...
 
DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByIndex (RFC_FUNCTION_DESC_HANDLE funcDesc, unsigned index, RFC_EXCEPTION_DESC *excDesc, RFC_ERROR_INFO *errorInfo)
 Reads the metadata description of the function module's ith ABAP Exception. More...
 
DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByName (RFC_FUNCTION_DESC_HANDLE funcDesc, SAP_UC const *name, RFC_EXCEPTION_DESC *excDesc, RFC_ERROR_INFO *errorInfo)
 Reads the metadata description of a function module's ABAP Exception given by name. More...
 
DECL_EXP RFC_RC SAP_API RfcEnableBASXML (RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO *errorInfo)
 Enables this function module for the basXML serialization format. More...
 
DECL_EXP RFC_RC SAP_API RfcIsBASXMLSupported (RFC_FUNCTION_DESC_HANDLE funcDesc, int *isEnabled, RFC_ERROR_INFO *errorInfo)
 Returns whether this function module has been enabled for basXML. More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyFunctionDesc (RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_ERROR_INFO *errorInfo)
 Deletes the function description and releases the allocated resources. More...
 
DECL_EXP RFC_RC SAP_API RfcEnableAbapClassException (RFC_FUNCTION_HANDLE funcHandle, RFC_CONNECTION_HANDLE rfcHandleRepository, RFC_ERROR_INFO *errorInfo)
 Enables this function handle for ABAP class exception support. More...
 
DECL_EXP RFC_RC SAP_API RfcIsAbapClassExceptionEnabled (RFC_FUNCTION_HANDLE funcHandle, int *isEnabled, RFC_ERROR_INFO *errorInfo)
 Checks whether this function handle has been enabled for ABAP class exception support. More...
 

Detailed Description

Functions for creating, reading and traversing through function module descriptions.

Function Documentation

DECL_EXP RFC_RC SAP_API RfcAddException ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
const RFC_EXCEPTION_DESC excDesc,
RFC_ERROR_INFO errorInfo 
)

Adds a new ABAP Exception to the function description.

Note
After the function description has been used via RfcCreateFunction() or RfcAddFunctionDesc(), it can no longer be modified!
Parameters
[in]funcDescThe function module's metadata description.
[in]*excDescThe description of the exception to add.
[out]*errorInfoNot much that can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcAddParameter ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
const RFC_PARAMETER_DESC paramDescr,
RFC_ERROR_INFO errorInfo 
)

Adds a new parameter (IMPORTING, EXPORTING, CHANGING, TABLES) to the function description.

Note
After the function description has been used via RfcCreateFunction() or RfcAddFunctionDesc(), it can no longer be modified!
Parameters
[in]funcDescThe function module description.
[in]*paramDescrMetadata description of the new parameter.
[out]*errorInfoMore details in case something goes wrong.
Returns
RFC_RC
DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcCreateFunctionDesc ( SAP_UC const *  name,
RFC_ERROR_INFO errorInfo 
)

Creates an empty function description with the given name.

Add parameter descriptions and exception descriptions to the new RFC_FUNCTION_DESC_HANDLE via RfcAddParameter() and RfcAddException().
After the handle was used for creating a container, any modifications are forbidden.

Parameters
[in]*nameThe name of the function module.
[out]*errorInfoProbably not enough memory left?!
Returns
An empty function description that can be used for constructing hard-coded metadata.
DECL_EXP RFC_RC SAP_API RfcDestroyFunctionDesc ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
RFC_ERROR_INFO errorInfo 
)

Deletes the function description and releases the allocated resources.

Only descriptions, which are not stored in a repository cache and not used by the application, can be deleted. Deleting a cached description will cause an error, and deleting a description that is still in use, will lead to a crash.

Parameters
[in]funcDescA function description.
[out]*errorInfoShould always return successfully...
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcEnableAbapClassException ( RFC_FUNCTION_HANDLE  funcHandle,
RFC_CONNECTION_HANDLE  rfcHandleRepository,
RFC_ERROR_INFO errorInfo 
)

Enables this function handle for ABAP class exception support.

R/3 Systems from kernel release 7.11 on support ABAP class exceptions. Calling RfcEnableAbapClassException() allows an RFC client to inform the ABAP backend that it can handle ABAP class exceptions for the current function call using this function handle. If the ABAP backend supports class-based exceptions as well, it can now safely throw such an exception.
Needs to be called before the corresponding RfcInvoke().

Parameters
[in]funcHandleFunction module data container.
[in]rfcHandleRepositoryRFC connection handle to the repository system from where the missing metadata can be dynamically retrieved during de-serializing the received ABAP class exceptions. This handle can be NULL but should not be the same that is used for the RFC call itself.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcEnableBASXML ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
RFC_ERROR_INFO errorInfo 
)

Enables this function module for the basXML serialization format.

R/3 Systems from kernel release 7.10 on support a new serialization format: basXML (binary ABAP serialization). Calling RfcEnableBASXML() allows the RFC library to transport this function module's data via the basXML format, if the target backend supports it and the connection parameter NO_BASXML is either not set or set to "0".

Parameters
[in]funcDescThe function module's metadata description.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetExceptionCount ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
unsigned *  count,
RFC_ERROR_INFO errorInfo 
)

Returns the number of ABAP Exceptions of the function module.

Parameters
[in]funcDescThe function module's metadata description.
[out]*countThe number of the function module's ABAP Exceptions.
[out]*errorInfoNot much that can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByIndex ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
unsigned  index,
RFC_EXCEPTION_DESC excDesc,
RFC_ERROR_INFO errorInfo 
)

Reads the metadata description of the function module's ith ABAP Exception.

Parameters
[in]funcDescThe function module's metadata description.
[in]indexThe index of the exception to describe.
[out]*excDescThe ABAP Exception's metadata description.
[out]*errorInfoIndex out of bounds?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetExceptionDescByName ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
SAP_UC const *  name,
RFC_EXCEPTION_DESC excDesc,
RFC_ERROR_INFO errorInfo 
)

Reads the metadata description of a function module's ABAP Exception given by name.

Parameters
[in]funcDescThe function module's metadata description.
[in]*nameThe name of the exception to describe.
[out]*excDescThe ABAP Exception's metadata description.
[out]*errorInfoNo such ABAP Exception?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetFunctionName ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
RFC_ABAP_NAME  bufferForName,
RFC_ERROR_INFO errorInfo 
)

Returns a function module's DDIC name.

Parameters
[in]funcDescThe function module description.
[out]bufferForNameWill receive the function module's DDIC name.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetParameterCount ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
unsigned *  count,
RFC_ERROR_INFO errorInfo 
)

Returns the number of parameters in the function module definition.

Parameters
[in]funcDescThe function module's metadata description.
[out]*countThe number of parameters (IMPORTING, EXPORTING, CHANGING, TABLES).
[out]*errorInfoNothing can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetParameterDescByIndex ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
unsigned  index,
RFC_PARAMETER_DESC paramDesc,
RFC_ERROR_INFO errorInfo 
)

Reads the metadata description of the function module's ith parameter.

Note
Mostly be useful when looping over all parameters of a function module.
Parameters
[in]funcDescThe function module's metadata description.
[in]indexThe index of the parameter to describe.
[out]*paramDescMetadata description of the specified parameter.
[out]*errorInfoIndex out of bounds?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetParameterDescByName ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
SAP_UC const *  name,
RFC_PARAMETER_DESC paramDesc,
RFC_ERROR_INFO errorInfo 
)

Reads the metadata description of a function module parameter given by name.

Parameters
[in]funcDescThe function module's metadata description.
[in]*nameThe name of the parameter to describe.
[out]*paramDescMetadata description of the specified parameter.
[out]*errorInfoNo such parameter?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcIsAbapClassExceptionEnabled ( RFC_FUNCTION_HANDLE  funcHandle,
int *  isEnabled,
RFC_ERROR_INFO errorInfo 
)

Checks whether this function handle has been enabled for ABAP class exception support.

R/3 Systems from kernel release 7.11 on support ABAP class exception. Typically, an RFC server can use this function in order to find out, whether the function module currently being processed has ABAP class exceptions enabled in the ABAP backend. Only if this is the case, can the RFC Server safely throw an ABAP class exception.

Parameters
[in]funcHandleFunction module data container.
[out]*isEnabledFlag indicating whether the function handle has been enabled for ABAP class based exception support.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcIsBASXMLSupported ( RFC_FUNCTION_DESC_HANDLE  funcDesc,
int *  isEnabled,
RFC_ERROR_INFO errorInfo 
)

Returns whether this function module has been enabled for basXML.

See RfcEnableBASXML()

Parameters
[in]funcDescThe function module's metadata description.
[out]*isEnabled0 = false, 1 = true.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC