Function sapnwrfc::binding::RfcGetXString
[−]
[src]
pub unsafe extern "C" fn RfcGetXString(
dataHandle: DATA_CONTAINER_HANDLE,
name: *const SAP_UC,
byteBuffer: *mut SAP_RAW,
bufferLength: c_uint,
xstringLength: *mut c_uint,
errorInfo: *mut RFC_ERROR_INFO
) -> RFC_RC
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
\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 *xstringLength Byte length of the result (in both cases, no matter whether the byteBuffer had been large enough or not). \out *errorInfo More information in case the field does not exist or a conversion fails. \return RFC_RC