cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdowns within RAP and Fiori Elements

0 Kudos
4,990

Hi RAP Experts,

I try to start my first RAP Application. So far everything works fine. But I still have a general (maybe understanding) problem. I have the follwoing situation:

I have a small CDS view with corresponding service for create and update. The view has only three attributes. On of this attribute should be displayed as dropdown.

The underlyng structure for this dropdown is table, with a key and a text value. Now I struggling with this dropdown. I like to display the text value of this dropdown, but interal I like to use the key.

But I'm not able to solve my probelm. If I display the key, the application wokrs fine, but logical, it will show the key in the dropdown only. If I switch to the text, I got error on the create page,

that the text doesn't fit the data attribute key. Which is also logical. But, is there any possiblity to fix my problem?

What I did so far:

In my Interface view I added the following:

define root view entity Z******

as select from ztable

association [0..*] to ZSP_V_DROP_DOWN as _VHelp

on $projection.vhelp_key = _VHelp.dd_key

In ZSP_V_DROP_DOWN I hjave only two fields: dd_key and dd_text.

In my consumption view I added both fields. For the dd_key field I added:

@Consumption.valueHelpDefinition: [{ entity : { name: 'ZSP_V_DROP_DOWN', element: 'dd_key' } }]

@ObjectModel.text.element: ['dd_text']

In the meta definition I added nothing special for this field.

Many thanks in advcance

Stefan

View Entire Topic
0 Kudos

Solved by my own.

karanshaheri
Participant
0 Kudos

Hi Stefan,

We are also facing the same issue. How did you solve the problem?

Regards,

Karan Shaheri.