on 04-29-2010 9:58 AM
Hi all,
I build a ALV grid with a dynamic node:
IF lv_check_child_node NE 'X'.
CALL METHOD lo_nd_root->add_new_child_node
EXPORTING
* supply_method =
* supply_object =
* dispose_method =
* dispose_object =
* static_element_type =
name = 'ALV_RESULT'
is_mandatory = abap_true
is_mandatory_selection = abap_false
is_multiple = abap_true
is_multiple_selection = abap_false
is_singleton = abap_true
is_initialize_lead_selection = abap_false
static_element_rtti = lr_strucdescr
is_static = abap_true
* attributes =
RECEIVING
child_node_info = lo_nd_alv_result.
ENDIF.
lo_nd_result = wd_context->get_child_node( name = lv_tab_name ).
lo_nd_result->bind_table( new_items = <lt_alv_tab> ).
* Instantiate ALV component
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
lo_nd_result = wd_context->get_child_node( name = lv_tab_name ).
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_ref_interfacecontroller->set_data(
r_node_data = lo_nd_result ).
l_ref_interfacecontroller->get_model( RECEIVING value = lr_cmdl ).
lr_cmdl->if_salv_wd_std_functions~set_export_allowed( abap_false ).
lr_cmdl->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
lr_cmdl->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
* lr_cmdl->if_salv_wd_table_settings~set_design( cl_wd_table=>e_design-alternating ).
lr_cmdl->if_salv_wd_table_settings~set_selection_mode( cl_wd_table=>e_selection_mode-single ).
lr_cmdl->if_salv_wd_table_settings~set_cell_action_event_enabled( value = abap_true ).
lr_cmdl->if_salv_wd_table_settings~set_data_check( if_salv_wd_c_table_settings=>data_check_on_cell_event ).
* lr_cmdl->if_salv_wd_table_settings~set_read_only( value = abap_false ).
* lr_cmdl->if_salv_wd_table_settings~set_enabled( value = abap_true ).
lr_cmdl->if_salv_wd_table_settings~set_row_selectable( value = abap_true ).
IF lt_fieldcat IS NOT INITIAL.
lt_col = lr_cmdl->if_salv_wd_column_settings~get_columns( ).
LOOP AT lt_fieldcat INTO ls_fieldcat.
READ TABLE lt_col INTO ls_col WITH KEY id = ls_fieldcat-fieldname.
IF sy-subrc = 0.
ls_col-r_column->set_position( ls_fieldcat-col_pos ).
CALL METHOD ls_col-r_column->get_header
RECEIVING
value = lr_header.
lr_header->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_none ).
lv_headertx = ls_fieldcat-seltext_l.
lr_header->set_text( lv_headertx ).
ELSE.
ls_col-r_column->set_visible( cl_wd_uielement=>e_visible-none ).
ENDIF.
ENDLOOP.
ENDIF.
But when I execute the dynpro, I get all the data I want. But I cannot select any row and the ON_LEAD_SELECT is not executed (an eventhandler is made in the method tab, and the event is bind to this handler).
When I change from selection_mode single to single_no_lead, I can select the row but the event is still not executed (not strange).
Is there anybody who can help me. We have support package SAPKB70020.
Regards,
Michael
Sorry, for the layout. But the code markups doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.