Application Development and Automation 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: 
Read only

Printing a report

Former Member
0 Likes
1,025

Hi experts,

I have a small issue with 'printing a report'.

When I'm printing a report output, the default Print Settings are: Report Page : <b>65</b>rows and

Report Width : 255 columns.

If I want to change these default values, how can I do that?

Thanks a lot for the help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
985

Hi Dev,

You can set the Line Size paramater depending on your requirement of the output display.

e.g. REPORT ZREP_TEST LINE-COUNT 65 LINE-SIZE 255.

This will result in the displaying output till the Line Size 255.

However if your printing spool of the same output also, you can use FM 'GET_PRINT_PARAMETERS'

e.g

DATA DECLARATION

CONSTANTS : C_FLAG_OFF(1) TYPE C VALUE ' ',

C_FLAG_ON(1) TYPE C VALUE 'X',

c_mode type sycallr value 'CURRENT'.

data: v_set_print like pri_params,

l_archive_parameters type arc_params,

l_print_parameters type pri_params,

l_valid_parameters type dd_flag.

*END OF DECLARATION

clear: l_print_parameters, l_archive_parameters,

l_valid_parameters, v_set_print.

*You can change the values below to your requirement.

v_set_print-paart = 'X_65_255'.

call function 'GET_PRINT_PARAMETERS'

exporting

IMMEDIATELY = c_flag_off

MODE = c_mode

NEW_LIST_ID = c_flag_on

NO_DIALOG = c_flag_on

LAYOUT = v_set_print-paart

importing

OUT_PARAMETERS = l_print_parameters

OUT_ARCHIVE_PARAMETERS = l_archive_parameters

VALID = l_valid_parameters

exceptions

OTHERS = 0.

if sy-subrc = 0.

new-page print on no dialog

parameters l_print_parameters

archive parameters l_archive_parameters.

endif.

Above FM will programatically define the length of your print paramater in spool.

Else ypu can set print paramter for spool thru Background Job scheduling Tcode SM35.Here you can set print paramater in the print setting option of Report Page (= 65)and Report Width (=255). Steps are Execute SM35->Click Define Steps->Give Program Name -> Click on Print Specifications Tab->Input Values in Print Setting Option.

Cheers,

Vikram

Pls reward helpful replies!!!

Hi experts,

I have a small issue with 'printing a report'.

When I'm printing a report output, the default Print Settings are: Report Page : <b>65</b>rows and

Report Width : 255 columns.

If I want to change these default values, how can I do that?

Thanks a lot for the help.

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
985

You change this in the REPORT statement.

report zrich_0001
      <b> line-size 255
       line-count 65</b>.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
985

In the top of the program, mention the line size and line count as desired.

For ex:

Report zxxxxx

line-size 200

line-count 100.

Read only

Former Member
0 Likes
985

Try using the FM :SET_PRINT_PARAMETERS

The following parameters may be useful

LINE_COUNT

LINE_SIZE

LIST_NAME

Regards,

Ravi

Read only

Former Member
0 Likes
985

Hi Deva,

you control width and line count using the following parameters line-size and line-count.

report zreport line-size XXX

line-count XX.

change them according to your requirement.

Regards

vijay

Read only

Former Member
0 Likes
986

Hi Dev,

You can set the Line Size paramater depending on your requirement of the output display.

e.g. REPORT ZREP_TEST LINE-COUNT 65 LINE-SIZE 255.

This will result in the displaying output till the Line Size 255.

However if your printing spool of the same output also, you can use FM 'GET_PRINT_PARAMETERS'

e.g

DATA DECLARATION

CONSTANTS : C_FLAG_OFF(1) TYPE C VALUE ' ',

C_FLAG_ON(1) TYPE C VALUE 'X',

c_mode type sycallr value 'CURRENT'.

data: v_set_print like pri_params,

l_archive_parameters type arc_params,

l_print_parameters type pri_params,

l_valid_parameters type dd_flag.

*END OF DECLARATION

clear: l_print_parameters, l_archive_parameters,

l_valid_parameters, v_set_print.

*You can change the values below to your requirement.

v_set_print-paart = 'X_65_255'.

call function 'GET_PRINT_PARAMETERS'

exporting

IMMEDIATELY = c_flag_off

MODE = c_mode

NEW_LIST_ID = c_flag_on

NO_DIALOG = c_flag_on

LAYOUT = v_set_print-paart

importing

OUT_PARAMETERS = l_print_parameters

OUT_ARCHIVE_PARAMETERS = l_archive_parameters

VALID = l_valid_parameters

exceptions

OTHERS = 0.

if sy-subrc = 0.

new-page print on no dialog

parameters l_print_parameters

archive parameters l_archive_parameters.

endif.

Above FM will programatically define the length of your print paramater in spool.

Else ypu can set print paramter for spool thru Background Job scheduling Tcode SM35.Here you can set print paramater in the print setting option of Report Page (= 65)and Report Width (=255). Steps are Execute SM35->Click Define Steps->Give Program Name -> Click on Print Specifications Tab->Input Values in Print Setting Option.

Cheers,

Vikram

Pls reward helpful replies!!!

Read only

0 Likes
985

THNX ALL.