P_RblsItmForKeyDteRepPeriod
P_RblsItmForKeyDteRepPeriod is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_FiscCalendarDateForCompCode) and exposes 4 fields with key fields CalendarDate, CompanyCode. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_FiscCalendarDateForCompCode | FiscalPeriod | from |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | bzdat | |
| P_PeriodType | fis_period_type |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CalendarDate | _CalendarDate | _CalendarDate.CalendarDate = $projection.CalendarDate |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRBLSKDATPERIO | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CalendarDate | I_FiscCalendarDateForCompCode | CalendarDate | |
| KEY | CompanyCode | I_FiscCalendarDateForCompCode | CompanyCode | |
| CalendarYearendasReportingYear | ||||
| CalendarWeekendasReportingPeriod |
@AbapCatalog.sqlViewName: 'PRBLSKDATPERIO'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@VDM.viewType: #COMPOSITE
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RblsItmForKeyDteRepPeriod
with parameters
P_KeyDate : bzdat,
P_PeriodType : fis_period_type
as select from I_FiscCalendarDateForCompCode as FiscalPeriod
association [0..1] to I_CalendarDate as _CalendarDate on _CalendarDate.CalendarDate = $projection.CalendarDate
{
key FiscalPeriod.CalendarDate,
key FiscalPeriod.CompanyCode,
case $parameters.P_PeriodType
when 'F' then FiscalPeriod.FiscalYear
when 'M' then _CalendarDate.CalendarYear
when 'W' then _CalendarDate.CalendarYear
end as ReportingYear,
case $parameters.P_PeriodType
when 'F' then FiscalPeriod.FiscalPeriod
when 'M' then cast(_CalendarDate.CalendarMonth as char3)
when 'W' then _CalendarDate.CalendarWeek
end as ReportingPeriod,
case $parameters.P_PeriodType
when 'F' then FiscalPeriod.FiscalPeriodStartDate
when 'M' then _CalendarDate.FirstDayOfMonthDate
when 'W' then _CalendarDate.FirstDayOfWeekDate
end as ReportingPeriodStartDate,
case $parameters.P_PeriodType
when 'F' then FiscalPeriod.FiscalPeriodEndDate
when 'M' then dats_add_days(dats_add_months(_CalendarDate.FirstDayOfMonthDate, 1, 'UNCHANGED'), -1, 'UNCHANGED')
when 'W' then dats_add_days(_CalendarDate.FirstDayOfWeekDate, 7, 'UNCHANGED')
end as ReportingPeriodEndDate
}
where
CalendarDate = $parameters.P_KeyDate
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE",
"I_FISCCALENDARDATEFORCOMPCODE"
],
"ASSOCIATED":
[
"I_CALENDARDATE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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