Application Development and Automation 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: 
Read only

Adding multiple spool into one PDF

Former Member
0 Likes
874

dear all,

how to adding multiple spool requests into one pdf,and what's the meaning of 'otf end command//missing in otf data

pls tell me how to do,tks!!!

6 REPLIES 6
Read only

JoffyJohn
Active Contributor
0 Likes
800

i_doctype = 'PDF'.

  • Binary store for PDF

data: begin of it_pdf_output occurs 0.

include structure tline.

data: end of it_pdf_output.

data:it_pdf_att like solisti1 occurs 0 with header line.

call function 'CONVERT_ABAPSPOOLJOB_2_PDF'

exporting

src_spoolid = i_spool_nr

no_dialog = c_no

dst_device = c_device

importing

pdf_bytecount = gd_bytecount

tables

pdf = it_pdf_output

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.

check sy-subrc = 0.

  • Transfer the 132-long strings to 255-long strings

loop at it_pdf_output.

translate it_pdf_output using ' ~'.

concatenate gd_buffer it_pdf_output into gd_buffer.

endloop.

translate gd_buffer using '~ '.

do.

it_pdf_att = gd_buffer.

append it_pdf_att.

shift gd_buffer left by 255 places.

if gd_buffer is initial.

exit.

endif.

enddo.

In loop call the function module and get the

pdf = it_pdf_output

then append it to final internal table

Read only

Former Member
0 Likes
800

Friend.........

check this one.....

Read only

Former Member
0 Likes
800
Read only

Former Member
0 Likes
800
Read only

Former Member
0 Likes
800
Read only

Former Member
0 Likes
800