anchor.diff:  
   
   
  -CLASS zcl_abapgit_object_tabl IMPLEMENTATION.
  +CLASS ZCL_ABAPGIT_OBJECT_TABL IMPLEMENTATION.
  +
  +
  +  METHOD check_is_idoc_segment.
  +
  +    DATA lv_segment_type TYPE edilsegtyp.
  +
  +    lv_segment_type = ms_item-obj_name.
  +
  +    SELECT SINGLE segtyp
  +           FROM edisegment
  +           INTO lv_segment_type
  +           WHERE segtyp = lv_segment_type.
  +    IF sy-subrc <> 0.
  +      zcx_abapgit_exception=>raise( 'No IDoc segment' ).
  +    ENDIF.
  +
  +  ENDMETHOD.
   
   
     METHOD clear_dd03p_fields.
  
positive.code:   ENDMETHOD.
  
  
    METHOD check_is_idoc_segment.
  
      DATA lv_segment_type TYPE edilsegtyp.
  
      lv_segment_type = ms_item-obj_name.
  
      SELECT SINGLE segtyp
             FROM edisegment
             INTO lv_segment_type
             WHERE segtyp = lv_segment_type.
      IF sy-subrc <> 0.
        zcx_abapgit_exception=>raise( 'No IDoc segment' ).
      ENDIF.
  
    ENDMETHOD.
  
  
    METHOD deserialize_idoc_segment.
  
      DATA lv_version             TYPE segmentvrs .
      DATA lv_result              TYPE syst_subrc.
      DATA lt_segment_definitions TYPE ty_segment_definitions.
      DATA lv_package             TYPE devclass.
      FIELD-SYMBOLS <ls_segment_definition> TYPE ty_segment_definition.
  
      rv_deserialized = abap_false.
  
      TRY.
  
          io_xml->read( EXPORTING iv_name = c_s_dataname-segment_definition
                        CHANGING  cg_data = lt_segment_definitions ).
  
  
        CATCH zcx_abapgit_exception ##no_handler.
          RETURN. "previous XML version or no IDoc segment
      ENDTRY.
  
      IF lines( lt_segment_definitions ) = 0.
        RETURN. "no IDoc segment
      ENDIF.
  
      rv_deserialized = abap_true.
  
      lv_package = iv_package.
  
      LOOP AT lt_segment_definitions ASSIGNING <ls_segment_definition>.
        <ls_segment_definition>-segmentheader-presp =
        <ls_segment_definition>-segmentheader-pwork = cl_abap_syst=>get_user_name( ).
  
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp = <ls_segment_definition>-segmentheader-segtyp
          IMPORTING
            result     = lv_result
          EXCEPTIONS
            OTHERS     = 1.
        IF sy-subrc <> 0 OR lv_result <> 0.
          CALL FUNCTION 'SEGMENT_CREATE'
            IMPORTING
              segmentdefinition = <ls_segment_definition>-segmentdefinition
            TABLES
              segmentstructure  = <ls_segment_definition>-segmentstructures
            CHANGING
              segmentheader     = <ls_segment_definition>-segmentheader
              devclass          = lv_package
            EXCEPTIONS
              OTHERS            = 1.
        ELSE.
  
          CALL FUNCTION 'SEGMENT_MODIFY'
            CHANGING
              segmentheader = <ls_segment_definition>-segmentheader
              devclass      = lv_package
            EXCEPTIONS
              OTHERS        = 1.
          IF sy-subrc = 0.
            CALL FUNCTION 'SEGMENTDEFINITION_MODIFY'
              TABLES
                segmentstructure  = <ls_segment_definition>-segmentstructures
              CHANGING
                segmentdefinition = <ls_segment_definition>-segmentdefinition
              EXCEPTIONS
                OTHERS            = 1.
          ENDIF.
        ENDIF.
  
        IF sy-subrc <> 0.
          zcx_abapgit_exception=>raise_t100( ).
        ENDIF.
  
      ENDLOOP.
  
      CALL FUNCTION 'TR_TADIR_INTERFACE'
        EXPORTING
          wi_test_modus       = abap_false
          wi_tadir_pgmid      = 'R3TR'
          wi_tadir_object     = ms_item-obj_type
          wi_tadir_obj_name   = ms_item-obj_name
          wi_tadir_author     = cl_abap_syst=>get_user_name( )
          wi_tadir_devclass   = iv_package
          wi_tadir_masterlang = mv_language
          iv_set_edtflag      = abap_true
          iv_delflag          = abap_false
        EXCEPTIONS
          OTHERS              = 1.
      IF sy-subrc <> 0.
        zcx_abapgit_exception=>raise( 'error from TR_TADIR_INTERFACE' ).
      ENDIF.
    ENDMETHOD.
  
  
    METHOD delete_idoc_segment.
  
      DATA lv_segment_type        TYPE edilsegtyp.
      DATA lv_result              TYPE syst_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.
  
      rv_deleted = abap_true.
      lv_segment_type = ms_item-obj_name.
  
      CALL FUNCTION 'SEGMENT_DELETE'
        EXPORTING
          segmenttyp = lv_segment_type
        IMPORTING
          result     = lv_result
        EXCEPTIONS
          OTHERS     = 1.
      IF sy-subrc <> 0 OR lv_result <> 0.
        zcx_abapgit_exception=>raise_t100( ).
      ENDIF.
    ENDMETHOD.
  
  ENDCLASS.
  
