[ABAP] Vertikaler Tabstrip-Container für Controls (CL_GUI_CONTAINER_BAR_XT, CL_GUI_CONTAINER_BAR_2, CL_GUI_CONTAINER_BAR)

Variante 1 (CL_GUI_CONTAINER_BAR_XT)

CLASS lcl_events DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      on_clicked FOR EVENT clicked OF cl_gui_container_bar_xt
        IMPORTING
            id
            container
            sender.
    CLASS-METHODS:
      on_empty FOR EVENT empty OF cl_gui_container_bar_xt
        IMPORTING
            sender.
    CLASS-METHODS:
      on_closed FOR EVENT closed OF cl_gui_container_bar_xt
        IMPORTING
            id
            sender.
ENDCLASS.

CLASS lcl_events IMPLEMENTATION.
* Eintrag angeklickt
  METHOD on_clicked.
    MESSAGE |Property: { id } { container->get_container_type( ) }| TYPE 'S'.
  ENDMETHOD.
* wenn keine Einträge mehr vorhanden (z.B. alle durch Klick auf die Schließen-Kreuze geschlossen)
  METHOD on_empty.
    BREAK-POINT.
  ENDMETHOD.
* wenn Schließen-Kreuz eines Eintrages geklickt
  METHOD on_closed.
    BREAK-POINT.
  ENDMETHOD.
ENDCLASS.

INITIALIZATION.
  TRY.
* Vertikalen Splitter erzeugen
      DATA(o_splitter) = NEW cl_gui_splitter_container( parent                  = cl_gui_container=>default_screen
                                                        no_autodef_progid_dynnr = abap_true
                                                        rows                    = 1
                                                        columns                 = 2 ).

* 10% / 90% Teilung
      o_splitter->set_column_width( id = 1 width = 10 ).

      DATA(o_container_left) = o_splitter->get_container( row = 1 column = 1 ).
      DATA(o_container_right) = o_splitter->get_container( row = 1 column = 2 ).

