Skip to Content
0
Dec 17, 2022 at 01:32 PM

RAP different behavior definition based on permission

238 Views

Hi Experts,

I have the requirement, that I have to switch a filter attribute in a RAP from mandatory = true to mandatory = false depending on permission. If the user has not a special permission, he/she has to select a filter in order to display the result ist. I tried many things, but nothing works as expected. For example, I added a field in CDS Select (wich delivers for testing purposes every time "true") and added in the behavior definition:

@Consumption.filter: { mandatory: #(my_static_field_true)}, but it will display the field not as mandatory ( if I change to mandatory: true it works)

So my question, is there any possibility to influence the behavior definition by permission. I can't believe, that I have to duplicate all application developed sources. Or is there any possibility to do some checks before selection? I saw only possibility to checks before create and update.

Many thanks Stefan