Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CDS views - Pass parameter as literals

0 Kudos

Dear community,

does anyone know if it's possible to switch a CDS view parameter from "bind variable mode" to "literal mode"?

We are having a requirement where we need to have an input parameter based on which we either do or not do the currency conversion. This parameter is used in a case. When running the consumption view sql, because of the default usage of bound variables for parameters (? in variables) the plan always builds the currency conversion even when not supposed to. When I run the query with literals 'N' for the parameter, the query is much much faster. Is there any way to switch for literals?

We're using ABAP CDS views consumed by AFO

I have tried @Environment.sql.passValue:true but this seems to be working only for elements and not for parameters.

Any suggestion is welcome. Thanks a lot, Milos.

0 REPLIES 0