on 12-12-2011 10:11 AM
I set a background process level with process type 'automatic' and I want to reject the WF within it. This is my code:
lo_pdo_bo_sc ?= /sapsrm/cl_pdo_factory_sc_adv=>get_instance(
iv_header_guid = lv_document_guid
iv_mode = /sapsrm/if_pdo_constants_gen_c=>gc_mode_display
iv_wiid = iv_workitem_id
iv_user_id = iv_agent_id ).
endif.
lo_pdo_bo_sc->/sapsrm/if_pdo_adv_base~reject( ).
I set the mode = DISPLAY, since if I set it EDIT, it will reise an exception /SAPSRM/CX_PDO_WF_RECALL_RQ .
So in DISPLAY mode, when i call the reject method, I will get the exception CX_SY_REF_IS_INITIAL. It is caused by the mo_user_context object is INITIAL.
So I do not know what is wrong with my method. Maybe the input user or mode?
Or else, there is another way to reject the SC wf in backgound process level?
HI,
In your process level definittion you can use task ID as 40007989 ( Automatic rejection).
Hope this solves your issue
Regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.