cancel
Showing results for 
Search instead for 
Did you mean: 

User Id who completed Workitem

Former Member
0 Kudos

Hi Experts,

I need the id of the user who completed the work item. Let me explain in detail. We are having a User decision step. Based on the outcome, i have to update in a table with the id of user who completed the User decision.

Say Work flow is started. User decision Work item is in User A. He is the only one agent. He opens the work item and the WI status changes to In Process from Ready. Now when Administrator or through FM SAP_WAPI_DECISION_COMPLETE if some other user completes the User A' WI. Still the actual agent will be User A but the WI is completed by different user.

Also, for using SAP_WAPI_DECISION_COMPLETE FM the user id passed in 'USER' export parameter need Workflow Administrator Authorization?

Can someone help, how to get the work item completed users id.

- Rk

Accepted Solutions (1)

Accepted Solutions (1)

former_member193771
Contributor
0 Kudos

Hi RK,

In every task in the workflow there should be a standard container element wi_actual_agent. This would carry the user id who processed the workitem.

Sukumar.

Answers (1)

Answers (1)

surjith_kumar
Active Contributor
0 Kudos

Hi,

Check the workflow log you can find the details.

And also use this FM SAP_WAPI_GET_WORKITEM_DETAIL Pass the workitem id and get the details of it.

Regards,

Surjith

Former Member
0 Kudos

Hi Surjith,

Thanks for your reply. I checked SAP_WAPI_GET_WORKITEM_DETAIL FM. The completed by user id is not returned in it...

vijy_mukunthan
Active Contributor
0 Kudos

Hi RK

There is field callled WI_AAGENT from the export parameter(WORKITEM_DETAIL) of FM SAP_WAPI_GET_WORKITEM_DETAIL. This displays the actual agent(approver). Even in the log you can check that WiActual_Agent the userid here and the WI_AAGENT field would be same. Check these fields.

Regards

vijay

bpawanchand
Active Contributor
0 Kudos

Even I too had a same scenario , like when ever the user decision step is executed by anym of the user then i need to update a custom table then , I made use of program exists tab of the user decision step.

check this [wiki|https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/programExitsIn+Workflow]