anchor.diff:  *----------------------------------------------------------------------*
   *
   *----------------------------------------------------------------------*
  -CLASS lcl_object_wdyn DEFINITION INHERITING FROM lcl_objects_super FINAL.
  -
  -  PUBLIC SECTION.
  -    INTERFACES lif_object.
  -    ALIASES mo_files FOR lif_object~mo_files.
  -
  -  PRIVATE SECTION.
  -
  -    DATA:
  -      mt_components TYPE TABLE OF wdy_ctlr_compo_vrs,
  -      mt_sources    TYPE TABLE OF wdy_ctlr_compo_source_vrs.
  -
  -    METHODS:
  +class lcl_object_wdyn definition inheriting from lcl_objects_super final.
  +
  +  public section.
  +    interfaces lif_object.
  +    aliases mo_files for lif_object~mo_files.
  +
  +  private section.
  +
  +    data:
  +      mt_components type table of wdy_ctlr_compo_vrs,
  +      mt_sources    type table of wdy_ctlr_compo_source_vrs.
  +
  +    methods:
         get_limu_objects
  -        RETURNING VALUE(rt_objects) TYPE wdy_md_transport_keys,
  +        returning value(rt_objects) type wdy_md_transport_keys,
         read
  -        RETURNING VALUE(rs_component) TYPE wdy_component_metadata
  -        RAISING   lcx_exception,
  +        returning value(rs_component) type wdy_component_metadata
  +        raising   lcx_exception,
         read_controller
  -        IMPORTING is_key               TYPE wdy_md_controller_key
  -        RETURNING VALUE(rs_controller) TYPE wdy_md_controller_meta_data
  -        RAISING   lcx_exception,
  +        importing is_key               type wdy_md_controller_key
  +        returning value(rs_controller) type wdy_md_controller_meta_data
  +        raising   lcx_exception,
         read_definition
  -        IMPORTING is_key               TYPE wdy_md_component_key
  -        RETURNING VALUE(rs_definition) TYPE wdy_md_component_meta_data
  -        RAISING   lcx_exception,
  +        importing is_key               type wdy_md_component_key
  +        returning value(rs_definition) type wdy_md_component_meta_data
  +        raising   lcx_exception,
         read_view
  -        IMPORTING is_key         TYPE wdy_md_view_key
  -        RETURNING VALUE(rs_view) TYPE wdy_md_view_meta_data
  -        RAISING   lcx_exception,
  +        importing is_key         type wdy_md_view_key
  +        returning value(rs_view) type wdy_md_view_meta_data
  +        raising   lcx_exception,
         recover_controller
  -        IMPORTING is_controller TYPE wdy_md_controller_meta_data
  -        RAISING   lcx_exception,
  +        importing is_controller type wdy_md_controller_meta_data
  +        raising   lcx_exception,
         recover_definition
  -        IMPORTING is_definition TYPE wdy_md_component_meta_data
  -        RAISING   lcx_exception,
  +        importing is_definition type wdy_md_component_meta_data
  +        raising   lcx_exception,
         recover_view
  -        IMPORTING is_view TYPE wdy_md_view_meta_data
  -        RAISING   lcx_exception,
  +        importing is_view type wdy_md_view_meta_data
  +        raising   lcx_exception,
         delta_controller
  -        IMPORTING is_controller   TYPE wdy_md_controller_meta_data
  -        RETURNING VALUE(rs_delta) TYPE svrs2_xversionable_object
  -        RAISING   lcx_exception,
  +        importing is_controller   type wdy_md_controller_meta_data
  +        returning value(rs_delta) type svrs2_xversionable_object
  +        raising   lcx_exception,
         delta_definition
  -        IMPORTING is_definition   TYPE wdy_md_component_meta_data
  -        RETURNING VALUE(rs_delta) TYPE svrs2_xversionable_object
  -        RAISING   lcx_exception,
  +        importing is_definition   type wdy_md_component_meta_data
  +        returning value(rs_delta) type svrs2_xversionable_object
  +        raising   lcx_exception,
         delta_view
  -        IMPORTING is_view         TYPE wdy_md_view_meta_data
  -        RETURNING VALUE(rs_delta) TYPE svrs2_xversionable_object
  -        RAISING   lcx_exception,
  +        importing is_view         type wdy_md_view_meta_data
  +        returning value(rs_delta) type svrs2_xversionable_object
  +        raising   lcx_exception,
         add_fm_param_exporting
  -        IMPORTING name            TYPE string
  -                  value           TYPE any
  -        RETURNING VALUE(rs_param) TYPE abap_func_parmbind,
  +        importing i_name          type string
  +                  i_value         type any
  +        changing  ct_param        type abap_func_parmbind_tab,
         add_fm_param_tables
  -        IMPORTING name            TYPE string
  -        CHANGING  value           TYPE ANY TABLE
  -        RETURNING VALUE(rs_param) TYPE abap_func_parmbind,
  +        importing i_name          type string
  +        changing  ct_value        type any table
  +                  ct_param        type abap_func_parmbind_tab,
         add_fm_exception
  -        IMPORTING name                TYPE string
  -                  value               TYPE i
  -        RETURNING VALUE(rs_exception) TYPE abap_func_excpbind.
  -
  -ENDCLASS.                    "lcl_object_wdyn DEFINITION
  +        importing i_name          type string
  +                  i_value         type i
  +        changing  ct_exception    type abap_func_excpbind_tab.
  +
  +endclass.                    "lcl_object_wdyn DEFINITION
   
   *----------------------------------------------------------------------*
   *       CLASS lcl_object_wdyn IMPLEMENTATION
   *----------------------------------------------------------------------*
   *
   *----------------------------------------------------------------------*
  -CLASS lcl_object_wdyn IMPLEMENTATION.
  -
  -  METHOD lif_object~has_changed_since.
  +class lcl_object_wdyn implementation.
  +
  +  method lif_object~has_changed_since.
       rv_changed = abap_true.
  -  ENDMETHOD.  "lif_object~has_changed_since
  -
  -  METHOD lif_object~changed_by.
  +  endmethod.  "lif_object~has_changed_since
  +
  +  method lif_object~changed_by.
       rv_user = c_user_unknown. " todo
  -  ENDMETHOD.
  -
  -  METHOD lif_object~get_metadata.
  +  endmethod.                    "lif_object~changed_by
  +
  +  method lif_object~get_metadata.
       rs_metadata = get_metadata( ).
  -  ENDMETHOD.                    "lif_object~get_metadata
  -
  -  METHOD lif_object~exists.
  -
  -    DATA: lv_component_name TYPE wdy_component-component_name.
  -
  -
  -    SELECT SINGLE component_name FROM wdy_component
  -      INTO lv_component_name
  -      WHERE component_name = ms_item-obj_name
  -      AND version = 'A'.                                "#EC CI_GENBUFF
  +  endmethod.                    "lif_object~get_metadata
  +
  +  method lif_object~exists.
  +
  +    data: lv_component_name type wdy_component-component_name.
  +
  +
  +    select single component_name from wdy_component
  +      into lv_component_name
  +      where component_name = ms_item-obj_name
  +      and version = 'A'.                                "#EC CI_GENBUFF
       rv_bool = boolc( sy-subrc = 0 ).
   
  -  ENDMETHOD.                    "lif_object~exists
  -
  -  METHOD delta_definition.
  -
  -    DATA: ls_key       TYPE wdy_md_component_key,
  -          lv_found     TYPE abap_bool,
  -          ls_obj_new   TYPE svrs2_versionable_object,
  -          li_component TYPE REF TO if_wdy_md_component,
  -          ls_obj_old   TYPE svrs2_versionable_object.
  +  endmethod.                    "lif_object~exists
  +
  +  method delta_definition.
  +
  +    data: ls_key       type wdy_md_component_key,
  +          lv_found     type abap_bool,
  +          ls_obj_new   type svrs2_versionable_object,
  +          li_component type ref to if_wdy_md_component,
  +          ls_obj_old   type svrs2_versionable_object.
   
   
       ls_key-component_name = is_definition-definition-component_name.
   
       lv_found = cl_wdy_md_component=>check_existency( ls_key-component_name ).
  -    IF lv_found = abap_false.
  -      TRY.
  +    if lv_found = abap_false.
  +      try.
             cl_wdy_md_component=>create_complete(
  -            EXPORTING
  +            exporting
                 name      = ls_key-component_name
  -            IMPORTING
  +            importing
                 component = li_component ).
             li_component->save_to_database( ).
             li_component->unlock( ).
  -        CATCH cx_wdy_md_exception.
  +        catch cx_wdy_md_exception.
             lcx_exception=>raise( 'error creating dummy component' ).
  -      ENDTRY.
  -    ENDIF.
  +      endtry.
  +    endif.
   
       ls_obj_new-objtype = wdyn_limu_component_definition.
       ls_obj_new-objname = ls_key-component_name.
  
