* 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.