2007 May 07 10:10 AM
Hi all,
I have a schedule job which retreives the spool number and should release the spool to print in background.
At present iam using the FM RSPO_OUTPUT_SPOOL_REQUEST, but does'nt work in background. is there any FM which can do the print jop using the spool number.
Thanks,
Rajesh..
Message was edited by:
Rajesh Kumar
2007 May 07 10:16 AM
You can create a background job by using the following function module and schedule them to print.
1. job_open
2. job_submit
3.job_close.
Hi all,
I have a schedule job which retreives the spool number and should release the spool to print in background.
At present iam using the FM RSPO_OUTPUT_SPOOL_REQUEST, but does'nt work in background. is there any FM which can do the print jop using the spool number.
Thanks,
Rajesh..
Message was edited by:
Rajesh Kumar
2007 May 07 10:16 AM
You can create a background job by using the following function module and schedule them to print.
1. job_open
2. job_submit
3.job_close.
2007 May 07 10:18 AM
Refer the following code:
report y_job .
parameters : job like btcevtjob-jobname.
data: count like btcevtjob-jobcount.
call function 'JOB_OPEN'
exporting
jobname = job
importing
jobcount = count.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
write : / sy-subrc.
call function 'JOB_SUBMIT'
exporting
authcknam = sy-uname
jobcount = count
jobname = job
report = 'YMPRPR_COMPRE11'
variant = 'TEST1'
language = sy-langu.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
write :/ sy-subrc.
call function 'JOB_CLOSE'
exporting
jobcount = count
jobname = job.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
write : / sy-subrc.