* Zwei Einträge im cl_gui_container_bar_xt
      DATA(it_captions) = VALUE sbptcaptns( ( caption      = 'ABAP'
                                              icon         = icon_abap
                                              no_close     = abap_false
                                              name         = 'CAP1'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' )
                                            ( caption      = 'ABC'
                                              icon         = icon_abc
                                              no_close     = abap_false
                                              name         = 'CAP2'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' ) ).

* cl_gui_container_bar_xt im linken Splitter erzeugen
      DATA(o_toolbar_xt) = NEW cl_gui_container_bar_xt( active_id     = 1                                    " Nr. des aktiven Eintrages
                                                        parent        = o_container_left                     " Einbettung in linken Container
                                                        captions      = it_captions                          " Einträge
                                                        style         = cl_gui_container_bar_xt=>c_style_fix " Style: Fix = Feste Anordnung, Outlook = Anordnung klappt
                                                        close_buttons = abap_true ).                         " Schließen Kreuze anzeigen

* einen weiterer Eintrag im cl_gui_container_bar_xt hinzufügen
      DATA(lv_caption) = VALUE sbptcaptn( caption      = 'Activate'
                                          icon         = icon_activate
                                          no_close     = abap_false
                                          name         = 'CAP3'
                                          invisible    = abap_false
                                          pre_inst     = abap_false
                                          reuse_cnt_of = '' ).

* Eintrag einfügen und Id holen
      DATA(lv_id) = 0.
      o_toolbar_xt->add_cell( EXPORTING caption = lv_caption
                              CHANGING  id      = lv_id ).

* Testweise Container zum Eintrag ermitteln
      DATA(o_cont) = o_toolbar_xt->get_container( id = lv_id ).

* letzen Eintrag im cl_gui_container_bar_xt aktiv (ausgewählt) setzen
      o_toolbar_xt->set_active( id = lv_id ).

* Eventhandler registrieren
      SET HANDLER lcl_events=>on_clicked FOR o_toolbar_xt.
      SET HANDLER lcl_events=>on_empty FOR o_toolbar_xt.
      SET HANDLER lcl_events=>on_closed FOR o_toolbar_xt.

* im rechten Splitter Beispieldaten anzeigen
      DATA: it_sflight TYPE STANDARD TABLE OF sflight.

      SELECT * FROM sflight INTO TABLE @it_sflight.

      DATA: o_salv TYPE REF TO cl_salv_table.

      cl_salv_table=>factory( EXPORTING
                                r_container    = o_container_right
                              IMPORTING
                                r_salv_table   = o_salv
                              CHANGING
                                t_table        = it_sflight ).

      o_salv->get_functions( )->set_all( ).
      o_salv->display( ).

* leere Standard-Toolbar ausblenden
      cl_abap_list_layout=>suppress_toolbar( ).

* Ausgabe von cl_gui_container=>default_screen erzwingen
      WRITE: space.
    CATCH cx_root INTO DATA(e_txt).
  ENDTRY.

Variante 2 (CL_GUI_CONTAINER_BAR_2)

CLASS lcl_events DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      on_clicked FOR EVENT clicked OF cl_gui_container_bar_2
        IMPORTING
            id
            container
            sender.
    CLASS-METHODS:
      on_empty FOR EVENT empty OF cl_gui_container_bar_2
        IMPORTING
            sender.
    CLASS-METHODS:
      on_closed FOR EVENT closed OF cl_gui_container_bar_2
        IMPORTING
            id
            sender.
ENDCLASS.

CLASS lcl_events IMPLEMENTATION.
* Eintrag angeklickt
  METHOD on_clicked.
    MESSAGE |Property: { id } { container->get_container_type( ) }| TYPE 'S'.
  ENDMETHOD.
* wenn keine Einträge mehr vorhanden (z.B. alle durch Klick auf die Schließen-Kreuze geschlossen)
  METHOD on_empty.
    BREAK-POINT.
  ENDMETHOD.
* wenn Schließen-Kreuz eines Eintrages geklickt
  METHOD on_closed.
    BREAK-POINT.
  ENDMETHOD.
ENDCLASS.

INITIALIZATION.
  TRY.
* Vertikalen Splitter erzeugen
      DATA(o_splitter) = NEW cl_gui_splitter_container( parent                  = cl_gui_container=>default_screen
                                                        no_autodef_progid_dynnr = abap_true
                                                        rows                    = 1
                                                        columns                 = 2 ).

* 10% / 90% Teilung
      o_splitter->set_column_width( id = 1 width = 10 ).

      DATA(o_container_left) = o_splitter->get_container( row = 1 column = 1 ).
      DATA(o_container_right) = o_splitter->get_container( row = 1 column = 2 ).

* Zwei Einträge im cl_gui_container_bar_2
      DATA(it_captions) = VALUE sbptcaptns( ( caption      = 'ABAP'
                                              icon         = icon_abap
                                              no_close     = abap_false
                                              name         = 'CAP1'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' )
                                            ( caption      = 'ABC'
                                              icon         = icon_abc
                                              no_close     = abap_false
                                              name         = 'CAP2'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' ) ).

* cl_gui_container_bar_2 im linken Splitter erzeugen
      DATA(o_toolbar) = NEW cl_gui_container_bar_2( active_id     = 1                                    " Nr. des aktiven Eintrages
                                                    parent        = o_container_left                     " Einbettung in linken Container
                                                    captions      = it_captions                          " Einträge
                                                    style         = cl_gui_container_bar_2=>c_style_tile " Style: Fix = Feste Anordnung, tile = Menü, Outlook = Anordnung klappt
                                                    close_buttons = abap_false ).                        " Schließen Kreuze anzeigen

* einen weiterer Eintrag im cl_gui_container_bar_2 hinzufügen
      DATA(lv_caption) = VALUE sbptcaptn( caption      = 'Activate'
                                          icon         = icon_activate
                                          no_close     = abap_false
                                          name         = 'CAP3'
                                          invisible    = abap_false
                                          pre_inst     = abap_false
                                          reuse_cnt_of = '' ).

* Eintrag einfügen und Id holen
      DATA(lv_id) = 0.
      o_toolbar->add_cell( EXPORTING caption = lv_caption
                           CHANGING  id      = lv_id ).

* Testweise Container zum Eintrag ermitteln
      DATA(o_cont) = o_toolbar->get_container( id = lv_id ).

* letzen Eintrag im cl_gui_container_bar_2 aktiv (ausgewählt) setzen
      o_toolbar->set_active( id = lv_id ).

* Eventhandler registrieren
      SET HANDLER lcl_events=>on_clicked FOR o_toolbar.
      SET HANDLER lcl_events=>on_empty FOR o_toolbar.
      SET HANDLER lcl_events=>on_closed FOR o_toolbar.

* im rechten Splitter Beispieldaten anzeigen
      DATA: it_sflight TYPE STANDARD TABLE OF sflight.

      SELECT * FROM sflight INTO TABLE @it_sflight.

      DATA: o_salv TYPE REF TO cl_salv_table.

      cl_salv_table=>factory( EXPORTING
                                r_container    = o_container_right
                              IMPORTING
                                r_salv_table   = o_salv
                              CHANGING
                                t_table        = it_sflight ).

      o_salv->get_functions( )->set_all( ).
      o_salv->display( ).

* leere Standard-Toolbar ausblenden
      cl_abap_list_layout=>suppress_toolbar( ).

* Ausgabe von cl_gui_container=>default_screen erzwingen
      WRITE: space.
    CATCH cx_root INTO DATA(e_txt).
  ENDTRY.

Variante 3 (CL_GUI_CONTAINER_BAR)

CLASS lcl_events DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      on_clicked FOR EVENT clicked OF cl_gui_container_bar
        IMPORTING
            id
            container
            sender.
ENDCLASS.

CLASS lcl_events IMPLEMENTATION.
* Eintrag angeklickt
  METHOD on_clicked.
    MESSAGE |Property: { id } { container->get_container_type( ) }| TYPE 'S'.
  ENDMETHOD.
ENDCLASS.

INITIALIZATION.
  TRY.
* Vertikalen Splitter erzeugen
      DATA(o_splitter) = NEW cl_gui_splitter_container( parent                  = cl_gui_container=>default_screen
                                                        no_autodef_progid_dynnr = abap_true
                                                        rows                    = 1
                                                        columns                 = 2 ).

* 10% / 90% Teilung
      o_splitter->set_column_width( id = 1 width = 10 ).

      DATA(o_container_left) = o_splitter->get_container( row = 1 column = 1 ).
      DATA(o_container_right) = o_splitter->get_container( row = 1 column = 2 ).

* Drei Einträge im cl_gui_container_bar
      DATA(it_captions) = VALUE sbptcaptns( ( caption      = 'ABAP'
                                              icon         = icon_abap
                                              no_close     = abap_false
                                              name         = 'CAP1'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' )
                                            ( caption      = 'ABC'
                                              icon         = icon_abc
                                              no_close     = abap_false
                                              name         = 'CAP2'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' )
                                            ( caption      = 'Activate'
                                              icon         = icon_activate
                                              no_close     = abap_false
                                              name         = 'CAP3'
                                              invisible    = abap_false
                                              pre_inst     = abap_false
                                              reuse_cnt_of = '' ) ).

* cl_gui_container_bar im linken Splitter erzeugen
      DATA(o_toolbar) = NEW cl_gui_container_bar( active_id     = 1                " Nr. des aktiven Eintrages
                                                  parent        = o_container_left " Einbettung in linken Container
                                                  captions      = it_captions ).   " Einträge

* Eventhandler registrieren
      SET HANDLER lcl_events=>on_clicked FOR o_toolbar.

* im rechten Splitter Beispieldaten anzeigen
      DATA: it_sflight TYPE STANDARD TABLE OF sflight.

      SELECT * FROM sflight INTO TABLE @it_sflight.

      DATA: o_salv TYPE REF TO cl_salv_table.

      cl_salv_table=>factory( EXPORTING
                                r_container    = o_container_right
                              IMPORTING
                                r_salv_table   = o_salv
                              CHANGING
                                t_table        = it_sflight ).

      o_salv->get_functions( )->set_all( ).
      o_salv->display( ).

* leere Standard-Toolbar ausblenden
      cl_abap_list_layout=>suppress_toolbar( ).

* Ausgabe von cl_gui_container=>default_screen erzwingen
      WRITE: space.
    CATCH cx_root INTO DATA(e_txt).
  ENDTRY.

[ABAP] Eine bestimmte Zeit (Sekundenbruchteile) warten

* WAIT UP TO ... SECONDS funktioniert nicht in allen Releases gleich zuverlässig
* Siehe auch BAPI_TRANSACTION_COMMIT mit Parameter WAIT = 'X'
* https://blogs.sap.com/2019/08/13/code-snippet-series-wait-a-fraction-of-a-second/
CLASS lcl_wait DEFINITION.
  PUBLIC SECTION.

    TYPES : BEGIN OF ty_s_tmstmp,
              start     TYPE timestampl, " Startzeit
              now       TYPE timestampl, " akt. Zeit
              elapsed   TYPE tzntstmpl,  " verstrichene Zeit in Sekunden
              limit     TYPE tzntstmpl,  " Limit in Sekunden
              condition TYPE abap_bool,  " Abbruch durch Bedingung oder Limit?
            END OF ty_s_tmstmp.

    CLASS-METHODS: wait
      IMPORTING
                i_time         TYPE tzntstmpl
      RETURNING VALUE(rv_info) TYPE ty_s_tmstmp.

  PRIVATE SECTION.
    CLASS-METHODS: condition_code
      RETURNING VALUE(rv_ok) TYPE abap_bool.
ENDCLASS.

CLASS lcl_wait IMPLEMENTATION.

  METHOD wait.
    rv_info = VALUE ty_s_tmstmp( elapsed = 0 limit = i_time condition = abap_false ).

    GET TIME STAMP FIELD rv_info-start.

* 1. Prüfung: Zeitlimit
    WHILE rv_info-elapsed < rv_info-limit.
* 2. Prüfung: Erfüllung der Abbruchbedingung
      IF abap_true = condition_code( ).
        rv_info-condition = abap_true.
        EXIT.
      ENDIF.

      GET TIME STAMP FIELD rv_info-now.
      rv_info-elapsed = cl_abap_tstmp=>subtract( tstmp1 = rv_info-now tstmp2 = rv_info-start ).
    ENDWHILE.

  ENDMETHOD.

  METHOD condition_code.
* Code mit Prüfbedingung hier (z.B. ENQUEUE_READ)
* Beispielcode testet, wann zufällig die Zahl 10 aus einer Seed von 0-100000 erzeugt wird
    DATA(lv_i) = cl_abap_random_int=>create( seed = cl_abap_random=>seed( ) min = 0 max = 100000 )->get_next( ).

    IF lv_i = 10.
      rv_ok = abap_true.
    ELSE.
      rv_ok = abap_false.
    ENDIF.
  ENDMETHOD.
ENDCLASS.

START-OF-SELECTION.

  DATA(lv_ts) = VALUE timestampl( ).

  GET TIME STAMP FIELD lv_ts.
  WRITE: / |Start: { lv_ts TIMESTAMP = ISO }|.

* max. Wartezeit in Sekunden (auch Sekundenbruchteile möglich)
  DATA(lv_info) = lcl_wait=>wait( '1.5' ).
  WRITE: / |Elapsed: { lv_info-elapsed TIMESTAMP = ISO }|.
  WRITE: / |Abbruchbedingung erfüllt: { lv_info-condition }|.

  GET TIME STAMP FIELD lv_ts.
  WRITE: / |Ende: { lv_ts TIMESTAMP = ISO }|.

[ABAP] JavaScript-Code über MSScriptControl ausführen

* http://www.thescarms.com/VBasic/Scripting.aspx
* JS-Code mit Beispielfunktionen einfügen
DATA(it_js_code) = VALUE stringtab( ( |var oJSON = \{| )
                                    ( |  "name" : "Heinz",| )
                                    ( |  "age"  : 56,| )
                                    ( |  "city" : "Hamburg"| )
                                    ( |\};| )
                                    ( |function add(a, b) \{| )
                                    ( |  return a + b;| )
                                    ( |\};| )
                                    ( |function getJSONString() \{| )
                                    ( |  return oJSON["name"];| )
                                    ( |\};| )
                                   ).

DATA: lv_jscode TYPE string.

* VBA-Code in String wandeln
LOOP AT it_js_code ASSIGNING FIELD-SYMBOL(<c>).
  DATA(lv_codeline) = condense( <c> ).
  IF lv_jscode IS INITIAL.
    lv_jscode = lv_codeline.
  ELSE.
    lv_jscode = |{ lv_jscode }{ cl_abap_char_utilities=>cr_lf }{ lv_codeline }|.
  ENDIF.
ENDLOOP.

* Scriptcontrol-Objekt erzeugen
DATA: o_scr TYPE ole2_object.
* Variablen für Fehleranalyse
DATA: o_error TYPE ole2_object.
DATA: lv_line TYPE string.
DATA: lv_number TYPE string.
DATA: lv_desc TYPE string.
DATA: lv_source TYPE string.

CREATE OBJECT o_scr 'MSScriptControl.ScriptControl'.

* wenn Erzeugung ok
IF sy-subrc = 0 AND o_scr-handle <> 0 AND o_scr-type = 'OLE2'.
  WRITE: / 'Header', o_scr-header.
  WRITE: / 'Type', o_scr-type.
  WRITE: / 'Handle', o_scr-handle.
  WRITE: / 'CB-Index', o_scr-cb_index.
  WRITE: / 'CLSID', o_scr-clsid.

* GUI anzeigen
  SET PROPERTY OF o_scr 'AllowUI' = 1.
* Sprache ist 'JScript'
  SET PROPERTY OF o_scr 'Language' = 'JScript'.

* Code hinzufügen und Syntaxcheck
  CALL METHOD OF o_scr 'AddCode'
    EXPORTING
      #1 = lv_jscode.

* wenn Syntax ok
  IF sy-subrc = 0.
* Funktionsaufruf mit Übergabeparametern
    DATA: lv_res_i TYPE i.
    CALL METHOD OF o_scr 'Eval' = lv_res_i
      EXPORTING
        #1 = 'add(1, 2)'.

    WRITE: / 'add(1, 2) =', lv_res_i.

* Aufruf Stringfunktion
    DATA: lv_res_str TYPE string.
    CALL METHOD OF o_scr 'Eval' = lv_res_str
      EXPORTING
        #1 = 'getJSONString()'.

    WRITE: / 'getJSONString() =', lv_res_str.

* Aufruf einer nicht Vorhandenen Funktion --> Fehlerauswertung
    DATA: lv_res_input TYPE string.
    CALL METHOD OF o_scr 'Eval' = lv_res_input
      EXPORTING
        #1 = 'getInput()'.

    IF sy-subrc = 0.
      WRITE: / 'getInput() =', lv_res_input.
    ELSE.
* Fehlerauswertung
      GET PROPERTY OF o_scr 'Error' = o_error.
      GET PROPERTY OF o_error 'Line' = lv_line.
      GET PROPERTY OF o_error 'Number' = lv_number.
      GET PROPERTY OF o_error 'Description' = lv_desc.
      GET PROPERTY OF o_error 'Source' = lv_source.

      WRITE: / 'Line:', lv_line.
      WRITE: / 'Number:', lv_number.
      WRITE: / 'Desc:', lv_desc.
      WRITE: / 'Source:', lv_source.
    ENDIF.
  ELSE.
    WRITE: / 'Fehler im Code: ', sy-subrc.
  ENDIF.

* Objekt zerstören
  FREE OBJECT o_scr.
ENDIF.

[S/4HANA] Installation und Einrichtung von S/4HANA

Your S/4HANA environment – Part 1 – Maintenance Planner, System Installation and Update
Your S/4HANA environment – Part 2 – SAP NW Gateway and Fiori Launchpad
Your S/4HANA environment – Part 3 – Best Practices Content Activation
Your S/4HANA environment – Part 4 – Fact Sheet apps, Fiori Search and Web Dispatcher
Your S/4HANA environment – Part 5 – Upgrade to 1610
Your S/4HANA environment – Part 6 – Fully Activated Appliance on Microsoft Azure
Your S/4HANA environment – Part 7 – Fiori Launchpad SAML Single Sign-On with Azure AD

[ABAP] Infos zu ICF-Service lesen / Prüfen, ob SSO2-Service aktiv

* Transaktion: SICF
* Tabelle: ICFSERVICE

* Service-Name, hier z.B. MYSSOCNTL (SSO2-Service)
PARAMETERS: p_srv TYPE icfservice-icf_name DEFAULT 'MYSSOCNTL'.

START-OF-SELECTION.

  TRY.
* Suche im Baum der ICF-Services im Internet-Kommunikations-Framework
      SELECT SINGLE icfparguid
        INTO @DATA(lv_icfparguid)
        FROM icfservice
        WHERE icf_name = @p_srv.

      IF sy-subrc = 0.
        DATA: lv_hostnr	TYPE icfhostnum.       " Nummer eines virtuellen Hosts
        DATA: it_serv_info TYPE icfservtbl.    " Tabelle von ICF-Services und deren zugehörige Handler
        DATA: lv_url TYPE string.              " URL zu Service
        DATA: lv_active	TYPE c.                " Service aktiv oder inaktiv
        DATA: lv_icfdocu TYPE icfdocu.         " Documentation der ICFSERVICE Einträge
        DATA: lv_icf_custstr TYPE icf_custstr. " ICF: String für customizingdaten der Anwendung
        DATA: lv_serv_sign TYPE c.             " Kz, um welche Art v. Service (Host, int Alias, Service)
        DATA: lv_host_info TYPE icfvirhost.    " Internet Communication Framework: Virtuelle Hosts

* Liefert Informationen zu ICF-Service
        cl_icf_tree=>if_icf_tree~get_info_from_serv( EXPORTING
                                                       icf_name        = p_srv
                                                       icfparguid      = lv_icfparguid
                                                       authority_check = abap_false
                                                     IMPORTING
                                                       hostnr          = lv_hostnr
                                                       serv_info       = it_serv_info
                                                       url             = lv_url
                                                       active          = lv_active
                                                       icfdocu         = lv_icfdocu
                                                       icf_custstr     = lv_icf_custstr
                                                       serv_sign       = lv_serv_sign
                                                       host_info       = lv_host_info
                                                   ).

        cl_demo_output=>write_data( lv_hostnr ).

        IF lines( it_serv_info ) > 0.
          DATA(lv_srv_info) = it_serv_info[ 1 ].
          cl_demo_output=>write_data( lv_srv_info-service ).
          cl_demo_output=>write_data( lv_srv_info-handlertbl ).
          cl_demo_output=>write_data( lv_srv_info-pathfields ).
        ENDIF.

        cl_demo_output=>write_data( lv_url ).
        cl_demo_output=>write_data( lv_active ).
        cl_demo_output=>write_data( lv_icfdocu ).
        cl_demo_output=>write_data( lv_icf_custstr ).
        cl_demo_output=>write_data( lv_serv_sign ).
        cl_demo_output=>write_data( lv_host_info ).

        DATA: lv_urlsuffix TYPE icfredurl.    " Rest einer Url nach ICF-Service
        DATA: lv_icfnodguid TYPE icfnodguid.  " Nodguid des letzen service im Pfad
        DATA: lv_icf_name TYPE icfname.       " Name des letzen Service im ICF-Baum
        DATA: lv_int_alias TYPE icfalias.     " Kein Service sondern interner Alias
        DATA: lv_ext_alias TYPE icfalias.     " Kein Service sondern externer Alias
        DATA: lv_icfactive TYPE icfactive.    " Service ist aktiv
        DATA: lv_icfaltnme TYPE icfaltnme.    " Alternative Namensgebung

* Ermittelt aus einer URL dem letzten Service im ICF-Baum
        cl_icf_tree=>if_icf_tree~service_from_url( EXPORTING
                                                    url             = lv_url
                                                    hostnumber      = lv_hostnr
                                                    authority_check = abap_false
                                                   IMPORTING
                                                    urlsuffix  = lv_urlsuffix
                                                    icfnodguid = lv_icfnodguid
                                                    icf_name   = lv_icf_name
                                                    int_alias  = lv_int_alias
                                                    ext_alias  = lv_ext_alias
                                                    icfactive  = lv_icfactive
                                                    icfaltnme  = lv_icfaltnme
                                                  ).

        cl_demo_output=>write_data( lv_urlsuffix ).
        cl_demo_output=>write_data( lv_icfnodguid ).
        cl_demo_output=>write_data( lv_icf_name ).
        cl_demo_output=>write_data( lv_int_alias ).
        cl_demo_output=>write_data( lv_ext_alias ).
        cl_demo_output=>write_data( lv_icfactive ).
        cl_demo_output=>write_data( lv_icfaltnme ).

* ist Service aktiv
        DATA(lv_is_active) = cl_icf_tree=>is_service_active( nodeguid	= lv_icfnodguid
*                                                             URL =
*                                                             HOSTNAME =
                                                           ).

        cl_demo_output=>write_data( lv_is_active ).

* HTML-Code vom Demo-Output holen
        DATA(lv_html) = cl_demo_output=>get( ).

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

*         cl_gui_container=>default_screen erzwingen
        WRITE: space.
      ENDIF.
    CATCH cx_root INTO DATA(e_txt).
  ENDTRY.