Skip to Content
0
Aug 03, 2012 at 08:34 AM

Table is not showed in the correct form on Outlook - ABAP

31 Views

Hi!

I have an ABAP ALV that shows some data. I need to send the outputed ALV to an email outlook. For now, it works for every email that was sent, except in Outlook. I was told that I need to use something in the tag on the ABAP. Here's the code:

loop at gt_email into ls_email.

clear: v_mensagem, t_html[].

t_html-line = '<html>'.

append t_html.

clear t_html.

t_html-line = '<table border = "1">'.

append t_html.

clear t_html.

t_html-line = '<tr>'.

append t_html.

clear t_html.

t_html-line = '<td>Código de Material</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Descrição</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Depósito</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Stock Actual</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Stock Mínimo</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Stock Máximo</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Necessidade</td>'.

append t_html.

clear t_html.

t_html-line = '<td>Stock LPO</td>'.

append t_html.

clear t_html.

t_html-line = '</tr>'.

append t_html.

clear t_html.

...

and i try with this code, but the result is the same of the pictures

loop at gt_email into ls_email.

clear: v_mensagem, it_message[].

* begin of GC - 26.07.2012

concatenate

'<html><head><table border="1">'

'<tr>'

'<td>Código de Material</td>'

'<td>Descrição</td>'

'<td>Depósito</td>'

'<td>Stock Actual</td>'

'<td>Stock Mínimo</td>'

'<td>Stock Máximo</td>'

'<td>Necessidade</td>'

'<td>Stock LPO</td>'

'</tr>'

into v_mensagem.

...

The result that appear in the email outlook is only this "<" (image: "Email Result").

but the report do the table in the correct way (image: "table")

Can someone help me?

Thanks!


Attachments

Email Result.jpg (6.5 kB)
table.jpg (148.7 kB)