P_CalendarDateCalculation
P_CalendarDateCalculation is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 7 fields with key field CalendarDate.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | I_CalendarDate | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Date | sydatum |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCALDATECALC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #P | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CalendarDate | CalendarDate | ||
| CalendarMonth | CalendarMonth | |||
| _CalendarMonth | _CalendarMonth | |||
| YearMonth | YearMonth | |||
| CalendarYear | CalendarYear | |||
| CurrentYearMonthFrom | ||||
| CurrentYearMonthTo |
@AbapCatalog: { sqlViewName: 'PCALDATECALC',
compiler.compareFilter:true,
preserveKey: true
}
@ObjectModel: { usageType.dataClass: #MIXED,
usageType.serviceQuality: #P,
usageType.sizeCategory: #L
}
@VDM: { private: true,
viewType: #CONSUMPTION
}
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@Metadata.ignorePropagatedAnnotations: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_CalendarDateCalculation
with parameters P_Date: sydatum
as select from I_CalendarDate
{
key CalendarDate,
@ObjectModel.foreignKey.association: '_CalendarMonth'
CalendarMonth,
_CalendarMonth,
YearMonth,
CalendarYear,
left(dats_add_months($parameters.P_Date, -6,'FAIL'), 6) as CurrentYearMonthFrom,
left($parameters.P_Date, 6) as CurrentYearMonthTo
}
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