cancel
Showing results for 
Search instead for 
Did you mean: 

How to read drop down value??

former_member197475
Active Contributor
0 Kudos

Hello Experts,

Am working in BADI IF_BADI_SLS_LO_OIF_GUIBB_FORM.

Here I need to read the drop down values of a field 'AUGRU'. Is there any standard way to read all the drop down values of this field. Please help me.

Also I have checked class  cl_lo_oif_model, but couldn't get any relevant details to derive the AUGRU dropdown values.

BR,

RAM>

Accepted Solutions (1)

Accepted Solutions (1)

former_member469314
Participant
0 Kudos

Hi,

in the GET_DATA method you can access the drop down values. Just read the entry of table CT_FIELD_USAGE with NAME = 'AUGRU', there you have the drop down values in the component FIXED_VALUES.

Best regards,

Rebekka

former_member197475
Active Contributor
0 Kudos

Thanks Rebekka,

I read the values from fixed values of the field. Thanks a lot.

And also I need another help. If suppose I have 5 fields in dropdown say 1,2,3,4,5. How should I make the default value in drop down to set the value as 3.

BR,

RAM.

former_member469314
Participant
0 Kudos

Hi,

in the GET_DATA method you have the parameter CS_DATA, which contains the data of the form fields. Just write the value in the component of the structure.

Additionally, you have to set the parameter CV_DATA_CHANGED to abap_true or 'X'.

You should do this only on startup of the application, otherwise the code is called on every FPM event. So the value would be overwritten with your default value even when the user selects another value.

former_member197475
Active Contributor
0 Kudos

Thanks for your reply Rebekka.

But in my case, I don't need to change the values. I just need to set a default value from the available list of drop down values.

BR,

RAM.

Former Member
0 Kudos

Assign the value to the field which is contained in the CS_DATA of the GET_DATA method and then you are done.

Answers (0)