Application Development 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: 

how to display listbox in ALV with domain values

former_member224008
Active Participant
0 Kudos

Hi Experts,

I have a requirement to display domain values in list box in ALV. For example, Domain S_CLASS have  both values and description. I want to have short description in the list box for selection and display. Only in the back end , the table need to have the fixed values.

Suppose if business class is selected in list box , ALV grid should display only the short description i.e. Business Class which i have selected and not the corresponding fixed values .

I have tried Drop down alias in the method SET_DROP_DOWN_TABLE in CL_GUI_ALV_GRID but that didnt fulfill my requirement.Also i have gone through standard program BCALV_EDIT_06 & BCALV_EDIT_07.

Please help me to resolve the issue.

Thanks,

Arun.

1 ACCEPTED SOLUTION

Tomas_Buryanek
Active Contributor
0 Kudos

Create conversion exit function/s

-- Tomas --
2 REPLIES 2

Tomas_Buryanek
Active Contributor
0 Kudos

Create conversion exit function/s

-- Tomas --

former_member249109
Active Participant
0 Kudos

Hi Arunkumar,

Perhaps you could use standard class CL_RECA_DDIC_DOMA to get the domain values? Method GET_VALUES supplies the values defined within a domain.


CONSTANTS: lc_bstat TYPE string VALUE 'BSTAT'.

DATA: lt_values TYPE re_t_rsdomaval .

* Get domain values for document status

cl_reca_ddic_doma=>get_values( EXPORTING  id_name   = lc_bstat

                                                IMPORTING  et_values = lt_values

                                                   EXCEPTIONS not_found = 1

                                                   OTHERS    = 2 ).

IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.


Now you can fill your listbox from the internal table LT_VALUES.