I_InactiveWorker

DDL: I_INACTIVEWORKER Type: view_entity COMPOSITE Package: VDM_WFD_WORK_FORCE

Active or Inactive Status of a Worker

I_InactiveWorker is a Composite CDS View that provides data about "Active or Inactive Status of a Worker" in SAP S/4HANA. It reads from 1 data source (I_BPUsrExternalID) and exposes 2 fields with key field BusinessPartner. Part of development package VDM_WFD_WORK_FORCE.

Data Sources (1)

SourceAliasJoin Type
I_BPUsrExternalID bpexid inner

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Active or Inactive Status of a Worker view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (2)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner bp BusinessPartner
WorkforceAssignmentStatus _Inactive WorkforceAssignmentStatus
@AbapCatalog.viewEnhancementCategory:[#NONE]
@AccessControl.authorizationCheck:#MANDATORY
@EndUserText.label:'Active or Inactive Status of a Worker'
@Metadata.ignorePropagatedAnnotations:true
@VDM:{
viewType:#COMPOSITE,
lifecycle.contract.type:#SAP_INTERNAL_API
}
@ObjectModel.usageType:{
serviceQuality:#X,
sizeCategory:#L,
dataClass:#MIXED
}
@Consumption.dbHints:[ 'USE_HEX_PLAN' ]
//............................................................................................................................

// This CDS view is meant for private consumption in Worker Overview ONLY ---- Do not use it for for other applications

//............................................................................................................................


define view entity I_InactiveWorker
  as select distinct from           I_BusinessPartner        as bp
    inner join             I_BPUsrExternalID        as bpexid    on bp.BusinessPartner            = bpexid.BusinessPartner
                                                                 and(
                                                                   bpexid.BPIdentificationType    = 'HCM001' // HCM001 - Employee ID

                                                                   or bpexid.BPIdentificationType = 'HCM030' // HCM030 - Service Agent

                                                                 )
    left outer to one join I_InactiveWorkAssignment as _Inactive on _Inactive.BusinessPartner = bpexid.BusinessPartner


{
  key bp.BusinessPartner                  as BusinessPartner,
      //blocked.IsBlocked,

      _Inactive.WorkforceAssignmentStatus as WorkforceAssignmentStatus,
      @Semantics.booleanIndicator: true
      case _Inactive.WorkforceAssignmentStatus
      when '1'
      then ' '
      when '0'
      then  'X'
      else
      ' '  end                            as WorkerIsInactive
}
//  as select distinct from  I_InactiveWorkAssignment as _WorkAssignment

//    inner join             I_BusinessPartner        as _BP               on _BP.BusinessPartner = _WorkAssignment.BusinessPartner

//    left outer to one join I_InactiveWorkAssignment as _ActiveAssignment on  _ActiveAssignment.BusinessPartner  = _WorkAssignment.BusinessPartner

//                                                                         and _ActiveAssignment.WorkerIsInactive = ' '

//{

//  key _BP.BusinessPartner as BusinessPartner,

//      case

//      when _ActiveAssignment.BusinessPartner <> ''

//      then cast('' as boolean)

//      else cast('X' as boolean)

//      end                 as WorkerIsInactive

//}

//where

//  _BP.BusinessPartner is not initial