I_WorkflowTaskRecipient

DDL: I_WORKFLOWTASKRECIPIENT Type: view BASIC

Work item recipients

I_WorkflowTaskRecipient is a Basic CDS View that provides data about "Work item recipients" in SAP S/4HANA. It reads from 9 data sources and exposes 16 fields with key fields WorkflowTaskInternalID, WorkflowTaskRecipient, WorkflowTaskSubstitutedUser, WorkflowTaskRecipient, WorkflowTaskSubstitutedUser.

Data Sources (9)

SourceAliasJoin Type
hrus_d2 hrus_d2 right_outer
hrus_d2 hrus_d2 right_outer
swwuserwi swwuserwi inner
swwuserwi swwuserwi inner
swwuserwi swwuserwi inner
swwwihead swwwihead from
swwwihead swwwihead union
swwwihead swwwihead union
twfs twfs right_outer

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName IWFTASKRECIPIENT view
AbapCatalog.buffering.type #NONE view
EndUserText.label Work item recipients view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY WorkflowTaskInternalID swwwihead wi_id
KEY WorkflowTaskRecipient
KEY WorkflowTaskSubstitutedUser
WorkflowTaskIsForwarded swwuserwi forward
wi_idasWorkflowTaskInternalID
KEY WorkflowTaskRecipient
KEY WorkflowTaskSubstitutedUser
WorkflowTaskIsForwarded swwuserwi forward
clientNULL
client
clientNULL
client
wi_idasWorkflowTaskInternalID
KEY WorkflowTaskRecipient
KEY WorkflowTaskSubstitutedUser
WorkflowTaskIsForwarded swwuserwi forward
@AbapCatalog : {
  sqlViewName: 'IWFTASKRECIPIENT',
  buffering.type: #NONE
}
@EndUserText.label: 'Work item recipients'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType : {
  dataClass: #CUSTOMIZING,
  serviceQuality: #C,
  sizeCategory: #L
}
define view I_WorkflowTaskRecipient

  // Select all tasks in progress or ready and the recipient for each task

  as select from swwwihead
    inner join   swwuserwi on swwwihead.wi_id = swwuserwi.wi_id

{
  key swwwihead.wi_id                            as WorkflowTaskInternalID,
  key cast( swwuserwi.user_id as sww_recipient ) as WorkflowTaskRecipient,
  key cast( ' ' as sww_recipient )               as WorkflowTaskSubstitutedUser,
      swwuserwi.forward                          as WorkflowTaskIsForwarded,
      case swwuserwi.no_sel
        when 'X' then cast( ' ' as sww_inbox )
        else cast ( 'X' as sww_inbox )
      end                                        as WorkflowTaskIsVisibleInInbox
}
where
       swwwihead.wi_type = 'W'
  and(
       swwwihead.wi_stat = 'READY'
    or swwwihead.wi_stat = 'SELECTED'
    or swwwihead.wi_stat = 'STARTED'
    or swwwihead.wi_stat = 'COMMITTED'
  )

union
// Select all tasks in progress or ready and all valid (active) substitutes for the recipient of each task

// Restriction: The subsitute profile (REPR in HRUS_D2) is not taken into account,

//              meaning all selected substitues may not be valid (bacause of the confidentiality level of the task)

select from        swwwihead
  inner join       swwuserwi on swwwihead.wi_id = swwuserwi.wi_id
  right outer join hrus_d2   on swwuserwi.user_id = hrus_d2.us_name
{
  key swwwihead.wi_id                           as WorkflowTaskInternalID,
  key cast( hrus_d2.rep_name as sww_recipient ) as WorkflowTaskRecipient,
  key cast( hrus_d2.us_name as sww_recipient )  as WorkflowTaskSubstitutedUser,
      swwuserwi.forward                         as WorkflowTaskIsForwarded,
      case swwuserwi.no_sel
        when 'X' then cast( ' ' as sww_inbox )
        else cast ( 'X' as sww_inbox )
      end                                       as WorkflowTaskIsVisibleInInbox
}
where
       swwwihead.wi_type =  'W'
  and(
       swwwihead.wi_stat =  'READY'
    or swwwihead.wi_stat =  'SELECTED'
    or swwwihead.wi_stat =  'STARTED'
    or swwwihead.wi_stat =  'COMMITTED'
  )
  and  hrus_d2.active    =  'X'
  and  hrus_d2.begda     <= tstmp_to_dats(
    tstmp_current_utctimestamp(), abap_system_timezone(
      $session.client, 'NULL'
    ), $session.client, 'NULL'
  )
  and  hrus_d2.endda     >= tstmp_to_dats(
    tstmp_current_utctimestamp(), abap_system_timezone(
      $session.client, 'NULL'
    ), $session.client, 'NULL'
  )
union


// Select all tasks in progress or ready and all valid (active) passive substitutes for the recipient of each task

// Restriction: The subsitute profile (REPR in HRUS_D2, and TWFS) is not taken into account,

//              meaning all selected substitues may not be valid (bacause of the confidentiality level of the task)

select from        swwwihead
  inner join       swwuserwi on swwwihead.wi_id = swwuserwi.wi_id
  right outer join hrus_d2   on swwuserwi.user_id = hrus_d2.us_name
  right outer join twfs      on hrus_d2.us_name = twfs.objid
{
  key swwwihead.wi_id                           as WorkflowTaskInternalID,
  key cast( twfs.uname as sww_recipient )       as WorkflowTaskRecipient,
  key cast( twfs.objid as sww_recipient )       as WorkflowTaskSubstitutedUser,
      swwuserwi.forward                         as WorkflowTaskIsForwarded,
      case swwuserwi.no_sel
        when 'X' then cast( ' ' as sww_inbox )
        else cast ( 'X' as sww_inbox )
      end                                       as WorkflowTaskIsVisibleInInbox
}
where
       swwwihead.wi_type =  'W'
  and(
       swwwihead.wi_stat =  'READY'
    or swwwihead.wi_stat =  'SELECTED'
    or swwwihead.wi_stat =  'STARTED'
    or swwwihead.wi_stat =  'COMMITTED'
  )
  and  hrus_d2.active    =  ''
  and  hrus_d2.begda     <= tstmp_to_dats(
    tstmp_current_utctimestamp(), abap_system_timezone(
      $session.client, 'NULL'
    ), $session.client, 'NULL'
  )
  and  hrus_d2.endda     >= tstmp_to_dats(
    tstmp_current_utctimestamp(), abap_system_timezone(
      $session.client, 'NULL'
    ), $session.client, 'NULL'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"HRUS_D2",
"SWWUSERWI",
"SWWWIHEAD",
"TWFS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/