P_LASTDAYOFFSCLDTEFUNCTION

CDS View

Last day of fiscal date function

P_LASTDAYOFFSCLDTEFUNCTION is a CDS View in S/4HANA. Last day of fiscal date function. It contains 1 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_LastDayOfFsclDteFunctionVH view inner BASIC Last day of fiscal date function

Fields (1)

KeyField CDS FieldsUsed in Views
FiscalYearVariant FiscalYearVariant 1
@AbapCatalog.sqlViewName: 'PLSTDAYDTEFUNC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private:true
@VDM.viewType: #BASIC
@EndUserText.label: 'Last day of fiscal date function'
define view P_LastDayOfFsclDteFunction 
as select from I_Datefunction            as _DateFunction

    inner join            I_FiscalDateFunctionValue as _fsclDateFunctionValue on  _fsclDateFunctionValue.DateFunction             = _DateFunction.DateFunction
                                                                              and _fsclDateFunctionValue.DateFunctionValidityDate = $session.system_date                                                           
    left outer to one join P_LastDayOfTwoPeriodsAgoText as _LastDayOfTwoPeriodsAgoText on DomainValue = '01' 
                                                                                       and Language = $session.system_language                                                                        
{
  key case when _DateFunction.DateFunction = 'FIRSTDAYOFPREVIOUSFISCALPERIOD'
  then 'LASTDAYOF2PERIODSAGO'
  else _DateFunction.DateFunction end                                                            as DateFunction,
  
  key _fsclDateFunctionValue.FiscalYearVariant                                                   as FiscalYearVariant,

      case when _DateFunction.DateFunction = 'FIRSTDAYOFPREVIOUSFISCALPERIOD'
      then _LastDayOfTwoPeriodsAgoText.DateFunctionDescription
      else _DateFunctionText[1: Language = $session.system_language].DateFunctionDescription end as DateFunctionDescription,

      cast( case when _DateFunction.DateFunction = 'FIRSTDAYOFPREVIOUSFISCALPERIOD'
      then dats_add_days(_fsclDateFunctionValue.DateFunctionEndDate, -1,'NULL')
      else _fsclDateFunctionValue.DateFunctionEndDate end as datum)                            as DateFunctionEndDate
}
where
     _DateFunction.DateFunction = 'LASTDAYOFPREVIOUSFISCALPERIOD'
  or _DateFunction.DateFunction = 'LASTDAYOFCURRENTFISCALPERIOD'
  or _DateFunction.DateFunction = 'FIRSTDAYOFPREVIOUSFISCALPERIOD'
  or _DateFunction.DateFunction = 'LASTDAYOFNEXTFISCALPERIOD'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DATEFUNCTION",
"I_DATEFUNCTIONTEXT",
"I_FISCALDATEFUNCTIONVALUE",
"P_LASTDAYOFTWOPERIODSAGOTEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/