cancel
Showing results for 
Search instead for 
Did you mean: 

Creating email body while generating output type as email.

Former Member
0 Kudos

Hi All,

I wanna create an email body while sending email through output type for smartform.

I am successfully creating a mail with attachement. But requirement ned to send a body with same email..

can any one know the same pls share. its very urgent... thx

Thanks..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

declare the following

data :

i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,

in the program write the below cod as following

i_objtxt = 'Find attached the output of the smart form.'. --> this is the body of the mail.

APPEND i_objtxt.

now pass this to the call function.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = w_doc_chng

put_in_outbox = 'X'

IMPORTING

sent_to_all = v_sent_all

TABLES

packing_list = i_objpack ......

This shall trigger the body.

Former Member
0 Kudos

Ok, But this will send another mail to the customer with body with out smartform attachment right? i need both at a time.

I am triggering output through output type and getting mail with attachement is ok now..

My concern is .. Have to send the body to the same email.

Ex:

to: abc at xyz.com

sub: this is orders 12345

Body: Pls find teh attached of the order...

Thx.

xyz..

finally there should be the attachment(smartform) to the same mail.

Thx

Former Member
0 Kudos

Hello sir,

This wil not send another mail without the smartfrom, I think you did not understand what i tried to explain you, so let me start this once again,

Only once you will be calling the CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

This is the funcation module to send the smartform in mail, and in this function module we need to pass the parameter what I had mentioned above, along with the other parameters that you had already passed.