01-07-2015 1:30 PM
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.
01-07-2015 2:40 PM
01-07-2015 2:40 PM
01-07-2015 3:15 PM
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.