Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.