cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the user ID of the old agent of a forwarded worktiem in workflow?

hafizul_mollah2
Participant
0 Kudos

Dear Workflow Specialists,

Lets assume that Hafizul has forwarded one dialog workitem from the User1 to User2 and then User2 has taken action on that workitem and now the worktiem has been completed.

Now the question is that from the given worktiem ID how can I get the user ID of the 1st receiver of the dialog workitem(in the above example it is User1)?

Any SAP standard table? or any SAP standard FM? Any any logic to get this information?

Note:From tables 'SWWWIHEAD', 'SWWLOGHIST' I am getting the user ID of the last person who has taken the action on the dialog worktiem(in the above example it is User2).

Please let me know the logic to get the user ID of the 1st person who received the workitem before forwarding to other person from him/her(in the above example it is User1).

Thanks in advance.

Hafizul,IBM

Accepted Solutions (0)

Answers (4)

Answers (4)

rambabu_k3
Active Participant
0 Kudos

Hi Hafizul,

As Anjan is suggested, please check table SWWLOGHIST and check for the entry SWW_WI_FORWARD value in the field SWWLOGHIST-METHOD.

In other terms, when WI is forwarded, an entry eill be created in this table with SWW_WI_FORWARD in Method column.

Thanks

Rambabu

hafizul_mollah2
Participant
0 Kudos

Hi Rambabu,

Thanks for reply.

I have check the table in the same way....it is creating the entry for forwarding which is storing the user id who has frwarded and to whom it was forwarded but i need the user id of the person from whom it was forwarded.

Example:If Z is forwarding the workitem from X to Y,then i need the user id of X(in this table Z and Y are being stored for the worktiem id but not storing X).

former_member185167
Active Contributor
0 Kudos

The way the question has been described (user C forwards from A to B) would not show user A in SWWLOGHIST.

hafizul_mollah2
Participant
0 Kudos

Hi Rick,

Thanks for the reply.....So dont we have any other way or any other table or combination of tables from where we can get user A(user C forwarded from A to B)?

former_member185167
Active Contributor
0 Kudos

Hi Hafizul,

That depends. How was user A determined in the workflow? If it was done in a preceding step and you can see user A in the workflow log (in the containers) then yes, you can retrieve user A using the SAP_WAPI* functions to read the container.

regards

Rick

anjan_paul
Active Contributor
0 Kudos

HI,

  Please recheck again in SWWLOGHIST and search with *FORWARD* , I think it will show all forward history

hafizul_mollah2
Participant
0 Kudos

Hi Anjan,

Thanks for the reply.

I have checked this 'SWWLOGHIST' by providing the workitem ID number and METHOD = 'SWW_WI_FORWARD' and it is showing the forwarding history which contains who forwarded,and to whom but from whom worktiem was forwarded is not there in this table.

Basically,our business has asked to give the details from the production system only without any further new report/application-so we need to get the table details from where we can get all the three required details

Worktiem ID,who forwarded,from whom,to whom.

former_member185167
Active Contributor
0 Kudos

Hello,

It depends how the original agent was determined. If it was done in a preceding step and stored in the container then you can get it from the workflow container (using SAP_WAPI* functions). If it was determined directly in the step then it won't be so easy.

regards

Rick Bakker

hafizul_mollah2
Participant
0 Kudos

Hi Rick,

Thanks for the reply.

Agents have been determined by the WF Rule resolution in the previous step.

Yes,using the FMs we can build the logic but the requirement is as follow.

Our business has asked to give the details from the production system only without any further new report/application-so we need to get the table details from where we can get all the three required details

Worktiem ID,who forwarded,from whom,to whom.

Former Member
0 Kudos

Hi Hafizul,

Check in table SWWUSERWI.

You can get both agents who is responsible agent as well Actual agent by passing WIID.

For more information refer following thread

http://scn.sap.com/thread/1499109#8277863

Regards,

Ragva

Message was edited by: Ragavendran Kanagaraj

hafizul_mollah2
Participant
0 Kudos

Hi Ragav,

Thanks for the reply.

I have checked this 'SWWUSERWI' table also but it is not giving the person's user ID from whose inbox the workitem was forwarded to another.

I have read the given thread also but after all the discussion the final solution was not concluded.

The main difference with the requirement with that thread is-he wanted to write a new report for this requirement but here the requirement is-

Our business has asked to give the details from the production system only without any further new report/application-so we need to get the table details from where we can get all the three required details

Worktiem ID,who forwarded,from whom,to whom.

Thanks

Hafizul.