cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Fields: Render code list as a dropdown list

Joseph_BERTHE
Active Contributor
0 Kudos

Hi experts,

I'm working on S/4HANA 2020 On-Premise edition, with the extensibility framework. I have added a custom field on the application F1982, which show an input field with a search help.

My requirement is having this search help like a Dropdown list. How to do it?

What I have thought, is by creating this custom fiel, I would be able to modify the generated CDS. Because, what I just need to do is, to add this annotation to that CDS:

@ObjectModel.resultSet.sizeCategory: #XS

But, Eclipse tells me that I have to use the application Custom Fields to modify it. Unfortunately, this application doesn't provide me the ability to change the layout of the field.

Please, tell me how to to it ?

Regards,

Joseph

former_member596519
Participant
0 Kudos

Hi Joseph,

just try to do a where-used in the system (SE11, GUI or eclipse...) on custom field you've created. You will see a CDS-View generated with <the name of your custom field>_V and <the name of your custom field>_W containing the Text (with translations?). Then, you could just use this CDS-View or create another one, aka <the name of your custom field>_VH:

and in the CDS-View you want to use it, just with the usual annotation for search help:

@Consumption.valueHelpDefinition: [{ entity: { name: '<the name of your custom field>_VH', element: 'Code' } }]

hope that helps.

BR Aleks

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

What type has your custom field? Did you define it as "Code List"? If not that is the reason for your "issue".

Joseph_BERTHE
Active Contributor
0 Kudos

Hello,

My custom field is a Code List. It's for this reason, I have a search help in the Object page of my bunisess object.

Regards,

Joseph