ABAP RAP How to use dates for additional binding in value helps?

Hello, community

I have a question about value helps in ABAP RESTFul application managed without draft oData version is 2.

I created value help which contain three fields SomeID, TextForId, DateFrom, DateTo

I consumed that value help in projection view as below

define view entity ZC_BASE_CDS_PROJ as projection on ZI_BASE_CDS {

@Consumption.valueHelpDefinition: [ { entity: { name: ‘zc_value_help’, element: ‘SomeID’ },

additionalBinding: [ { element: ‘SomeId’,

localElement: ‘LocalSomeId’,

usage: #RESULT },

{ element: ‘DateFrom’,

localElement: ‘DateFrom’,

usage: #FILTER_AND_RESULT },

{ element: ‘DateTo’,

localElement: ‘DateTo’,

usage: #FILTER_AND_RESULT } ],

useForValidation: true,

label: ‘Important IDs’ } ]

@EndUserText.label: ‘Very important ID’

LocalSomeId,

DateFrom,

DateTo

}

And everything would be fine but, I don’t want use dates in filter like DateFrom in CDS equivalent DateFrom in value help, I would like to use intersection of periods in value help and in CDS. I know how to fill CDS.DateFrom and CDS.DateTo before creating new record, but I don’t know how use dates in CDS as range or interval filter for value help. I asked our frontend developer can he pass those fields as default filter before showing value help pop up window, but he said that is impossible.

So question is how to pass additional binding elements as filter with greater than or less than?

Maybe I chose wrong approach, so could you please suggest right approach for Fiori elements not for custom application.

@Andre_Fischer could you please help?

Thank you in advance.

Scroll to Top