Function sapnwrfc::binding::RfcGetBytes
[−]
[src]
pub unsafe extern "C" fn RfcGetBytes(
dataHandle: DATA_CONTAINER_HANDLE,
name: *const SAP_UC,
byteBuffer: *mut SAP_RAW,
bufferLength: c_uint,
errorInfo: *mut RFC_ERROR_INFO
) -> RFC_RC
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
\in dataHandle A 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 *name The name of the field to read. \out *byteBuffer Pre-allocated buffer, which will receive the (converted) field value. \in bufferLength Size of the buffer in bytes. \out *errorInfo More information in case the field does not exist or a conversion fails. \return RFC_RC