Skip to Content

Email from ABAP program

Hi !

I am populating the email body with some internal table values. I would like a line feed and carriage return in the email. How do I do it ?

Constants : c_lf(2) TYPE X value '0A'.

c_cr(2) TYPE X value '0D'.

...........

SWC_CREATE_OBJECT MESSAGE 'MESSAGE' SPACE.

SWC_SET_ELEMENT CONTAINER 'DOCUMENTTITLE' 'Title'(020).

SWC_SET_ELEMENT CONTAINER 'DOCUMENTNAME' 'Email message'(020).

SWC_SET_ELEMENT CONTAINER 'DOCUMENTTYPE' 'RAW'.

SWC_SET_ELEMENT CONTAINER 'NO_DIALOG' 'X'.

CONCATENATE 'Dear' firstname INTO CONTENT.

APPEND CONTENT.

CONTENT = c_lf.

APPEND CONTENT.

CONTENT = c_cr.

APPEND CONTENT.

CONTENT 'This is the first line'.

APPEND CONTENT.

...........

The above just appends the hex values of line feed and carriage return into the email body and doesn't actually create a line feed / carriage return.

Any ideas ?

Cheers,

Ashok.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2005 at 06:01 PM

    If you are using SAP R/3 Enterprise, you might want to look at the class(SE24) CL_ABAP_CHAR_UTILITIES - the attributes section.

    Regards,

    Subramanian V.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.