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

Email body text formating

Former Member
0 Likes
859

Hi ALL,

I need to display the following data in the email body with Material records and DIR records

Line 1 (Header Line):

"Material Master Records "

Line 2:

[ space ]

Line 3 (New Record):

Material Number Material Desc. MatGrp Basic Material UOM

.

Line 1 (Header Line):

"Document Info. Records "

Line 2:

[ space ]

Line 3 (New Record):

DocType Document Part Version Doc.Desc.

I am using the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the mail and populating the contents_txt internal table with Material and DIR records using OFFSETS.

I am getting alignment problems and space is getting trucated between the fields.

Can somebody tell me how to do a proper formating to the email body

Thanks

Bhasker

Hi ALL,

I need to display the following data in the email body with Material records and DIR records

Line 1 (Header Line):

"Material Master Records "

Line 2:

[ space ]

Line 3 (New Record):

Material Number Material Desc. MatGrp Basic Material UOM

.

Line 1 (Header Line):

"Document Info. Records "

Line 2:

[ space ]

Line 3 (New Record):

DocType Document Part Version Doc.Desc.

I am using the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the mail and populating the contents_txt internal table with Material and DIR records using OFFSETS.

I am getting alignment problems and space is getting trucated between the fields.

Can somebody tell me how to do a proper formating to the email body

Thanks

Bhasker

2 REPLIES 2
Read only

Former Member
0 Likes
640

To avoid formating issues, I usually construct an html instead of plain text in email body.

With tables in html, I can align format text easily because when email displayes body, it will display html.

to construct html, use class cl_dd_document. And set doc type to 'HTM' when calling 'SO_NEW_DOCUMENT_ATT_SEND_API1'

Read only

Former Member
0 Likes
640

I hope every thing in the mail is in Charater format , every field and length .

the only thing for these sort of option is to have a fixed distance based on max and min length the text can occupy .

-


Line 1 (Header Line):

"Material Master Records "

Line 2:

[ space ]

Line 3 (New Record):

Material Number Material Desc. MatGrp Basic Material UOM

.

-


declare the text as

begin of itab occurs 0 ,

s1(200) type c,

endof itab

1. first text for the header .

itab-S1+10(100) = " Header text'.

append itab .

clear itab.

2.

append itab ====> fill force an empty line

3.

use concatenate f1X(Y ) f2X(Y ) itab-f3+X(Y ) into itab-s1 separated by space

append itab.

will keep the format in justified format .

similarly repeat the same for the second header .

regards,

vijay