P_SalesInsightDuration
Sales Insight Period
P_SalesInsightDuration is a Composite CDS View that provides data about "Sales Insight Period" in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 7 fields with key field CurrentDate. Part of development package VDM_SD_SP.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | I_CalendarDate | from |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSLSINDURATION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CurrentDate | CalendarDate | ||
| CurrentYearMonth | YearMonth | |||
| StartDateYearMonth | ||||
| ValidityStartYearMonth | ||||
| ValidityEndYearMonth | ||||
| YoYStartYearMonth | ||||
| YoYEndYearMonth |
@AbapCatalog.sqlViewName: 'PSLSINDURATION'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_SalesInsightDuration as select from I_CalendarDate {
key CalendarDate as CurrentDate,
// CalendarYear as CurrentYear,
// YearQuarter as CurrentYearQuarter,
@Semantics.calendar.yearMonth: true
YearMonth as CurrentYearMonth,
// @Semantics.calendar.yearMonth: true
// left(dats_add_months(CalendarDate, -1,'FAIL'), 6) as LastYearMonth,
@Semantics.calendar.yearMonth: true
left(dats_add_months(CalendarDate, -5,'FAIL'), 6) as StartDateYearMonth,
@Semantics.calendar.yearMonth: true
cast( left(dats_add_months(CalendarDate, -12,'FAIL'), 6) as vdm_yearmonth ) as ValidityStartYearMonth,
@Semantics.calendar.yearMonth: true
cast( left(dats_add_months(CalendarDate, 1,'FAIL'), 6) as vdm_yearmonth ) as ValidityEndYearMonth,
// For year over year data
@Semantics.calendar.yearMonth: true
left(dats_add_months(CalendarDate, -24,'FAIL'), 6) as YoYStartYearMonth,
@Semantics.calendar.yearMonth: true
left(dats_add_months(CalendarDate, -11,'FAIL'), 6) as YoYEndYearMonth
}
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