[ABAP] ITS: HTML aus einem Dynpro generieren

* Paket: SITS_ABAP

* SE11 - Report
DATA: lv_prog TYPE d020s-prog VALUE 'SAPLSD_ENTRY'.
* Dynpro 1000
DATA: lv_dynnr TYPE d020s-dnum VALUE '1000'.
* '' / C - Classic, B - HTML-Business, W - WebGUI
DATA: lv_style TYPE w3style VALUE 'B'.

DATA: lv_html_xstr TYPE xstring.
DATA: it_html TYPE STANDARD TABLE OF w3html WITH DEFAULT KEY.

* Template von Dynpro generieren
CALL FUNCTION 'ITS_GENERATE_HTML_FROM_DYNPRO'
  EXPORTING
    progname                       = lv_prog
    dynnr                          = lv_dynnr
    style_2006                     = lv_style
  IMPORTING
    source_stream                  = lv_html_xstr
  TABLES
    meta_html                      = it_html
  EXCEPTIONS
    style_not_valid                = 1
    dynnr_or_programname_not_valid = 2
    css_not_valid                  = 3
    xsl_not_valid                  = 4
    placeholder_not_valid          = 5
    no_card_identifiers_used       = 6
    error_occured                  = 7
    OTHERS                         = 8.

IF sy-subrc = 0.
  cl_demo_output=>write_data( it_html ).
  DATA(lv_html) = cl_demo_output=>get( ).

* Daten im Inline-Browser im SAP-Fenster anzeigen
  cl_abap_browser=>show_html( EXPORTING
                                title        = 'HTML'
                                html_string  = lv_html
                                container    = cl_gui_container=>default_screen ).

* cl_gui_container=>default_screen erzwingen
  WRITE: space.
ENDIF.

Kommentare sind geschlossen.