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: 

Vertical Alignment of the report list printing

Former Member
0 Kudos

Dear All,

In my report output screen, the data is coming correctly, but when I take print out in paper, the vertical alignment (lines) are not coming properly.

Kindly let me know how to get the vertical line alignment correctly. I am using the following code presently.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'PRNT'.

DATA: l_params TYPE pri_params,

l_valid TYPE c,

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = 'LPIN'

copies = 1

immediately = 'X'

layout = 'X_65_132'

line_count = 65

line_size = 220

release = 'X'

mode = 'CURRENT'

no_dialog = 'X'

IMPORTING

out_parameters = l_params

valid = l_valid

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

l_params-prsap = ' '.

NEW-PAGE PRINT ON PARAMETERS l_params NO DIALOG.

PERFORM display_data1.

NEW-PAGE PRINT OFF.

ENDCASE.

WRITE:/2(165) sy-uline.

write:/2 sy-vline,text-007, "Material Name,

43 sy-vline,text-008, "Batch No

55 sy-vline,text-009, "Quantity

72 sy-vline,text-010, "Unit

79 sy-vline,text-011, "Ship-to Address

151 sy-vline,text-012, "Shipping Doc

166 sy-vline.

WRITE:/2(165) sy-uline.

LOOP AT g_t_final ASSIGNING <fs_final>.

WRITE:/2 sy-vline, <fs_final>-maktx under text-007,

43 sy-vline, <fs_final>-charg under text-008,

55 sy-vline,<fs_final>-lgmng UNIT mara-meins under text-009,

72 sy-vline, <fs_final>-meins under text-010,

79 sy-vline, <fs_final>-name under text-011,

151 sy-vline, <fs_final>-vbeln under text-012.

166 sy-vline.

WRITE:/2(165) sy-uline.

ENDLOOP.

Many Thanks,

Ranjan

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Hi,

comment this one and try..

<b>*layout = 'X_65_132'</b>

regards

vijay

14 REPLIES 14

andreas_mann3
Active Contributor
0 Kudos

Hi,

line-size 220 and layot 132 differ in your input

Andreas

Former Member
0 Kudos

Hi kc,

1. Thats bcos,

in program we are specifying

TWO CONTRADICTORY PARAMETERS

2.

layout = 'X_65_132'

line_count = 65

line_size = 220

3.

layout = 'X_65_132'

means 132 characters horizontally <----


>

4.

where as u have printed

vline,text-011, "Ship-to Address

151 sy-vline,text-012, "Shipping Doc

166 sy-vline.

151 th position,

166 th position,

5. So the first FEW Columns must be appearing fine,

but rest mis-aligned.

regards,

amit m.

former_member188685
Active Contributor
0 Kudos

Hi,

comment this one and try..

<b>*layout = 'X_65_132'</b>

regards

vijay

0 Kudos

Dear Vijay,

Thanks for the reply. But x_65_132 is to get LANDSCAPE print format, if we don't give this, it's not even printing the whole list.

Kindly let me know if any other way...

Regards,

Ranjan

0 Kudos

hi,

i tried at my end,Though X_65_132 and 65,220 they differ,

this will print up to 220 chars. what is the maximum length you are printing(what is your maximum line-size)...,if it is more than 220 chars, them change it from 220 to max length...

regards

vijay

0 Kudos

Dear Vijay,

This is my code,

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'PRNT'.

DATA: l_params TYPE pri_params,

l_valid TYPE c,

l_arc_params TYPE arc_params.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = 'LPIN'

copies = 1

list_name = 'TEST'

list_text = 'Test NEW-PAGE PRINT ON'

immediately = 'X'

layout = 'X_65_132'

line_count = 65

line_size = 220

release = 'X'

mode = 'CURRENT'

no_dialog = 'X'

IMPORTING

out_parameters = l_params

valid = l_valid

EXCEPTIONS

archive_info_not_found = 1

invalid_print_params = 2

invalid_archive_params = 3

OTHERS = 4.

l_params-prsap = ' '.

NEW-PAGE PRINT ON PARAMETERS l_params NO DIALOG.

PERFORM display_data1.

NEW-PAGE PRINT OFF.

ENDCASE.

Kindly let me know how I get the vertical lines properly in my report output in paper(after printing).

Many Thanks,

Ranjan

0 Kudos

hi,

what is there in side..

PERFORM display_data1.

can you show your write statements...

regards

vijay

0 Kudos

This is the code under WRITE statement.

FORM display_data1.

WRITE:/2(165) sy-uline.

WRITE:/2 sy-vline,text-007, "Material Name,

43 sy-vline,text-008, "Batch No

55 sy-vline,text-009, "Quantity

72 sy-vline,text-010, "Unit

79 sy-vline,text-011, "Ship-to Address

151 sy-vline,text-012, "Shipping Doc

166 sy-vline.

WRITE:/2(165) sy-uline.

LOOP AT g_t_final ASSIGNING <fs_final>.

WRITE:/2 sy-vline, <fs_final>-maktx,

43 sy-vline, <fs_final>-charg,

55 sy-vline,<fs_final>-lgmng UNIT mara-meins,

72 sy-vline, <fs_final>-meins,

79 sy-vline, <fs_final>-name,

151 sy-vline, <fs_final>-vbeln,

166 sy-vline.

WRITE:/2(165) sy-uline.

ENDLOOP.

ENDFORM. " display_data1

0 Kudos

Hi Rajan,

Ideally your output is max is 166 chars.

check the following..

<b>report ztest line-size 166.</b>

and line_count = 65

<b>line_size = 166</b>

check it in debug mode..what are the parameters in

<b>l_params</b>

Regards

vijay

0 Kudos

Dear Vijay,

I am getting line_count = 65 and

line_size = 166 in debugging mode.

So they are coming properly in the FM. Now where shall I need to modify, kindly let me know...

Thanks,

Ranjan

0 Kudos

Hi,

in normal output you are getting correctly (i mean alignment).

now try printing it,still are you facing misalignment problem.

and rajan check you have X_65_

in transaction <b>SPAD</b> , click on <b>full administration</b>,then choose tab <b>Device Types</b>

and then click on Format Types , now look for <b>'X_65_132'</b>, if it is not there take any thing which is nearer to X_65_132.

and use it for your printing pupose.

Regards

vijay

Message was edited by: Vijay Babu Dudla

0 Kudos

Dear Vijay,

In normal output (on screen), I am getting the alignement always properly, but When I take print out, the vertical alignment is not coming properly.

Any advice kindly let me know.

Thanks,

Ranjan

0 Kudos

check first you have X_65_132 format ,

for this proceed ===>

in transaction SPAD , click on full administration,then choose tab Device Types

and then click on Format Types , now look for 'X_65_132', if it is not there take any thing which is nearer to X_65_132.

and use it for your printing pupose.

may be you can see some formats like X_65_

Regards

vijay

Former Member
0 Kudos

NEW-PAGE LINE-COUNT <length>.

NEW-PAGE LINE-SIZE <width>.

these 2 Controls can be used.

Regards

srikanth.