10-12-2007 3:08 PM
Hello All,
i am running a normal report in background which is containing write statement.
when i starts a job through SM36 and runs it immediately,
will there be spool generation which will contain all the list output data came through WRITE statement?
if yes i am not getting the same.can anyone help me out. is anything additional required?
Rushikesh
10-13-2007 1:05 AM
Yes there will -> if you are not seeing this then check the printer settings in the job step definition, and your own printer defaults. If you want to confirm the program is reaching the "write" statement, put in a "message s398(00) with 'got here'." type statement as this message will appear in the job log, not spool, and help isolate where the problem is.
Jonathan
10-14-2007 10:28 AM
in the spool options select print immediately option. If you don't set this normally SAP sends it to the spool and just holds it there and doesn't print immediately.
10-15-2007 6:09 AM
Hi Rushikesh,
Write the below mentioned code at the end of your WRITE statments
NEW-PAGE.
COMMIT WORK.
NEW-PAGE PRINT OFF.
Regards,
Amit
10-15-2007 10:42 AM
Hi,
start-of-selection.
use function module - GET_PRINT_PARAMETERS
here u can set titlen number of pages, printer, start conditionand it will returns
printparameters and Valid parameters.
NEW-PAGE PRINT ON parameters <what ever returns from above Function module> NO Dialog 'X'.
here what ever u r write statements .
write 'abcd'.
:
:
end-of-selection.
if valid = 'X'.
NEW-PAGE PRINT OFF.
and also
Submit <program name> to SAP-SPOOL <name of spool>.
Regars,
VIjay