on 08-09-2012 7:48 AM
Hi experts,
I want to approve user desion step in a worklfow program exit during a workflow process, that is, the step will be approved automatically based on some condition by the same agent ( who receives the work item ) . Knidly pass me some useful solution for this..
Thank You
Ramesh
Hello,
Could you please explain further, with an example?
If approval is no longer necessary you could have a fork that checks for that.
regards
Rick Bakker / hanabi technology
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
We have implemented a program exit , in the decision step , to set the _wi_result parameter value 001( aprove) . Still I am unable to update the decision step by exit and work item remains in the inbox. Kindly help me on this . Below is my code from program exit.
* Local data
data: lr_wf_container type ref to if_swf_ifs_parameter_container,
lr_wi_container type ref to if_swf_ifs_parameter_container.
data: lv_wi_id type sww_wiid,
lv_rej_text type exmai,
lv_ustatus type sysubrc,
lv_se_number type lblni,
lv_wi_result type i,
lv_exit_ind type char1 value 'C',
lv_bef_exec type sww_evttyp value 'BEF_EXEC'.
constants: lc_wi_result type swfdname value '_WI_RESULT'.
* Get the reference to the workflow container
call method im_workitem_context->get_wf_container
receiving
re_container = lr_wf_container.
* Get the reference to the workitem container
call method im_workitem_context->get_wi_container
receiving
re_container = lr_wi_container.
case im_event_name.
when lv_bef_exec.
lv_wi_result = '001'. " Approve
try.
call method lr_wi_container->set
exporting
name = lc_wi_result
value = lv_wi_result
importing
returncode = lv_ustatus.
* if there is no update! please abort
if lv_ustatus <> 0.
message x001(000) with lv_ustatus.
endif.
catch cx_swf_cnt_cont_access_denied .
catch cx_swf_cnt_elem_access_denied .
catch cx_swf_cnt_elem_not_found .
catch cx_swf_cnt_elem_type_conflict .
catch cx_swf_cnt_unit_type_conflict .
catch cx_swf_cnt_elem_def_invalid .
catch cx_swf_cnt_container .
endtry.
when others.
endcase.
endmethod.
Thank you
Ramesh
hI,
It is possible you put a activity step to collect list of approvers in previous level. Then take a loop on the approvers container element, if current approver is exist in the approver container element. condition step before Decision step and check it is previously approved by any user. If approver was there then send the User decision first in background step, in binding collect the workitem id,
then use one activity step to call SAP_WAPI_DECISION_COMPLETE to complete the decision step.
Thank you for your reply.
In the workflow container, one of the table container contains all approver and their levels.
I hope by using this we can write the condition for repeated uesrs but my concern is, for the repeted users how to approve programmetically.As i know the RFC SAP_WAPI_DECISION_COMPLETE we cannot use in the program exit.
Please help me on this.
Regards,
Ramesh
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.