10-21-2008 7:13 AM
Hi Experts,
I have a requirement wherein I have to use a function module CONVERT_ABAPSPOOLJOB_2_PDF. But I am not clear with all the import and export parameters and how and why to use them.Can you please provide some explanation for the import and export parameters of this particular FM?
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
IMPORTING
src_spoolid = tsp01-rqident
no_dialog = ' '
DST_DEVICE =
PDF_DESTINATION =
EXPORTING
pdf_bytecount = l_numbytes
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
pdf = it_pdf
Please help.
Thanks in advance.
Neha
10-21-2008 7:17 AM
Hi,
Try this:
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = i_spool_request (spool request number)
no_dialog = ' '
IMPORTING
pdf_bytecount = gv_bytecount
btc_jobname = lv_btc_jobname (specify job name)
btc_jobcount = lv_btc_jobcount (specify job count)
TABLES
pdf = gt_pdf ( gt_pdf LIKE tline OCCURS 100 WITH HEADER LINE,)
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.
Rgds,
Sandeep
10-21-2008 7:17 AM
Hi,
Try this:
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = i_spool_request (spool request number)
no_dialog = ' '
IMPORTING
pdf_bytecount = gv_bytecount
btc_jobname = lv_btc_jobname (specify job name)
btc_jobcount = lv_btc_jobcount (specify job count)
TABLES
pdf = gt_pdf ( gt_pdf LIKE tline OCCURS 100 WITH HEADER LINE,)
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.
Rgds,
Sandeep
10-21-2008 7:18 AM
Hi,
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = li_spoolno
no_dialog = ' '
DST_DEVICE =
PDF_DESTINATION =
importing
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
LIST_PAGECOUNT =
btc_jobname = jobname
btc_jobcount = jobcount
tables
pdf = 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.
if sy-subrc <> 0.
endif.
10-21-2008 7:23 AM
Thanks a lot. But I want to know what each parameter is for.
no_dialog =
DST_DEVICE =
PDF_DESTINATION =
what are these 3 parameters exactly for?
10-21-2008 7:28 AM
hi,
those two are optional.
dst_device is for output device and pdf_destination of type c(its for default value)
10-21-2008 7:28 AM
Hi,
No_dialog = this is for background scheduling
DST_DEVICE = o/p device
PDF_DESTINATION = not sure abt this
By the way all these are optional and not of much importance.
Rgds,
Sandeep
10-21-2008 7:35 AM