Hello SAP Experts,
I am facing a persistent UI5 ERROR in an OData V4 Fiori Elements application (based on ABAP RAP).
The Scenario: I have a Root Consumption View with an input Parameter. I have assigned a custom CDS Value Help (Dropdown / #XS) to this parameter. The dropdown successfully opens and displays the data in the Fiori Preview.
The Error: When the user clicks/selects an item from the dropdown list, the slection doesn't happen with the following console error in the browser:
Uncaught (in promise) Error: KeyPath missing at p.getItemFromContext
1. Value Help CDS View (Single Key, Dropdown)
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Value Help for Parameter'
@ObjectModel.resultSet.sizeCategory: #XS
define view entity ZI_VH_CustomValue
as select from custom_domain_table
{
@UI.lineItem: [{ position: 10 }]
key cast( domain_value as abap.char(1) ) as ValueKey,
@UI.lineItem: [{ position: 20 }]
@Semantics.text: true
domain_text as Description
}
where active_status = 'A'
2. The Consumption View (Short Version)
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Main Business Object'
@Metadata.allowExtensions: true
define root view entity ZC_MainBusinessObject
with parameters
@EndUserText.label: 'Custom Filter Parameter'
@Consumption.valueHelpDefinition: [{
entity: { name: 'ZI_VH_CustomValue', element: 'ValueKey' },
/* Explicit binding to pass the value back to the parameter */
additionalBinding: [{
localParameter: 'p_custom_filter',
element: 'ValueKey',
usage: #RESULT
}]
}]
p_custom_filter : z_custom_data_element
as select from ZI_MainBusinessObject
{
key DocumentId,
DocumentType,
PostingDate
}
where PostingDate <= $session.system_date
My Questions:
- Is there a known limitation or missing
@ui/@Consumptionannotation required to bind a Value Help strictly to aPARAMETER(rather than a standard table field) in OData V4? - Why is the OData V4 framework failing to resolve the context for the selected item despite the explicit
localParameterbinding?
Any insights or workarounds would be highly appreciated.
Thank you!