08-07-2015 8:10 PM
Hi Experts,
I am facing a strange issue, one of the Column Values getting truncated when executing report in background. The column filed output length is 10 characters and the field "Chain ID" is of type KUNNR. But when we execute it in background and check the value in the spool we only see first 7 characters only. Plz find the screen shot below. The column name is Chain ID. Here only 7 characters are getting displayed, but it should display 10 characters.
In foreground the report is working fine.
I am using FM: REUSE_ALV_GRID_DISPLAY to display the output.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
i_grid_settings = lk_grid
is_layout = lwa_layout
it_fieldcat = i_fieldcat
I am passing the below data along with the internal table values to prevent this issue. But of no help.
DATA: lk_grid TYPE lvc_s_glay, " Grid settings
lwa_layout TYPE slis_layout_alv.
lk_grid-no_colwopt = c_true.
lwa_layout-colwidth_optimize = c_true.
In the field catalog I am passing the following data for this "Chain ID" Column .
k_fieldcat-fieldname = xv_fldname.
k_fieldcat-tabname = 'I_FINAL'.
k_fieldcat-seltext_l = xv_desc.
k_fieldcat-seltext_m = xv_desc.
k_fieldcat-seltext_s = xv_desc.
k_fieldcat-no_convext = xv_desc.
k_fieldcat-outputlen = '00015'.
Still Unable to solve the issue. Kindly provide me some solution for the same.
Regards
Gopa
08-09-2015 9:49 PM
Pass values to the fields reference field name and reference table in the fieldcat.
V.
08-10-2015 6:41 AM
Hi Vikram,
Thanks for the update.. but the issue is still not solved... getting the same error..
08-10-2015 10:22 AM
Hi
In your code -
lk_grid-no_colwopt = c_true.
lwa_layout-colwidth_optimize = c_true.
Can you try with un-checking / checking with these two parameters.
08-10-2015 11:18 AM
Hi Atul Sir,
Thanks for the update. I un-checked the code "lk_grid-no_colwopt = c_true.".
And also deleted and re-created the Layout Variants and the issue got solved.
Regards
Gopa
08-10-2015 11:45 AM