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: 

PDF Output in 4.6C

Former Member
0 Kudos

hi all

As i m working on 4.6C version i m getting stuck with this PDF output.It is giving conversion error.please tell me whether 4.6C will support PDf output or not.

Thanks for ur suggestions.

5 REPLIES 5

Former Member
0 Kudos

Hi,

If you are working with smartforms....you can use FM OTF_Convert and the format give format as 'PDF'.

former_member223537
Active Contributor
0 Kudos

Hi Zarina,

Yes 4.6c supports PDF conversion.

The problem would be that you are not converting the output from 132 characters to 255 characters.

Please refer the following link for PDF conversion logic. This works absolutely fine in 4.6c.

http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm

CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'

EXPORTING

src_spoolid = gd_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_mess_att = gd_buffer.

APPEND it_mess_att.

SHIFT gd_buffer LEFT BY 255 PLACES.

IF gd_buffer IS INITIAL.

EXIT.

ENDIF.

ENDDO.

Best regards,

Prashant

0 Kudos

Hi prashant thanks for your reply but as i m using the standard program sapfm06p i dont think additional coding is required.

is there any other way to go

Former Member
0 Kudos

check PDF setting in SCOT->SMTP->double Click--->Address Nodes ->Internet->here u can check the Formats which are avail in system.

Regards

Prabhu

Former Member
0 Kudos

HI

GOOD

Read OSS Note 317851 - Printing PDF files in 4.6C/4.6B/4.5B

Note the restrictions specified in Note 323736 with the print output with PDF.

Caution when modifying device type ZPDF1, see Note 437696.

THANKS

MRUTYUN^