2009 Apr 24 11:47 AM
Dear Friends,
I have used the below code for generating the spool by submitting the standard program.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_nr
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc EQ 0.
SUBMIT RPCEDTX0
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS mstr_print_parms
USING SELECTION-SET 'ZPDF'
VIA JOB lv_job_name NUMBER lv_job_nr
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_job_released
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF syst-subrc NE 0.
MESSAGE i162(00) WITH
'An error occured while closing the background job.'.
STOP.
ENDIF.
ENDIF.
PERFORM get_spool_number USING sy-repid
sy-uname
CHANGING mi_rqident.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
IMPORTING
pdf_bytecount = mi_bytecount
TABLES
pdf = mtab_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
But i found there are being lot of spool no.s generated for my user id , could any one please let me know how can i delete those spool no.s .
regards
divya
2009 Apr 24 12:03 PM
Hi,
try this FM:
Spool wieder löschen
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
SPOOLID = SPOOL_NR_DEL. "Your SpoolNo you want to delete.
*
Regards, Dieter
2009 Apr 24 11:51 AM
Hi,
goto transaction SP02 or SP01 and it will list all the spools under ur user id...
select the check box which u wnt to delete and click on delete button...
Regards,
Pavan
2009 Apr 24 11:52 AM
<<copy&paste_removed_by_moderator>>
Note: Don't Post copy Righted material
Edited by: Vijay Babu Dudla on Apr 24, 2009 12:27 PM
2009 Apr 24 11:58 AM
2009 Apr 24 12:03 PM
Hi,
try this FM:
Spool wieder löschen
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
SPOOLID = SPOOL_NR_DEL. "Your SpoolNo you want to delete.
*
Regards, Dieter
2009 Apr 24 5:25 PM
Try tables TBTCP, TBTCP_SPOOLID, TSP01.
This works.
Regards
Shital