P_RSHCalWorkDaysTimeFrame
Return the calendar work days within the required time frame
P_RSHCalWorkDaysTimeFrame is a Consumption CDS View that provides data about "Return the calendar work days within the required time frame" in SAP S/4HANA. It reads from 1 data source (P_RSHCALWORKDAYS) and exposes 4 fields with key fields Client, WorkDays, CalendarDate, CapacityInternalID. Part of development package RSH_CDS_WC_CONSUMPTION.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_RSHCALWORKDAYS | P_RSHCALWORKDAYS | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_StartDate | datum | |
| P_EndDate | datum |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRSHCALWDTF | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
@AbapCatalog.sqlViewName: 'PRSHCALWDTF'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
/*
CONTRACT**********************************************************************************************************************
Name: Calander Working Days for requested timeframe
Specification: This view retrieves the information on whether each day is a working day(1) or not(0), as per the
factory calander
Requires: NA
Ensures: Information on whether each day is a working day(1) or not(0), as per the factory calander
is returned. Only the days within the requested timeframe is included in the results
Owners: PRP
Contributors: CK, AN
Unit Test required Y/N: Yes
END OF CONTRACT***************************************************************************************************************
*/
define view P_RSHCalWorkDaysTimeFrame
with parameters
P_StartDate : datum,
P_EndDate : datum
as select from P_RSHCALWORKDAYS( P_SAPClient : $session.client ) isWorkDay
{
key isWorkDay.client as Client,
key isWorkDay.WorkDays as WorkDays,
key isWorkDay.CalendarDate as CalendarDate,
key isWorkDay.CapacityInternalID as CapacityInternalID
}
where isWorkDay.CalendarDate >= $parameters.P_StartDate and isWorkDay.CalendarDate <= $parameters.P_EndDate
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