on ā2014 Nov 17 7:45 AM
Dear Consultants,
I am creating a custom workflow , where i am sending work item to all first level approvers at the same time and taking approval of all approvers.
This has been achieved by parallel block profetch. However i am stuck with some scenario -
1. I want to send outlook mail to requestor's outlook ID
2. an outlook mail to all approvers ( With table in item text ,where detail and approver list should appear)
3. an most importantly i want if one of the approver rejects the work item , that work item should go to requestor for edit and resend the item only to the approver who has reected that item, but all the work work item should not go to the all approvers who have already approved the task?
Anyone has any idea?
Thanks
Request clarification before answering.
Hello
hey i am stuck with this ? Also i have one question how to send request agin to requester ?
Do you have any document ,ehich can help me out?
In the same rejection branch, save the rejection agent (_ACTUAL_AGENT from the task to the workflow in a new variable)., say in LV_REJ_AGENT of type SWHACTOR. Pass it back from the block to the workflow
After the block , send a revision item to the workflow initiator if LV_REJECTED = 'X', clear the rejection flag, after that activity of WF Initiator, loop back to top of block, replace the agent table with the LV_REJ_AGENT saved in the rejection branch.
I have created a task to read values but where i hae to creae container?
DATA: ztask_wi_id type SWWWIHEAD-WI_ID,
it_container type table of swr_wihdr,
wa_container type swr_wihdr,
lv_rej_agent type SWHACTOR.
swc_get_element container 'ztask_wi_id' ztask_wi_id.
CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
EXPORTING
workitem_id = ztask_wi_id
language = sy-langu
TABLES
simple_container = it_container
* MESSAGE_LINES =
* MESSAGE_STRUCT =
* SUBCONTAINER_BOR_OBJECTS =
* SUBCONTAINER_ALL_OBJECTS =
.
IF sy-subrc = 0.
READ TABLE it_container INTO wa_container WITH KEY WI_AAGENT = '_WI_ACTUAL_AGENT'.
ENDIF.
swc_set_element container '_WI_ACTUAL_AGENT' lv_rej_agent.
*MOVE wa_container-value TO reqndetails-employeeid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudhanshu
Why did we create a method to manipulate the container?
We need to use a loop step.
the workflow logic should look like this:
1) Start -> Get agents
2) Start loop -> end condition can be LV_APPROVED = 'X'
3) Start Block (with local container data as necessary) - end condition correctly setup - pass back necessary variables back to workflow in binding to read later on
4) End block
5) IF LV_REJECTED = 'X', send workitem to _WF_INITIATOR (available in the workflow container) - After WI completion, loop back to send the WI to the Agnets (you can overwrite the agents table with Actual Agent
6) IF LV_REJECTED <> 'X' - set LV_APPROVED = 'X' so that the loop ends
Regards,
Modak
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.