TABLES : UPSHDR.
TYPE-POOLS : kups.
CALL FUNCTION 'UPSCU_ALE_UPDATE'
CALL FUNCTION 'UPSAP_AUTOMATIC_PROCESSING'
CALL FUNCTION 'UPSCU_FREE'
EXPORTING
im_instid = unity.
CALL FUNCTION 'DEQUEUE_ALL'.
CALL FUNCTION 'UPSCP_ASSEMBLE_EXTKEY'
CALL FUNCTION 'UPSCU_CONSTRUCTOR'
TABLES : TUPS02D.
CALL FUNCTION 'UPSCU_SEND'
CALL FUNCTION 'UPSCU_JOB_DELETE'
FORM rupssend_done .
data: lr_badi type ref to if_ex_ups_addons,
lr_badi_i type ref to if_ex_ups_addons_i,
ls_param type api_upshdr.
move-corresponding wa_upshdr to ls_param.
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
EXPORTING
EXIT_NAME = 'UPS_ADDONS_I'
NULL_INSTANCE_ACCEPTED = SEEX_TRUE
CHANGING
INSTANCE = lr_badi_i
EXCEPTIONS
others = 0
.
if lr_badi_i is bound.
call method lr_badi_i->rupssend_done
exporting i_apihdr = ls_param.
endif.
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
EXPORTING
EXIT_NAME = 'UPS_ADDONS'
NULL_INSTANCE_ACCEPTED = SEEX_TRUE
* IMPORTING
* ACT_IMP_EXISTING =
CHANGING
INSTANCE = lr_badi
EXCEPTIONS
* NO_REFERENCE = 1
* NO_INTERFACE_REFERENCE = 2
* NO_EXIT_INTERFACE = 3
* CLASS_NOT_IMPLEMENT_INTERFACE = 4
* SINGLE_EXIT_MULTIPLY_ACTIVE = 5
* CAST_ERROR = 6
* EXIT_NOT_EXISTING = 7
* DATA_INCONS_IN_EXIT_MANAGEM = 8
others = 0
.
check lr_badi is bound. "The logical expression checks whether a reference variable contains a valid reference
call method lr_badi->rupssend_done
exporting i_apihdr = ls_param.
ENDFORM.