SAP NetWeaver RFC SDK 7.50
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data container API (Function objects, structures & tables)

Functions for allocating & releasing data containers, which hold the data of a structure, table or complete function module. More...

Classes

struct  RFC_DATA_CONTAINER
 Handle to a general data container (structure, table or function module). More...
 
struct  RFC_STRUCTURE_HANDLE
 Handle to a data container for a structure. More...
 
struct  RFC_FUNCTION_HANDLE
 Handle to a data container for a function module. More...
 
struct  RFC_TABLE_HANDLE
 Handle to a data container for a table. More...
 
struct  RFC_ABAP_OBJECT_HANDLE
 Handle to a data container for an ABAP object instance. More...
 

Functions

DECL_EXP RFC_FUNCTION_HANDLE
SAP_API 
RfcCreateFunction (RFC_FUNCTION_DESC_HANDLE funcDescHandle, RFC_ERROR_INFO *errorInfo)
 Creates a data container that can be used to execute function calls in the backend via RfcInvoke(). More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyFunction (RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
 Releases all memory used by the data container. More...
 
DECL_EXP RFC_RC SAP_API RfcSetParameterActive (RFC_FUNCTION_HANDLE funcHandle, SAP_UC const *paramName, int isActive, RFC_ERROR_INFO *errorInfo)
 Allows to deactivate certain parameters in the function module interface. More...
 
DECL_EXP RFC_RC SAP_API RfcIsParameterActive (RFC_FUNCTION_HANDLE funcHandle, SAP_UC const *paramName, int *isActive, RFC_ERROR_INFO *errorInfo)
 Query whether a parameter is active. More...
 
DECL_EXP RFC_STRUCTURE_HANDLE
SAP_API 
RfcCreateStructure (RFC_TYPE_DESC_HANDLE typeDescHandle, RFC_ERROR_INFO *errorInfo)
 Creates a data container for a structure. More...
 
DECL_EXP RFC_STRUCTURE_HANDLE
SAP_API 
RfcCloneStructure (RFC_STRUCTURE_HANDLE srcStructureHandle, RFC_ERROR_INFO *errorInfo)
 Clones a sructure including the data in it. More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyStructure (RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO *errorInfo)
 Releases all memory for a particular structure. More...
 
DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCreateTable (RFC_TYPE_DESC_HANDLE typeDescHandle, RFC_ERROR_INFO *errorInfo)
 Creates a data container for a table. More...
 
DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCloneTable (RFC_TABLE_HANDLE srcTableHandle, RFC_ERROR_INFO *errorInfo)
 Clones a table including all the data in it. More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyTable (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Releases the memory of a table and all its lines. More...
 
DECL_EXP RFC_STRUCTURE_HANDLE
SAP_API 
RfcGetCurrentRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Returns the table row, on which the "table cursor" is currently positioned. More...
 
DECL_EXP RFC_STRUCTURE_HANDLE
SAP_API 
RfcAppendNewRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Appends a new empty row at the end of the table and moves the table cursor to that row. More...
 
DECL_EXP RFC_RC SAP_API RfcReserveCapacity (RFC_TABLE_HANDLE tableHandle, unsigned numRows, RFC_ERROR_INFO *errorInfo)
 Reserves memory without changing the size of a table so that new rows can be appended without new memory allocation. More...
 
DECL_EXP RFC_RC SAP_API RfcAppendNewRows (RFC_TABLE_HANDLE tableHandle, unsigned numRows, RFC_ERROR_INFO *errorInfo)
 Appends a set of new empty rows at the end of the table and moves the table cursor to the first new row. More...
 
DECL_EXP RFC_STRUCTURE_HANDLE
SAP_API 
RfcInsertNewRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Inserts a new empty row at the current position of the table cursor. More...
 
DECL_EXP RFC_RC SAP_API RfcAppendRow (RFC_TABLE_HANDLE tableHandle, RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO *errorInfo)
 Appends an existing row to the end of the table and moves the table cursor to that row. More...
 
DECL_EXP RFC_RC SAP_API RfcInsertRow (RFC_TABLE_HANDLE tableHandle, RFC_STRUCTURE_HANDLE structHandle, RFC_ERROR_INFO *errorInfo)
 Inserts an existing row at the current position of the table cursor. More...
 
DECL_EXP RFC_RC SAP_API RfcDeleteCurrentRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Deletes the row, on which the table cursor is currently positioned. More...
 
DECL_EXP RFC_RC SAP_API RfcDeleteAllRows (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Deletes all rows from the table. More...
 
DECL_EXP RFC_RC SAP_API RfcMoveToFirstRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Positions the table cursor at the first row (or at index "-1", if the table is empty). More...
 
DECL_EXP RFC_RC SAP_API RfcMoveToLastRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Positions the table cursor at the last row (or at index "-1", if the table is empty). More...
 
DECL_EXP RFC_RC SAP_API RfcMoveToNextRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Increments the table cursor by one. More...
 
DECL_EXP RFC_RC SAP_API RfcMoveToPreviousRow (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Decrements the table cursor by one. More...
 
DECL_EXP RFC_RC SAP_API RfcMoveTo (RFC_TABLE_HANDLE tableHandle, unsigned index, RFC_ERROR_INFO *errorInfo)
 Sets the table cursor to a specific index. More...
 
DECL_EXP RFC_RC SAP_API RfcGetRowCount (RFC_TABLE_HANDLE tableHandle, unsigned *rowCount, RFC_ERROR_INFO *errorInfo)
 Returns the number of rows in a table. More...
 
DECL_EXP RFC_TYPE_DESC_HANDLE
SAP_API 
RfcGetRowType (RFC_TABLE_HANDLE tableHandle, RFC_ERROR_INFO *errorInfo)
 Returns a type description handle describing the line type (metadata) of this table. More...
 
DECL_EXP
RFC_ABAP_OBJECT_HANDLE SAP_API 
RfcCreateAbapObject (RFC_CLASS_DESC_HANDLE classDescHandle, RFC_ERROR_INFO *errorInfo)
 Creates an ABAP object handle with the given class description handle. More...
 
DECL_EXP RFC_RC SAP_API RfcDestroyAbapObject (RFC_ABAP_OBJECT_HANDLE objHandle, RFC_ERROR_INFO *errorInfo)
 Destroys an ABAP object handle. More...
 
DECL_EXP RFC_RC SAP_API RfcGetChars (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_CHAR *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as char array. More...
 
DECL_EXP RFC_RC SAP_API RfcGetCharsByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_CHAR *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as char array. More...
 
DECL_EXP RFC_RC SAP_API RfcGetNum (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_NUM *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as num-char array (digits only). More...
 
DECL_EXP RFC_RC SAP_API RfcGetNumByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_NUM *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as num-char array (digits only). More...
 
DECL_EXP RFC_RC SAP_API RfcGetDate (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_DATE emptyDate, RFC_ERROR_INFO *errorInfo)
 Reads a DATE field. More...
 
DECL_EXP RFC_RC SAP_API RfcGetDateByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DATE emptyDate, RFC_ERROR_INFO *errorInfo)
 Reads a DATE field. More...
 
DECL_EXP RFC_RC SAP_API RfcGetTime (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_TIME emptyTime, RFC_ERROR_INFO *errorInfo)
 Reads a TIME field. More...
 
DECL_EXP RFC_RC SAP_API RfcGetTimeByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_TIME emptyTime, RFC_ERROR_INFO *errorInfo)
 Reads a TIME field. More...
 
DECL_EXP RFC_RC SAP_API RfcGetString (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, SAP_UC *stringBuffer, unsigned bufferLength, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as null-terminated string. More...
 
DECL_EXP RFC_RC SAP_API RfcGetStringByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_UC *stringBuffer, unsigned bufferLength, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as null-terminated string. More...
 
DECL_EXP RFC_RC SAP_API RfcGetBytes (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, SAP_RAW *byteBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as byte array. More...
 
DECL_EXP RFC_RC SAP_API RfcGetBytesByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_RAW *byteBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as byte array. More...
 
DECL_EXP RFC_RC SAP_API RfcGetXString (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, SAP_RAW *byteBuffer, unsigned bufferLength, unsigned *xstringLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as byte array. More...
 
DECL_EXP RFC_RC SAP_API RfcGetXStringByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, SAP_RAW *byteBuffer, unsigned bufferLength, unsigned *xstringLength, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as byte array. More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT *value, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as RFC_INT (signed). More...
 
DECL_EXP RFC_RC SAP_API RfcGetIntByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT *value, RFC_ERROR_INFO *errorInfo)
 Returns the value of the specified field as RFC_INT (signed). More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt1 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT1 *value, RFC_ERROR_INFO *errorInfo)
 Returns the value of a field as an unsigned one byte integer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt1ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT1 *value, RFC_ERROR_INFO *errorInfo)
 Returns the value of a field as an unsigned one byte integer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt2 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT2 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field value as a signed two byte integer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt2ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT2 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field value as a signed two byte integer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt8 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_INT8 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field value as a signed eight byte integer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetInt8ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_INT8 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field value as a signed eight byte integer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetFloat (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_FLOAT *value, RFC_ERROR_INFO *errorInfo)
 Returns the value of the given field as an RFC_FLOAT. More...
 
DECL_EXP RFC_RC SAP_API RfcGetFloatByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_FLOAT *value, RFC_ERROR_INFO *errorInfo)
 Returns the value of the given field as an RFC_FLOAT. More...
 
DECL_EXP RFC_RC SAP_API RfcGetDecF16 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_DECF16 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field as an 8 byte IEEE 754r decimal floating point. More...
 
DECL_EXP RFC_RC SAP_API RfcGetDecF16ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DECF16 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field as an 8 byte IEEE 754r decimal floating point. More...
 
DECL_EXP RFC_RC SAP_API RfcGetDecF34 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_DECF34 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field as a 16 byte IEEE 754r decimal floating point. More...
 
DECL_EXP RFC_RC SAP_API RfcGetDecF34ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_DECF34 *value, RFC_ERROR_INFO *errorInfo)
 Returns the field as a 16 byte IEEE 754r decimal floating point. More...
 
DECL_EXP RFC_RC SAP_API RfcGetStructure (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_STRUCTURE_HANDLE *structHandle, RFC_ERROR_INFO *errorInfo)
 Returns a handle to a structure. More...
 
DECL_EXP RFC_RC SAP_API RfcGetStructureByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_STRUCTURE_HANDLE *structHandle, RFC_ERROR_INFO *errorInfo)
 Returns a handle to a structure. More...
 
DECL_EXP RFC_RC SAP_API RfcGetStructureIntoCharBuffer (DATA_CONTAINER_HANDLE dataHandle, SAP_UC *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Returns the entire structure value as a single char buffer. More...
 
DECL_EXP RFC_RC SAP_API RfcGetTable (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_TABLE_HANDLE *tableHandle, RFC_ERROR_INFO *errorInfo)
 Returns a handle to a table. More...
 
DECL_EXP RFC_RC SAP_API RfcGetTableByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_TABLE_HANDLE *tableHandle, RFC_ERROR_INFO *errorInfo)
 Returns a handle to a table. More...
 
DECL_EXP RFC_RC SAP_API RfcGetAbapObject (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, RFC_ABAP_OBJECT_HANDLE *objHandle, RFC_ERROR_INFO *errorInfo)
 Returns a handle to an abap object. More...
 
DECL_EXP RFC_RC SAP_API RfcGetAbapObjectByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, RFC_ABAP_OBJECT_HANDLE *objHandle, RFC_ERROR_INFO *errorInfo)
 Returns a handle to an abap object. More...
 
