on 2020 Jul 22 2:15 PM
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.
Hi
My self solved the issue changing WERKS TO WERKS_D in the above code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
10 | |
9 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.