Skip to Content

how to display listbox in ALV with domain values

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.



Untitled.jpg (35.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 07, 2015 at 02:40 PM

    Create conversion exit function/s 😊

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2015 at 03: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.
     *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.