DECL_EXP RFC_RC SAP_API RfcGetStringLength (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
 Returns the length of the value of a STRING or XSTRING parameter. More...
 
DECL_EXP RFC_RC SAP_API RfcGetStringLengthByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, unsigned *stringLength, RFC_ERROR_INFO *errorInfo)
 Returns the length of the value of a STRING or XSTRING parameter. More...
 
DECL_EXP RFC_RC SAP_API RfcSetChars (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_CHAR *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given char value (charValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetCharsByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_CHAR *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given char value (charValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetNum (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_NUM *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the value of a NUMC field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetNumByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_NUM *charValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the value of a NUMC field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetString (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const SAP_UC *stringValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given string value (stringValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetStringByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_UC *stringValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given string value (stringValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetDate (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_DATE date, RFC_ERROR_INFO *errorInfo)
 Sets the value of a DATE field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetDateByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DATE date, RFC_ERROR_INFO *errorInfo)
 Sets the value of a DATE field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetTime (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_TIME time, RFC_ERROR_INFO *errorInfo)
 Sets the value of a TIME field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetTimeByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_TIME time, RFC_ERROR_INFO *errorInfo)
 Sets the value of a TIME field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetBytes (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given byte value (byteValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetBytesByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given byte value (byteValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetXString (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given byte value (byteValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetXStringByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const SAP_RAW *byteValue, unsigned valueLength, RFC_ERROR_INFO *errorInfo)
 Sets the given byte value (byteValue/valueLength) into the field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT4 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetIntByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT4 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt1 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT1 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT1 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt1ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT1 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT1 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt2 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT2 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT2 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt2ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT2 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT2 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt8 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_INT8 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT8 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetInt8ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_INT8 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an INT8 field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetFloat (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_FLOAT value, RFC_ERROR_INFO *errorInfo)
 Sets a floating point field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetFloatByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_FLOAT value, RFC_ERROR_INFO *errorInfo)
 Sets a floating point field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetDecF16 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_DECF16 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an 8 byte decfloat object into a field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetDecF16ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DECF16 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of an 8 byte decfloat object into a field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetDecF34 (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_DECF34 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of a 16 byte decfloat object into a field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetDecF34ByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_DECF34 value, RFC_ERROR_INFO *errorInfo)
 Sets the value of a 16 byte decfloat object into a field. More...
 
DECL_EXP RFC_RC SAP_API RfcSetStructure (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_STRUCTURE_HANDLE value, RFC_ERROR_INFO *errorInfo)
 Copies the given structure into the target structure of the parent container. More...
 
DECL_EXP RFC_RC SAP_API RfcSetStructureByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_STRUCTURE_HANDLE value, RFC_ERROR_INFO *errorInfo)
 Copies the given structure into the target structure of the parent container. More...
 
DECL_EXP RFC_RC SAP_API RfcSetStructureFromCharBuffer (DATA_CONTAINER_HANDLE dataHandle, SAP_UC *charBuffer, unsigned bufferLength, RFC_ERROR_INFO *errorInfo)
 Set single char value buffer to the entire structure. More...
 
DECL_EXP RFC_RC SAP_API RfcSetTable (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_TABLE_HANDLE value, RFC_ERROR_INFO *errorInfo)
 Copies the given table into the target table of the parent container. More...
 
DECL_EXP RFC_RC SAP_API RfcSetTableByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_TABLE_HANDLE value, RFC_ERROR_INFO *errorInfo)
 Copies the given table into the target table of the parent container. More...
 
DECL_EXP RFC_RC SAP_API RfcSetAbapObject (DATA_CONTAINER_HANDLE dataHandle, SAP_UC const *name, const RFC_ABAP_OBJECT_HANDLE value, RFC_ERROR_INFO *errorInfo)
 Copies the object into the target object of the parent container. More...
 
DECL_EXP RFC_RC SAP_API RfcSetAbapObjectByIndex (DATA_CONTAINER_HANDLE dataHandle, unsigned index, const RFC_ABAP_OBJECT_HANDLE value, RFC_ERROR_INFO *errorInfo)
 Copies the object into the target object of the parent container. More...
 
DECL_EXP
RFC_ABAP_OBJECT_HANDLE SAP_API 
RfcGetAbapClassException (RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
 Gets the ABAP exception object handle from the given function handle. More...
 
DECL_EXP RFC_RC SAP_API RfcSetAbapClassException (RFC_FUNCTION_HANDLE funcHandle, RFC_ABAP_OBJECT_HANDLE excpHandle, const SAP_UC *exceptionText, RFC_ERROR_INFO *errorInfo)
 Sets the ABAP exception object handle to the given function handle. More...
 
DECL_EXP
RFC_FUNCTION_DESC_HANDLE
SAP_API 
RfcDescribeFunction (RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO *errorInfo)
 Returns the metadata description for the given function module. More...
 
DECL_EXP RFC_TYPE_DESC_HANDLE
SAP_API 
RfcDescribeType (DATA_CONTAINER_HANDLE dataHandle, RFC_ERROR_INFO *errorInfo)
 Returns the metadata description of the given structure or table (RFC_STRUCTURE_HANDLE or RFC_TABLE_HANDLE). More...
 
DECL_EXP RFC_CLASS_DESC_HANDLE
SAP_API 
RfcDescribeAbapObject (RFC_ABAP_OBJECT_HANDLE objectHandle, RFC_ERROR_INFO *errorInfo)
 Returns the metadata description of the given ABAP object handle. More...
 

Detailed Description

Functions for allocating & releasing data containers, which hold the data of a structure, table or complete function module.

Function Documentation

DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcAppendNewRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Appends a new empty row at the end of the table and moves the table cursor to that row.

Parameters
[in]tableHandleThe table to enlarge.
[out]*errorInfoMore information in case of errors (e.g. not enough memory).
Returns
A handle to the newly created row.
DECL_EXP RFC_RC SAP_API RfcAppendNewRows ( RFC_TABLE_HANDLE  tableHandle,
unsigned  numRows,
RFC_ERROR_INFO errorInfo 
)

Appends a set of new empty rows at the end of the table and moves the table cursor to the first new row.

Parameters
[in]tableHandleThe table to enlarge.
[in]numRowsNumber of rows to add.
[out]*errorInfoMore information in case of errors (e.g. not enough memory).
Returns
RFC_OK, RFC_INVALID_HANDLE or RFC_MEMORY_INSUFFICIENT.
DECL_EXP RFC_RC SAP_API RfcAppendRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_STRUCTURE_HANDLE  structHandle,
RFC_ERROR_INFO errorInfo 
)

Appends an existing row to the end of the table and moves the table cursor to that row.

Parameters
[in]tableHandleThe table to enlarge.
[in]structHandleThe row to append to the table.
[out]*errorInfoMore information in case something goes wrong (e.g. the line types of the table and the structure don't match).
Returns
RFC_RC
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcCloneStructure ( RFC_STRUCTURE_HANDLE  srcStructureHandle,
RFC_ERROR_INFO errorInfo 
)

Clones a sructure including the data in it.

Parameters
[in]srcStructureHandleThe structure to clone.
[out]*errorInfoNot enough memory?
Returns
A handle to the newly created copy of the input structure.
DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCloneTable ( RFC_TABLE_HANDLE  srcTableHandle,
RFC_ERROR_INFO errorInfo 
)

Clones a table including all the data in it.

(Use with care...)

Parameters
[in]srcTableHandleThe table to duplicate.
[out]*errorInfoIn case there is not enough memory.
Returns
A handle to the cloned table.
DECL_EXP RFC_ABAP_OBJECT_HANDLE SAP_API RfcCreateAbapObject ( RFC_CLASS_DESC_HANDLE  classDescHandle,
RFC_ERROR_INFO errorInfo 
)

Creates an ABAP object handle with the given class description handle.

Parameters
[in]classDescHandleclass description handle.
[out]*errorInfoContains more information, for example if memory runs out (code = RFC_MEMORY_INSUFFICIENT).
Returns
A handle to the created ABAP object.
DECL_EXP RFC_FUNCTION_HANDLE SAP_API RfcCreateFunction ( RFC_FUNCTION_DESC_HANDLE  funcDescHandle,
RFC_ERROR_INFO errorInfo 
)

Creates a data container that can be used to execute function calls in the backend via RfcInvoke().

The importing parameters can be set using the RfcSetX functions. After the RfcInvoke() call returned successfully, the exporting parameters can be read from this data container via the RfcGetX functions.

Parameters
[in]funcDescHandleMetadata description ("blueprint") for the data container to be created.
[out]*errorInfoError information in case the parameters are incorrect or there's not enough memory.
Returns
A handle to the function module container.
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcCreateStructure ( RFC_TYPE_DESC_HANDLE  typeDescHandle,
RFC_ERROR_INFO errorInfo 
)

Creates a data container for a structure.

Parameters
[in]typeDescHandleThe metadata description (blueprint) for the structure to be created.
[out]*errorInfoError information in case the parameters are incorrect or there's not enough memory.
Returns
A handle to the structure.
DECL_EXP RFC_TABLE_HANDLE SAP_API RfcCreateTable ( RFC_TYPE_DESC_HANDLE  typeDescHandle,
RFC_ERROR_INFO errorInfo 
)

Creates a data container for a table.

Parameters
[in]typeDescHandleThe metadata description (blueprint) for the line type of the table to be created.
[out]*errorInfoMore details in case there was an invalid parameter or not enough memory.
Returns
The freshly created table.
DECL_EXP RFC_RC SAP_API RfcDeleteAllRows ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Deletes all rows from the table.

Parameters
[in]tableHandleThe table to clear.
[out]*errorInfoNot much that can go wrong here (except an invalid table handle).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcDeleteCurrentRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Deletes the row, on which the table cursor is currently positioned.

If the row cursor is currently at an index i between 0 - n-2, then row i will be deleted and the rows i+1 - n-1 will be moved on index "up", e.g. will now be rows i - n-2. The table cursor will remain fixed at index i.
If the cursor is currently on the last row (n-1), then that row will be deleted, all other position will remain unchanged, and the table cursor will move up to n-2 (the new last row of the table).

Parameters
[in]tableHandleThe table from which to delete a row.
[out]*errorInfoError information in case the table cursor is not on a valid position.
Returns
RFC_RC
DECL_EXP RFC_CLASS_DESC_HANDLE SAP_API RfcDescribeAbapObject ( RFC_ABAP_OBJECT_HANDLE  objectHandle,
RFC_ERROR_INFO errorInfo 
)

Returns the metadata description of the given ABAP object handle.

Parameters
[in]objectHandleAn ABAP object.
[out]*errorInfoCan't possibly go wrong...
Returns
The class description of the given ABAP object.
DECL_EXP RFC_FUNCTION_DESC_HANDLE SAP_API RfcDescribeFunction ( RFC_FUNCTION_HANDLE  funcHandle,
RFC_ERROR_INFO errorInfo 
)

Returns the metadata description for the given function module.

Parameters
[in]funcHandleA function module.
[out]*errorInfoCan't possibly go wrong...
Returns
The metadata description that had been used when creating the function module container.
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcDescribeType ( DATA_CONTAINER_HANDLE  dataHandle,
RFC_ERROR_INFO errorInfo 
)

Returns the metadata description of the given structure or table (RFC_STRUCTURE_HANDLE or RFC_TABLE_HANDLE).

Parameters
[in]dataHandleA structure or table.
[out]*errorInfoCan't possibly go wrong...
Returns
The type description of the given structure (in case dataHandle is a structure), or the type description of the table line type (in case dataHandle is a table).
DECL_EXP RFC_RC SAP_API RfcDestroyAbapObject ( RFC_ABAP_OBJECT_HANDLE  objHandle,
RFC_ERROR_INFO errorInfo 
)

Destroys an ABAP object handle.

Parameters
[in]objHandleABAP object handle to be destroyed.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcDestroyFunction ( RFC_FUNCTION_HANDLE  funcHandle,
RFC_ERROR_INFO errorInfo 
)

Releases all memory used by the data container.

Warning
Be careful: if you have obtained a handle to a structure (RFC_STRUCTURE_HANDLE) or table parameter (RFC_TABLE_HANDLE) from that function module, that handle will be invalid afterwards, as that memory will be released as well!
Parameters
[in]funcHandleData container to release.
[out]*errorInfoNot much that can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcDestroyStructure ( RFC_STRUCTURE_HANDLE  structHandle,
RFC_ERROR_INFO errorInfo 
)

Releases all memory for a particular structure.

Warning
Do not call this function on structures, which you have obtained from another data container (e.g. a function module) via RfcGetStructure(). In that case the memory will be released, when the parent container will be destroyed. If you destroy a child structure separately, you will get a segmentation fault, when the parent structure is destroyed!
Parameters
[in]structHandleStructure to release.
[out]*errorInfoNot much that can go wrong here.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcDestroyTable ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Releases the memory of a table and all its lines.

Warning
Be careful: if you still have a reference to a certain table line (an RFC_STRUCTURE_HANDLE you got from RfcGetCurrentRow() / RfcAppendNewRow() / RfcInsertNewRow()), this handle will be invalid after RfcDestroyTable()! Using a handle to a table line after the table has been destroyed, will lead to a segmentation fault.
Parameters
[in]tableHandleThe table to release.
[out]*errorInfoNothing can go wrong here...
Returns
RFC_RC
DECL_EXP RFC_ABAP_OBJECT_HANDLE SAP_API RfcGetAbapClassException ( RFC_FUNCTION_HANDLE  funcHandle,
RFC_ERROR_INFO errorInfo 
)

Gets the ABAP exception object handle from the given function handle.

If a call to RfcInvoke() returned RFC_ABAP_CLASS_EXCEPTION, the RFC client calls this function afterwards with the original function handle in order to get access to the details of the class exception.

Parameters
[in]funcHandleFunction module data container.
[out]*errorInfoShould always return successfully.
Returns
A handle to an ABAP class exception object .
DECL_EXP RFC_RC SAP_API RfcGetAbapObject ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_ABAP_OBJECT_HANDLE objHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a handle to an abap object.

The field specified by name must be of type RFCTYPE_ABAPOBJECT. If that field has not yet been filled previously, NULL is returned.

Warning
The memory of that data container will be released, when the parent container gets destroyed. So don't destroy the returned table handle, nor continue to use it, after the parent has been destroyed!
Parameters
[in]dataHandleA data container (function handle, structure handle, table handle or object handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*objHandleA handle to the object.
[out]*errorInfoField does not exist, is of wrong type or out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetAbapObjectByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_ABAP_OBJECT_HANDLE objHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a handle to an abap object.

This function works exactly like RfcGetAbapObject(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle, table handle or object handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*objHandleA handle to the object.
[out]*errorInfoField does not exist, is of wrong type or out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetBytes ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
SAP_RAW byteBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as byte array.

Should mainly be used with fields of type RAW (RFCTYPE_BYTE), but also works with a number of other data types. In case of numerical data types it simply gives the binary representation of the value, in case of character data types it gives the UTF-16 representation (little endian/big endian, depending on the host platform). In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. In case the buffer is longer than the field, it will be filled with 0x00 values. Example: The field is of type INT4 and contains the value 4711, byteBuffer is an SAP_RAW[10]. Then the buffer will be filled as follows: 67 12 00 00 00 00 00 00 00 00 (little endian system) or 00 00 12 67 00 00 00 00 00 00 (big endian system).

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field to read.
    [out]*byteBufferPre-allocated buffer, which will receive the (converted) field value.
    [in]bufferLengthSize of the buffer in bytes.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetBytesByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
SAP_RAW byteBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as byte array.

This function works exactly like RfcGetBytes(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*byteBufferPre-allocated buffer, which will receive the (converted) field value.
[in]bufferLengthSize of the buffer in bytes.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetChars ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_CHAR charBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as char array.

The charBuffer will be filled with a string representation of the given field. The remaining places in the buffer will be filled with trailing spaces. In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. The result will not be null-terminated.

The field specified by name needs to be of one of the following data types. If the field has one of the listed non-char-like data types, the RFC library will convert the field value to string format. Example:
If "name" specifies a field of type INT4 with the value 4711 and charBuffer is an SAP_CHAR[10], then the buffer will be filled as follows: "4711 ".

Note
If the target field has type BYTE or XSTRING, the bytes will be converted to a hex encoded string representation.
  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx
  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_UTCLONG

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field.
    [out]*charBufferA pre-allocated buffer, which will receive the (converted) field value.
    [in]bufferLengthSize of the buffer in RFC_CHARs.
    [out]*errorInfoField doesn't exist, cannot be converted to char, etc.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetCharsByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_CHAR charBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as char array.

This function works exactly like RfcGetChars(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field.
[out]*charBufferA pre-allocated buffer, which will receive the (converted) field value.
[in]bufferLengthSize of the buffer in RFC_CHARs.
[out]*errorInfoField doesn't exist, cannot be converted to char, etc.
Returns
RFC_RC
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcGetCurrentRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Returns the table row, on which the "table cursor" is currently positioned.

Note
that the rows are numbered from 0 to n-1, not from 1 to n, as it's done in ABAP.
Parameters
[in]tableHandleThe table to read data from.
[out]*errorInfoIf the table cursor is not on a valid position.
Returns
A handle to the current row.
Warning
Do not destroy the returned RFC_STRUCTURE_HANDLE.
DECL_EXP RFC_RC SAP_API RfcGetDate ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_DATE  emptyDate,
RFC_ERROR_INFO errorInfo 
)

Reads a DATE field.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read. The field must be of type RFCTYPE_DATE.
[out]emptyDateAn RFC_DATE object, which will receive the field value.
[out]*errorInfoMore information in case something goes wrong.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetDateByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_DATE  emptyDate,
RFC_ERROR_INFO errorInfo 
)

Reads a DATE field.

This function works exactly like RfcGetDate(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read. The field must be of type RFCTYPE_DATE.
[out]emptyDateAn RFC_DATE object, which will receive the field value.
[out]*errorInfoMore information in case something goes wrong.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetDecF16 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_DECF16 value,
RFC_ERROR_INFO errorInfo 
)

Returns the field as an 8 byte IEEE 754r decimal floating point.

See the header sapdecf.h for how to work with RFC_DECF16 objects. If the field has a binary data type, its field length needs to be 8 bytes.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_DECF16
  • RFCTYPE_DECF34
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
    • RFCTYPE_INT8
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_STRING
  • RFCTYPE_BYTE is interpreted as IEEE 754r format
  • RFCTYPE_XSTRING is interpreted as IEEE 754r format

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field to read.
    [out]*valueThe (converted) decimal floating point value.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetDecF16ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_DECF16 value,
RFC_ERROR_INFO errorInfo 
)

Returns the field as an 8 byte IEEE 754r decimal floating point.

This function works exactly like RfcGetDecF16(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe (converted) decimal floating point value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetDecF34 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_DECF34 value,
RFC_ERROR_INFO errorInfo 
)

Returns the field as a 16 byte IEEE 754r decimal floating point.

See the header sapdecf.h for how to work with RFC_DECF16 objects. If the field has a binary data type, its field length needs to be 16 bytes.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_DECF16
  • RFCTYPE_DECF34
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
    • RFCTYPE_INT8
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_STRING
  • RFCTYPE_BYTE is interpreted as IEEE 754r format
  • RFCTYPE_XSTRING is interpreted as IEEE 754r format

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field to read.
    [out]*valueThe (converted) decimal floating point value.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetDecF34ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_DECF34 value,
RFC_ERROR_INFO errorInfo 
)

Returns the field as a 16 byte IEEE 754r decimal floating point.

This function works exactly like RfcGetDecF34(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe (converted) decimal floating point value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetFloat ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_FLOAT value,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the given field as an RFC_FLOAT.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_FLOAT
  • RFCTYPE_BCD

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field to read.
    [out]*valueThe floating point value.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetFloatByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_FLOAT value,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the given field as an RFC_FLOAT.

This function works exactly like RfcGetFloat(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe floating point value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_INT value,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as RFC_INT (signed).

If the field is a character type, an "atoi-like" conversion is performed. If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, this function interprets the bytes in big-endian byte order when converting them to int. Note that in this case the byte length of the field value must not exceed 4!

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_INT8
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_BYTE is interpreted as big endian sequence of an int
  • RFCTYPE_XSTRING is interpreted as big endian sequence of an int
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_STRING
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt1 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_INT1 value,
RFC_ERROR_INFO errorInfo 
)

Returns the value of a field as an unsigned one byte integer.

The current field value must not be bigger than 255, otherwise you'll get an RFC_CONVERSION_ERROR. If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, the field length must be 1 byte.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_INT8
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt1ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_INT1 value,
RFC_ERROR_INFO errorInfo 
)

Returns the value of a field as an unsigned one byte integer.

This function works exactly like RfcGetInt1(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt2 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_INT2 value,
RFC_ERROR_INFO errorInfo 
)

Returns the field value as a signed two byte integer.

The current field value must be between -32768 and 32767, otherwise you'll get an RFC_CONVERSION_ERROR. If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, the field length must be 1 or 2 bytes.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_INT8
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_BYTE is interpreted as big endian sequence of a short
  • RFCTYPE_XSTRING is interpreted as big endian sequence of a short
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt2ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_INT2 value,
RFC_ERROR_INFO errorInfo 
)

Returns the field value as a signed two byte integer.

This function works exactly like RfcGetInt2(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt8 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_INT8 *  value,
RFC_ERROR_INFO errorInfo 
)

Returns the field value as a signed eight byte integer.

If the field is of type RFCTYPE_BYTE/RFCTYPE_XSTRING, the field length must be 1, 2, 4 or 8 bytes.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_INT8
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_BYTE is interpreted as big endian sequence of a long long
  • RFCTYPE_XSTRING is interpreted as big endian sequence of a long long

RFCTYPE_UTCLONG

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetInt8ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_INT8 *  value,
RFC_ERROR_INFO errorInfo 
)

Returns the field value as a signed eight byte integer.

This function works exactly like RfcGetInt8(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetIntByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_INT value,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as RFC_INT (signed).

This function works exactly like RfcGetInt(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*valueThe (converted) integer value.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetNum ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_NUM charBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as num-char array (digits only).

The charBuffer will be filled with a string representation of the field (from right to left). The remaining places in the buffer will be filled with leading zero digits. In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. The result is not null-terminated.

The field specified by name needs to be of one of the following data types. If the field has one of the listed non-char-like data types, the RFC library will convert the field value to string format. Example:
If "name" specifies a field of type INT4 with the value 4711 and charBuffer is an SAP_CHAR[10], then the buffer will be filled as follows: "0000004711".

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field.
    [out]*charBufferA pre-allocated buffer, which will receive the (converted) field value.
    [in]bufferLengthSize of the buffer in RFC_CHARs.
    [out]*errorInfoField doesn't exist, cannot be converted to numc, etc.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetNumByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_NUM charBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as num-char array (digits only).

This function works exactly like RfcGetNum(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field.
[out]*charBufferA pre-allocated buffer, which will receive the (converted) field value.
[in]bufferLengthSize of the buffer in RFC_CHARs.
[out]*errorInfoField doesn't exist, cannot be converted to numc, etc.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetRowCount ( RFC_TABLE_HANDLE  tableHandle,
unsigned *  rowCount,
RFC_ERROR_INFO errorInfo 
)

Returns the number of rows in a table.

Parameters
[in]tableHandleA table.
[out]*rowCountThe number of rows in the table.
[out]*errorInfoNot much that can go wrong.
Returns
RFC_RC
DECL_EXP RFC_TYPE_DESC_HANDLE SAP_API RfcGetRowType ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a type description handle describing the line type (metadata) of this table.

Parameters
[in]tableHandleA table.
[out]*errorInfoNot much that can go wrong.
Returns
A type description handle that provides information about this table's fields (for each field: fieldname, the field's datatype, length, offset, etc.)
DECL_EXP RFC_RC SAP_API RfcGetString ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
SAP_UC stringBuffer,
unsigned  bufferLength,
unsigned *  stringLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as null-terminated string.

The charBuffer will be filled with a null-terminated string representation of the field value. In case the buffer is too small, e.g. no place for string termination, the function will return RFC_BUFFER_TOO_SMALL. stringLength contains the number of written characters, or the required number of characters in case RFC_BUFFER_TOO_SMALL was thrown. The result will be null-terminated.

The field specified by name needs to be of one of the following data types. If the field has one of the listed non-char-like data types, the RFC library will convert the field value to string format. Example:
If "name" specifies a field of type INT4 with the value 4711 and stringBuffer is an SAP_UC[10], then the buffer will be filled as follows: "4711\0xxxxx". (x: left unchanged.)

Note
If the target field has type BYTE or XSTRING, the bytes will be converted to a hex encoded string representation.
  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx
  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_UTCLONG

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field to read.
    [out]*stringBufferPre-allocated buffer, which will receive the (converted) field value.
    [in]bufferLengthSize of the buffer in SAP_UC.
    [out]*stringLengthAlways returns the string's length, no matter whether the stringBuffer had been large enough or not. (Note that if you want to try again after an RFC_BUFFER_TOO_SMALL, you need to make the stringBuffer at least *stringLength + 1 in order to account for the terminating null.)
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetStringByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
SAP_UC stringBuffer,
unsigned  bufferLength,
unsigned *  stringLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as null-terminated string.

This function works exactly like RfcGetString(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*stringBufferPre-allocated buffer, which will receive the (converted) field value.
[in]bufferLengthSize of the buffer in SAP_UC.
[out]*stringLengthAlways returns the string's length, no matter whether the stringBuffer had been large enough or not. (Note that if you want to try again after an RFC_BUFFER_TOO_SMALL, you need to make the stringBuffer at least *stringLength + 1 in order to account for the termnating null.)
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetStringLength ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
unsigned *  stringLength,
RFC_ERROR_INFO errorInfo 
)

Returns the length of the value of a STRING or XSTRING parameter.

The field specified by name must be of type RFCTYPE_STRING or RFCTYPE_XSTRING. If that field is of type STRING, the returned length is measured in characters, otherwise in bytes.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of a STRING or XSTRING field.
[out]*stringLengthLength of the current field value.
[out]*errorInfoWrong field type?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetStringLengthByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
unsigned *  stringLength,
RFC_ERROR_INFO errorInfo 
)

Returns the length of the value of a STRING or XSTRING parameter.

This function works exactly like RfcGetStringLength(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of a STRING or XSTRING field.
[out]*stringLengthLength of the current field value.
[out]*errorInfoWrong field type?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetStructure ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_STRUCTURE_HANDLE structHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a handle to a structure.

The field specified by name must be of type RFCTYPE_STRUCTURE. If that field has not yet been accessed/filled previously, a new empty structure is created from the metadata of the parent data container ("dataHandle") and returned.

Warning
The memory of that data container will be released, when the parent container gets destroyed. So don't destroy the returned structure handle, nor continue to use it, after the parent has been destroyed!
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*structHandleA handle to the sub-structure.
[out]*errorInfoField does not exist, is of wrong type or out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetStructureByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_STRUCTURE_HANDLE structHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a handle to a structure.

This function works exactly like RfcGetStructure(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*structHandleA handle to the sub-structure.
[out]*errorInfoField does not exist, is of wrong type or out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetStructureIntoCharBuffer ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC charBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Returns the entire structure value as a single char buffer.

The charBuffer will be filled with the data of the structure as if it were a single char field.

In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. The result will not be null-terminated.

This mimics the way structures have been handled by the classic RFC library librfc32. It can conveniently be used for fetching an RFC structure into a C struct, which has been defined like in the ABAP DDIC. In addition to programming convenience, it should also improve runtime performance compared to fetching each single field one-by-one.

This function can only be applied to structures/tables if they contain char-like fields (CHAR, NUMC, DATE, TIME) The result will be aligned exactly as on ABAP side, including padding bytes.

Parameters
[in]dataHandleA data container (structure handle or table handle). If dataHandle is a table handle, the function will read the structure data of the current row.
[out]*charBufferPre-allocated buffer, which will receive the structure value.
[in]bufferLengthSize of the buffer in SAP_UC.
[out]*errorInfoMore information in case the structure cannot be returned as char buffer.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetTable ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_TABLE_HANDLE tableHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a handle to a table.

The field specified by name must be of type RFCTYPE_TABLE. If that field has not yet been accessed/filled previously, a new empty structure is created from the metadata of the parent data container ("dataHandle") and returned.

Warning
The memory of that data container will be released, when the parent container gets destroyed. So don't destroy the returned table handle, nor continue to use it, after the parent has been destroyed!
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read.
[out]*tableHandleA handle to the sub-table.
[out]*errorInfoField does not exist, is of wrong type or out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetTableByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_TABLE_HANDLE tableHandle,
RFC_ERROR_INFO errorInfo 
)

Returns a handle to a table.

This function works exactly like RfcGetTable(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*tableHandleA handle to the sub-table.
[out]*errorInfoField does not exist, is of wrong type or out of memory.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetTime ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
RFC_TIME  emptyTime,
RFC_ERROR_INFO errorInfo 
)

Reads a TIME field.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]*nameThe name of the field to read. The field must be of type RFCTYPE_TIME.
[out]emptyTimeAn RFC_TIME object, which will receive the field value.
[out]*errorInfoMore information in case something goes wrong.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetTimeByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
RFC_TIME  emptyTime,
RFC_ERROR_INFO errorInfo 
)

Reads a TIME field.

This function works exactly like RfcGetTime(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read. The field must be of type RFCTYPE_TIME.
[out]emptyTimeAn RFC_TIME object, which will receive the field value.
[out]*errorInfoMore information in case something goes wrong.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetXString ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
SAP_RAW byteBuffer,
unsigned  bufferLength,
unsigned *  xstringLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as byte array.

In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. xstringLength contains the number of written bytes, or the required number of bytes in case of RFC_BUFFER_TOO_SMALL. The remaining buffer won't be changed.

Example: The field is of type INT4 and contains the value 4711, byteBuffer is an SAP_RAW[10]. Then the buffer will be filled as follows: 67 12 00 00 x x x x x x (little endian system) or 00 00 12 67 x x x x x x (big endian system). (x: unchanged) In both cases *xstringLength will be 4.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
    [in]*nameThe name of the field to read.
    [out]*byteBufferPre-allocated buffer, which will receive the (converted) field value.
    [in]bufferLengthSize of the buffer in bytes.
    [out]*xstringLengthByte length of the result (in both cases, no matter whether the byteBuffer had been large enough or not).
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcGetXStringByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
SAP_RAW byteBuffer,
unsigned  bufferLength,
unsigned *  xstringLength,
RFC_ERROR_INFO errorInfo 
)

Returns the value of the specified field as byte array.

This function works exactly like RfcGetXString(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will read the field value of the current row.
[in]indexThe index of the field to read.
[out]*byteBufferPre-allocated buffer, which will receive the (converted) field value.
[in]bufferLengthSize of the buffer in bytes.
[out]*xstringLengthByte length of the result (in both cases, no matter whether the byteBuffer had been large enough or not).
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_STRUCTURE_HANDLE SAP_API RfcInsertNewRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Inserts a new empty row at the current position of the table cursor.

The row, on which the table cursor is currently positioned, and all following rows are moved one index "down". E.g. if the table currently has rows nos 0 - n-1 and the cursor points to row i, then the rows i - n-1 are moved to positions i+1 - n, and the new row is inserted at position i.

Parameters
[in]tableHandleThe table to enlarge.
[out]*errorInfoMore information in case of errors (e.g. not enough memory).
Returns
A handle to the newly created row.
DECL_EXP RFC_RC SAP_API RfcInsertRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_STRUCTURE_HANDLE  structHandle,
RFC_ERROR_INFO errorInfo 
)

Inserts an existing row at the current position of the table cursor.

The row, on which the table cursor is currently positioned, and all following rows are moved one index "down". E.g. if the table currently has rows nos 0 - n-1 and the cursor points to row i, then the rows i - n-1 are moved to positions i+1 - n, and the given row is inserted at position i.

Parameters
[in]tableHandleThe table to enlarge.
[in]structHandleThe row to insert into the table.
[out]*errorInfoMore information in case something goes wrong (e.g. the line types of the table and the structure don't match).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcIsParameterActive ( RFC_FUNCTION_HANDLE  funcHandle,
SAP_UC const *  paramName,
int *  isActive,
RFC_ERROR_INFO errorInfo 
)

Query whether a parameter is active.

Useful for example in a server function implementation: Before creating a large table, you may want to check, whether the client (the backend system), has requested that table at all.

Parameters
[in]funcHandleA function module data container (usually handed to your server function from the RFC library).
[in]*paramNameThe name of a parameter of this function module.
[out]*isActive1 = is active, 0 = is not active.
[out]*errorInfoError information in case something goes wrong (e.g. a parameter of that name does not exist).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcMoveTo ( RFC_TABLE_HANDLE  tableHandle,
unsigned  index,
RFC_ERROR_INFO errorInfo 
)

Sets the table cursor to a specific index.

Parameters
[in]tableHandleA table.
[in]indexThe index to which to move the cursor.
[out]*errorInfoIndex out of bounds or invalid table handle.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcMoveToFirstRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Positions the table cursor at the first row (or at index "-1", if the table is empty).

Parameters
[in]tableHandleA table.
[out]*errorInfoNot much that can go wrong here (except an invalid table handle).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcMoveToLastRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Positions the table cursor at the last row (or at index "-1", if the table is empty).

Parameters
[in]tableHandleA table.
[out]*errorInfoNot much that can go wrong here (except an invalid table handle).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcMoveToNextRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Increments the table cursor by one.

Parameters
[in]tableHandleA table.
[out]*errorInfoNot much that can go wrong here (except an invalid table handle).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcMoveToPreviousRow ( RFC_TABLE_HANDLE  tableHandle,
RFC_ERROR_INFO errorInfo 
)

Decrements the table cursor by one.

Parameters
[in]tableHandleA table.
[out]*errorInfoNot much that can go wrong here (except an invalid table handle).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcReserveCapacity ( RFC_TABLE_HANDLE  tableHandle,
unsigned  numRows,
RFC_ERROR_INFO errorInfo 
)

Reserves memory without changing the size of a table so that new rows can be appended without new memory allocation.

Parameters
[in]tableHandleThe table to enlarge.
[in]numRowsNumber of rows to reserve.
[out]*errorInfoMore information in case of errors (e.g. not enough memory).
Returns
RFC_OK, RFC_INVALID_HANDLE or RFC_MEMORY_INSUFFICIENT.
DECL_EXP RFC_RC SAP_API RfcSetAbapClassException ( RFC_FUNCTION_HANDLE  funcHandle,
RFC_ABAP_OBJECT_HANDLE  excpHandle,
const SAP_UC exceptionText,
RFC_ERROR_INFO errorInfo 
)

Sets the ABAP exception object handle to the given function handle.

If an RFC server function wants to throw an ABAP class exception, it calls this function before it returns with RFC_ABAP_CLASS_EXCEPTION.

Parameters
[in]funcHandleFunction module data container .
[in]excpHandleObject handle to the class exception to be thrown.
[in]exceptionTextException text.
[out]*errorInfoShould always return successfully.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetAbapObject ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_ABAP_OBJECT_HANDLE  value,
RFC_ERROR_INFO errorInfo 
)

Copies the object into the target object of the parent container.

The target field needs to be of type RFCTYPE_ABAPOBJECT.

Note
If you want to avoid the copy operation, use RfcGetAbapObject() and if the instance already exists set the subfields here, instead of the sequence RfcCreateAbapObject()/ setting the subfields/ RfcSetAbapObject().
Parameters
[in]dataHandleA data container (function handle, structure handle, table handle or object handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]valueThe object to copy.
[out]*errorInfoField does not exist or is not of type RFCTYPE_ABAPOBJECT?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetAbapObjectByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_ABAP_OBJECT_HANDLE  value,
RFC_ERROR_INFO errorInfo 
)

Copies the object into the target object of the parent container.

This function works exactly like RfcSetAbapObject(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle, table handle or object handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe object to copy.
[out]*errorInfoField does not exist or is not of type RFCTYPE_ABAPOBJECT?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetBytes ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const SAP_RAW byteValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given byte value (byteValue/valueLength) into the field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx
    Note
    : If the target field has type CHAR or STRING, the byte value will be stored as a hex representation of the bytes.
    If the target field has a numerical type, the byte value will be assigned only if the given valueLength matches the field length. In order to use this feature, you need to know exactly what you are doing... E.g. when setting 8 bytes into an RFC_FLOAT field, you need to understand the IEEE floating point format. Better only use this function for setting RAW fields.
    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]*byteValueThe byte value to write into the field.
    [in]valueLengthThe number of bytes to use from byteValue.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetBytesByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const SAP_RAW byteValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given byte value (byteValue/valueLength) into the field.

This function works exactly like RfcSetBytes(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]*byteValueThe byte value to write into the field.
[in]valueLengthThe number of bytes to use from byteValue.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetChars ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_CHAR charValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given char value (charValue/valueLength) into the field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx
  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_UTCLONG
Note
If the target field is a numerical type, the RFC library tries to convert the string to a number. If the target field has type BYTE or XSTRING, the char value will be interpreted as hex encoded string representation of the bytes. Its length needs to be even in that case.
Example: the 8 characters "CAFEBABE" will be converted to 4 bytes 0xCA 0xFE 0xBA 0xBE.

If the value cannot be converted to the desired target type, RFC_CONVERSION_ERROR will be returned.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]*charValueThe characters to write into the field.
[in]valueLengthThe number of characters to read from charValue.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetCharsByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_CHAR charValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given char value (charValue/valueLength) into the field.

This function works exactly like RfcSetChars(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]*charValueThe characters to write into the field.
[in]valueLengthThe number of characters to read from charValue.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetDate ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_DATE  date,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a DATE field.

The target field needs to be of type RFCTYPE_DATE.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]dateThe date value to write into the field.
[out]*errorInfoIs the field not of type DATE?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetDateByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_DATE  date,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a DATE field.

