We have created a List-Report using ABAP CDS. We are using dynamic date rate. Our requirement is to set the default date range as 2 weeks i the past (14 days) until 4 weeks in the future (28 days).
Below code is working when we set the TODAYFROMTO as default, but it is taking -1day to +1 day as the default range.
"settings": {
"condensedTableLayout": true,
"smartVariantManagement": true,
"enableTableFilterInPageVariant": true,
"filterSettings": {
"dateSettings": {
"useDateRange" : false,
"fields": {
"vfdat": {
"defaultValue": {
"operation": "TODAYFROMTO"
},
"selectedValues": "TOMORROW,TODAYFROMTO,LASTYEAR ",
"exclude" :false
}
}
}
}
}

We want to set this to -14 days to +28 days
We found a code snippet in help.sap relating to this, but it seems like this will work only in Odata V4 (we are using V2)

Is there any way to achieve this with Odata V2?