Application Development and Automation 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: 
Read only

problem in mail content while sending email

Former Member
0 Likes
3,096

Hi,

I am using the function module 'SO_NEW_DOCUMENT_SEND_API1' to send HTML emails.

I am able to receive emeils, but the body content of the email comes a one line which should come in different lines as per requirements.

Appreciate any help on issue.

Hi,

I am using the function module 'SO_NEW_DOCUMENT_SEND_API1' to send HTML emails.

I am able to receive emeils, but the body content of the email comes a one line which should come in different lines as per requirements.

Appreciate any help on issue.

8 REPLIES 8
Read only

former_member156446
Active Contributor
0 Likes
1,286

try to concatenate a line feed after each line...

data: line_feed type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.

concatenate this varaible at the end of each row.

if you want to do it witl HTML tags <br> is the HTML tag, for line break

Read only

Former Member
0 Likes
1,286

Hi

use the line break ( MOVE cl_abap_char_utilities=>cr_lf TO w_lfeed ) at end of the each line.

DATA : w_lfeed(2) TYPE c.

MOVE cl_abap_char_utilities=>cr_lf TO w_lfeed.

hope this will help u.

Reg,

vijay

Read only

0 Likes
1,286

This has worked for me. Thank u

Read only

Former Member
0 Likes
1,286

concatenate <_BR> at the end of each row.

remove the underscore symbole

Edited by: Rahul Ghosh on Mar 4, 2009 3:41 PM

Read only

I355602
Product and Topic Expert
Product and Topic Expert
Read only

Former Member
0 Likes
1,286

Appreciate ur help

Read only

Former Member
0 Likes
1,286

hi kunaal,

I am also facing the same problem. Kindly send the steps that i have to do.

I followed the answers for u r thread but unable solve my problem.

thanks in advance,

padmaja.

Read only

0 Likes
1,286

Hi Padmaja,

I don't have any idea on your requirements,but let me share how to send emails in seperate lines.

1.The email is send HTML format.

2.Use the above function module.

3.If you are using smartforms as template for mass email sending then the smartforms output should be online.

4.Use html tags like <_p> <_br> for text formating.

5.Read the lines of the smartforms to an internal table and pass it to the body content of the email.

6.This will result in formatted text in the body of the email.

7.In case you need to send email as attachement follow the standard procedure but make sure of what format you r sending.may be ASCII,TEXT,PDF etc.By default it takes ASCII.And I suppose dats the best way to test your mail content.U cannot use the html tags in these formats.Instead use ABAP syntax.

8.In addition if you are adding any images in your mail content pass on the correct address in </_href?>

Dat shud do the work.

9.Hope so you are using RSCONN01 report to send the mail to your SAP outbox.

10.Now check in SBWP outbox whether you r triggering the correct mail.

Hope so it meets your needs.

Regards

Kunaal