Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating spool id

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

Check with RSPO_OUTPUT_SPOOL_REQUEST

and RSPO_WRITE_SPOOLREQUEST

goto SE37 RSPOspool and search

Thanks

Seshu

former_member195698
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Try with RSPO_OPEN_SPOOLREQUEST

Thanks

Seshu

Former Member
0 Kudos

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

Former Member
0 Kudos

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?

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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