cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding a ALV initially

Former Member
0 Kudos

Dear All,

    We have a requirement in which in the initial view there is a table displayed. On clicking on the specific fields we have to display 3 other ALV tables.

For eg when fied1 is clicked table1 has to be displayed, when field2 is clicked table2 has to be displayed. and when field3 is clicked table3 has to be displayed.

   So when table1 is displayed the other 2 tables need to be invisible. How to achieve this in webdynpro abap.  I am ale to view all the 3 tables initially. How to restrict the display.

Thanks in advance,

Bavan

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

First you have to find which field you have clicked. If you have clicked on first field, set the visibility of table2 and table3 as Invisible. If you have clicked second field, set the visibility of table1 and table3 as Invisible and If you have clicked field3 then set the visibility of table1 and table2 as Invisible.

Former Member
0 Kudos

Hi Kalyan,

You have to create 3 ALVs. Create 3 VIEWCONTAINERUI Elements to display ALVs. And create 3 attributes of type wdui_visibility, bind visible property of each VCUI with one attribute. Initially in WDDOINIT method visible one alv and remaining 2 in invisible by setting visible property. Like this display all ALVs based on your condition.

Cheers,

Kris.

Former Member
0 Kudos

Hi

when ur writing code for ALV Configuration.

Please use below coding.

Data :

     lo_interfacecontroller            TYPE REF TO iwci_salv_wd_table,

     lv_value                          TYPE REF TO cl_salv_wd_config_table,

     lo_cmp_usage                      TYPE REF TO if_wd_component_usage,

  lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).

   IF lo_cmp_usage->has_active_component( ) IS INITIAL.

     lo_cmp_usage->create_component( ).

   ENDIF.

   lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).

   lv_value = lo_interfacecontroller->get_model( ).

Based on condition use this method.

lv_value->if_salv_wd_table_settings~set_visible( ).

Hope this will help u out 

Thanks & Regards,

Vasu Yadav.

former_member210266
Active Participant
0 Kudos

Hi

In the ALV configuration use the following method

IF_SALV_WD_TABLE_SETTINGS~SET_VISIBLE

Regards

Swati