cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to retrieve who the current approver of a work item is from top-level work item ids?

YABAPER
Explorer
0 Kudos
192

Hi

I have a cds view that generates a report of work items from the swwwihead and swwuserwi tables. I have already used the field user_id but it has many blanks for the approvers columns. Upon further inspection in SE11 under table SWWUSERWI, it seems that these records do not exist but are present in the SWWWIHEAD table, is this because they are top level work items? If so, how can this be used to pull the actual current approver?

define view Test_Report as select from swwwihead as x

left outer join swwwihead as z on x.wi_id = z.top_wi_id
and z.wi_type =  'W'
and z.wi_stat <> 'COMPLETED'

left outer join swwuserwi as y on z.wi_id = y.wi_id
{
x.wi_id   as WorkItemID
y.user_id as Approver
}

 

Accepted Solutions (0)

Answers (0)