During the execution of a unit, you can use the methods of the class CL_BGRFC_SERVER to influence the way the unit is processed. All specified methods raise the exception CX_RFC_NO_LUW_EXEC if they are called outside of a unit started by the tRFC scheduler.
You can use the GET_UNIT_ID method to determine the unique number of a unit.
RETRY_UNIT is used to force the RFC runtime to reschedule the current unit. This method is used to resolve a blocked situation in the application, for example, a resource conflict within parallel transactions. The parameter RETRY_KEY is used to form another queue to serialize former independent units with the same resource conflict.
The event END_OF_UNIT from the class C L_BGRFC_SERVER is triggered once a unit has been successfully processed. You can register an event handler for this event by using the ABAP statement SET HANDLER to control the postprocessing.