This function works exactly like RfcSetDate(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]dateThe date value to write into the field.
[out]*errorInfoIs the field not of type DATE?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetDecF16 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_DECF16  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an 8 byte decfloat object into a field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_DECF16
  • RFCTYPE_DECF34
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_STRING
  • RFCTYPE_BYTE Needs to be 8 byte long.
  • RFCTYPE_XSTRING
    Note
    If the target field is CHAR or STRING, the value will be converted to a string in scientific notation. If it is NUMC, it will be truncated to the next integer.
    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe decfloat value to set.
    [out]*errorInfoField does not exist or is not of a supported type?
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetDecF16ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_DECF16  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an 8 byte decfloat object into a field.

This function works exactly like RfcSetDecF16(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe decfloat value to set.
[out]*errorInfoField does not exist or is not of a supported type?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetDecF34 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_DECF34  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a 16 byte decfloat object into a field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_DECF16
  • RFCTYPE_DECF34
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_INT
  • RFCTYPE_INT2
  • RFCTYPE_INT1
  • RFCTYPE_CHAR
  • RFCTYPE_NUM
  • RFCTYPE_STRING
  • RFCTYPE_BYTE Needs to be 8 byte long.
  • RFCTYPE_XSTRING
    Note
    If the target field is CHAR or STRING, the value will be converted to a string in scientific notation. If it is NUMC, it will be truncated to the next integer.
    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe decfloat value to set.
    [out]*errorInfoField does not exist or is not of a supported type?
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetDecF34ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_DECF34  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a 16 byte decfloat object into a field.

This function works exactly like RfcSetDecF34(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe decfloat value to set.
[out]*errorInfoField does not exist or is not of a supported type?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetFloat ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_FLOAT  value,
RFC_ERROR_INFO errorInfo 
)

Sets a floating point field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_NUM
  • RFCTYPE_DECF16
  • RFCTYPE_DECF34
    Note
    If the target field is CHAR or STRING, the value will be converted to a string in scientific notation. If it is NUMC, it will be truncated to the next integer.
    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe double value to set.
    [out]*errorInfoField does not exist or is not of a supported type?
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetFloatByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_FLOAT  value,
RFC_ERROR_INFO errorInfo 
)

