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

Functions for creating, reading and traversing through ABAP class descriptions. More...

Functions

DECL_EXP RFC_CLASS_DESC_HANDLE
SAP_API 
RfcCreateClassDesc (SAP_UC const *name, RFC_ERROR_INFO *errorInfo)
 Creates an empty class description with the given name. More...
 
DECL_EXP RFC_RC SAP_API RfcGetClassName (RFC_CLASS_DESC_HANDLE classDesc, RFC_ABAP_NAME bufferForName, RFC_ERROR_INFO *errorInfo)
 Returns the class's DDIC name. More...
 
DECL_EXP RFC_RC SAP_API RfcAddClassAttribute (RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_ATTRIBUTE_DESC *attrDesc, RFC_ERROR_INFO *errorInfo)
 Adds a new attribute (field, structure, table, method) to the class description. More...
 
DECL_EXP RFC_RC SAP_API RfcGetClassAttributesCount (RFC_CLASS_DESC_HANDLE classDesc, unsigned *count, RFC_ERROR_INFO *errorInfo)
 Returns the number of parameters in the function module definition. More...
 
DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByIndex (RFC_CLASS_DESC_HANDLE classDesc, unsigned index, RFC_CLASS_ATTRIBUTE_DESC *attrDesc, RFC_ERROR_INFO *errorInfo)
 Reads the metadata description of the class attribute. More...
 
DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByName (RFC_CLASS_DESC_HANDLE classDesc, SAP_UC const *name, RFC_CLASS_ATTRIBUTE_DESC *attrDesc, RFC_ERROR_INFO *errorInfo)
 Reads the metadata description of a class attribute given by name. More...
 
DECL_EXP RFC_RC SAP_API RfcGetParentClassByIndex (RFC_CLASS_DESC_HANDLE classDesc, RFC_CLASS_NAME name, unsigned index, RFC_ERROR_INFO *errorInfo)
 Returns the parent classes of the given class. More...
 
DECL_EXP RFC_RC SAP_API RfcGetParentClassesCount (RFC_CLASS_DESC_HANDLE classDesc, unsigned *parentClassesCount, RFC_ERROR_INFO *errorInfo)
 Returns the number of parent classes of the given class. More...
 
DECL_EXP RFC_RC SAP_API RfcAddParentClass (RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_NAME name, RFC_ERROR_INFO *errorInfo)
 Sets the parent classes of the given class. More...
 
DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfaceByIndex (RFC_CLASS_DESC_HANDLE classDesc, unsigned index, RFC_CLASS_NAME name, RFC_ERROR_INFO *errorInfo)
 Returns the implemented interfaces of the given class. More...
 
DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfacesCount (RFC_CLASS_DESC_HANDLE classDesc, unsigned *implementedInterfacesCount, RFC_ERROR_INFO *errorInfo)
 Returns the number of parent interfaces of the given class. More...
 
DECL_EXP RFC_RC SAP_API RfcAddImplementedInterface (RFC_CLASS_DESC_HANDLE classDesc, const RFC_CLASS_NAME name, RFC_ERROR_INFO *errorInfo)
 Adds an interface to the list of implemented interfaces of the given class. More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyClassDesc (RFC_CLASS_DESC_HANDLE classHandle, RFC_ERROR_INFO *errorInfo)
 Deletes the class description and releases the allocated resources. More...
 

Detailed Description

Functions for creating, reading and traversing through ABAP class descriptions.

Function Documentation

DECL_EXP RFC_RC SAP_API RfcAddClassAttribute ( RFC_CLASS_DESC_HANDLE  classDesc,
const RFC_CLASS_ATTRIBUTE_DESC attrDesc,
RFC_ERROR_INFO errorInfo 
)

Adds a new attribute (field, structure, table, method) to the class description.

Note
After the function description has been used via RfcCreateAbapObject() or RfcAddClassDesc(), it can no longer be modified!
Parameters
[in]classDescThe class description.
[in]*attrDescMetadata description of the new class attribute.
[out]*errorInfoMore details in case something goes wrong.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcAddImplementedInterface ( RFC_CLASS_DESC_HANDLE  classDesc,
const RFC_CLASS_NAME  name,
RFC_ERROR_INFO errorInfo 
)

Adds an interface to the list of implemented interfaces of the given class.

