I_MktDataDateFunction

DDL: I_MKTDATADATEFUNCTION SQL: IMDDATEFUNC Type: view COMPOSITE Package: FTR_MDM_CORE

Market Data Reporting Date Function

I_MktDataDateFunction (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.

Financial Operations

I_MktDataDateFunction is a Composite CDS View that provides data about "Market Data Reporting Date Function" in SAP S/4HANA. It reads from 1 data source (I_DateFunctionValue) and exposes 7 fields with key field DateFunction. Part of development package FTR_MDM_CORE.

SAP Help Documentation

CategoryCDS Views for Market Data
Data CategoryComposite
StatusReleased
Purpose
This CDS view supplies dates and detail data for date functions, such as PREVIOUS30DAYS and YEARTODATE . The date function compares to the current system date. Relative dates are an alternative way to assign a value to a date parameter in a CDS view. A relative date is an expression referring to a calendar date that is related to a reference date, typically derived from the time of execution. A relative date can be seen as function applied to a reference date, therefore it is also called a functional date or date function. This CDS view provides the prerequisites for answering the following business questions: What is the start date of the date function? What is the end date of the date function?

Structure
Main CDS parameters and filters The main CDS parameters are: Date Function ID The following date function IDs are predefined by SAP: Date Function ID Description Description long FIRSTDAYOFCURRENTMONTH First day of current month First day of current month FIRSTDAYOFCURRENTQUARTER First day of current quarter First day of current quarter FIRSTDAYOFCURRENTYEAR First day of current year First day of current year LASTDAYOFCURRENTMONTH Last day of current month Last day of current month LASTDAYOFCURRENTQUARTER Last day of current Quarter Last day of current Quarter LASTDAYOFCURRENTYEAR Last day of current year Last day of current year MONTHTODATE Month to date First day of current month until today NEXT90DAYS Next 90 days Next 90 days from today PREVIOUS180DAYS Previous 180 days until today Previous 180 days until today PREVIOUS365DAYS Previous 365 days Previous 365 days from today PREVIOUS3QUARTERSTODATE Previous 3 quarters to date First day of previous three quarter until today PREVIOUSMONTH Previous month First day until last day of previous month PREVIOUSQUARTER Previous quarter First day until last day of previous quarter PREVIOUSQUARTERTODATE Previous quarter to date First day of previous quarter until today PREVIOUSYEAR Previous year First day until last day of previous year PREVIOUSYEARTODATE Previous year to date First day of previous year until today QUARTERTODATE Quarter to date First day of current quarter until today TODAY Today Today TOMORROW Tomorrow Tomorrow YEARTODATE Year to date First day of current year until today YESTERDAY Yesterday Yesterday Note Date functions are defined in the Manage Date Functions app available in the Query Design group on SAP Fiori launchpad for the Analytics Specialist business role template. Language Key Enter 1 for system language. Measures and attributes Some important measures and attributes are: Date Function Date Function Name Date Function Description Date Function Granularity Date Function Type (01 Single or 02 Range ) Date Function Start Date Date Function End Date

View on SAP Help Portal →

SAP API Hub

CategoryComposite
StateC1
Line of BusinessFinancial Operations
Application ComponentFIN-FSCM-TRM-2CL
CapabilitiesAssociation Target for Defining CDS Entities,Data Source for Defining CDS Entities,Data Source in SQL Select
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Not Released
PackageFinancial Operations for SAP S/4HANA Cloud Public Edition
Description <p>This CDS view supplies dates and detail data for date functions, such as PREVIOUS30DAYS and YEARTODATE. The date function compares to the current system date.</p> <p>Relative dates are an alternative way to assign a value to a date parameter in a CDS view. A relative date is an expression referring to a calendar date that is related to a reference date, typically derived from the time of execution. A relative date can be seen as function applied to a reference date, therefore it is also called a functional date or date function.</p> <p>This CDS view provides the prerequisites for answering the following business questions:</p> <ul> <li><p>What is the start date of the date function?</p></li> <li><p>What is the end date of the date function?</p></li> </ul>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_DateFunctionValue DateFucntionValue from

Parameters (2)

NameTypeDefault
P_DateFunction datefunctionid
P_Language sylangu

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IMDDATEFUNC view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #S view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.preserveKey true view
EndUserText.label Market Data Reporting Date Function view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY DateFunction DateFunction Relative Date Function ID
DateFunctionName Date Function Name
DateFunctionDescription Date Function Description
DateFunctionGranularity _Datefunction DateFunctionGranularity Date Function Granularity
DateFunctionType _Datefunction DateFunctionType Date Function Type
DateFunctionStartDate DateFunctionStartDate Date Function Start Date
DateFunctionEndDate DateFunctionEndDate Date Function End Date

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_MktDataDateFunction.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IMDDATEFUNC
-- Parameters: P_DateFunction : datefunctionid, P_Language : sylangu

CREATE VIEW I_MktDataDateFunction AS
SELECT
  DateFunction,
  _Datefunction._DateFunctionText[1: Language = $session.system_language].DateFunctionName AS DateFunctionName,
  _Datefunction._DateFunctionText[1: Language = $session.system_language].DateFunctionDescription AS DateFunctionDescription,
  _Datefunction.DateFunctionGranularity AS DateFunctionGranularity,
  _Datefunction.DateFunctionType AS DateFunctionType,
  DateFunctionStartDate,
  DateFunctionEndDate
FROM I_DateFunctionValue AS DateFucntionValue
;