11-29-2007 3:35 PM
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.
11-29-2007 6:29 PM
11-29-2007 3:49 PM
Check with RSPO_OUTPUT_SPOOL_REQUEST
and RSPO_WRITE_SPOOLREQUEST
goto SE37 RSPOspool and search
Thanks
Seshu
11-29-2007 3: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
11-29-2007 3:57 PM
11-29-2007 4: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
11-29-2007 4: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?
11-29-2007 4:51 PM
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
11-29-2007 6:29 PM
11-29-2007 7:06 PM
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