* https://wiki.scn.sap.com/wiki/display/ABAP/Extracting+Function+Module+Details+using+Class+-+CL_FB_FUNCTION_UTILITY
TRY.
DATA: lv_fm_name TYPE eu_lname VALUE 'BAPI_MATERIAL_GET_ALL'.
* Header des FB lesen
DATA: lv_head TYPE header_fb.
cl_fb_function_utility=>meth_get_header_fb( EXPORTING im_name = lv_fm_name
IMPORTING ex_header = lv_head ).
cl_demo_output=>write_data( lv_head-name ).
cl_demo_output=>write_data( lv_head-stext ).
cl_demo_output=>write_data( lv_head-area ).
cl_demo_output=>write_data( lv_head-progname ).
* Interface des FB lesen
DATA: lv_interface TYPE rsfbintfv.
cl_fb_function_utility=>meth_get_interface( EXPORTING im_name = lv_fm_name
IMPORTING ex_interface = lv_interface ).
cl_demo_output=>write_data( lv_interface-import ).
cl_demo_output=>write_data( lv_interface-export ).
cl_demo_output=>write_data( lv_interface-change ).
cl_demo_output=>write_data( lv_interface-tables ).
cl_demo_output=>write_data( lv_interface-except ).
cl_demo_output=>write_data( lv_interface-paramtext ).
cl_demo_output=>write_data( lv_interface-source ).
cl_demo_output=>write_data( lv_interface-interface ).
cl_demo_output=>write_data( lv_interface-oparam ).
cl_demo_output=>write_data( lv_interface-nparam ).
cl_demo_output=>write_data( lv_interface-fparam ).
cl_demo_output=>write_data( lv_interface-opdocu ).
cl_demo_output=>write_data( lv_interface-npdocu ).
cl_demo_output=>write_data( lv_interface-stub ).
cl_demo_output=>write_data( lv_interface-frparam ).
cl_demo_output=>write_data( lv_interface-enhanceparam ).
cl_demo_output=>write_data( lv_interface-enhancedocu ).
* Anzeige
cl_demo_output=>display( ).
CATCH cx_root INTO DATA(e_txt).
WRITE: / e_txt->get_text( ).
ENDTRY.