Hi Experts,
i wirte a program exit for one workflow task, and i use FM: SAP_WAPI_SET_WORKITEM_STATUS to set workitem status to COMPLETE at program exit. After this workitem, email step will send a mail.
Everything is fine using SWUS for testing. Program exit class activated and processing ok then go to email step successfully.
But at real scenairo, the workitem step which using my program exit is stopped at 'Completed' status , and Email step is not be executed.
Please give me some hints, many thanks.
JG
---------------------------------------------------------------------
my update status code is:
IF im_event_name EQ swrco_event_after_execution.
lw_wiid = im_workitem_context->get_workitem_id( ).
*---- complete work item
CALL FUNCTION 'SAP_WAPI_SET_WORKITEM_STATUS'
EXPORTING
workitem_id = lw_wiid
status = swfco_wi_status_completed
* USER = SY-UNAME
language = sy-langu
do_commit = 'X'
IMPORTING
return_code = lv_retcode
endif.




