anchor.diff:    PRIVATE SECTION.
   
       DATA mv_success TYPE abap_bool .
  +
  +    TYPES: t_run_mode TYPE sychar01.
       CONSTANTS:
         BEGIN OF co_run_mode,
  -        run_with_popup   TYPE sychar01 VALUE 'P',
  -        run_after_popup  TYPE sychar01 VALUE 'A',
  -        run_via_rfc      TYPE sychar01 VALUE 'R',
  -        run_in_batch     TYPE sychar01 VALUE 'B',
  -        run_loc_parallel TYPE sychar01 VALUE 'L',
  -        run_direct       TYPE sychar01 VALUE 'L',
  +        run_with_popup   TYPE t_run_mode VALUE 'P',
  +        run_after_popup  TYPE t_run_mode VALUE 'A',
  +        run_via_rfc      TYPE t_run_mode VALUE 'R',
  +        run_in_batch     TYPE t_run_mode VALUE 'B',
  +        run_loc_parallel TYPE t_run_mode VALUE 'L',
  +        run_direct       TYPE t_run_mode VALUE 'L',
         END OF co_run_mode .
       DATA mo_inspection TYPE REF TO cl_ci_inspection .
       DATA mv_name TYPE sci_objs .
  
positive.code:         zcx_abapgit_exception .
      METHODS create_inspection
        IMPORTING
          !io_set              TYPE REF TO cl_ci_objectset
          !io_variant          TYPE REF TO cl_ci_checkvariant
        RETURNING
          VALUE(ro_inspection) TYPE REF TO cl_ci_inspection
        RAISING
          zcx_abapgit_exception .
  ENDCLASS.
  
  
  
negative.code:     ENDTRY.
  
    ENDMETHOD.
  
    METHOD decide_run_mode.
  
      DATA: lo_settings TYPE REF TO zcl_abapgit_settings.
      lo_settings = zcl_abapgit_persist_settings=>get_instance( )->read( ).
  
      IF sy-batch = abap_true.
        " We have to disable parallelization in batch because of lock errors.
        rv_run_mode = co_run_mode-run_via_rfc.
      ELSEIF lo_settings->get_parallel_proc_disabled( ) = abap_false.
        rv_run_mode = co_run_mode-run_loc_parallel.
      ELSE.
        rv_run_mode = co_run_mode-run_via_rfc.
      ENDIF.
  
    ENDMETHOD.
  
  ENDCLASS.
  