cancel
Showing results for 
Search instead for 
Did you mean: 

Workitem - Approve/Reject

Former Member
0 Kudos

Hello Experts,

I have a work item which has 2 options Approve/Reject. User can do either one i.e approve or reject.

Now based on either action I need to process the workflow for further approval/rejection notice.

How can I capture what user has done i.e Accept/Reject and pass to next task.

Thanks

Nani

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member184495
Active Contributor
0 Kudos

Hi Nani,

what you could do is, create a WF container wf_flag, and in your method capture a flag for Approve 'A' Reject 'R', pass this value to task container and from task container to Wf container, and in your WF use the check condition and according proceed further.

Hope it helps,

As I do not know which object or template you are using, you could try this out.

Aditya

Former Member
0 Kudos

Hai,

If you are using custom BOR, in Result parameter - <b>SWXFORMABS</b>

: <i><b>PROCSTATE</b></i> can be used. Accordingly in the Task which uses the method with this result parameter will have <b>2 outcomes</b> Approve and Reject. Activate these outcomes.

In the Function Module used in this method, <b>create a Screen</b> with 2 buttons - Approve and Reject. As per the sy-ucomm, <i>set container element</i>- <b>Status</b> in Workflow.

Now, by defining subsequent activities in the corresponding outcomes, they can be processed.

Thanks & Regards,

Jubish

Former Member
0 Kudos

Sorry. Here are the details.

These are all custom workflow and custom screens. Nothing standard

When I user creates a request. I send a workitem to his supervisor.

On I need to know if he has approved or rejected. I have this in my sy-ucomm but this sy-comm does not come to method.

I need to get this into method and pass this to next task.

Former Member
0 Kudos

I would say : attach an event on the button (launch an event depending on which button clicked, and add a parrallel section with two branches.

On these two branches put a wait for event step, and link the according event on this step.

i.e., you create two events , agree and not_agree.

the event agree is raised when the user approves, the event not_agree is raised when the user disagrees.

In your workflow you put a parrallel section after the step on which he gives his approval/rejection, on branch A put a 'wait for event' linked on the event agree.

On branch B, put a wait for event linked on not_agree.

depending on the decision of your user, another branch will be executed.

Maybe that there are other users which have better solutions...

KKilhavn
Active Contributor
0 Kudos

I don't know how you display your screens etc. Perhaps you submit a program or call a transaction code? One option I have used myself is to put the screen in a function group. I then call the function module from my BOR object and let the function module return a value indicating what the user did (e.g. based on or directly using a variable defined in the TOP include of the function module).

This way you can take care of your event-raising from the BOR object, if you want to use that approach. Or you can set up a return parameter from the method to the workflow (which is probably the solution you are using now).

former_member184112
Active Contributor
0 Kudos

Hi Nani,

Which module you are doing? What is your Object and Workflow?

Then you can get proper answer from us.

Thanks and Regards,

Prabhakar Dharmala

Former Member
0 Kudos

Hi Nani,

can you tell us how you do the approval/rejection ? Do you use a user decision or is it in the method self.

Normally you should have two 'legs' after the method where you have your choice. Depending on the decision you make, the workflow will process the 'leg' attached to this choice...