P_WorkAssignmentCostCenterDets
Work Assignment Details with Cost Center
P_WorkAssignmentCostCenterDets is a Composite CDS View that provides data about "Work Assignment Details with Cost Center" in SAP S/4HANA. It reads from 3 data sources (I_CostCenter, I_WorkAssignmentDetailsAll, I_WorkAssignmentDetailsAll) and exposes 13 fields with key fields WorkAssignment, WorkAssignmentStartDate, WorkAssignmentStartDate. Part of development package VDM_WFD_WORK_FORCE.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CostCenter | CostCenter | inner |
| I_WorkAssignmentDetailsAll | dets | from |
| I_WorkAssignmentDetailsAll | dets | union_all |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | WorkAssignment | I_WorkAssignmentDetailsAll | WorkAssignment | |
| KEY | WorkAssignmentStartDate | I_WorkAssignmentDetailsAll | WorkAssignmentStartDate | |
| WorkAssignmentEndDate | I_WorkAssignmentDetailsAll | WorkAssignmentEndDate | ||
| CompanyCode | I_WorkAssignmentDetailsAll | CompanyCode | ||
| CostCenter | I_WorkAssignmentDetailsAll | CostCenter | ||
| ControllingArea | I_CostCenter | ControllingArea | ||
| WorkAssignment | ||||
| KEY | WorkAssignmentStartDate | I_WorkAssignmentDetailsAll | WorkAssignmentStartDate | |
| WorkAssignmentEndDate | I_WorkAssignmentDetailsAll | WorkAssignmentEndDate | ||
| CompanyCode | I_WorkAssignmentDetailsAll | CompanyCode | ||
| CostCenter | I_WorkAssignmentDetailsAll | CostCenter | ||
| ControllingArea | ||||
| ValidityEndDate |
/***Only for Private Consumption in I_ActiveWorkAssignmentsVH***/
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MASTER
}
@VDM.viewType: #COMPOSITE
@VDM.private:true
define view entity P_WorkAssignmentCostCenterDets
as select from I_WorkAssignmentDetailsAll as dets
inner join I_CostCenter as CostCenter on dets.CostCenter = CostCenter.CostCenter
and dets.ControllingArea = CostCenter.ControllingArea
and dets.CompanyCode = CostCenter.CompanyCode
and CostCenter.ValidityEndDate >= dets.WorkAssignmentEndDate
and CostCenter.ValidityStartDate <= dets.WorkAssignmentEndDate
//Fetch Cost Center Details where CC is valid for complete duration of assignment,
//If not valid then Controlling Area & CC Validity End date would be blank
{
key dets.WorkAssignment,
@Semantics.businessDate.from
key dets.WorkAssignmentStartDate,
@Semantics.businessDate.to
dets.WorkAssignmentEndDate,
dets.CompanyCode,
dets.CostCenter,
CostCenter.ControllingArea,
CostCenter.ValidityEndDate
}
where
dets.CompanyCode <> ''
and dets.CostCenter <> ''
and dets.WorkAssignmentStatus = '1'
and dets.WorkAssignmentEndDate >= $session.system_date
union all
select from I_WorkAssignmentDetailsAll as dets
//Fetch Job Details where CC is not Assigned
{
key dets.WorkAssignment,
key dets.WorkAssignmentStartDate,
dets.WorkAssignmentEndDate,
dets.CompanyCode,
dets.CostCenter,
'' as ControllingArea,
cast ( '00000000' as datbi) as ValidityEndDate
}
where
dets.CompanyCode <> ''
and dets.CostCenter = ''
and dets.WorkAssignmentStatus = '1'
and dets.WorkAssignmentEndDate >= $session.system_date
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