Hi,
While trying to utilise the functionality of Consumption.derivation I have encountered the following error:
Here’s my MAIN_VIEW with consumption derivation for parameter p_fromDate which should look up for a value in the view SUPPORTING_VIEW using binding value based on parameter p_startDate defined in the MAIN_VIEW.
define view MAIN_VIEW with parameters @AnalyticsDetails.query.variableSequence: 1 p_startDate: abap.dats, @AnalyticsDetails.query.variableSequence: 2 @Consumption.derivation: {lookupEntity: 'SUPPORTING_VIEW', resultElement: 'fromDate', binding: [{targetParameter: 'p_startCalculationDate', type: #PARAMETER, value: 'p_startDate' }]} p_fromDate: abap.dats,
Here’s my SUPPORTING_VIEW which should be supplied with parameter p_star_date from the MAIN_VIEW.
define view SUPPORTING_VIEW with parameters p_startCalculationDate: abap.dats as select from TABLE_FUNCTION( p_startCalculationDate: $parameters.p_startCalculationDate ) { fromDate, toDate }
The error occurs while I try to activate the MAIN_VIEW.
I tried to test this functionality a bit more in different scenarios to debug my problem and I noticed that e.g. it all works fine if I change the binding value to #CONSTANT and provide value manually:
@Consumption.derivation: {lookupEntity: 'SUPPORTING_VIEW', resultElement: 'fromDate', binding: [{targetParameter: 'p_startCalculationDate', type: #CONSTANT, value: '20190101' }]} p_fromDate: abap.dats,
Have anyone encountered and solved the problem with this error?
BR,
Mateusz.