Have been implementing virtual elements in a consumption view and things have been working great so far. However I have come across a scenario which does not work so I would like to pick your brains :0)
The consumption view contains a calculated field called CalcField1:
@ObjectModel.readOnly: true @ObjectModel.virtualElement: true @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZCL_CALCULATE' @ObjectModel.filter.transformedBy: 'ABAP:ZCL_FILTER' cast('' as abap.char( 10 )) as CalcField1
The field is calculated correctly to give values A, B or C. But when I pass a filter on the calculated field it says you cannot filter on a calculated field:
The SAP help does talk about filtering in calculated fields:
But in there example they seem to talk about calculating a value and then using that value to filter on a persistent field fetched from the DB. Whereas my requirement is to filter on a transient field which is calculated on the fly.
If you have any thoughts or experiences please do share!