Display web dynpro ALV report select options to resict output resultsHere are the simple instruction of how to add select options to a web dynpro ALV table. You first need to have created a Basic Web Dynpro ALV table, Once you have this you can follow the basic steps below to implement the select options.
Step 1 - Assign ALV Component usage M_HANDLER IF_WD_SELECT_OPTIONS M_WD_SELECT_OPTIONS IWCI_WDR_SELECT_OPTIONS Step 10 - Add ABAP code to create selection fields Next you need to add the following ABAP code to your WDDOINTINIT or where ever you want as long as it happens before your view is displayed.
CONSTANTS: c_yes TYPE abap_bool VALUE 'X',
c_no TYPE abap_bool VALUE ' '.
DATA: lt_range_table TYPE REF TO data,
rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
type_name TYPE string.
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 = 'S_CARR_ID' ).
wd_this->m_handler->add_selection_field( i_id = 'S_CARR_ID'
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 ).
DATA: node_flights TYPE REF TO if_wd_context_node,
rt_carrid TYPE REF TO data,
rt_connid TYPE REF TO data.
* create table based on context structure
data: it_scarr type STANDARD TABLE OF if_view1=>element_ALV_TABLE,
wa_scarr like line of it_scarr.
FIELD-SYMBOLS:
|
||||