Skip to Content
author's profile photo
Former Member

Column width changing for list display in background run


I'm executing a program in background. First, I'm calling the below statements.

CALL METHOD cl_gui_alv_grid=>offline


e_offline = v_off.

IF v_off IS INITIAL. " Offline check

IF container1 IS INITIAL.

CREATE OBJECT container1


container_name = c_container.

Then I'm creating the object.



i_parent = container1.

Then I'm populating the field catalog but I'm not setting the output length.

Finally I'm calling CALL METHOD v_grid->set_table_for_first_display.

The field material number is declared with table name-field type.

The list display is showing material number with a column width of only 17 characters. Here when I open the layout, the column width is being shown as 17 and when I set it to 20, the display is fine. I checked the field catalog values in the method calls, and the output length is set as 20 for material number. But I do not understand why the output is only 17.

Due to this, when I'm exporting from spool to spreadsheet, the entries are not correct and missing the last digit.

Can somebody explain me how I can resolve this?



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on May 03, 2011 at 02:17 PM

    try pass the layout and optimize the column width


    Column optimization in OO ALV

    Add comment
    10|10000 characters needed characters exceeded