Sets a floating point field.

This function works exactly like RfcSetFloat(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe double value to set.
[out]*errorInfoField does not exist or is not of a supported type?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_INT  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT4 field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_INTx
  • RFCTYPE_DECFxx

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe integer value to set.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt1 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_INT1  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT1 field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_INTx
  • RFCTYPE_DECFxx

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe integer value to set.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt1ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_INT1  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT1 field.

This function works exactly like RfcSetInt1(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe integer value to set.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt2 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_INT2  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT2 field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_INTx
  • RFCTYPE_DECFxx

    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe integer value to set.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt2ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_INT2  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT2 field.

This function works exactly like RfcSetInt2(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe integer value to set.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt8 ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_INT8  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT8 field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_INTx
  • RFCTYPE_DECFxx

    • RFCTYPE_UTCLONG.
    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]valueThe integer value to set.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetInt8ByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_INT8  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT8 field.

This function works exactly like RfcSetInt8(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe integer value to set.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetIntByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_INT  value,
RFC_ERROR_INFO errorInfo 
)

Sets the value of an INT4 field.

This function works exactly like RfcSetInt(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe integer value to set.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetNum ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_NUM charValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a NUMC field.

The target field needs to be of type RFCTYPE_NUM.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]*charValueThe digits [0..9] to write into the field.
[in]valueLengthThe number of characters to read from charValue.
[out]*errorInfoMore information in case the field does not exist or the parameter value is invalid.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetNumByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_NUM charValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a NUMC field.

This function works exactly like RfcSetNum(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]*charValueThe digits [0..9] to write into the field.
[in]valueLengthThe number of characters to read from charValue.
[out]*errorInfoMore information in case the field does not exist or the parameter value is invalid.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetParameterActive ( RFC_FUNCTION_HANDLE  funcHandle,
SAP_UC const *  paramName,
int  isActive,
RFC_ERROR_INFO errorInfo 
)

Allows to deactivate certain parameters in the function module interface.

This is particularly useful for BAPIs which have many large tables, in which you are not interested. Deactivate those and leave only those tables active, in which you are interested. This reduces network traffic and memory consumption in your application considerably.

Note
This functionality can be used for input and output parameters. If the parameter is an input, no data for that parameter will be sent to the backend. If it's an output, the backend will be informed not to return data for that parameter.
Parameters
[in]funcHandleA function module data container.
[in]*paramNameThe name of a parameter of this function module.
[in]isActive1 = activate, 0 = deactivate.
[out]*errorInfoError information in case something goes wrong (e.g. a parameter of that name does not exist).
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetString ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const SAP_UC stringValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given string value (stringValue/valueLength) into the field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_NUM
  • RFCTYPE_DATE
  • RFCTYPE_TIME
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx
  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_UTCLONG
Note
If the target field is a numerical type, the RFC library tries to convert the string to a number. If the target field has type BYTE or XSTRING, the char value will be interpreted as hex encoded string representation of the bytes. Its length needs to be even in that case.
Example: the 8 characters "CAFEBABE" will be converted to 4 bytes 0xCA 0xFE 0xBA 0xBE.

If the value cannot be converted to the desired target type, RFC_CONVERSION_ERROR will be returned.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]*stringValueThe characters to write into the field.
[in]valueLengthThe number of characters to read from stringValue.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetStringByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const SAP_UC stringValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given string value (stringValue/valueLength) into the field.

This function works exactly like RfcSetString(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]*stringValueThe characters to write into the field.
[in]valueLengthThe number of characters to read from stringValue.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetStructure ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_STRUCTURE_HANDLE  value,
RFC_ERROR_INFO errorInfo 
)

