Adam Harkus
Adam Harkus

Reputation: 2210

How to set date range for @Consumption.filter.defaultValue?

I'm using the ABAP Restful Application Programming Model - oData v2.

I'd like to be able to default in a date range of say, a CreationDate within the last 3 months.

At a very basic level, I can default in a single arbitrary date, see my CDS View below...

 @Consumption.filter.defaultValue: '20201012000000'  
 CreationDate : rap_cp_odata_v2_edm_datetime ; 

Could you please provide an example of how a date range could be set up using Today's date going back 3 months rather than having to provide a literal value?

Upvotes: 1

Views: 9043

Answers (1)

Neetesh
Neetesh

Reputation: 1

Add this against Date field -

@Consumption.filter.selectionType: #INTERVAL

Upvotes: 0

Related Questions