PARAMETERS: p_url TYPE w3url DEFAULT 'https://google.de'.
DATA: lv_size TYPE i.
DATA: lv_errorstate TYPE i.
DATA: lv_ret_type TYPE c.
DATA: lv_ret_subtype TYPE c.
DATA: lv_date TYPE sy-datum.
DATA: lv_time TYPE sy-uzeit.
DATA: it_response TYPE STANDARD TABLE OF docs WITH DEFAULT KEY.
* Stellt die Daten eines URLs in eine interne Tabelle
CALL FUNCTION 'DP_GET_STREAM_FROM_URL'
EXPORTING
url = p_url
IMPORTING
size = lv_size
errorstate = lv_errorstate
ret_type = lv_ret_type
ret_subtype = lv_ret_subtype
date = lv_date
time = lv_time
TABLES
data = it_response
EXCEPTIONS
dp_fail = 1
dp_failed_init = 2
blocked_by_policy = 3
unknown_error = 4
OTHERS = 5.
IF sy-subrc = 0.
* Hier Objekte für die Ausgabe hinzufügen
cl_demo_output=>write_data( lv_size ).
cl_demo_output=>write_data( lv_errorstate ).
cl_demo_output=>write_data( lv_ret_type ).
cl_demo_output=>write_data( lv_ret_subtype ).
cl_demo_output=>write_data( lv_date ).
cl_demo_output=>write_data( lv_time ).
cl_demo_output=>write_data( it_response ).
* 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 = 'Daten'
html_string = lv_html
container = cl_gui_container=>default_screen ).
* cl_gui_container=>default_screen erzwingen
WRITE: space.
ENDIF.