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

Text formatting

manubhutani
Active Contributor
0 Likes
1,203

HI

I am filling a field of type SOLISTI1(char255) , I am appending text into this and sending this text in an email, but when we see that email received, the text is not coming in proper paragraph, when the size of window is decreased, the text is not formatted properly, please help me in solving this problem.

Regards

10 REPLIES 10
Read only

Former Member
0 Likes
1,141

Hi

use the HTML tags with the text.

As an example suppose you want to send

"This is an information message which describe how to format the text which is sent in a mail"

just insert few tags like

..<BR>

This is an information message which

<BR>

describe how to format the text which is sent in a mail

<BR>

will put a break and the message will appear like..

This is an information message which

describe how to format the text which is sent in a mail

Read only

anup_deshmukh4
Active Contributor
0 Likes
1,141

Use char utilites they will act as escape sequences in your text. like if you want a tab in email you would concatinate a separator in between of your sting ....and so on.....

SEPARATOR = CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB

in above example i have shown a horizontal_tab you can very well use

HORIZONTAL_TAB

VERTICAL_TAB

NEWLINE

CR_LF

FORM_FEED

BACKSPACE

SPACE_STR

SPACE_STR_LANGU

Read only

Former Member
0 Likes
1,141

Is the text is more than 255 Char???

Sas

Read only

0 Likes
1,141

yes, my text is around 800 chars long, so i am appending this into SOLISTI1(char255)

but its not coming as a proper paragraph in the email body.

Read only

Former Member
0 Likes
1,141

Hi

I think for this you need to set the Document size

DATA: DOC_CHNG TYPE SODOCCHGI1,

DATA: L_OBJTXT TYPE STANDARD TABLE OF SOLISTI1,

DATA:L_FILELINES TYPE I.

DESCRIBE TABLE L_OBJTXT LINES L_FILELINES.

  • Create the document which is to be sent

DOC_CHNG-OBJ_NAME = 'Direct Deposit Expense Report'.

DOC_CHNG-OBJ_DESCR = 'Direct Deposit Expense Report'.

DOC_CHNG-DOC_SIZE = L_FILELINES * 225.

And this parameter need to be passed in FM

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

DOCUMENT_DATA = DOC_CHNG

Regards,

Ravinder.

Read only

0 Likes
1,141

already doing this

Read only

0 Likes
1,141

Hi manu,

have u try inserting the tags inside?

Tell me if it is not working...

Read only

0 Likes
1,141

No i dont know about tags, I am sending an attachment

but this issue is with the mail body of the text wher i am having around 800 chars for display in the body of the email

like

Hi

amnsrfbkbcf klhadslh asdkldhaslhdasjdjasl;kjdla

total chars here are around 800 (but they should come as a paragraph)

thanks

Regards

Manu

Read only

0 Likes
1,141

Hi,

There is no big deal in tag, this is simple thing. you just need to insert the tag at a point where you want to terminate your line and start a new line..

Lets say:: mail_content(800) conatain => "Hi amnsrfbkbcf klhadslh asdkldhaslhdasjdjasl;kjdla this is third line and this is fourth line thanks & Regrds"

It is not readable i suggest you to insert <BR.>

like

mail_content(800) conatain => "Hi <BR.>amnsrfbkbcf klhadslh asdkldhaslhdasjdjasl;kjdla <BR.>This is third line and <BR.>This is fourth line<BR.> thanks & Regrds".

It will appear in mail body as::

Hi

amnsrfbkbcf klhadslh asdkldhaslhdasjdjasl;kjdla

this is third line and this is

fourth line

thanks & Regrds

Note <BR.> is <BR> with out "." As this page will understand the tag(*=*)

Read only

0 Likes
1,141

Hi Raj

The field in which I am putting data is 255 char long

so i have to append after every 255 chars, and when i append, automatically next record comes in next line

but i dont what this to happen, i want o/p in proper para, whether mail is opened in a small window or large window.

i hope issue is clear .

Regards

Manu