Skip to Content
0
Aug 09, 2007 at 05:35 AM

Problem using WWW_LIST_TO_HTML

73 Views

Hi everyone,

I am having a problem using WWW_LIST_TO_HTML function.

I've done many writes and I want to transfer all those writes to a table.

The problem is that the table that returns from WWW_LIST_TO_HTML contains

also the old data.

For example:

<code>

DATA: gt_w3html LIKE TABLE OF w3html WITH HEADER LINE.

DO 3 TIMES.

CLEAR: gt_w3html.

REFRESH: gt_w3html.

IF sy-index = 1.

WRITE:/ 'hello1'.

ELSEIF sy-index = 2.

WRITE:/ 'hello2'.

ELSEIF sy-index = 3.

WRITE:/ 'hello3'.

ENDIF.

CALL FUNCTION 'WWW_LIST_TO_HTML'

EXPORTING

list_index = sy-lsind

TABLES

html = gt_w3html.

ENDDO.

</code>

Now when sy-index = 2, the gt_w3html contains hello1 and hello2.

When sy-index = 3, gt_w3html contains hello1, hello2 and hello3.

I would like that gt_w3html will contain only the text that is relevant :

if sy-index =3, gt_w3html should contain only hello3.

Thanks for the help.

Regards.

David