on 09-18-2014 4:04 AM
Hello Experts,
I need to get the status of Approve or Reject from user decision step. How can i do it??
Thanks,
Mohammed.
Hi Mohammed
It's always good to explain fully!
Where do you need to know the decision? In the WF ? Outside the WF? Some later step of the WF?
If in the WF, Gautham has already explained it.
If outside the WF in an independent ABAP code, you can call FM SAP_WAPI_DECISION_READ. You would however need a work item ID of the decision step.
If the question pops up "How do I get the Workitem ID outside the wf" then please do explain what exactly are you trying to achieve, what is the base object (PO or a PR or a Leave Request), what is the BO and so on.
Regards,
Modak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Modak,
I am writing ABAP code to fetch status. The full scenario is given below:
I got a button on screen, clicking that button will pop-up 3 fields and a submit button (Webdynpro screen). Now i need to enter the 3 fields and upon clicking the submit button workflow triggers with custom business object. Basically business object will pass data from webdynpro screen to workflow. workflow has an activity step, email step and decision step.
Retrieved the container elements(i.e. 3 input fields given from webdynpro screen) from email step and need to get the status from user decision. I dont know how to link between email step and decision step as both got different TASK id and Workitem id.
Thanks,
Mohammed.
Hi Mohammed
If I understand you correctly, you need to send an email AFTER the decision and inform on the 3 fields + the decision (Approved or Rejected) ..... then please follow what Gautham advised ... set a workflow container element , say APP_RSULT to 'Approved' in the Approval Branch and to 'Rejected' in the rejection branch. Use that in the email step.
or create two separate email steps, in each approval branch of the workflow - each can have entirely different text based on the decision.
Regards,
Modak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"how to capture the status??"
Have a look at the container of the Decision step after it has been executed.
One of the elements will contain the result. Pass that back to the workflow container.
Or, you can add an extra step in the Yes branch to set result_value = Yes. You have to create the container element result_value in the workflow container.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.