I_InactiveWorker
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)
| Source | Alias | Join Type |
|---|---|---|
| I_BPUsrExternalID | bpexid | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| 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 |
@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
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA