cancel
Showing results for 
Search instead for 
Did you mean: 

Change mail subject and body

Former Member
0 Kudos

Hi all,

I configured a 'printer' in SPAD that is used to send email with pdf attachments with the smartforms / sapscritps that I developed.

Is there a way to change email subject and body instead of standard text "The Mail Attachment Contains the Print File Created by User" bla bla bla?

This is critical to me.

Thanks in advance!

Regards,

André

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you are already able to send the pdf attachment through mail using Function Modles 'CONVERT_OTF_2_PDF' &

SO_NEW_DOCUMENT_ATT_SEND_API1 and the problem is with subject and Attachment name only then

in the SO_NEW_DOCUMENT_ATT_SEND_API1 function Module

For Subject

EXPORTING

document_data = docdata

For Attachment Name

TABLES

packing_list = objpack

Declarations for the above two are

DATA:

objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,

docdata LIKE sodocchgi1.

and the values you need to pass are

objpack-obj_descr = 'Invoice'. "Attachment name

docdata-obj_descr = 'Mexico Direct Invoice'. "Subject of the mail

Thanks,

Phani.

Answers (3)

Answers (3)

Former Member

The method to change body text is described in note 311037 - Printing using e-mail.

You have to insert your text in SPTP transaction, LOCAL section with MAIL0 MAIL1 .. 9 ids,

then call SPAD / "output attributes" and flag coversheet use (this operation is not mentioned in sap note, but is necessary).

For the title of mail, see the appropriate print parameter while you start a print job.

Former Member
0 Kudos

The problem is that I'm using a standard program in FI that calls a Z SapScript / Smartform that I developed. I'm using the printer 'MAIL' (configured in SPAD) that automatically sends an email with the form attached.

But the standard text is awful :"The Mail Attachment Contains the Print File Created by User XXXXX , with Number xxxx from SAP System "...

How can I change the standard text that appears?

Thanks in advance.

Regards,

AS

brad_bohn
Active Contributor
0 Kudos

Ok, but which process in FI? Electronic payment advices?

Former Member
0 Kudos

The smartform is a Customer Invoice / Credit memo.

brad_bohn
Active Contributor
0 Kudos

How are the emails triggered? Output determination? You don't need a PDF-based printer to send e-mails with PDF attachments. If this is output determination, you can use method '5 - External Send' and determine the subject/body in the output program. Otherwise, just create a class or function that performs the e-mailing for you, including the PDF conversion, setting of the subject, and body contents.