P_RSHThisWeekAndNextWeek
P_RSHThisWeekAndNextWeek is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 5 fields with key field DateOfCurrentWeek.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | I_CalendarDate | from |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRSHTHISCWNEXTCW | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (5)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DateOfCurrentWeek | CalendarDate | ||
| DateOfNextWeek | ||||
| DateOfPreviousWeek | ||||
| DateofThirdWeek | ||||
| DateofFourthWeek |
@AbapCatalog.sqlViewName: 'PRSHTHISCWNEXTCW'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
/*
CONTRACT**********************************************************************************************************************
Name: Date of current week and next week
Specification: This view helps to convert rows into columns in work center utilization service.
It is not possible to return two calendar weeks with one CDS View.
Requires: NA
Ensures: Date of current week and next week is returned
Owners: AN
Contributors: PRP
Unit Test required Y/N: Yes
Additional comments None
END OF CONTRACT***************************************************************************************************************
*/
define view P_RSHThisWeekAndNextWeek
as select from I_CalendarDate
{
key CalendarDate as DateOfCurrentWeek,
dats_add_days(CalendarDate, 7, 'FAIL') as DateOfNextWeek,
dats_add_days(CalendarDate, -7, 'FAIL') as DateOfPreviousWeek,
dats_add_days(CalendarDate, 14, 'FAIL') as DateofThirdWeek,
dats_add_days(CalendarDate, 21, 'FAIL') as DateofFourthWeek
}
where
CalendarDate = $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