cancel
Showing results for 
Search instead for 
Did you mean: 

resize option in alv

Former Member
0 Kudos

i have created alv in webdynpro but i need user can change column width as per there requirement.

we have enhancement package 1  also put code

lr_config->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).

anybody know why this is not working.

Accepted Solutions (0)

Answers (2)

Answers (2)

amy_king
Active Contributor
0 Kudos

Hi Jitendra,

Maybe your code is not executed at the right place in the phase model. If I enter the following code into the component controller's wddoinit method, I get the option to resize columns with the mouse.

METHOD wddoinit .

   DATA lo_cmp_usage           TYPE REF TO if_wd_component_usage.
   DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
   DATA lo_model                    TYPE REF TO cl_salv_wd_config_table.
   DATA lo_settings                 TYPE REF TO if_salv_wd_table_settings.

* -- Instantiate the used component

   lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
  
   IF lo_cmp_usage->has_active_component( ) IS INITIAL.
       lo_cmp_usage->create_component( ).
   ENDIF.

* -- Get the ALV configuration model

   lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
   lo_model = lo_interfacecontroller->get_model( ).

* -- Set fixed table layout

   lo_model->if_salv_wd_table_settings~set_fixed_table_layout( ).

ENDMETHOD.

Cheers,

Amy

Former Member
0 Kudos

in  application we have 18 Tab each Tab having 3 ALV table calling all alv in component controller is not optimal for us.

amy_king
Active Contributor
0 Kudos

It also works in wddoinit of the view. Where have you written this code in your scenario?

Cheers,

Amy

Former Member
0 Kudos

yes i have wriiten this method in wddoinit hook method  of each view.

but still am not getting this symbol b\w column we have around 40 colmn

is it dependent on size of tansparant container we have fixed tranparent container size with few column left align and vartical scroll bar after few column

amy_king
Active Contributor
0 Kudos

Hi Jitendra,

To troubleshoot your issue, one thing you could try is to simplify one ALV down to its bare essentials. Comment out any code that customizes its columns or configuration and see if you can make it work. There may be some setting or personalization in place (or a combination of) that is preventing the fixed layout.

Cheers,

Amy

former_member184578
Active Contributor
0 Kudos

Hi,

Have you used SET_WIDTH method..? After set width you have to use set_fixed_table_layout method.

Use set width method and the set_fixed_table_layout to abap_false to allow resize. To make it fixed pass abap_true!!!

Check this thread for reference: http://scn.sap.com/message/7564863

Hope this helps u.,

Regards,

Kiran

Former Member
0 Kudos

hi kiran,

i don't want to set each column width manually.

regards

jitendra

former_member184578
Active Contributor
0 Kudos

Hi,

I jus tries by setting the fixed layout to abap_true and its working fine. I am on Netweaver 701.

Aren't you getting the mouse icon when you place the mouse in between the columns like this..

Regards,

kiran

Former Member
0 Kudos

i'am not getting mouse icon b/w column

Former Member
0 Kudos

we have ecc6.0 but enhancement pack 2