cancel
Showing results for 
Search instead for 
Did you mean: 

Date parameter with dynamic value of today's date (Range function of date)

shubhasri
Discoverer
0 Kudos
156

Hi Everyone

We have created a report in the public cloud related to the GL Extract, where we need the posting date as a parameter that should automatically populate with today's date. 
We have created a custom CDS view, Cube view, Custom Analytical Query, and a KPI based on the Custom Analytical Query. However, we are unable to configure this data parameter with a dynamic value of today's date.
Any suggestions would be greatly appreciated.

 

OwenLiu
Product and Topic Expert
Product and Topic Expert
0 Kudos
Added Extensibility tag.

Accepted Solutions (0)

Answers (1)

Answers (1)

MKreitlein
Active Contributor
0 Kudos

Hello @shubhasri 

You can have a look into this CDS View: C_GLLineItemsQ0001 ... how it is done there and take it over into your Query View:

  with parameters
    @Consumption.hidden: true
    @Environment.systemField: #SYSTEM_LANGUAGE
    P_Language : sylangu,
    @Semantics.businessDate.at: true
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate  : vdm_v_key_date

and further down

  @Consumption.filter: { selectionType: #SINGLE, multipleSelections: true, mandatory: false }
  @Consumption.derivation: { lookupEntity: 'I_CalendarDate',
        resultElement: 'CalendarYear', binding: [
        { targetElement : 'CalendarDate' , type : #PARAMETER, value : 'P_KeyDate' } ]
       }
  @AnalyticsDetails.query.variableSequence: 40
  @AnalyticsDetails.query.axis: #FREE
  LedgerFiscalYear,

BR, Martin