positive.code:         ext_ctx_mappings        = rs_definition-ext_ctx_mappings
          psmodilog               = lt_psmodilog " not optional in all versions
          psmodisrc               = lt_psmodisrc " not optional in all versions
        EXCEPTIONS
          not_existing            = 1
          OTHERS                  = 2.
      IF sy-subrc = 1.
        RETURN.
      ELSEIF sy-subrc <> 0.
        lcx_exception=>raise( 'error from WDYD_GET_OBJECT' ).
      ENDIF.
  
      READ TABLE lt_definition INDEX 1 INTO rs_definition-definition.
      IF sy-subrc <> 0.
        lcx_exception=>raise( 'WDYD, definition not found' ).
      ENDIF.
  
      CLEAR: rs_definition-definition-author,
             rs_definition-definition-createdon,
             rs_definition-definition-changedby,
             rs_definition-definition-changedon,
             rs_definition-definition-gendate,
             rs_definition-definition-gentime.
  
    ENDMETHOD.                    "read_definition
  
    METHOD read_view.
  
      DATA: lt_definition TYPE TABLE OF wdy_view_vrs,
            lt_psmodilog  TYPE TABLE OF smodilog,
            lt_psmodisrc  TYPE TABLE OF smodisrc.
  
      FIELD-SYMBOLS: <ls_definition> LIKE LINE OF lt_definition.
  
  
      CALL FUNCTION 'WDYV_GET_OBJECT'
        EXPORTING
          view_key               = is_key
          get_all_translations   = abap_false
        TABLES
          definition             = lt_definition
          descriptions           = rs_view-descriptions
          view_containers        = rs_view-view_containers
  