Copies the given structure into the target structure of the parent container.

The target field needs to be of type RFCTYPE_STRUCTURE.

Note
If you want to avoid the copy operation, use RfcGetStructure() and set the subfields here, instead of the sequence RfcCreateStructure()/ setting the subfields/ RfcSetStructure().
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]valueThe structure to copy.
[out]*errorInfoOut of memory, field does not exist or is not of type RFCTYPE_STRUCTURE?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetStructureByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_STRUCTURE_HANDLE  value,
RFC_ERROR_INFO errorInfo 
)

Copies the given structure into the target structure of the parent container.

This function works exactly like RfcSetStructure(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe structure to copy.
[out]*errorInfoOut of memory, field does not exist or is not of type RFCTYPE_STRUCTURE?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetStructureFromCharBuffer ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC charBuffer,
unsigned  bufferLength,
RFC_ERROR_INFO errorInfo 
)

Set single char value buffer to the entire structure.

The structure will be filled with the data of bufferas if it were a single char field.

In case the buffer is too small, the function will return RFC_BUFFER_TOO_SMALL. The result will not be null-terminated.

This mimics the way structures have been handled by the classic RFC library librfc32. It can conveniently be used for fetching an RFC structure into a C struct, which has been defined like in the ABAP DDIC. In addition to programming convenience, it should also improve runtime performance compared to fetching each single field one-by-one.

