2011 Dec 06 9:14 AM
Hi All
How can I format the text that it will be placed in lines at the same level regardless of their length
I have several lines with several length ,that will be sent per mail.
for example
cost per shirt 100
cost per trousers 200
-
Total 300
I have tried with several string functions but the without luck.
Thanks.
Edited by: Malu Mader on Dec 6, 2011 10:14 AM
2011 Dec 06 9:28 AM
You may want to consider using the UNDER addition on WRITE statements
Do you want it on the email body?
then go for HTML mode.
in this you can go for any formatting such as < 'p > or table (without grid lines) and you can easily acheive this,
2011 Dec 06 9:25 AM
hi
you can use simple write stmt like this:-
write text1,text2,text3.....
hope this helps ..
regards ,
somesh
2011 Dec 06 9:28 AM
You may want to consider using the UNDER addition on WRITE statements
2011 Dec 06 10:23 AM
Hi
Thanks for the suggestions but this is not about the write statement , it will be sent by mail so it has to be appended to the text table for the mail
BR
2011 Dec 06 12:05 PM
Do you want it on the email body?
then go for HTML mode.
in this you can go for any formatting such as < 'p > or table (without grid lines) and you can easily acheive this,
2011 Dec 06 12:12 PM
like
<table border="0">
<tr>
<td>mytest</td>
<td>2</td>
<td>300</td>
</tr>
<tr>
<td>test12345</td>
<td>500</td>
<td>600</td>
</tr>
</table>and your output comes as
mytest 2 300
test12345 500 600
2011 Dec 06 12:47 PM
Hi Soumyaprakash
This could be the solution , but when I am sending the mail I have already my text in a string table
I am looping into it and appending the string I have in the table into the mail body
so I did in this way but the whole string is comming out including the <td> and so on
lt_mailtxt = '<table border="0">' .
APPEND lt_mailtxt.
CLEAR lt_mailtxt.
LOOP AT it_string.
lt_mailtxt = '<tr>'.
APPEND lt_mailtxt.
clear lt_mailtxt .
lt_mailtxt = '<td>' .
APPEND lt_mailtxt.
CLEAR lt_mailtxt.
lt_mailtxt = it_string.
APPEND lt_mailtxt.
CLEAR lt_mailtxt.
lt_mailtxt = '</td>' .
APPEND lt_mailtxt.
lt_mailtxt = '</tr>' .
APPEND lt_mailtxt.
ENDLOOP.
lt_mailtxt = '</table>' .
APPEND lt_mailtxt.
CLEAR lt_mailtxt.
What am I missing... ?
BR
2011 Dec 06 2:04 PM
Hi,
If you don't want to bother with html, you could also use a structure and char fields instead of a string...
TYPES: BEGIN OF ts_data,
key(20) TYPE c,
val(10) TYPE c,
END OF ts_data.
DATA: ls_data TYPE ts_data,
l_str(1024) TYPE c.
ls_data-key = 'Cost per shirt'.
ls_data-val = 100.
l_str = ls_data.
"WRITE: l_str.
ls_data-key = 'Cost per trousers'.
ls_data-val = 200.
l_str = ls_data.
"WRITE: / l_str.
Kr,
Manu.
2011 Dec 06 7:31 PM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |