P_RSHResourceWeeklyUtilization
Resource Weekly Utilization Information
P_RSHResourceWeeklyUtilization is a Composite CDS View that provides data about "Resource Weekly Utilization Information" in SAP S/4HANA. It reads from 2 data sources (I_CalendarDate, P_RSHResourceUtilization) and exposes 6 fields with key fields EmploymentInternalID, YearWeek. Part of development package RSH_CDS_RES.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | _CalendarDate | inner |
| P_RSHResourceUtilization | _ResourceUtilization | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_StartDate | syst_datum | |
| P_EndDate | syst_datum | |
| P_WeekStart | abap.int1 |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRSHRESWEEKLYUTL | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (6)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmploymentInternalID | EmploymentInternalId | ||
| KEY | YearWeek | YearWeek | ||
| StartDate | ||||
| EndDate | ||||
| EmployeeAvailabilityInHours | ||||
| EmployeeStaffedHours |
@AbapCatalog.sqlViewName: 'PRSHRESWEEKLYUTL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #XL
@ClientHandling.algorithm: #SESSION_VARIABLE
/*CONTRACT*******************************************************************************************************************
Name: Resource Weekly Utilization Info
Specification: Gives weekwise utilization information for resources between the given dates
Requires: Period for which the monthly capacity information is sought
Ensures: Total Staffed and Total Availability information for resources is returned
Owners: RY
Contributors: RY
Unit Test required Y/N: Yes - uses summation
Additional comments None
END OF CONTRACT**************************************************************************************************************/
define view P_RSHResourceWeeklyUtilization
with parameters
P_StartDate : syst_datum,
P_EndDate : syst_datum,
P_WeekStart : abap.int1
as select from P_RSHResourceUtilization as _ResourceUtilization
inner join I_CalendarDate as _CalendarDate on _CalendarDate.CalendarDate = dats_add_days(
_ResourceUtilization.CalendarDate, $parameters.P_WeekStart, 'INITIAL'
)
{
key EmploymentInternalId as EmploymentInternalID,
key YearWeek,
min(_ResourceUtilization.CalendarDate) as StartDate,
max(_ResourceUtilization.CalendarDate) as EndDate,
sum(EmployeeAvailableHours ) as EmployeeAvailabilityInHours,
sum(EmployeeStaffedHours ) as EmployeeStaffedHours
}
where
_ResourceUtilization.CalendarDate between $parameters.P_StartDate and $parameters.P_EndDate
group by
EmploymentInternalId,
YearWeek
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