Skip to Content
author's profile photo Former Member
Former Member

Calling Spool while running in Foreground

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 12: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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 12: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.