cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Script

Former Member
0 Kudos

Hi!!

Can anyone help me as to:

How can i send a mail of the spool request created in SAPSCRIPT ?

So that user can print or telex it ...

Thnaks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use program ZPDFPRNT that can be found on site

http://www.ciudadfutura.com/sap/sap/abaputil_eng.ht m this will convert the

spool to PDF. Then use function modules SO_ATTACHMENT_INSERT and

SO_OBJECT_SEND to attach and send spool request

Regards

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lee,

U can check with the below link..

Hope it helps u..

Regards,

KK

Former Member
0 Kudos

hi,

use this function module so that u can send the spool request to PDF.

'CONVERT_ABAPSPOOLJOB_2_PDF'

have a look at this piece of code.

FORM convert_spool_to_pdf.

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.

ENDFORM.

(or)

Use the standard pgm RSTXPDFT4 to convert spool to PDF.

PLEASE REWARD ME IF USEFUL.