‎2008 Jun 19 1:05 PM
Hi,
If I run a classical report in background, the output of this automatically goes to the Spool, which I can see using SP01/SP02.
But, the user wants to send the output of the report while running in Foreground too.
Customer's Says: "in the foreground, the user must be prompted to send the output to the spool".
Please help me with the logic.
Thanks in advance,
Ishaq.
‎2008 Jun 19 1:17 PM
Use the below code to create a spool request:
NEW-PAGE PRINT ON
LINE-SIZE 220
IMMEDIATELY 'X'
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
WRITE:/.........code all the WRITE steps
NEW-PAGE PRINT OFF.
Before the above code use the function module POPUP_TO_CONFIRM to prompt the customer and if he interested for spool go for the above code else not.
*******Reward points if useful
Regards,
Kiran Bobbala
‎2008 Jun 19 1:09 PM
Hi,
The code for calling spool in foreground running is in the following link,
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf2.htm
Regards,
Jagadish
‎2008 Jun 19 1:17 PM
Use the below code to create a spool request:
NEW-PAGE PRINT ON
LINE-SIZE 220
IMMEDIATELY 'X'
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
WRITE:/.........code all the WRITE steps
NEW-PAGE PRINT OFF.
Before the above code use the function module POPUP_TO_CONFIRM to prompt the customer and if he interested for spool go for the above code else not.
*******Reward points if useful
Regards,
Kiran Bobbala
‎2008 Jul 07 7:36 AM
Hi,
I have tried your code for generating spool in foreground(below). The spool no gets generated but I am not getting the data in spool.
NEW-PAGE PRINT ON
LINE-SIZE 220
IMMEDIATELY 'X'
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
PERFORM header.
PERFORM output USING wa_final.
NEW-PAGE PRINT OFF.
Then after I have to send mail with a PDF attachment.
Please suggest.
Regards,
Binay.