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

List to Spool

Former Member
0 Likes
688

Hello Experts,

I have written a report, in which a lot of internal tables are read out, the values are analyzed and some of them are displayed to the user using command "write". Is it possible to print these values additionally to spool memory? How can this be done?

Tanks.

Best regards,

Tobias

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
656

you can use :

NEW PAGE PRINT ON.

NEW PAGE PRINT OFF.

whatever write stantment is written between these two statement will be sent to spool.... If you want to specify additional parameters ..just press F1 for this command..

Hello Experts,

I have written a report, in which a lot of internal tables are read out, the values are analyzed and some of them are displayed to the user using command "write". Is it possible to print these values additionally to spool memory? How can this be done?

Tanks.

Best regards,

Tobias

3 REPLIES 3
Read only

Former Member
0 Likes
657

you can use :

NEW PAGE PRINT ON.

NEW PAGE PRINT OFF.

whatever write stantment is written between these two statement will be sent to spool.... If you want to specify additional parameters ..just press F1 for this command..

Read only

Former Member
0 Likes
656

NEW-PAGE PRINT ON. -->use F1 for more help on this

now use 'WRITE' statements. all stements will be directed to printer/spool instead of list output.

Read only

venkat_o
Active Contributor
0 Likes
656

Hi Tobies, Try this way.


REPORT ztest_notepad.
"Variables
DATA:
   l_lay    TYPE pri_params-paart,
   l_lines  TYPE pri_params-linct,
   l_cols   TYPE pri_params-linsz,
   l_val    TYPE c.
*Types
TYPES:
   t_pripar TYPE pri_params,
   t_arcpar TYPE arc_params.
"Work areas
DATA:
   lw_pripar TYPE t_pripar,
   lw_arcpar TYPE t_arcpar.

l_lay   = 'X_65_132'.
l_lines = 65.
l_cols  = 132.
"Read, determine, change spool print parameters and archive parameters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    in_archive_parameters  = lw_arcpar
    in_parameters          = lw_pripar
    layout                 = l_lay
    line_count             = l_lines
    line_size              = l_cols
    no_dialog              = 'X'
  IMPORTING
    out_archive_parameters = lw_arcpar
    out_parameters         = lw_pripar
    valid                  = l_val
  EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params   = 2
    invalid_archive_params = 3
    OTHERS                 = 4.
IF l_val <> space AND sy-subrc = 0.
  lw_pripar-prrel = space.
  lw_pripar-primm = space.
  NEW-PAGE PRINT ON
    NEW-SECTION
    PARAMETERS lw_pripar
    ARCHIVE PARAMETERS lw_arcpar
    NO DIALOG.
ENDIF.
WRITE 'Output'.
NEW-PAGE PRINT OFF.
CALL FUNCTION 'ABAP4_COMMIT_WORK'.

Write sy-spono.
Thanks Venkat.O