cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Virtual Element Calculate and Filter option to same field

former_member644343
Discoverer
0 Kudos

I have a Scenario where the field should be calculated and should have a filter option to the same field..

tried with below scenario however, couldn't able to resolve it.

View Entire Topic
former_member644343
Discoverer
0 Kudos
@ObjectModel.virtualElement
      @ObjectModel.filter.transformedBy: 'ABAP:ZCL_DEMO_CDS_CALC'
      @EndUserText.label: 'Period'
      @UI.selectionField: [{ position: 50 }]
      @Consumption.valueHelpDefinition:
      [{ entity             : {name : 'ZI_PERIOD_VH',
      element               : 'YearMonth'} }]
      cast( '000000' as vdm_yearmonth preserving type ) as YearMonth,


      @EndUserText.label    : 'Period1'
      @UI.lineItem: [{position: 40 }]
      @ObjectModel.virtualElement: true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZCL_DEMO_CDS_CALC'
      cast( ' ' as vdm_yearmonth  )                     as YearMonth1,
gasparerdelyi
Active Participant
0 Kudos

I wonder what is your question about.

Is your problem that the ABAP class does not get called at all?
Do you want to make use of the virtual element in a non-analytical OData or Fiori use case? Or somewhere else?
Have you implemented the SADL exit interfaces?
Do you need help on using the condition factory for the filrter transfmoration?