Hi,
I'm executing a program in background. First, I'm calling the below statements.
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING
e_offline = v_off.
IF v_off IS INITIAL. " Offline check
IF container1 IS INITIAL.
CREATE OBJECT container1
EXPORTING
container_name = c_container.
Then I'm creating the object.
CREATE OBJECT v_grid
EXPORTING
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?
Regards,
Rohit
try pass the layout and optimize the column width
LVC_S_LAYO-CWIDTH_OPT = 'X'.
Add a comment