anchor.diff:      ASSERT sy-subrc = 0.
   
       TRY.
  -        mi_persistence->get(
  +        li_wb_object_operator = get_wb_object_operator( ).
  +
  +
  +        CALL METHOD li_wb_object_operator->('IF_WB_OBJECT_OPERATOR~READ')
             EXPORTING
  -            p_object_key  = mv_service_binding_key
  -            p_version     = 'A'
  -          CHANGING
  -            p_object_data = li_object_data_model ).
  +            version        = 'A'
  +            data_selection = 'AL'
  +          IMPORTING
  +            eo_object_data = li_object_data_model.
   
           li_object_data_model->get_data( IMPORTING p_data = <ls_service_binding> ).
   
  
positive.code:           iv_fieldname       TYPE csequence
          CHANGING
            cs_service_binding TYPE any.
  
      DATA:
        mi_persistence         TYPE REF TO if_wb_object_persist,
        mv_service_binding_key TYPE seu_objkey,
        mr_service_binding     TYPE REF TO data.
  
  ENDCLASS.
  
  
  
  CLASS zcl_abapgit_object_srvb IMPLEMENTATION.
  
  
    METHOD clear_field.
  
  
negative.code:       CHANGING
          cs_service_binding = cs_service_binding ).
  
      clear_field(
        EXPORTING
        iv_fieldname          = 'METADATA-PACKAGE_REF'
        CHANGING
        cs_service_binding = cs_service_binding ).
  
      clear_field(
        EXPORTING
        iv_fieldname          = 'METADATA-MASTER_SYSTEM'
        CHANGING
        cs_service_binding = cs_service_binding ).
  
  
    ENDMETHOD.
  
    METHOD get_transport_req_if_needed.
  
      DATA: li_sap_package TYPE REF TO zif_abapgit_sap_package.
  
      li_sap_package = zcl_abapgit_factory=>get_sap_package( iv_package ).
  
      IF li_sap_package->are_changes_recorded_in_tr_req( ) = abap_true.
        rv_transport_request = zcl_abapgit_default_transport=>get_instance( )->get( )-ordernum.
      ENDIF.
  
    ENDMETHOD.
  
    METHOD get_wb_object_operator.
  
      DATA:
        ls_object_type TYPE wbobjtype,
        lx_error       TYPE REF TO cx_root.
  
      IF mo_object_operator IS BOUND.
        ro_object_operator = mo_object_operator.
      ENDIF.
  
      ls_object_type-objtype_tr = 'SRVB'.
      ls_object_type-subtype_wb = 'SVB'.
  
      TRY.
          CALL METHOD ('CL_WB_OBJECT_OPERATOR')=>('CREATE_INSTANCE')
            EXPORTING
              object_type = ls_object_type
              object_key  = mv_service_binding_key
            RECEIVING
              result      = mo_object_operator.
  
        CATCH cx_root INTO lx_error.
          zcx_abapgit_exception=>raise_with_text( lx_error ).
      ENDTRY.
  
      ro_object_operator = mo_object_operator.
  
    ENDMETHOD.
  
    METHOD get_object_data.
  
      FIELD-SYMBOLS:
        <ls_service_binding> TYPE any,
        <lv_language>        TYPE data.
  
      ASSIGN mr_service_binding->* TO <ls_service_binding>.
      ASSERT sy-subrc = 0.
  
      io_xml->read(
        EXPORTING
          iv_name = 'SRVB'
        CHANGING
          cg_data = <ls_service_binding> ).
  
  
      " We have to set the language explicitly,
      " because otherwise the description isn't stored
      ASSIGN COMPONENT 'METADATA-LANGUAGE' OF STRUCTURE <ls_service_binding>
             TO <lv_language>.
      ASSERT sy-subrc = 0.
      <lv_language> = mv_language.
  
      CREATE OBJECT ro_object_data TYPE ('CL_SRVB_OBJECT_DATA').
      ro_object_data->set_data( p_data = <ls_service_binding>  ).
  
    ENDMETHOD.
  
    METHOD merge_object_data.
  
      DATA:
        lo_object_data        TYPE REF TO object,
        lo_object_data_old    TYPE REF TO if_wb_object_data_model,
        lr_new                TYPE REF TO data,
        lr_old                TYPE REF TO data,
        lo_wb_object_operator TYPE REF TO object.
  
      FIELD-SYMBOLS:
        <ls_new>       TYPE any,
        <ls_old>       TYPE any,
        <lv_field_old> TYPE any,
        <lv_field_new> TYPE any.
  
      CREATE OBJECT lo_object_data TYPE ('CL_SRVB_OBJECT_DATA').
      lo_object_data = io_object_data.
  
      CREATE DATA lr_new TYPE ('CL_SRVB_OBJECT_DATA=>TY_OBJECT_DATA').
      ASSIGN lr_new->* TO <ls_new>.
      ASSERT sy-subrc = 0.
  
      CREATE DATA lr_old TYPE ('CL_SRVB_OBJECT_DATA=>TY_OBJECT_DATA').
      ASSIGN lr_old->* TO <ls_old>.
      ASSERT sy-subrc = 0.
  
      CALL METHOD lo_object_data->('IF_WB_OBJECT_DATA_MODEL~GET_DATA')
        EXPORTING
          p_metadata_only  = abap_false
          p_data_selection = 'AL'
        IMPORTING
          p_data           = <ls_new>.
  
      lo_wb_object_operator = get_wb_object_operator( ).
  
      CALL METHOD lo_wb_object_operator->('IF_WB_OBJECT_OPERATOR~READ')
        EXPORTING
          data_selection = 'AL' " if_wb_object_data_selection_co=>c_all_data
        IMPORTING
          eo_object_data = lo_object_data_old.
  
      CALL METHOD lo_object_data_old->('GET_DATA')
        EXPORTING
          p_metadata_only  = abap_false
          p_data_selection = 'AL' " if_wb_object_data_selection_co=>c_all_data
        IMPORTING
          p_data           = <ls_old>.
  
      ASSIGN COMPONENT 'METADATA-DESCRIPTION' OF STRUCTURE <ls_old> TO <lv_field_old>.
      ASSIGN COMPONENT 'METADATA-DESCRIPTION' OF STRUCTURE <ls_new> TO <lv_field_new>.
      <lv_field_old> = <lv_field_new>.
  
      CREATE OBJECT ro_object_data_merged TYPE ('CL_SRVB_OBJECT_DATA').
  
      CALL METHOD ro_object_data_merged->('SET_DATA')
        EXPORTING
          p_data = <ls_old>.
  
    ENDMETHOD.
  
    METHOD is_ai_supported.
      TRY.
          CREATE OBJECT mr_srvb_svrs_config TYPE ('CL_SRVB_SVRS_CONFIG')
              EXPORTING iv_objtype = 'SRVB'.
        CATCH cx_sy_create_error.
          rv_ai_supported = abap_false.
      ENDTRY.
      CALL METHOD mr_srvb_svrs_config->('HAS_INACTIVE_VERSION')
        RECEIVING
          rv_has_inactive = rv_ai_supported.
  
    ENDMETHOD.
  
    METHOD constructor.
  
  