types: begin of msg,
type like icon-id,
text(140) type c,
end of msg.
constants: gc_marked type c value 'X',
gc_ok like icon-id value '@5B@'.
data:
gt_msg type standard table of msg,
gs_msg like line of gt_msg,
gv_msg(138) type c,
*-- html
html_container type ref to cl_gui_custom_container,
html_control type ref to cl_gui_html_viewer,
my_row_header like w3head occurs 10 with header line,
my_fields like w3fields occurs 10 with header line,
my_header like w3head,
my_html type standard table of w3html ,
ok_code like sy-ucomm.
*-------------------------------------------------------------------*
* Start of Selection *
*-------------------------------------------------------------------*
start-of-selection.
clear gv_msg.
gv_msg = 'MESSAGES for HTML'.
do 3 times.
perform message using gc_ok gv_msg .
enddo.
*-------------------------------------------------------------------*
* End of Selection *
*-------------------------------------------------------------------*
end-of-selection.
set screen 0100.
*&---------------------------------------------------------------------*
*& Form message
*&---------------------------------------------------------------------*
form message using p_type
p_text.
case ok_code.
when 'EXIT' or 'BACK'.
leave program.
when others.
call method cl_gui_cfw=>dispatch.
endcase.
endmodule. " user_command_0100 INPUT
*&---------------------------------------------------------------------*
*& Form convert_itab_html
*&---------------------------------------------------------------------*
form convert_itab_html.
data: lv_tabix like sy-tabix.
*-- table header
call function 'WWW_ITAB_TO_HTML_HEADERS'
exporting
field_nr = 1
text = 'Type'
fgcolor = 'navy'
bgcolor = 'red'
font = 'Arial'
tables
header = my_row_header.
call function 'WWW_ITAB_TO_HTML_HEADERS'
exporting
field_nr = 2
text = 'Message'
fgcolor = 'navy'
bgcolor = 'red'
font = 'Arial'
tables
header = my_row_header.
*-- table rows
clear lv_tabix.
loop at gt_msg into gs_msg.
lv_tabix = sy-tabix.
call function 'WWW_ITAB_TO_HTML_LAYOUT'
exporting
field_nr = 1
line_nr = lv_tabix
icon = gc_marked
tables
fields = my_fields.
*-- header
move 'Messages during program run' to my_header-text.
move 'Arial' to my_header-font.
move '2' to my_header-size.
move 'Centered' to my_header-just.
move 'red' to my_header-bg_color.
move 'blue' to my_header-fg_color.
eigentlich sieht alles gut aus. Ich werde selbst mal ein Beispiel aufbauen und posten.
Liegt es bei Dir am HTML-Control oder daran, daß der Baustein kein HTML ausgibt?