Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

alv grid field truncated in print preview

Former Member
0 Kudos
413

hi experts,

I have developed an alv report using grid display.

there are nearly 10 fields in the output with varrious of length.

They get displayed correctly in grid format.

But, when on the output screen, I click on List menu and goto "Print Preview",

the output gets displayed in a list format where these only 9 fields get displayed one filed in a truncated format.

I have tried all options such as optimize colwidth and giving outputlen for the fieldcatalog.

But, still the problem persists, only for printing and print preview.

Please suggest a solution.

Mohana

1 ACCEPTED SOLUTION

Former Member
0 Kudos
113

Hi,

I think you have to pass the print parameter.

data : iprint type slis_print_alv.

iprint-no_change_print_params = 'X'.

now pass that to alv_grid display fm is_print parameter.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_fieldcat
IT_SORT = lt_sort
I_DEFAULT = 'X'
I_SAVE = 'X'
IT_EVENTS = it_events[]
IS_PRINT = printalv
TABLES
T_OUTABab = it_output

it may work.

Thanks

Vikranth

Edited by: Khimavath Vikranth on Jun 19, 2008 11:23 PM

4 REPLIES 4

Former Member
0 Kudos
113

Hi,

Did you try these:

wa_cat-outputlen = 30.

wa_cat-ddictxt = 'L'.

Former Member
0 Kudos
113

Hello check this out:

REPORT z_report LINE-SIZE 255

LINE-COUNT 60(1)

NO STANDARD PAGE HEADING.

Check you line size defined in report.

If it is not defined please define it. You can define more than 255 CHAR and you can see them on screen too, but in print max you can accomodate is 255.

Hope this helps.

Thanks,

Ags.

former_member212653
Active Contributor
0 Kudos
113

Your report width must have crossed 256 char. try to bring it down.

Former Member
0 Kudos
114

Hi,

I think you have to pass the print parameter.

data : iprint type slis_print_alv.

iprint-no_change_print_params = 'X'.

now pass that to alv_grid display fm is_print parameter.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_fieldcat
IT_SORT = lt_sort
I_DEFAULT = 'X'
I_SAVE = 'X'
IT_EVENTS = it_events[]
IS_PRINT = printalv
TABLES
T_OUTABab = it_output

it may work.

Thanks

Vikranth

Edited by: Khimavath Vikranth on Jun 19, 2008 11:23 PM