I_InactiveWorkAssignment
Work Assignment Status of a Worker
I_InactiveWorkAssignment is a Composite CDS View that provides data about "Work Assignment Status of a Worker" in SAP S/4HANA. It reads from 2 data sources (I_WorkAssignmentDetail_1, I_WorkforcePersonKeyMap) and exposes 3 fields with key field BusinessPartner. Part of development package VDM_WFD_WORK_FORCE.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_WorkAssignmentDetail_1 | assgmtdets | inner |
| I_WorkforcePersonKeyMap | keymap | from |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Work Assignment 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 | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (3)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BusinessPartner | I_WorkforcePersonKeyMap | BusinessPartner | |
| WorkforceAssignmentStatus | ||||
| IsBlocked |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Work Assignment Status of a Worker'
@Metadata.ignorePropagatedAnnotations: true
@VDM: {
viewType: #COMPOSITE,
lifecycle.contract.type: #SAP_INTERNAL_API
}
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #XL,
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_InactiveWorkAssignment
as select from I_WorkforcePersonKeyMap as keymap
// I_WorkforceAssignment_1 as assgmt
// inner join I_WorkforcePersonKeyMap as keymap on keymap.WorkAssignment = assgmt.WorkforceAssignment
inner join I_WorkAssignmentDetail_1 as assgmtdets on assgmtdets.WorkforceAssignment = keymap.WorkAssignment
and(
(
assgmtdets.WorkforceAssgmtStartDate <= $session.system_date
and assgmtdets.WorkforceAssgmtEndDate >= $session.system_date
)
or(
assgmtdets.WorkforceAssgmtStartDate >= $session.system_date
)
)
{
key keymap.BusinessPartner,
max(assgmtdets.WorkforceAssignmentStatus) as WorkforceAssignmentStatus,
@Semantics.booleanIndicator: true
min(assgmtdets.IsBlocked) as IsBlocked
}
group by
keymap.BusinessPartner
//{
//{
// key assgmt.workforce_assgmt_id as WorkAssignment,
// key assgmt.business_partner_id as BusinessPartner,
// assgmt.start_date as StartDate,
// assgmt.end_date as EndDate,
// @Semantics.booleanIndicator
// assgmtdets.employment_status as WorkAssignmentStatus,
// case
// when
// assgmtdets.employment_status = '0'
// then cast ( 'X' as boolean )
// else cast ( ' ' as boolean )
// end as WorkerIsInactive,
// //
// case
// when keymap.IsBlocked = 'X'
// then cast( 'X' as wfd_blocked)
// else cast( ' ' as wfd_blocked )
// end as IsBlocked
//}
//where
// (
// assgmtdets.start_date < $session.system_date
// and assgmtdets.end_date > $session.system_date
// )
// and assgmt.business_partner_id 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