P_CALENDARWEEK
P_CALENDARWEEK is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_CalendarDate) and exposes 10 fields.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CalendarDate | _Calendar | from |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PCALENDARWK | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| FirstDayOfYearDate | ||||
| ShiftedCalendarDate | ||||
| CalendarDate | CalendarDate | |||
| YearMonth | YearMonth | |||
| YearQuarter | YearQuarter | |||
| CalendarWeek | ||||
| EndDateWeek | ||||
| YearDay | YearDay | |||
| CalendarYear | CalendarYear | |||
| FirstDayOfWeekDate | FirstDayOfWeekDate |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog:{
sqlViewName: 'PCALENDARWK',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
//@EndUserText.label: 'Calendar Week'
@ObjectModel: {
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #B,
sizeCategory: #XXL
}
}
@VDM: {
viewType: #COMPOSITE,
private:true
}
define view P_CALENDARWEEK
as select from I_CalendarDate as _Calendar
{
cast(concat(CalendarYear, '0101') as abap.dats(8)) as FirstDayOfYearDate,
DATS_ADD_DAYS(CalendarDate,365,'NULL') as ShiftedCalendarDate,
CalendarDate,
YearMonth,
YearQuarter,
cast(concat('00',cast(CalendarWeek as abap.char( 4 ))) as abap.numc( 4 )) as CalendarWeek,
cast(concat('00',(cast( cast(CalendarWeek as int4) + 52 as abap.char(12 )))) as abap.numc( 4 )) as EndDateWeek,
// cast(concat('00',(cast( cast(CalendarWeek as int4) + 53 as abap.char(12 )))) as abap.numc( 4 )) as EndDateWeek,
YearDay,
CalendarYear,
FirstDayOfWeekDate
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
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