anchor.diff:  
     ENDMETHOD.
   
  -  METHOD lif_object~exists.
  -
  -    DATA: lv_enh_id TYPE enhname.
  -
  -
  -    lv_enh_id = ms_item-obj_name.
  -    TRY.
  -        cl_enh_factory=>get_enhancement(
  -          enhancement_id   = lv_enh_id
  -          bypassing_buffer = abap_true ).
  -        rv_bool = abap_true.
  -      CATCH cx_enh_root.
  -        rv_bool = abap_false.
  -    ENDTRY.
  -
  -  ENDMETHOD.                    "lif_object~exists
  -
  -  METHOD lif_object~serialize.
  -
  -    DATA: lv_enh_id   TYPE enhname,
  -          lv_tool     TYPE enhtooltype,
  -          li_enh_tool TYPE REF TO if_enh_tool.
  -
  -
  -    IF lif_object~exists( ) = abap_false.
  -      RETURN.
  -    ENDIF.
  -
  -    lv_enh_id = ms_item-obj_name.
  -    TRY.
  -        li_enh_tool = cl_enh_factory=>get_enhancement(
  -          enhancement_id   = lv_enh_id
  -          bypassing_buffer = abap_true ).
  -      CATCH cx_enh_root.
  -        lcx_exception=>raise( 'Error from CL_ENH_FACTORY' ).
  -    ENDTRY.
  -    lv_tool = li_enh_tool->get_tool( ).
  -
  -    CASE lv_tool.
  -      WHEN cl_enh_tool_badi_impl=>tooltype.
  -        serialize_badi( io_xml      = io_xml
  -                        iv_tool     = lv_tool
  -                        ii_enh_tool = li_enh_tool ).
  -      WHEN cl_enh_tool_hook_impl=>tooltype.
  -        serialize_hook( io_xml      = io_xml
  -                        iv_tool     = lv_tool
  -                        ii_enh_tool = li_enh_tool ).
  -      WHEN cl_enh_tool_class=>tooltype.
  -        serialize_class( io_xml      = io_xml
  -                         iv_tool     = lv_tool
  -                         ii_enh_tool = li_enh_tool ).
  -* ToDo:
  -*      WHEN 'ENHFUGRDATA'. "cl_enh_tool_fugr
  -*      WHEN cl_enh_tool_intf=>tooltype.
  -*      WHEN cl_wdr_cfg_enhancement=>tooltype.
  -*      WHEN 'ENHWDYN'. "cl_enh_tool_wdy
  -      WHEN OTHERS.
  -        lcx_exception=>raise( |Unsupported ENHO type { lv_tool }| ).
  -    ENDCASE.
  -
  -  ENDMETHOD.                    "serialize
  -
  -  METHOD lif_object~deserialize.
  -
  -    DATA: lv_tool TYPE enhtooltype.
  -
  -    IF lif_object~exists( ) = abap_true.
  -      lif_object~delete( ).
  -    ENDIF.
  -
  -    io_xml->read( EXPORTING iv_name = 'TOOL'
  -                  CHANGING cg_data = lv_tool ).
  -
  -    CASE lv_tool.
  -      WHEN cl_enh_tool_badi_impl=>tooltype.
  -        deserialize_badi( io_xml     = io_xml
  -                          iv_package = iv_package ).
  -      WHEN cl_enh_tool_hook_impl=>tooltype.
  -        deserialize_hook( io_xml     = io_xml
  -                          iv_package = iv_package ).
  -      WHEN cl_enh_tool_class=>tooltype.
  -        deserialize_class( io_xml     = io_xml
  -                           iv_package = iv_package ).
  -* ToDo:
  -*      WHEN 'ENHFUGRDATA'. "cl_enh_tool_fugr
  -*      WHEN cl_enh_tool_intf=>tooltype.
  -*      WHEN cl_wdr_cfg_enhancement=>tooltype.
  -*      WHEN 'ENHWDYN'. "cl_enh_tool_wdy
  -      WHEN OTHERS.
  -        lcx_exception=>raise( |Unsupported ENHO type { lv_tool }| ).
  -    ENDCASE.
  -
  -    lcl_objects_activation=>add_item( ms_item ).
  -
  -  ENDMETHOD.                    "deserialize
  -
  -  METHOD deserialize_badi.
  -
  -    DATA: lv_spot_name TYPE enhspotname,
  -          lv_shorttext TYPE string,
  -          lv_enhname   TYPE enhname,
  -          lo_badi      TYPE REF TO cl_enh_tool_badi_impl,
  -          li_tool      TYPE REF TO if_enh_tool,
  -          lv_package   TYPE devclass,
  -          lt_impl      TYPE enh_badi_impl_data_it.
  -
  -    FIELD-SYMBOLS: <ls_impl> LIKE LINE OF lt_impl.
  -
  -
  -    io_xml->read( EXPORTING iv_name = 'SHORTTEXT'
  -                  CHANGING cg_data  = lv_shorttext ).
  -    io_xml->read( EXPORTING iv_name = 'SPOT_NAME'
  -                  CHANGING cg_data  = lv_spot_name ).
  -    io_xml->read( EXPORTING iv_name = 'IMPL'
  -                  CHANGING cg_data  = lt_impl ).
  -
  -    lv_enhname = ms_item-obj_name.
  -    lv_package = iv_package.
  -    TRY.
  -        cl_enh_factory=>create_enhancement(
  -          EXPORTING
  -            enhname     = lv_enhname
  -            enhtype     = cl_abstract_enh_tool_redef=>credefinition
  -            enhtooltype = cl_enh_tool_badi_impl=>tooltype
  -          IMPORTING
  -            enhancement = li_tool
  -          CHANGING
  -            devclass    = lv_package ).
  -        lo_badi ?= li_tool.
  -
  -        lo_badi->set_spot_name( lv_spot_name ).
  -        lo_badi->if_enh_object_docu~set_shorttext( lv_shorttext ).
  -        LOOP AT lt_impl ASSIGNING <ls_impl>.
  -          lo_badi->add_implementation( <ls_impl> ).
  -        ENDLOOP.
  -        lo_badi->if_enh_object~save( ).
  -        lo_badi->if_enh_object~unlock( ).
  -      CATCH cx_enh_root.
  -        lcx_exception=>raise( 'error deserializing ENHO badi' ).
  -    ENDTRY.
  -
  -  ENDMETHOD.                    "deserialize_badi
  -
  -  METHOD deserialize_class.
  -
  -    DATA: lo_enh_class TYPE REF TO cl_enh_tool_class,
  -          lt_owr       TYPE enhmeth_tabkeys,
  -          lt_pre       TYPE enhmeth_tabkeys,
  -          lt_post      TYPE enhmeth_tabkeys,
  -          lt_source    TYPE rswsourcet,
  -          li_tool      TYPE REF TO if_enh_tool,
  -          lv_shorttext TYPE string,
  -          lv_class     TYPE seoclsname,
  -          lv_enhname   TYPE enhname,
  -          lv_package   TYPE devclass.
  -
  -
  -    io_xml->read( EXPORTING iv_name = 'SHORTTEXT'
  -                  CHANGING cg_data  = lv_shorttext ).
  -    io_xml->read( EXPORTING iv_name = 'OWR_METHODS'
  -                  CHANGING cg_data  = lt_owr ).
  -    io_xml->read( EXPORTING iv_name = 'PRE_METHODS'
  -                  CHANGING cg_data  = lt_pre ).
  -    io_xml->read( EXPORTING iv_name = 'POST_METHODS'
  -                  CHANGING cg_data  = lt_post ).
  -    io_xml->read( EXPORTING iv_name = 'CLASS'
  -                  CHANGING cg_data  = lv_class ).
  -    lt_source = mo_files->read_abap( ).
  -
  -    lv_enhname = ms_item-obj_name.
  -    lv_package = iv_package.
  -    TRY.
  -        cl_enh_factory=>create_enhancement(
  -          EXPORTING
  -            enhname     = lv_enhname
  -            enhtype     = ''
  -            enhtooltype = cl_enh_tool_class=>tooltype
  -          IMPORTING
  -            enhancement = li_tool
  -          CHANGING
  -            devclass    = lv_package ).
  -        lo_enh_class ?= li_tool.
  -
  -        lo_enh_class->if_enh_object_docu~set_shorttext( lv_shorttext ).
  -        lo_enh_class->set_class( lv_class ).
  -        lo_enh_class->set_owr_methods( version     = 'I'
  -                                       owr_methods = lt_owr ).
  -        lo_enh_class->set_pre_methods( version     = 'I'
  -                                       pre_methods = lt_pre ).
  -        lo_enh_class->set_post_methods( version      = 'I'
  -                                        post_methods = lt_post ).
  -        lo_enh_class->set_eimp_include( version     = 'I'
  -                                        eimp_source = lt_source ).
  -
  -        lo_enh_class->if_enh_object~save( ).
  -        lo_enh_class->if_enh_object~unlock( ).
  -      CATCH cx_enh_root.
  -        lcx_exception=>raise( 'error deserializing ENHO class' ).
  -    ENDTRY.
  -
  -  ENDMETHOD.
  -
  -  METHOD deserialize_hook.
  +  METHOD lif_object_enho~deserialize.
   
       DATA: lv_shorttext       TYPE string,
             lo_hook_impl       TYPE REF TO cl_enh_tool_hook_impl,
  
