[ABAP] Semantisches Objekt im Fiori-Launchpad anzeigen

* Semantisches Objekt
PARAMETERS: p_semobj TYPE /ui2/v_semobj-sem_obj LOWER CASE DEFAULT 'SalesOrder'.
* Action
PARAMETERS: p_semact TYPE char80 LOWER CASE DEFAULT 'displayFactSheet'.
* Parameter
PARAMETERS: p_sempar TYPE char80 LOWER CASE DEFAULT 'SalesOrder'.
* Value
PARAMETERS: p_parval TYPE char80 LOWER CASE DEFAULT '1'.

START-OF-SELECTION.

* URL Parameter
  DATA(it_parameters) = VALUE tihttpnvp( ( name = 'sap-client'      value = sy-mandt )
                                         ( name = 'sap-ui-language' value = 'DE' )
                                         ( name = 'sap-ui-appcache' value = 'false' ) ).

* Browser URL mit HOST:PORT und Parametern zusammenbauen
  DATA(lv_url) = /ui5/cl_theme_util=>get_server_url( path         = |/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html|
                                                     parameters   = it_parameters
                                                     always_https = abap_false  ).

* Pattern:
*    #<semantic object>-<action>?<semantic object parameter>=<value1>
* Beispiel:
*    #SalesOrder-displayFactSheet?SalesOrder=1
  lv_url = |{ lv_url }#{ p_semobj }-{ p_semact }?{ p_sempar }={ p_parval }|.

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

* URL anzeigen
  DATA(o_hv) = NEW cl_gui_html_viewer( parent = cl_gui_container=>default_screen ).
  o_hv->show_url( url = CONV swk_url( lv_url )
                  in_place = abap_true ). " im SAP-Fenster (abap_true) oder im Externen Browser (abap_false) anzeigen

* cl_gui_container=>default_screen erzwingen
  WRITE: space.