Application Development and Automation 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: 
Read only

Having different dropdowns for different fields

Former Member
0 Likes
422

Hi All,

I created a new infotype in HR and for the different fields, I need different dropdowns.

Example: Infotype 9XXX

field 1 - dropdown values (A,B,C)

field 2 - dropdown values (D,E,F)

field 3 - dropdown values (A,D,F)

Right now, I am getting the values for the dropdown based on a custom search help.

The table used in the search help is a custom table, which has all the possible values A,B,C,D,E,F.

Is there a way I can have different dropdowns for the different fields in the infotype?

Or is there is a way I can set different default values in the search help dynamically based on the field in the infotype.

Is using a search help exit a solution? If so please let me know how i can use it and what code needs to go in it.

Your inputs are greatly appreciated.

Thanks!

Sandeep

2 REPLIES 2
Read only

Former Member
0 Likes
400

Hi Sandeep,

One option you can consider is using the dropdown and attaching different function codes to the different dropdowns.using vrm_set_values you can set the required values in the drop down based on the function code triggered.

imagine you have 3 fields...make it as dropdown boxes and assign different function codes to it in the screen painter..so whenever you select the dropdown the particular function code is triggered and you know which field is called..so in the select query you can filter or filter can be done in the internal table as you feel correct and passed to the field..

so if FXN1/2/3 are function codes for field1/2/3 in the PAI..you can check

case sy-ucomm.

when 'FXN1'.

fill for field1

when 'FXN2'.

fill for field2.

when 'FXN3'

fill for field3.

endcase.

Please check the sample program in se38 for filling drop down values(demo_dynpro_dropdown_listbox)

Hope it solved your problem

Regards

Byju

Read only

Former Member
0 Likes
400

Thank you for all the inputs.