Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Data conversion to PDF

Hello,

Iam working on SRM system which is UNICODE,I have tos end the mail with pdf attachment from SRM system ,but the problem is i have to get the data from R/3 System(in which iam using CONVERT_OTFSPOOLJOB_2_PDF to convert the spool request number to PDF data),If i use the same converted PDF data in SRM iam unable to open the PDF in mail.

My code in SRM is like this ::

If i use the below code iam getting the PDF but with some RAW data ::

is there anything more i have to add ????/

options-tddest = 'LP01'.

options-tdimmed = 'X'.

options-tdnewid = 'X'.

options-tdgetotf = 'X'.

options-tdnoprev = 'X'.

***

call function 'PRINT_TEXT'

exporting

dialog = ' '

header = header

options = options

importing

result = result

tables

lines = textlines

otfdata = otf

exceptions

canceled = 1

device = 2

form = 3

options = 4

unclosed = 5

unknown = 6

format = 7

textformat = 8

communication = 9

bad_pageformat_for_print = 10

others = 11.

  • IF sy-subrc 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  • ENDIF.

call function 'CONVERT_OTF'

exporting

format = 'PDF'

importing

bin_file = ev_count

bin_filesize = filesize

tables

otf = otf

lines = it_lines

exceptions

err_conv_not_possible = 1

err_bad_otf = 2.

Former Member
Not what you were looking for? View more on this topic or Ask a question