I_TimeSheetApprovalUser

DDL: I_TIMESHEETAPPROVALUSER Type: view_entity COMPOSITE Package: ODATA_HCM_CATS_REPORTING

Retrieve Timesheet Approval Users

I_TimeSheetApprovalUser is a Composite CDS View that provides data about "Retrieve Timesheet Approval Users" in SAP S/4HANA. It reads from 1 data source (I_TimeSheetRecord) and exposes 3 fields with key field TimeSheetRecord. Part of development package ODATA_HCM_CATS_REPORTING.

Data Sources (1)

SourceAliasJoin Type
I_TimeSheetRecord _TimeSheet from

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Retrieve Timesheet Approval Users view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY TimeSheetRecord I_TimeSheetRecord TimeSheetRecord
PersonWorkAgreement I_TimeSheetRecord PersonWorkAgreement
LastChangedByUserelseendasUserID
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Retrieve Timesheet Approval Users'
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType:{
  serviceQuality: #D,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity I_TimeSheetApprovalUser
  as select from            I_TimeSheetRecord       as _TimeSheet

    left outer to many join I_WorkflowRecipients_V2 as _WorkflowRecipients on  _TimeSheet.WorkflowTaskInternalID               is not initial
                                                                           and _TimeSheet.TimeSheetStatus                      = '20'
                                                                           and _WorkflowRecipients.WorkflowTaskInternalID      = _TimeSheet.WorkflowTaskInternalID
                                                                           and _WorkflowRecipients.WorkflowTaskSubstitutedUser is initial //Suppose substituted User is there, we won't show approver details in MMT

{
  key _TimeSheet.TimeSheetRecord,   
      _TimeSheet.PersonWorkAgreement,
      case _TimeSheet.TimeSheetStatus
           when '20' then _WorkflowRecipients.WorkflowTaskRecipient
           when '30' then _TimeSheet.TimeSheetApprovedByUser
           when '40' then _TimeSheet.LastChangedByUser
           else ''
        end as UserID
}
where
  (
       _TimeSheet.TimeSheetStatus = '20'
    or _TimeSheet.TimeSheetStatus = '30'
    or _TimeSheet.TimeSheetStatus = '40'
  )