This function can only be applied to structures/tables if they contain char-like fields (CHAR, NUMC, DATE, TIME) The result will be aligned exactly as on ABAP side, including padding bytes.

Parameters
[out]dataHandleA data container (structure handle or table handle). If dataHandle is a table handle, the function will read the structure data of the current row.
[in]*charBufferPre-allocated buffer, which will receive the structure value.
[in]bufferLengthSize of the buffer in SAP_UC.
[out]*errorInfoMore information in case the structure cannot be returned as char buffer.
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetTable ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_TABLE_HANDLE  value,
RFC_ERROR_INFO errorInfo 
)

Copies the given table into the target table of the parent container.

The target field needs to be of type RFCTYPE_TABLE.

Note
If you want to avoid the copy operation, use RfcGetTable() and set the subfields here, instead of the sequence RfcCreateTable()/ setting the subfields/ RfcSetTable().
Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]valueThe table to copy.
[out]*errorInfoField does not exist or is not of type RFCTYPE_TABLE?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetTableByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_TABLE_HANDLE  value,
RFC_ERROR_INFO errorInfo 
)

Copies the given table into the target table of the parent container.

This function works exactly like RfcSetTable(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]valueThe table to copy.
[out]*errorInfoField does not exist or is not of type RFCTYPE_TABLE?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetTime ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const RFC_TIME  time,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a TIME field.

