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

binary to pdf

Former Member
0 Likes
577

Hi,

I have RFC which gives data in binary format. now I need to convert that binary data to pdf with out using spool request number like that. Can anybody have idea on this.

sure helpful answers are rewarded

Thanks,

suma.

3 REPLIES 3
Read only

Former Member
0 Likes
546

Hi,

After you get the data from RFC FM,thn you use tht

all function 'CONVERT_OTF'

EXPORTING

format = 'PDF'

max_linewidth = 132

IMPORTING

bin_filesize = v_len_in

TABLES

otf = i_otf

lines = i_tline

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

others = 4.

  • Fehlerhandling

if sy-subrc <> 0.

endif.

loop at i_tline.

translate i_tline using '~'.

concatenate wa_buffer i_tline into wa_buffer.

endloop.

translate wa_buffer using '~'.

do.

i_record = wa_buffer.

append i_record.

shift wa_buffer left by 255 places.

if wa_buffer is initial.

exit.

endif.

enddo.

  • Attachment

refresh:

i_reclist,

i_objtxt,

i_objbin,

i_objpack.

clear wa_objhead.

i_objbin[] = i_record[].

Now you the PDF data in i_record.

Reward if useful

Thanks,

Aditya.

Read only

Former Member
0 Likes
546

send me declarations code also.

Read only

Former Member
0 Likes
546

this code is not working. now I am having a file with binary data. what is the procedure