PARAMETERS: p_kappl TYPE t681a-kappl DEFAULT 'V2'.
PARAMETERS: p_kschl TYPE t685-kschl.
START-OF-SELECTION.
SELECT SINGLE *
INTO @DATA(lv_nast)
FROM nast
WHERE kappl = @p_kappl
AND kschl = @p_kschl
AND spras = @sy-langu.
IF sy-subrc = 0.
DATA(lv_vbco3) = VALUE vbco3( spras = lv_nast-spras " Message language
vbeln = lv_nast-objky " Vertriebsbelegnummer
kunde = lv_nast-parnr " Partnernummer (KUNNR, LIFNR, PERNR, PARNR) mit Konv.Routine
parvw = lv_nast-parvw " Partnerrolle
).
DATA: lv_vbdkl TYPE vbdkl.
DATA: it_vbdpl TYPE STANDARD TABLE OF vbdpl WITH DEFAULT KEY.
* Datenbeschaffung für Lieferscheindruck
CALL FUNCTION 'RV_DELIVERY_PRINT_VIEW'
EXPORTING
comwa = lv_vbco3
IMPORTING
kopf = lv_vbdkl
TABLES
pos = it_vbdpl.
cl_demo_output=>write_data( lv_vbdkl ).
cl_demo_output=>write_data( it_vbdpl ).
* 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.