on 06-01-2022 10:42 AM
Hello Everyone,
I am working on a requirement where I need to show a value help on an element with the help of CDS view with parameters. For doing this I used the annotation @Consumption.valueHelpDefinition along with @Consumption.valueHelpDefinition.additionalBinding.
When I tried to pass the parameter in the CDS using the @Consumption.valueHelpDefinition: I am getting the following error:
Here the above error says that I cannot pass the CDS View Parameter(P_CLASS) as a filter attribute.
PFB the code for CDS View:
This is the consumption view
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Intf view bo reg'
@Metadata.allowExtensions: true
define root view entity zi_bo_reg
as select from zbo_reg
{
key etc as ObjectTypeCode,
proxy_model_id as ProxyModel,
proxy_model_version as ProxyModelVer,
cast( 'IF_MDI_CLIENT_INBOUND' as seoclsname) as pl1,
@Consumption.valueHelpDefinition: [{
entity: {
name: 'ZI_F4_CLASSNAME',
element: 'Clsname'
},
additionalBinding: [{
parameter: 'p_class',
localElement: 'pl1'
}]
}]
proxy_model_class as ProxyMdlCls
}
View Created with parameters
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'F4 Classname'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@Metadata.allowExtensions: true
define view entity zi_f4_classname
with parameters
p_class: seoclsname
as select from zi_hier_class(p_ref_class:$parameters.p_class)
{
key Clsname,
key Refclsname,
key Version,
VersionDescription
}
Here my question is does the @consumption.valuehelpdefinition supports the CDS view with parameter or not?
I am also having alternate ways to implement this logic want to know whether the above one possible not.
Any help is appreciated.
Hi Mani,
It is a constraint in ABAP RAP and CDS views with parameters cannot be used.
Below is the documentation.
"CDS Views with parameters don't work properly in Fiori Elements UI services. The filter value isn't sent to the back end"
reference : https://help.sap.com/docs/BTP/923180ddb98240829d935862025004d6/9cddeaa625854358b9cbedd198667787.html
Best wishes,
Ramjee Korada
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.