2009 Jul 24 4:24 PM
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
2009 Jul 24 4:30 PM
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..
2009 Jul 24 4:30 PM
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..
2009 Jul 24 5:25 PM
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.
2009 Jul 25 4:38 AM
Hi Tobies,
Try this way.
Thanks
Venkat.O
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.