cancel
Showing results for 
Search instead for 
Did you mean: 

FM to determine the approver user

RicardoRomero_1
Active Contributor
0 Kudos

Hi all,


Do you know if there is a FM to get the user who approved a document?


In our system we have, for Confirmations for example, several approval eschemas with several process levels.
What we want to know is the user who approved the last level. (or the current level)

Do you know if exists a FM to get this user? Or do I need to read all the workflow's workitems and select the user from table swwwihead or something like that.

Thanks in advance,
Regads,
Ricardo.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185167
Active Contributor
0 Kudos

Hello,

As always in SAP, you should only access the tables as a last resort (since they could change them at any time). With workflow-related queries almost everything can be done with SAP_WAPI* functions.

I think the one you need here is SAP_WAPI_READ_CONTAINER.

regards

Rick Bakker

RicardoRomero_1
Active Contributor
0 Kudos

Hello Rick,


Yes, knowing the workitem I can use this FM instead of accesing the tables.
But what I want to know is if exists an specific SRM FM to get the approver or if I need to read the WF tables...

If not I guess I can use FM  SAP_WAPI_WORKITEMS_TO_OBJECT to get all the workitems and then SAP_WAPI_READ_CONTAINER to obtain the user.

Thanks,

I042439
Employee
Employee
0 Kudos

Hi Ricardo

You can also use SAP_WAPI_GET_WORKITEM_DETAIL which will give you the actual agent in WORKITEM_DETAIL-WI_AAGENT

regards,

Modak