anchor.diff:  
     METHOD zif_abapgit_object~delete.
   
  -    DATA: lv_fieldname TYPE authx-fieldname.
  +    " there is a bug in SAP standard, the TADIR entries are not deleted
  +    " when the AUTH object is deleted in transaction SU20
   
  +    " FM SUSR_AUTF_DELETE_FIELD calls the UI, therefore we reimplement its logic
   
  -    lv_fieldname = ms_item-obj_name.
  +    DATA:
  +      lt_objlst TYPE susr_t_xuobject,
  +      lo_auth   TYPE REF TO cl_auth_tools,
  +      lv_dummy  TYPE string.
   
  -* there is a bug in SAP standard, the TADIR entries are not deleted
  -* when the AUTH object is deleted in transaction SU20
  -    CALL FUNCTION 'SUSR_AUTF_DELETE_FIELD'
  -      EXPORTING
  -        fieldname           = lv_fieldname
  -      EXCEPTIONS
  -        delete_not_possible = 1
  -        field_in_use        = 2
  -        not_existing        = 3
  -        no_authority        = 4
  -        OTHERS              = 5.
  +    " authority check
  +    CREATE OBJECT lo_auth.
  +    IF lo_auth->authority_check_suso( actvt     = '06'
  +                                      fieldname = mv_fieldname ) <> 0.
  +      MESSAGE e463(01) WITH mv_fieldname INTO lv_dummy.
  +      zcx_abapgit_exception=>raise_t100( ).
  +    ENDIF.
  +
  +    " if field is used check
  +    lt_objlst = lo_auth->suso_where_used_afield( mv_fieldname ).
  +    IF lt_objlst IS NOT INITIAL.
  +      MESSAGE i453(01) WITH mv_fieldname INTO lv_dummy.
  +      zcx_abapgit_exception=>raise_t100( ).
  +    ENDIF.
  +
  +    " collect fieldname into a transport task
  +    IF lo_auth->add_afield_to_trkorr( mv_fieldname ) <> 0.
  +      "no transport -> no deletion
  +      MESSAGE e507(0m) INTO lv_dummy.
  +      zcx_abapgit_exception=>raise_t100( ).
  +    ENDIF.
  +
  +    DELETE FROM authx WHERE fieldname = mv_fieldname.
       IF sy-subrc <> 0.
  -      zcx_abapgit_exception=>raise( 'error from SUSR_AUTF_DELETE_FIELD' ).
  +      MESSAGE e507(0m) INTO DATA(dummy).
  +      zcx_abapgit_exception=>raise_t100( ).
       ENDIF.
   
     ENDMETHOD.
  
positive.code:   PUBLIC SECTION.
      INTERFACES zif_abapgit_object.
      ALIASES mo_files FOR zif_abapgit_object~mo_files.
  
  ENDCLASS.
  
  
  
  CLASS zcl_abapgit_object_auth IMPLEMENTATION.
  
  
    METHOD zif_abapgit_object~changed_by.
  
negative.code: 
    METHOD zif_abapgit_object~exists.
  
      SELECT SINGLE fieldname FROM authx
        INTO mv_fieldname
        WHERE fieldname = ms_item-obj_name.               "#EC CI_GENBUFF
      rv_bool = boolc( sy-subrc = 0 ).
  
  