positive.code: 
    ENDMETHOD.
  
    METHOD serialize_hook.
  
      DATA: lv_shorttext       TYPE string,
            lo_hook_impl       TYPE REF TO cl_enh_tool_hook_impl,
            ls_original_object TYPE enh_hook_admin,
            lt_spaces          TYPE ty_spaces_tt,
            lt_enhancements    TYPE enh_hook_impl_it.
  
  
      lo_hook_impl ?= ii_enh_tool.
  
      lv_shorttext = lo_hook_impl->if_enh_object_docu~get_shorttext( ).
      lo_hook_impl->get_original_object(
        IMPORTING
          pgmid     = ls_original_object-pgmid
          obj_name  = ls_original_object-org_obj_name
          obj_type  = ls_original_object-org_obj_type
          main_type = ls_original_object-org_main_type
          main_name = ls_original_object-org_main_name
          program   = ls_original_object-programname ).
      ls_original_object-include_bound = lo_hook_impl->get_include_bound( ).
      lt_enhancements = lo_hook_impl->get_hook_impls( ).
  
      hook_impl_serialize(
        IMPORTING et_spaces = lt_spaces
        CHANGING ct_impl = lt_enhancements ).
  
      io_xml->add( iv_name = 'TOOL'
                   ig_data = iv_tool ).
      io_xml->add( ig_data = lv_shorttext
                   iv_name = 'SHORTTEXT' ).
      io_xml->add( ig_data = ls_original_object
                   iv_name = 'ORIGINAL_OBJECT' ).
      io_xml->add( iv_name = 'ENHANCEMENTS'
                   ig_data = lt_enhancements ).
      io_xml->add( iv_name = 'SPACES'
                   ig_data = lt_spaces ).
  
    ENDMETHOD.                    "serialize_hook
  
    METHOD lif_object~delete.
  
  
negative.code:         lcx_exception=>raise( 'error deserializing ENHO hook' ).
      ENDTRY.
  
    ENDMETHOD.
  
  ENDCLASS.
  
  CLASS lcl_object_enho_class DEFINITION.
  
    PUBLIC SECTION.
      METHODS:
        constructor
          IMPORTING
            is_item  TYPE ty_item
            io_files TYPE REF TO lcl_objects_files.
      INTERFACES: lif_object_enho.
  
    PRIVATE SECTION.
      DATA: ms_item TYPE ty_item.
      DATA: mo_files TYPE REF TO lcl_objects_files.
  
  ENDCLASS.
  
  CLASS lcl_object_enho_class IMPLEMENTATION.
  
    METHOD constructor.
      ms_item = is_item.
      mo_files = io_files.
    ENDMETHOD.
  
    METHOD lif_object_enho~serialize.
  
      DATA: lo_enh_class TYPE REF TO cl_enh_tool_class,
            lt_owr       TYPE enhmeth_tabkeys,
  