‎2008 Aug 06 6:47 PM
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
‎2008 Aug 06 7:16 PM
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.
‎2008 Aug 06 7:32 PM
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
‎2008 Aug 08 11:14 PM