negative.code:   ENDMETHOD.
  
  
    METHOD delete_idoc_segment.
  
      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.
  
      rv_deleted = abap_true.
      lv_segment_type = ms_item-obj_name.
  
      CALL FUNCTION 'SEGMENT_DELETE'
        EXPORTING
          segmenttyp = lv_segment_type
        IMPORTING
          result     = lv_result
        EXCEPTIONS
          OTHERS     = 1.
      IF sy-subrc <> 0 OR lv_result <> 0.
        zcx_abapgit_exception=>raise_t100( ).
      ENDIF.
    ENDMETHOD.
  
  
    METHOD deserialize_idoc_segment.
  
      DATA lv_version             TYPE segmentvrs .
      DATA lv_result              LIKE sy-subrc.
      DATA lt_segment_definitions TYPE ty_segment_definitions.
      DATA lv_package             TYPE devclass.
      FIELD-SYMBOLS <ls_segment_definition> TYPE ty_segment_definition.
  
      rv_deserialized = abap_false.
  
      TRY.
  
          io_xml->read( EXPORTING iv_name = c_s_dataname-segment_definition
                        CHANGING  cg_data = lt_segment_definitions ).
  
  
        CATCH zcx_abapgit_exception ##no_handler.
          RETURN. "previous XML version or no IDoc segment
      ENDTRY.
  
      IF lines( lt_segment_definitions ) = 0.
        RETURN. "no IDoc segment
      ENDIF.
  
      rv_deserialized = abap_true.
  
      lv_package = iv_package.
  
      LOOP AT lt_segment_definitions ASSIGNING <ls_segment_definition>.
        <ls_segment_definition>-segmentheader-presp =
        <ls_segment_definition>-segmentheader-pwork = cl_abap_syst=>get_user_name( ).
  
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp = <ls_segment_definition>-segmentheader-segtyp
          IMPORTING
            result     = lv_result
          EXCEPTIONS
            OTHERS     = 1.
        IF sy-subrc <> 0 OR lv_result <> 0.
          CALL FUNCTION 'SEGMENT_CREATE'
            IMPORTING
              segmentdefinition = <ls_segment_definition>-segmentdefinition
            TABLES
              segmentstructure  = <ls_segment_definition>-segmentstructures
            CHANGING
              segmentheader     = <ls_segment_definition>-segmentheader
              devclass          = lv_package
            EXCEPTIONS
              OTHERS            = 1.
        ELSE.
  
          CALL FUNCTION 'SEGMENT_MODIFY'
            CHANGING
              segmentheader = <ls_segment_definition>-segmentheader
              devclass      = lv_package
            EXCEPTIONS
              OTHERS        = 1.
          IF sy-subrc = 0.
            CALL FUNCTION 'SEGMENTDEFINITION_MODIFY'
              TABLES
                segmentstructure  = <ls_segment_definition>-segmentstructures
              CHANGING
                segmentdefinition = <ls_segment_definition>-segmentdefinition
              EXCEPTIONS
                OTHERS            = 1.
          ENDIF.
        ENDIF.
  
        IF sy-subrc <> 0.
          zcx_abapgit_exception=>raise_t100( ).
        ENDIF.
  
      ENDLOOP.
  
      CALL FUNCTION 'TR_TADIR_INTERFACE'
        EXPORTING
          wi_test_modus       = abap_false
          wi_tadir_pgmid      = 'R3TR'
          wi_tadir_object     = ms_item-obj_type
          wi_tadir_obj_name   = ms_item-obj_name
          wi_tadir_author     = cl_abap_syst=>get_user_name( )
          wi_tadir_devclass   = iv_package
          wi_tadir_masterlang = mv_language
          iv_set_edtflag      = abap_true
          iv_delflag          = abap_false
        EXCEPTIONS
          OTHERS              = 1.
      IF sy-subrc <> 0.
        zcx_abapgit_exception=>raise( 'error from TR_TADIR_INTERFACE' ).
      ENDIF.
    ENDMETHOD.
  
  
    METHOD serialize_idoc_segment.
  
      DATA lv_segment_type        TYPE edilsegtyp.
      DATA lv_result              LIKE sy-subrc.
      DATA lv_devclass            TYPE devclass.
      DATA lt_segmentdefinitions  TYPE STANDARD TABLE OF edisegmdef.
      DATA ls_segment_definition  TYPE ty_segment_definition.
  