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: 

FM: CONVERT_ABAPSPOOLJOB_2_PDF

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Sandeep_Kumar
Advisor
Advisor
0 Kudos

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

6 REPLIES 6

Sandeep_Kumar
Advisor
Advisor
0 Kudos

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

KK07
Contributor
0 Kudos

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.

Former Member
0 Kudos

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?

0 Kudos

hi,

those two are optional.

dst_device is for output device and pdf_destination of type c(its for default value)

0 Kudos

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

Former Member
0 Kudos

Thanks a lot. My question is answered.

Thanks again