Sending a report directly to the printer
NEW-PAGE PRINT ONdestination 'p190'
COPIES 1
LIST NAME 'Test liste'
COVER TEXT 'Cover text'
SAP COVER PAGE 'X'
DATASET EXPIRATION 3
NO DIALOG.
LOOP AT ITAB.
WRITE: / ITAB-ZZREVLOGPR.
ENDLOOP.
NEW-PAGE PRINT OFF.
Sending output to the spool
NEW-PAGE PRINT ONCOPIES 1
LIST NAME 'Test liste'
COVER TEXT 'zzspec01 Log for overførsel af revlogdata fra host'
SAP COVER PAGE ' '
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
DATASET EXPIRATION 3.
Submitting a report in the background and send the list to spool
* If the program is run in the background the
* difference report is send to spool.
SUBMIT rm07idif WITH SELECTION-TABLE li_selection
EXPORTING LIST TO MEMORY AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = li_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
CHECK sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = li_listobject
EXCEPTIONS
empty_list = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
No comments:
Post a Comment