cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro abap alv table cell width and change records from alv table

Former Member
0 Kudos

Hi Experts,

I am working on webdynpro abap alv and i need some information regarding alv,In my alv table i need to increase the width of the particular column cell and other requirement is how to get changed records from the alv table..

Please Provided me required information.

Waiting for Replay 

Thanks & Regard

Krishna

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

For increasing  Display layout width to 100 use below code

  DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
  DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
  DATA l_table TYPE REF TO cl_salv_wd_config_table.

    l_ref_cmp_usage =   wd_this->wd_cpuse_it_alv( ).

  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
    l_ref_cmp_usage->create_component( ).
  ENDIF.

  l_salv_wd_table = wd_this->wd_cpifc_it_alv( ).
  l_table = l_salv_wd_table->get_model( ).


  l_table->if_salv_wd_table_settings~set_width( '100%' ).

And please refer standard WD component where column setting scenario is handled

WD componant name: SALV_WD_TEST_TABLE_PROPS.

Hope this is useful,

Regards,

Manjunath M

Former Member
0 Kudos
guillaume-hrc
Active Contributor
0 Kudos

Hi,

You can change column width through code with the method SET_WIDTH.

To change the records within the ALV you have to switch it to edit mode.

Check this document, it is really useful : http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0b6a153-a132-2d10-bcb3-ac5853325...

Best regards,

Guillaume

Former Member
0 Kudos

Hi Guillaume,

Thanks for the reply,but set width is not working,My requirement is

I have alv table with 4 columns

1. Emp no ( TYPE NUM8)

2, Emp Id  ( TYPE NUM8)

3, Emp Age (TYPE CHAR03)

4. Emp Name.( TYPE CHAR40)

here all are inputfields editable column

and all the column length should be based on the type of the column.Here Emp Name is Char40 so the inputfield should be char40 length in alv table.But in my application its showing 15 to 20 char after entering the value in Emp Name column its expanding.but i don't want like the Emp Name should fixed to char40 .And it should not expand.

Nothing but my columns in alv table should be fixed with type of the Field in the table.

.

Please Provided me Required Information.

Wating for Reply.

Thanks & Regards.

Krishna.