anchor.diff:          li_spot_ref = cl_enh_factory=>get_enhancement_spot( lv_spot_name ).
           lv_tool = li_spot_ref->get_tool( ).
   
  +        li_enh_object_docu ?= li_spot_ref.
  +        lv_enh_shtext = li_enh_object_docu->get_shorttext( ).
  +
  +        io_xml->add( ig_data = lv_tool
  +                     iv_name = 'TOOL' ).
  +        io_xml->add( ig_data = lv_enh_shtext
  +                     iv_name = 'SHORTTEXT' ).
  +
           CASE lv_tool.
             WHEN cl_enh_tool_badi_def=>tooltype.
   
               lo_badidef_tool ?= li_spot_ref.
  -            lv_enh_shtext = lo_badidef_tool->if_enh_object_docu~get_shorttext( ).
   
               "get parent = composite enhs (ENHC)
               lv_parent = cl_r3standard_persistence=>enh_find_parent_composite( lv_spot_name ).
               "get subsequent BADI definitions
               lt_enh_badi = lo_badidef_tool->get_badi_defs( ).
   
  +            io_xml->add( ig_data = lv_parent
  +                         iv_name = 'PARENT_COMP' ).
               io_xml->add( ig_data = lt_enh_badi
                            iv_name = 'BADI_DATA' ).
   
             WHEN cl_enh_tool_hook_def=>tool_type.
   
  -            lo_badi_hook ?= li_spot_ref.
  -            lv_enh_shtext = lo_badi_hook->if_enh_object_docu~get_shorttext( ).
  -
  -            "get parent = composite enhs (ENHC)
  -            lv_parent = cl_r3standard_persistence=>enh_find_parent_composite( lv_spot_name ).
  -            lt_hook_defs = lo_badi_hook->get_hook_defs( ).
  -
  -            io_xml->add( ig_data = lt_hook_defs
  +            lo_hookdef_tool ?= li_spot_ref.
  +
  +            lt_hook_definitions = lo_hookdef_tool->get_hook_defs( ).
  +
  +            io_xml->add( ig_data = lt_hook_definitions
                            iv_name = 'BADI_DATA' ).
   
  +          WHEN OTHERS.
  +            zcx_abapgit_exception=>raise( |ENHS: Unsupported tool { lv_tool }| ).
           ENDCASE.
  -
  -        io_xml->add( ig_data = lv_tool
  -                     iv_name = 'TOOL' ).
  -        io_xml->add( ig_data = lv_parent
  -                     iv_name = 'PARENT_COMP' ).
  -        io_xml->add( ig_data = lv_enh_shtext
  -                     iv_name = 'SHORTTEXT' ).
   
         CATCH cx_enh_root INTO lx_root.
           zcx_abapgit_exception=>raise( `Error occured while serializing EHNS: `
  
positive.code: 
    METHOD lif_object~serialize.
  
      DATA: lv_spot_name    TYPE enhspotname,
            lv_enh_shtext   TYPE string,
            lv_parent       TYPE enhspotcompositename,
            lt_enh_badi     TYPE enh_badi_data_it,
            lv_tool         TYPE enhspottooltype,
            lx_root         TYPE REF TO cx_root,
            li_spot_ref     TYPE REF TO if_enh_spot_tool,
            lo_badidef_tool TYPE REF TO cl_enh_tool_badi_def,
            lo_badi_hook    TYPE REF TO cl_enh_tool_hook_def,
            lt_hook_defs    TYPE enh_hook_def_ext_it.
  
  
      lv_spot_name = ms_item-obj_name.
  
  
negative.code:         li_spot_ref = cl_enh_factory=>get_enhancement_spot( lv_spot_name ).
  
          lv_tool = li_spot_ref->get_tool( ).
  
          rv_bool = abap_true.
  
        CATCH cx_enh_root.
          rv_bool = abap_false.
      ENDTRY.
  