negative.code:     ls_key-view_name      = is_view-definition-view_name.
  
      cl_wdy_md_abstract_view=>recover_version(
        exporting
          view_key = ls_key
          delta    = ls_delta-wdyv
        changing
          corrnr   = lv_corrnr ).
  
    endmethod.                    "recover_view
  
    method read_controller.
  
      data: lt_components   type table of wdy_ctlr_compo_vrs,
            lt_sources      type table of wdy_ctlr_compo_source_vrs,
            lt_definition   type table of wdy_controller,
            lt_psmodilog    type table of smodilog,
            lt_psmodisrc    type table of smodisrc,
            lt_fm_param     type abap_func_parmbind_tab,
            lt_fm_exception type abap_func_excpbind_tab.
  
      field-symbols: <lt_ctrl_exceptions>      type any table,
                     <lt_ctrl_exception_texts> type any table.
  
  *   Calling FM dynamically because version 702 has less parameters
  
  *   FM parameters
      add_fm_param_exporting( exporting i_name     = 'CONTROLLER_KEY'
                                        i_value    = is_key
                              changing  ct_param = lt_fm_param ).
      add_fm_param_exporting( exporting i_name     = 'GET_ALL_TRANSLATIONS'
                                        i_value    = abap_false
                              changing  ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'DEFINITION'
                           changing  ct_value = lt_definition
                                     ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'DESCRIPTIONS'
                           changing ct_value = rs_controller-descriptions
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTROLLER_USAGES'
                           changing ct_value = rs_controller-controller_usages
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTROLLER_COMPONENTS'
                           changing ct_value = lt_components
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTROLLER_COMPONENT_SOURCES'
                           changing ct_value = lt_sources
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTROLLER_COMPONENT_TEXTS'
                           changing ct_value = rs_controller-controller_component_texts
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTROLLER_PARAMETERS'
                           changing ct_value = rs_controller-controller_parameters
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTROLLER_PARAMETER_TEXTS'
                           changing ct_value = rs_controller-controller_parameter_texts
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTEXT_NODES'
                           changing ct_value = rs_controller-context_nodes
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTEXT_ATTRIBUTES'
                           changing ct_value = rs_controller-context_attributes
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'CONTEXT_MAPPINGS'
                           changing ct_value = rs_controller-context_mappings
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'FIELDGROUPS'
                           changing ct_value = rs_controller-fieldgroups
                                    ct_param = lt_fm_param ).
  *   Version 702 doesn't have these two attributes so we
  *   use them dynamically for downward compatibility
      assign component 'CONTROLLER_EXCEPTIONS' of structure rs_controller to <lt_ctrl_exceptions>.
      if sy-subrc = 0.
        add_fm_param_tables( exporting i_name = 'CONTROLLER_EXCEPTIONS'
                             changing ct_value = <lt_ctrl_exceptions>
                                      ct_param = lt_fm_param ).
      endif.
      assign component 'CONTROLLER_EXCEPTION_TEXTS' of structure rs_controller to <lt_ctrl_exception_texts>.
      if sy-subrc = 0.
        add_fm_param_tables( exporting i_name = 'CONTROLLER_EXCEPTION_TEXTS'
                             changing ct_value = <lt_ctrl_exception_texts>
                                      ct_param = lt_fm_param ).
      endif.
      add_fm_param_tables( exporting i_name = 'PSMODILOG'
                           changing ct_value = lt_psmodilog
                                    ct_param = lt_fm_param ).
      add_fm_param_tables( exporting i_name = 'PSMODISRC'
                           changing ct_value = lt_psmodisrc
                                    ct_param = lt_fm_param ).
  
  *   FM exceptions
      add_fm_exception( exporting i_name = 'NOT_EXISTING'
                                  i_value = 1
                        changing ct_exception = lt_fm_exception ).
      add_fm_exception( exporting i_name = 'OTHERS'
                                  i_value = 2
                        changing ct_exception = lt_fm_exception ).
  
      call function 'WDYC_GET_OBJECT'
        parameter-table
        lt_fm_param
        exception-table
        lt_fm_exception.
      if sy-subrc <> 0.
        lcx_exception=>raise( 'error from WDYC_GET_OBJECT' ).
      endif.
  
      append lines of lt_components to mt_components.
      append lines of lt_sources to mt_sources.
  
      read table lt_definition index 1 into rs_controller-definition.
      if sy-subrc <> 0.
        lcx_exception=>raise( 'WDYC, definition not found' ).
      endif.
  
      clear: rs_controller-definition-author,
             rs_controller-definition-createdon,
             rs_controller-definition-changedby,
             rs_controller-definition-changedon.
  
    endmethod.                    "read_controller
  
    method read_definition.
  
      data: lt_definition type table of wdy_component,
            lt_psmodilog  type table of smodilog,
            lt_psmodisrc  type table of smodisrc.
  
  
      call function 'WDYD_GET_OBJECT'
        exporting
          component_key           = is_key
          get_all_translations    = abap_false
        tables
          definition              = lt_definition
          descriptions            = rs_definition-descriptions
          component_usages        = rs_definition-component_usages
  