* PRPS-POSID (Projektstrukturplanelement (PSP-Element))
PARAMETERS: p_wbs TYPE bapi_wbs_list MATCHCODE OBJECT h_wbselem DEFAULT ''.
START-OF-SELECTION.
DATA: it_wbs_element_table TYPE STANDARD TABLE OF bapi_wbs_elements WITH DEFAULT KEY.
DATA: it_wbs_hierarchie_table TYPE STANDARD TABLE OF bapi_wbs_hierarchie WITH DEFAULT KEY.
it_wbs_element_table = VALUE #( ( wbs_element = p_wbs ) ).
* Read detailed information for work breakdown structures
CALL FUNCTION 'BAPI_PROJECT_GETINFO'
EXPORTING
with_subtree = abap_true
TABLES
i_wbs_element_table = it_wbs_element_table
e_wbs_hierarchie_table = it_wbs_hierarchie_table.
cl_demo_output=>write_data( it_wbs_element_table ).
cl_demo_output=>write_data( it_wbs_hierarchie_table ).
* 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.