The call RfcInstallStructure can be used in an RFC client or server program.
If structures and/or internal tables are to be transferred from an SAP system to external programs (that is, to programs which display or run the SAP RFC Library), only homogeneous structures/tables can be transferred. These may only consist of character-like fields (type C, D, T or N) or fields to be converted (type X or P). Integer or float fields can only be transferred as individual fields.
For functions with structured parameters or tables it is therefore necessary to install a description of the structures used to allow automatic conversion of different data representations by the RFC library.
The call RfcInstallStructure installs a description for a structure being used in an RFC interface.
The description must contain all (scalar) fields of the structure in correct order. A type handle is returned which can be used in RFC_PARAMETER and RFC_TABLE descriptions.
To call RfcInstallStructure, use the calling syntax:
RFC_RC SAP_API RfcInstallStructure(char * name,
RFC_TYPE_ELEMENT * elements,
unsigned entries,
RFC_TYPEHANDLE * pTypeHandle;
This function is defined in SAPRFC.H.
· RFC_OK
The structure was successfully installed. The returned type handle (RFC_TYPEHANDLE) can be used in RFC_PARAMETER or RFC_TABLE arrays.
· RFC_MEMORY_INSUFFICIENT
Not enough memory available to register the structure.
· name
Name of the structure. It is used only in the trace file.
· elements
Description of the elements of the structure
· entries
Count of (scalar) elements in the structure. The elements parameter points to an array of size entries * sizeof(RFC_TYPE_ELEMENT).
· pTypeHandle
Returned type handle.