TRY.
DATA: it_sel_filetab TYPE filetable.
DATA: ret_code TYPE i.
DATA: lv_action TYPE i.
* FileOpen-Dialog für Dateiauswahl anzeigen
cl_gui_frontend_services=>file_open_dialog( EXPORTING
window_title = 'PDF-Datei öffnen'
multiselection = abap_false
CHANGING
file_table = it_sel_filetab
rc = ret_code " Anzahl ausgewählte Dateien, -1 bei Fehler
user_action = lv_action ).
IF lv_action = cl_gui_frontend_services=>action_ok.
* Browserfenster erzeugen
DATA(o_html) = NEW cl_gui_html_viewer( parent = cl_gui_container=>default_screen ).
* PDF im ABAP-Fenster anzeigen
o_html->show_url( url = it_sel_filetab[ 1 ]-filename
in_place = abap_true ).
* leere SAP-Toolbar ausblenden
cl_abap_list_layout=>suppress_toolbar( ).
* cl_gui_container=>default_screen erzwingen
WRITE: / space.
ENDIF.
CATCH cx_root INTO DATA(e_txt).
WRITE: / e_txt->get_text( ).
ENDTRY.