P_CurrentYearMonth
Current Year Month
P_CurrentYearMonth is a Composite CDS View that provides data about "Current Year Month" in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 4 fields with key field CalendarDate. Part of development package VDM_PP_MP.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | I_CalendarDate | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_TodayDate | sydate |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CalendarDate | CalendarDate | ||
| CurrentYearMonth | YearMonth | |||
| CalendarMonth | I_CalendarDate | CalendarMonth | ||
| _CalendarMonth | I_CalendarDate | _CalendarMonth |
@VDM.private:true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@Analytics: { dataCategory: #DIMENSION,
// dataExtraction.enabled: true }
//@EndUserText.label: 'Techn. Int. CDS View to determine Current Period and Date'
define view entity P_CurrentYearMonth
with parameters
@Consumption.hidden : true
@Environment.systemField: #SYSTEM_DATE
P_TodayDate : sydate
as select
//@Semantics.calendar.dayDate : true //check using code completion
//23092015
from I_CalendarDate
{
key CalendarDate,
//@Semantics.calendar.yearMonth: true - deactivated, because otherwise the following association is said to be ignored
YearMonth as CurrentYearMonth,
I_CalendarDate.CalendarMonth, //23092015 - necessary to include "I_CalendarDate._CalendarMonth" here
I_CalendarDate._CalendarMonth
}
where CalendarDate = $parameters.P_TodayDate
group by
YearMonth,
I_CalendarDate.CalendarMonth, //23092015
CalendarDate
;
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