Parameters
[in]classDescThe class metadata description.
[in]nameName of implemented interface to be added.
[out]*errorInfoNot much can go wrong here except out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcAddParentClass ( RFC_CLASS_DESC_HANDLE  classDesc,
const RFC_CLASS_NAME  name,
RFC_ERROR_INFO errorInfo 
)

Sets the parent classes of the given class.

Parameters
[in]classDescThe class metadata description.
[in]nameParent class name to be added.
[out]*errorInfoNo such parameter?
Returns
RFC_RC
DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcCreateClassDesc ( SAP_UC const *  name,
RFC_ERROR_INFO errorInfo 
)

Creates an empty class description with the given name.

Add attribute descriptions to the new RFC_CLASS_DESC_HANDLE via RfcAddAttribute().
After the handle was used for creating a container, any modifications are forbidden.

Parameters
[in]*nameThe name of the ABAP class.
[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 RfcDestroyClassDesc ( RFC_CLASS_DESC_HANDLE  classHandle,
RFC_ERROR_INFO errorInfo 
)

Deletes the class 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]classHandleThe class description to be deleted.
[out]*errorInfoMore details in case the description can not be destroyed.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByIndex ( RFC_CLASS_DESC_HANDLE  classDesc,
unsigned  index,
RFC_CLASS_ATTRIBUTE_DESC attrDesc,
RFC_ERROR_INFO errorInfo 
)

Reads the metadata description of the class attribute.

Note
Is useful mostly when looping over all attributes of a class.
Parameters
[in]classDescThe class metadata description.
[in]indexThe index of the attributes to describe.
[out]*attrDescMetadata description of the class attribute.
[out]*errorInfoIndex out of bounds?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetClassAttributeDescByName ( RFC_CLASS_DESC_HANDLE  classDesc,
SAP_UC const *  name,
RFC_CLASS_ATTRIBUTE_DESC attrDesc,
RFC_ERROR_INFO errorInfo 
)

Reads the metadata description of a class attribute given by name.

Parameters
[in]classDescThe class metadata description.
[in]*nameThe name of the parameter to describe.
[out]*attrDescMetadata description of the class attribute.
[out]*errorInfoNo such parameter?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetClassAttributesCount ( RFC_CLASS_DESC_HANDLE  classDesc,
unsigned *  count,
RFC_ERROR_INFO errorInfo 
)

Returns the number of parameters in the function module definition.

Parameters
[in]classDescThe class description.
[out]*countThe number of attributes.
[out]*errorInfoNothing can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetClassName ( RFC_CLASS_DESC_HANDLE  classDesc,
RFC_ABAP_NAME  bufferForName,
RFC_ERROR_INFO errorInfo 
)

Returns the class's DDIC name.

Parameters
[in]classDescThe class description.
[out]bufferForNameWill receive the function module's DDIC name (zero terminated).
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfaceByIndex ( RFC_CLASS_DESC_HANDLE  classDesc,
unsigned  index,
RFC_CLASS_NAME  name,
RFC_ERROR_INFO errorInfo 
)

Returns the implemented interfaces of the given class.

Parameters
[in]classDescThe class metadata description.
[in]indexIndex of the implemented interface.
[out]nameBuffer for the implemented interface's name.
[out]*errorInfoIndex out of bounds?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetImplementedInterfacesCount ( RFC_CLASS_DESC_HANDLE  classDesc,
unsigned *  implementedInterfacesCount,
RFC_ERROR_INFO errorInfo 
)

Returns the number of parent interfaces of the given class.

Parameters
[in]classDescThe class metadata description.
[out]*implementedInterfacesCountNumber of implemented interfaces.
[out]*errorInfoShould always be successful.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetParentClassByIndex ( RFC_CLASS_DESC_HANDLE  classDesc,
RFC_CLASS_NAME  name,
unsigned  index,
RFC_ERROR_INFO errorInfo 
)

Returns the parent classes of the given class.

Parameters
[in]classDescThe class metadata description.
[in]nameThe parent class name.
[in]indexIndex of parent class.
[out]*errorInfoCurrent class does not inherit from parent class?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetParentClassesCount ( RFC_CLASS_DESC_HANDLE  classDesc,
unsigned *  parentClassesCount,
RFC_ERROR_INFO errorInfo 
)

Returns the number of parent classes of the given class.

Parameters
[in]classDescThe class metadata description.
[out]*parentClassesCountNumber of parent classes in the list.
[out]*errorInfoShould always be successful.
Returns
RFC_RC