Hi all, I would like to keep workitem in case the user cancel the execution, the activity is Edit.. it's based on Method Edit in BOR SCASE.
Here's the code:
DATA: rms_id TYPE string,
return_value TYPE i,
activity_state TYPE i.
*--Y7AK060922--PANDEP-cust msg 0120025231 0000575665 2007--------------
clear: g_var, g_workitem.
*--PANDEP--------------------------------------------------------------
swc_get_element container 'POSITIONTOPROCEED' g_var.
swc_get_element container '_WORKITEM' g_workitem.
PERFORM start_rmf_activity USING if_srm_activity_list=>modify
object-key-guid
CHANGING activity_state
return_value.
IF activity_state NE if_srm_request=>activity_finished_with_ok
AND NOT g_workitem IS initial. "only in workflow
exit_cancelled.
ENDIF.
IF return_value <> 0.
exit_return '1000' 'SCMG_BOR_CASE->EDIT'
'start_rmf_activity' return_value space.
ENDIF.
What happens with exit_cancelled?
Does that statement retain workitem in inbox?
Regards,
Karina