P_LastDayOfFsclDteFunction
Last day of fiscal date function
P_LastDayOfFsclDteFunction is a Basic CDS View that provides data about "Last day of fiscal date function" in SAP S/4HANA. It reads from 2 data sources (I_Datefunction, I_FiscalDateFunctionValue) and exposes 2 fields with key fields DateFunctionendasDateFunction, FiscalYearVariant. Part of development package ODATA_EBW_ORDER_INSPECTOR.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_Datefunction | _DateFunction | from |
| I_FiscalDateFunctionValue | _fsclDateFunctionValue | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PLSTDAYDTEFUNC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| EndUserText.label | Last day of fiscal date function | view |
Fields (2)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DateFunctionendasDateFunction | |||
| KEY | FiscalYearVariant | I_FiscalDateFunctionValue | FiscalYearVariant |
@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'
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