Function sapnwrfc::binding::RfcCreateUnit [] [src]

pub unsafe extern "C" fn RfcCreateUnit(
    rfcHandle: RFC_CONNECTION_HANDLE,
    uid: *mut SAP_UC,
    queueNames: *mut *const SAP_UC,
    queueNameCount: c_uint,
    unitAttr: *const RFC_UNIT_ATTRIBUTES,
    identifier: *mut RFC_UNIT_IDENTIFIER,
    errorInfo: *mut RFC_ERROR_INFO
) -> RFC_UNIT_HANDLE

Create a bgRFC unit.

Creates a data container that can later be filled with one or more function modules comprising the bgRFC unit. The backend will execute these function modules as an atomic unit. The connection handle specifies the target system, to which the unit will later be sent. The unit ID has been created in the previous step (or is an old one in case of retrying a failed unit). Via queueNames and queueNameCount you can specify the list of bgRFC queues, into which this unit shall later be inserted. If no queues are given (queueNameCount == 0), a synchronous unit is created (type 'T') that will later be executed immediately. Otherwise an asynchronous unit (type 'Q') is created, which will be inserted into the named queues and executed asynchronously by the bgRFC scheduler.

\in rfcHandle An open RFC connection into the system that will later receive the unit. \in uid A 32 digit unique identifier of the unit. \in *queueNames[] A list of bgRFC queues in the backend or NULL. \in queueNameCount The length of the queueNames list. \in *unitAttr A set of attributes that specify the behaviour of the unit in the backend. See RFC_UNIT_ATTRIBUTES for more information. \out *identifier This identifier can be used in later calls to RfcConfirmUnit() and RfcGetUnitState(). It is important that these functions are called with the correct unit type ('T' or 'Q'), otherwise the backend system won't find the status information corresponding to the uid... Therefore the NW RFC lib bundles the uid and the correct unit type here for your convenience. \out *errorInfo More details in case something goes wrong. \return RFC_OK or RFC_MEMORY_INSUFFICIENT