P_REFERENCEDATES

CDS View

Calculate Last and Next Year for a date

P_REFERENCEDATES is a CDS View in S/4HANA. Calculate Last and Next Year for a date. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
DATEFUNC_CONFIG_SIMULATE view inner Non-Persisted DateFunction Configuration Simulation
P_GregorianCalDateFunction view inner CONSUMPTION All Date Functions along with calculated dates
@AbapCatalog.sqlViewName: 'PDFREFDATES'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@VDM.private: true
//@EndUserText.label: 'Calculate Last and Next Year for a date'

@ObjectModel.usageType.serviceQuality:  #P
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_Referencedates with parameters
    P_DateFunctionValidityDate: sydats
as select from I_CalendarDate
{

  CalendarDate,
  dats_add_months( CalendarDate, -12, 'FAIL') as LastYearDate,
  dats_add_months( CalendarDate, 12, 'FAIL')  as NextYearDate
}
where
  CalendarDate = $parameters.P_DateFunctionValidityDate