P_CalendarDate
Calendar Date
P_CalendarDate is a Consumption CDS View that provides data about "Calendar Date" in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 20 fields.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | I_CalendarDate | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Date | sydate |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMMCALENDATE | view | |
| ClientDependent | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Calendar Date | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| CalendarDate | I_CalendarDate | CalendarDate | Calendar Date | |
| CalendarYear | I_CalendarDate | CalendarYear | Year | |
| CalendarQuarter | I_CalendarDate | CalendarQuarter | Calendar Quarter | |
| CalendarMonth | I_CalendarDate | CalendarMonth | Calendar Month | |
| CalendarWeek | I_CalendarDate | CalendarWeek | Calendar Week | |
| CalendarDay | I_CalendarDate | CalendarDay | Occur Day in a Month | |
| YearMonth | I_CalendarDate | YearMonth | Year Month | |
| YearQuarter | I_CalendarDate | YearQuarter | Year Quarter | |
| YearWeek | I_CalendarDate | YearWeek | Year and Calendar Week | |
| WeekDay | I_CalendarDate | WeekDay | Weekdays | |
| FirstDayOfWeekDate | I_CalendarDate | FirstDayOfWeekDate | First day of week date | |
| FirstDayOfMonthDate | I_CalendarDate | FirstDayOfMonthDate | First Day of Month | |
| CalendarDayOfYear | I_CalendarDate | CalendarDayOfYear | Calendar day of year | |
| YearDay | I_CalendarDate | YearDay | Day of the year | |
| _CalendarMonth | I_CalendarDate | _CalendarMonth | ||
| _CalendarQuarter | I_CalendarDate | _CalendarQuarter | ||
| _CalendarYear | I_CalendarDate | _CalendarYear | ||
| _WeekDay | I_CalendarDate | _WeekDay | ||
| _YearMonth | I_CalendarDate | _YearMonth | ||
| DaysBetween |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_CalendarDate.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PMMCALENDATE
-- Parameters: P_Date : sydate
CREATE VIEW P_CalendarDate AS
SELECT
I_CalendarDate.CalendarDate AS CalendarDate,
I_CalendarDate.CalendarYear AS CalendarYear,
I_CalendarDate.CalendarQuarter AS CalendarQuarter,
I_CalendarDate.CalendarMonth AS CalendarMonth,
I_CalendarDate.CalendarWeek AS CalendarWeek,
I_CalendarDate.CalendarDay AS CalendarDay,
I_CalendarDate.YearMonth AS YearMonth,
I_CalendarDate.YearQuarter AS YearQuarter,
I_CalendarDate.YearWeek AS YearWeek,
I_CalendarDate.WeekDay AS WeekDay,
I_CalendarDate.FirstDayOfWeekDate AS FirstDayOfWeekDate,
I_CalendarDate.FirstDayOfMonthDate AS FirstDayOfMonthDate,
I_CalendarDate.CalendarDayOfYear AS CalendarDayOfYear,
I_CalendarDate.YearDay AS YearDay,
I_CalendarDate._CalendarMonth AS _CalendarMonth,
I_CalendarDate._CalendarQuarter AS _CalendarQuarter,
I_CalendarDate._CalendarYear AS _CalendarYear,
I_CalendarDate._WeekDay AS _WeekDay,
I_CalendarDate._YearMonth AS _YearMonth,
dats_days_between(I_CalendarDate.CalendarDate, :P_Date) AS DaysBetween
FROM I_CalendarDate
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA