anchor.diff:      DATA lv_segment_type        TYPE edilsegtyp.
       DATA lv_result              LIKE sy-subrc.
   
  -    TRY.
  -        check_is_idoc_segment( ).
  -
  -      CATCH zcx_abapgit_exception ##no_handler.
  -        rv_deleted = abap_false.
  -        RETURN. "previous XML version or no IDoc segment
  -    ENDTRY.
  +    IF is_idoc_segment( ) = abap_false.
  +      rv_deleted = abap_false.
  +      RETURN. "previous XML version or no IDoc segment
  +    ENDIF.
   
       rv_deleted = abap_true.
       lv_segment_type = ms_item-obj_name.
  
positive.code:            FROM edisegment
             INTO lv_segment_type
             WHERE segtyp = lv_segment_type.
      IF sy-subrc <> 0.
        zcx_abapgit_exception=>raise( 'No IDoc segment' ).
      ENDIF.
  
    ENDMETHOD.
  
  
negative.code:     DATA lt_segment_definitions TYPE ty_segment_definitions.
      FIELD-SYMBOLS: <ls_segemtndefinition> TYPE edisegmdef.
  
      IF is_idoc_segment( ) = abap_false.
        RETURN.
      ENDIF.
  
      lv_segment_type = ms_item-obj_name.
      CALL FUNCTION 'SEGMENT_READ'
        EXPORTING
          segmenttyp        = lv_segment_type
        IMPORTING
          result            = lv_result
        TABLES
          segmentdefinition = lt_segmentdefinitions
        EXCEPTIONS
          OTHERS            = 1.
      IF sy-subrc <> 0 OR lv_result <> 0.
        zcx_abapgit_exception=>raise_t100( ).
      ENDIF.
  
      LOOP AT lt_segmentdefinitions ASSIGNING <ls_segemtndefinition>.
        CLEAR ls_segment_definition.
        CALL FUNCTION 'SEGMENTDEFINITION_READ'
          EXPORTING
            segmenttyp           = <ls_segemtndefinition>-segtyp
          IMPORTING
            result               = lv_result
            devclass             = lv_devclass
            segmentheader        = ls_segment_definition-segmentheader
            segmentdefinition    = ls_segment_definition-segmentdefinition
          TABLES
            segmentstructure     = ls_segment_definition-segmentstructures
          CHANGING
            version              = <ls_segemtndefinition>-version
          EXCEPTIONS
            no_authority         = 1
            segment_not_existing = 2
            OTHERS               = 3.
        IF sy-subrc <> 0 OR lv_result <> 0.
          zcx_abapgit_exception=>raise_t100( ).
        ENDIF.
  
        zcl_abapgit_object_idoc=>clear_idoc_segement_fields(
                                   CHANGING cs_structure = ls_segment_definition-segmentdefinition ).
        zcl_abapgit_object_idoc=>clear_idoc_segement_fields(
                                   CHANGING cs_structure = ls_segment_definition-segmentheader ).
  
        APPEND ls_segment_definition TO lt_segment_definitions.
      ENDLOOP.
  
      io_xml->add( iv_name = c_s_dataname-segment_definition
                   ig_data = lt_segment_definitions ).
  
    ENDMETHOD.
  
  