Skip to Content

multiple select-options in UI

Hi Experts,

I was trying to use below code for multiple select-options in ui.

i need to display material and plant as select-options in ui.

METHOD wddoinit .
*Constants
CONSTANTS: c_yes TYPE abap_bool VALUE 'X',
c_no TYPE abap_bool VALUE ' '.
*Data Declarations
DATA: lt_range_table TYPE REF TO data,
rt_range_table TYPE REF TO data,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.

* Set up selection area
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.

wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).

wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).

lt_range_table =
wd_this->m_handler->create_range_table( i_typename = 'MATNR' ).

wd_this->m_handler->add_selection_field( i_id = 'MATNR'
it_result = lt_range_table
i_read_only = abap_false ).

wd_this->m_handler->set_global_options( i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_false ).
*werks
lt_range_table =
wd_this->m_handler->create_range_table( i_typename = 'WERKS' ).

wd_this->m_handler->add_selection_field( i_id = 'WERKS'
it_result = lt_range_table
i_read_only = abap_false ).

wd_this->m_handler->set_global_options( i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_false ).
ENDMETHOD.

I getting below dump , Please find the screenshot for your reference.

Kindly do the needfull.

capture.jpg

capture.jpg (28.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 23, 2020 at 07:43 AM

    Hi

    My self solved the issue changing WERKS TO WERKS_D in the above code.

    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.