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

formating possible in sending mail program

Former Member
0 Likes
865

Hi All,

I am creating report to send a mail to user in this report i want format like uline, vline and table box also like below:

_________________________________________________

budget notification

_________________________________________________

comapny code Cost center Cost element

001 375040 6446a7

can you please guide me if is it possible?

thanks

Jigar

3 REPLIES 3
Read only

Sm1tje
Active Contributor
0 Likes
439

Would be best to create a (simple) smartform first and send it as an attachment along with the mail. Doing it the way you propose, if possible at all, very difficult. Especially the table. All this can easily be done with the smartform variant.

There are a lot of post around on SDN on how to do this.

Good luck.

Read only

naimesh_patel
Active Contributor
0 Likes
439

You can pass your BODY data as HTML to have this kind of formatting.

Like:


* Message BODY
  WA_OBJTXT-LINE = '<html> <body>'.
  APPEND WA_OBJTXT TO T_OBJTXT.

  WA_OBJTXT-LINE = '<p> List of Test materials </p>'.
  APPEND WA_OBJTXT TO T_OBJTXT.

  WA_OBJTXT-LINE = '<table border = "0"> <tr> <td>_________________</td>'.
  APPEND WA_OBJTXT TO T_OBJTXT.
  WA_OBJTXT-LINE = '</tr> </table>'.
  APPEND WA_OBJTXT TO T_OBJTXT.

  WA_OBJTXT-LINE = '<p> </p>'.
  APPEND WA_OBJTXT TO T_OBJTXT.

  WA_OBJTXT-LINE = '<table border = "1"> '.
  APPEND WA_OBJTXT TO T_OBJTXT.
  WA_OBJTXT-LINE = '<tr> <td>Material</td>'.
  APPEND WA_OBJTXT TO T_OBJTXT.
  WA_OBJTXT-LINE = '<td>Description</td> </tr>'.
  APPEND WA_OBJTXT TO T_OBJTXT.

  DO 5 TIMES.
    WA_OBJTXT-LINE = '<tr> <td>TEST</td>'.
    APPEND WA_OBJTXT TO T_OBJTXT.
    CONCATENATE '<td>' SY-ABCDE '</td> </tr>' INTO WA_OBJTXT-LINE.
    APPEND WA_OBJTXT TO T_OBJTXT.
  ENDDO.

  WA_OBJTXT-LINE = '</table>'.
  APPEND WA_OBJTXT TO T_OBJTXT.

  WA_OBJTXT-LINE = '</body> </html> '.
  APPEND WA_OBJTXT TO T_OBJTXT.

* packing data  
  DESCRIBE TABLE T_OBJTXT      LINES W_TAB_LINES.
  WA_OBJPACK-HEAD_START = 1.
  WA_OBJPACK-HEAD_NUM   = 0.
  WA_OBJPACK-BODY_START = 1.
  WA_OBJPACK-BODY_NUM   = W_TAB_LINES.
  WA_OBJPACK-DOC_TYPE   = 'HTML'.   "<<<

Regards,

Naimesh Patel

Read only

0 Likes
439

Hi Naimesh,

Thanks for answer..

Thanks

Jigar