P_ARCalendarLast12Mnths

DDL: P_ARCALENDARLAST12MNTHS SQL: PARPROM2PAYCAL Type: view COMPOSITE Package: ODATA_AR_OVP

Gives Last Year Date From Key Date

P_ARCalendarLast12Mnths is a Composite CDS View that provides data about "Gives Last Year Date From Key Date" in SAP S/4HANA. It reads from 2 data sources (I_CalendarDate, I_CalendarDate) and exposes 2 fields. Part of development package ODATA_AR_OVP.

Data Sources (2)

SourceAliasJoin Type
I_CalendarDate Last12Months inner
I_CalendarDate ThisMonth from

Parameters (1)

NameTypeDefault
P_KeyDate sydate

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PARPROM2PAYCAL view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (2)

KeyFieldSource TableSource FieldDescription
KeyDate
FirstDayOfLastYearDate I_CalendarDate FirstDayOfMonthDate
@AbapCatalog.sqlViewName: 'PARPROM2PAYCAL'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #COMPOSITE
@VDM.private:true

define view P_ARCalendarLast12Mnths
  with parameters
    P_KeyDate         : sydate
  as select from I_CalendarDate as ThisMonth
    inner join   I_CalendarDate as Last12Months on Last12Months.CalendarDate = DATS_ADD_MONTHS(
      $parameters.P_KeyDate, - 12, 'FAIL'
    )
{
  $parameters.P_KeyDate              as KeyDate,
  Last12Months.FirstDayOfMonthDate    as FirstDayOfLastYearDate
}
where
  ThisMonth.CalendarDate = $parameters.P_KeyDate