cancel
Showing results for 
Search instead for 
Did you mean: 

How to read workflow history

martin_svik2
Participant
0 Kudos

hi there,

i have the following requirement: i have some workflows where user can e.g. approve purchase orders, recject purchase orders or forward the workitem to another user. this can happen often inside one workflow.

now my customer wants to see the history of the workflow in a list -> simply said "who has done what and when"-> for example:

User A has forwarded workflow to User B on date yyyy.mm.tt

User B has forwarded workflow to User C on date yyyy.mm.tt

User C has approved workflow on date yyyy.mm.tt

Is there any suitable FM for that ? I can't find anything

br Martin

Accepted Solutions (1)

Accepted Solutions (1)

former_member185167
Active Contributor
0 Kudos

SAP_WAPI* fms are very useful for reporting.

SAP_WAPI_FORWARDING_INFO_GET

SAP_WAPI_GET_WORKITEM_DETAIL

SAP_WAPI_READ_CONTAINER

SAP_WAPI_GET_DEPENDENT_WIS

etc

Answers (3)

Answers (3)

former_member183134
Participant
0 Kudos

Dear Martin,

If i understood your requirement then you will get all the information referred below.

In the user decision step go to control tab.

Go for binding in the control tab.

In the right hand side you can system variable. In that Expand the BOR (_WORKITEM) .

In this you will find all the system variables related to Work item. (Who executed, who forwarded, when completed etc)

Create local container in the work flow and map required variables from User decision step to workflow by this way u will get the values in workflow then you can use it further in mail sending step also approved/rejected/forwarded on this date.

Below screen shot for your reference.

Thanks,

Anand

martin_svik2
Participant
0 Kudos

Hi Mike, hi Rick,

thank you both for the hints. @Rick: you are doing a great jobs for many years here in the forum

now i see the problem: reading out the forwardings of an workflow is different to reading out the decisions.

the other problem is that i have to read ALL workitems of a workflow.

so that will be a little bit more of logic and coding as i expected

br Martin

pokrakam
Active Contributor
0 Kudos

Hi Martin,

Unfortunately you would have to dig into the log for some of these. The WAPI functions will let you retrieve some of the basic info, such as getting dialog items. You would need to use something like SWW_WI_LOG_READ and pull apart the results to get information like forwarding etc.

Not a small task, but doable.

Regards,

Mike