Metadata for ABAP classes
[Metadata and Repository API]


Detailed Description

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


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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.


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] classDesc The class description.
[in] *attrDesc Metadata description of the new class attribute.
[out] *errorInfo More 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] classDesc The class metadata description.
[in] name Name of implemented interface to be added.
[out] *errorInfo Not 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] classDesc The class metadata description.
[in] name Parent class name to be added.
[out] *errorInfo No 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] *name The name of the ABAP class.
[out] *errorInfo Probably 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] classHandle The class description to be deleted.
[out] *errorInfo More 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] classDesc The class metadata description.
[in] index The index of the attributes to describe.
[out] *attrDesc Metadata description of the class attribute.
[out] *errorInfo Index 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] classDesc The class metadata description.
[in] *name The name of the parameter to describe.
[out] *attrDesc Metadata description of the class attribute.
[out] *errorInfo No 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] classDesc The class description.
[out] *count The number of attributes.
[out] *errorInfo Nothing 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] classDesc The class description.
[out] bufferForName Will receive the function module's DDIC name (zero terminated).
[out] *errorInfo Should 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] classDesc The class metadata description.
[in] index Index of the implemented interface.
[out] name Buffer for the implemented interface's name.
[out] *errorInfo Index 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] classDesc The class metadata description.
[out] *implementedInterfacesCount Number of implemented interfaces.
[out] *errorInfo Should 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] classDesc The class metadata description.
[in] name The parent class name.
[in] index Index of parent class.
[out] *errorInfo Current 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] classDesc The class metadata description.
[out] *parentClassesCount Number of parent classes in the list.
[out] *errorInfo Should always be successful.
Returns:
RFC_RC


Generated on Fri Aug 29 16:54:53 2014 for SAP by  doxygen 1.5.5