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

Creating spool id

I need to create a spool id. I know you can use RSNAST00 program to do this. But RSNAST00 uses table NAST and I have to use a custom table. Is there a function module that I can call to create a spool ID.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 06:29 PM

    I want to create it for a SAP Script. How to do it.

    Add a comment
    10|10000 characters needed characters exceeded

    • You need to fill the ITCPO strcutre with can directly generate the SPOOL id without displaying the print preview.

      DATA:BEGIN OF ST_ITCPO .
              INCLUDE STRUCTURE ITCPO.
      DATA:END OF ST_ITCPO.
      
        ST_ITCPO-TDDEST   = 'LOCL'.   "  Spool: Output device
        ST_ITCPO-TDIMMED  = ' '.
        ST_ITCPO-TDNEWID  = 'X'.
        ST_ITCPO-TDNOPREV ='X'.
      
        CALL FUNCTION 'OPEN_FORM'
         EXPORTING
           DEVICE                            = 'PRINTER'
           DIALOG                            = ' '
           FORM                              = 'ZTEST_NP'
           OPTIONS                           = ST_ITCPO

      Regards,

      Naimesh Patel

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 03:49 PM

    Check with RSPO_OUTPUT_SPOOL_REQUEST

    and RSPO_WRITE_SPOOLREQUEST

    goto SE37 RSPOspool and search

    Thanks

    Seshu

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 29, 2007 at 03:54 PM

    What exactly is your requirement? There are different ways in which the output will goto spool, and that too will depend on the type of output.

    1) If your are using smartform/script and you want to send it to spool. You can do that by setting the Contol and output parameters.

    2) If you are having a report, then if the report is run in background, then spool will be created automatically with write statement statement.

    3) If you want to run the report in foreground and you want to send the output to spool use NEW -PAGE PRINT ON... statement...

    Regards,

    Abhishek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 03:57 PM

    Try with RSPO_OPEN_SPOOLREQUEST

    Thanks

    Seshu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 04:21 PM

    The requirement is to

    contacts table contains contact number, email address and fax number

    loop at contacts 
      print output type 
      use the spool id to email 
      use the spool id to fax
    endloop

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 04:28 PM

    What I really want to do is trigger output type and I know RNAST00 does that. Is there a function module that does that too where I can simply pass NAST like data and it will create a spool id and the document?

    Add a comment
    10|10000 characters needed characters exceeded

    • For what thing you wnat to generate the Spool for Report, sapscript , Smartforms ??

      For report you can use the NEW-PAGE with addition PRINT ON.

      START-OF-SELECTION.
        NEW-PAGE PRINT ON NO DIALOG .
        DO 10 TIMES.
          WRITE / sy-index.
        ENDDO.

      It will send the list directly ot the spool.

      For SAPScript and SMARTform you can set the output control parameter to get the spool.

      Regards,

      Naimesh Patel

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.