Skip to end of metadata
Go to start of metadata

I wrote this small report to display the parsed metadata of a UI component, which could be used to check the UI component when you meet with some exception in the UI Framework runtime ( for example, no appropriate inbound plug found during navigation queue is processed )

TYPES ltype_viewline TYPE cl_bsp_wd_rep_view=>gtype_viewline .
  BEGIN OF gtype_op_mapping,
    name      TYPE string,
    op_plug   TYPE string,
    switch_id TYPE sfw_switch_id,
    reaction  TYPE sfw_showhide,
  END OF gtype_op_mapping .
  BEGIN OF gtype_ip_follow_up,
    name      TYPE string,
    navlink   TYPE string,
    switch_id TYPE sfw_switch_id,
    reaction  TYPE sfw_showhide,
  END OF gtype_ip_follow_up .
  BEGIN OF gtype_navlink,
    name         TYPE string,
    targets_done TYPE flag,
    targets      TYPE tbsp_wd_rep_navigation_targets,
    sfw_data     TYPE bsp_wd_sfw_data BOXED,
  END OF gtype_navlink .
  BEGIN OF gtype_viewline,
    view              TYPE string,
    active            TYPE abap_bool,
    view_id           TYPE n LENGTH 4,
    parent_viewset    TYPE string,
    parent_viewarea   TYPE string,
    parent            TYPE REF TO cl_bsp_wd_rep_view,
    initials          TYPE tbsp_wd_rep_viewarea_assigns,
    initials_done     TYPE abap_bool,
    navlinks          TYPE SORTED TABLE OF gtype_navlink
                         WITH NON-UNIQUE KEY name
                         INITIAL SIZE 0,
    rep_view          TYPE REF TO cl_bsp_wd_rep_view,
    is_window         TYPE abap_bool,
    is_intf_view      TYPE abap_bool,
    is_default_window TYPE abap_bool,
    ip_follow_ups     TYPE HASHED TABLE OF gtype_ip_follow_up
                         WITH UNIQUE KEY name
                         INITIAL SIZE 0,
    op_mappings       TYPE HASHED TABLE OF gtype_op_mapping
                         WITH UNIQUE KEY name
                         INITIAL SIZE 0,
    sfw_data          TYPE bsp_wd_sfw_data BOXED,
  END OF gtype_viewline .
   ltype_view_tab TYPE HASHED TABLE OF ltype_viewline
                              WITH UNIQUE KEY view active
                              INITIAL SIZE 0 .
DATA:   lv_loader TYPE REF TO cl_bsp_wd_stream_loader,
        lv_xml    TYPE string,
        lv_root   TYPE string.
CREATE OBJECT lv_loader.
lv_xml = lv_loader->load_from_bsp_page( iv_bsp_appl                 = name
                                        iv_bsp_page                 = 'Repository.xml' ). "#EC NOTEXT
DATA:   lt_views  TYPE ltype_view_tab,
        lt_usages TYPE bsp_wd_cmp_usage_descr_tab,
        result    TYPE REF TO cl_bsp_wd_repository.
* "parse" repository xml data directly into memory
CALL TRANSFORMATION bsp_wd_rt_rep_runtime
  SOURCE XML        lv_xml
  RESULT views    = lt_views
         rootview = lv_root
         usages   = lt_usages.

Just specify the ui component name and run the report.

You can check variable settings in internal table lt_views, 

and component usage in lt_usages.

  • No labels