Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report ZW3CSS_GUI_DEMO_01
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zw3css_gui_demo_01 LINE-SIZE 100.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
* dummy for triggering screen on Java SAP GUI
SELECTION-SCREEN END OF SCREEN 1001.
START-OF-SELECTION.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module PBO_0100 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE pbo_0100 OUTPUT.
TYPES:
ty_html TYPE c LENGTH 255,
tty_html_tab TYPE STANDARD TABLE OF ty_html WITH EMPTY KEY.
DATA: lt_html TYPE tty_html_tab,
html_url TYPE char255,
lV_TITLE TYPE string VALUE 'Test Html'.
DATA(lo_cont) = NEW cl_gui_custom_container( container_name = 'HTML_CCONT' ).
DATA(html_control) = NEW cl_gui_html_viewer( parent = lo_cont ).
DATA(lt_htmltable) = VALUE htmltable(
( tdline = '<html lang="en">' )
( tdline = |<title>{ lv_title }</title>| )
( tdline = '<meta name="viewport" content="width=device-width, initial-scale=1">' )
( tdline = '<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">' )
( tdline = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">' )
( tdline = '<style type="text/css">body { overflow: hidden; }</style>' )
( tdline = '<body>' )
( tdline = '<h1>My Header</h1>' )
( tdline = '</body>' )
( tdline = '</html>' ) ).
INSERT LINES OF lt_htmltable INTO lt_html INDEX 1.
html_control->load_data(
IMPORTING
assigned_url = html_url
CHANGING
data_table = lt_html ).
html_control->show_url(
EXPORTING
url = html_url ).
ENDMODULE.
Code: Alles auswählen.
PROCESS BEFORE OUTPUT.
MODULE pbo_0100.
PROCESS AFTER INPUT.
Code: Alles auswählen.
HTML_CCONT