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: 

Regarding FM : 'CONVERT_ABAPSPOOLJOB_2_PDF'

0 Kudos

While working on 2 different server I am getting different result from FM 'CONVERT_ABAPSPOOLJOB_2_PDF'

Due to which attachment in PDF in second serever is not Proper...

Does anyone have idea about it...

Code for refernce is...

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_attach = gd_buffer.

APPEND it_attach.

SHIFT gd_buffer LEFT BY 255 PLACES.

IF gd_buffer IS INITIAL.

EXIT.

ENDIF.

ENDDO.

4 REPLIES 4

krishnendu_laha
Active Contributor
0 Kudos

I do not know exact reason but the functionality you want to achieve through concatenate and translate with PDF tables parameter data is already available in export parameter BIN_FILE.

Please check with BIN_FILE data and look into the result.

0 Kudos

Hii....

Thanks for reply...

But Bin_file M getting is also Blank, there is no data in Bin_file...

The same program i had done in another server is working fine bt on this server output from the FM is getting smthing different.

0 Kudos

Hi,

Default settings of the device you are passing might be different in both the servers.

Check with your BASIS guys.

Cheers,

Raja.D

0 Kudos

Double post. Hence edited.

Edited by: Raja Dhandapani on Feb 13, 2012 4:31 PM