on 01-22-2013 8:21 PM
Hi everyone!
I'm trying to use an ALV Tree in webdynpro, but when i use the code to configure the ALV into Tree, a graphic appears below the table:
This is the code I've been using:
*---------------------------------------------------------------------------------------------------------------
DATA l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
DATA lo_nd_nodo_alv TYPE REF TO if_wd_context_node.
DATA lo_alv_config TYPE REF TO cl_salv_wd_config_table.
DATA lo_header TYPE REF TO cl_salv_wd_header.
DATA l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
DATA lr_field TYPE REF TO cl_salv_wd_field.
DATA lr_column TYPE REF TO cl_salv_wd_column.
DATA lr_column_header TYPE REF TO cl_salv_wd_column_header.
* navigate from <CONTEXT> to <NODO_ALV> via lead selection
lo_nd_nodo_alv = wd_context->get_child_node( name = wd_this->wdctx_nodo_alv ).
* 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.
* Pass context node to ALV
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_ref_interfacecontroller->set_data( lo_nd_nodo_alv ).
lo_alv_config ?= l_ref_interfacecontroller->get_model( ).
lo_alv_config->if_salv_wd_table_settings~set_display_as(
if_salv_wd_c_table_settings=>display_type_hierarchy ).
lo_alv_config->if_salv_wd_std_functions~set_hierarchy_allowed( abap_true ).
* cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
* lo_alv_config ).
lo_header = lo_alv_config->if_salv_wd_table_settings~get_header( ).
lo_header->set_text( value = 'Report' ).
lr_column = lo_alv_config->if_salv_wd_column_settings~get_column( 'WAID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
lr_column = lo_alv_config->if_salv_wd_column_settings~get_column(
'PARENT_WAID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
*---------------------------------------------------------------------------------------------------------------
How can a get rid of this graphic on the screen?
I think is a problem with the constant: if_salv_wd_c_table_settings=>display_type_hierarchy which has the same value as if_salv_wd_c_table_settings=>>display_as_table_graphic.
We are using SAP ECC 6.0 EHP5.
Thanks,
Luis Ayala
*---------------------------------------------------------------------------------------------------------------
DATA l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
DATA lo_nd_nodo_alv TYPE REF TO if_wd_context_node.
DATA lo_alv_config TYPE REF TO cl_salv_wd_config_table.
DATA lo_header TYPE REF TO cl_salv_wd_header.
DATA l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
DATA lr_field TYPE REF TO cl_salv_wd_field.
DATA lr_column TYPE REF TO cl_salv_wd_column.
DATA lr_column_header TYPE REF TO cl_salv_wd_column_header.
* navigate from <CONTEXT> to <NODO_ALV> via lead selection
lo_nd_nodo_alv = wd_context->get_child_node( name = wd_this->wdctx_nodo_alv ).
* 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.
* Pass context node to ALV
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_ref_interfacecontroller->set_data( lo_nd_nodo_alv ).
lo_alv_config ?= l_ref_interfacecontroller->get_model( ).
"ADD THIS
*------------------------------------------------------------------------------------------------------------------------
DATA lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= lo_alv_config .
lr_table_settings->set_display_type( if_salv_wd_c_table_settings=>display_type_hierarchy ).
*... init FunctionSettings
cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
r_model = lo_alv_config ).
*--------------------------------------------------------------------------------------------------------------------------
"COMMENT THIS
*------------------------------------------------------------------------------------------------------------
" lo_alv_config->if_salv_wd_table_settings~set_display_as(
" if_salv_wd_c_table_settings=>display_type_hierarchy ).
lo_alv_config->if_salv_wd_std_functions~set_hierarchy_allowed( abap_true ).
*-------------------------------------------------------------------------------------------------------------
* cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
* lo_alv_config ).
lo_header = lo_alv_config->if_salv_wd_table_settings~get_header( ).
lo_header->set_text( value = 'Report' ).
lr_column = lo_alv_config->if_salv_wd_column_settings~get_column( 'WAID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
lr_column = lo_alv_config->if_salv_wd_column_settings~get_column(
'PARENT_WAID' ).
lr_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).
*---------------------------------------------------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.