The target field needs to be of type RFCTYPE_TIME.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*nameThe name of the field to set.
[in]timeThe time value to write into the field.
[out]*errorInfoIs the field not of type TIME?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetTimeByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const RFC_TIME  time,
RFC_ERROR_INFO errorInfo 
)

Sets the value of a TIME field.

This function works exactly like RfcSetTime(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]timeThe time value to write into the field.
[out]*errorInfoIs the field not of type TIME?
Returns
RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetXString ( DATA_CONTAINER_HANDLE  dataHandle,
SAP_UC const *  name,
const SAP_RAW byteValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given byte value (byteValue/valueLength) into the field.

The field specified by name needs to be of one of the following data types:

  • RFCTYPE_BYTE
  • RFCTYPE_XSTRING
  • RFCTYPE_CHAR
  • RFCTYPE_STRING
  • RFCTYPE_INTx
  • RFCTYPE_FLOAT
  • RFCTYPE_BCD
  • RFCTYPE_DECFxx
    Note
    : If the target field has type CHAR or STRING, the byte value will be stored as a hex representation of the bytes.
    If the target field has a numerical type, the byte value will be assigned only if the given valueLength matches the field length. In order to use this feature, you need to know exactly what you are doing... E.g. when setting 8 bytes into an RFC_FLOAT field, you need to understand the IEEE floating point format. Better only use this function for setting RAW fields.
    Parameters
    [in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
    [in]*nameThe name of the field to set.
    [in]*byteValueThe byte value to write into the field.
    [in]valueLengthThe number of bytes to use from byteValue.
    [out]*errorInfoMore information in case the field does not exist or a conversion fails.
    Returns
    RFC_RC
DECL_EXP RFC_RC SAP_API RfcSetXStringByIndex ( DATA_CONTAINER_HANDLE  dataHandle,
unsigned  index,
const SAP_RAW byteValue,
unsigned  valueLength,
RFC_ERROR_INFO errorInfo 
)

Sets the given byte value (byteValue/valueLength) into the field.

This function works exactly like RfcSetXString(), the difference being that the field is addressed by its index within the structure/table/function module. The first field has index 0, last field has index n-1, the order of the fields is as defined in the ABAP DDIC.

Parameters
[in]dataHandleA data container (function handle, structure handle or table handle). If dataHandle is a table handle, the function will set the field value of the current row.
[in]*indexThe index of the field to set.
[in]*byteValueThe byte value to write into the field.
[in]valueLengthThe number of bytes to use from byteValue.
[out]*errorInfoMore information in case the field does not exist or a conversion fails.
Returns
RFC_RC