Merge branch 'main' into mbtools/selector

This commit is contained in:
Marc Bernard 2025-02-12 20:22:56 +01:00 committed by GitHub
commit 528dd85cd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 91 additions and 6 deletions

View File

@ -52,6 +52,7 @@ CLASS ZCL_ABAPGIT_AFF_REGISTRY IMPLEMENTATION.
register( 'CHKC' ).
register( 'CHKO' ).
register( 'CHKV' ).
register( 'COTA' ).
register( 'DRTY' ).
register( 'DTEB' ).
register( 'DSFI' ).

View File

@ -0,0 +1,46 @@
CLASS zcl_abapgit_object_cota DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_object_common_aff
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS zif_abapgit_object~changed_by REDEFINITION.
METHODS zif_abapgit_object~delete REDEFINITION.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_abapgit_object_cota IMPLEMENTATION.
METHOD zif_abapgit_object~changed_by.
DATA lx_error TYPE REF TO cx_root.
TRY.
SELECT SINGLE changedby FROM ('sapcontargethead') INTO rv_user
WHERE id = ms_item-obj_name AND version = 'I'.
IF rv_user IS INITIAL.
SELECT SINGLE changedby FROM ('sapcontargethead') INTO rv_user
WHERE id = ms_item-obj_name AND version = 'A'.
ENDIF.
CATCH cx_root INTO lx_error.
zcx_abapgit_exception=>raise_with_text( lx_error ).
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_object~delete.
DATA lx_error TYPE REF TO cx_root.
DATA lv_cota_name TYPE c LENGTH 30.
TRY.
lv_cota_name = ms_item-obj_name.
CALL METHOD ('CL_COTA_FACTORY')=>('DELETE_COTA')
EXPORTING
cota_name = lv_cota_name
korrnum = iv_transport.
CATCH cx_root INTO lx_error.
zcx_abapgit_exception=>raise_with_text( lx_error ).
ENDTRY.
ENDMETHOD.
ENDCLASS.

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCL_ABAPGIT_OBJECT_COTA</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>abapGit - COTA - Communication Target</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>

View File

@ -41,14 +41,10 @@ INTERFACE zif_abapgit_sap_package
zcx_abapgit_exception .
METHODS read_description
RETURNING
VALUE(rv_description) TYPE string
RAISING
zcx_abapgit_exception .
VALUE(rv_description) TYPE string.
METHODS read_responsible
RETURNING
VALUE(rv_responsible) TYPE usnam
RAISING
zcx_abapgit_exception .
VALUE(rv_responsible) TYPE usnam.
METHODS create_child
IMPORTING
!iv_child TYPE devclass

View File

@ -8,6 +8,9 @@ CLASS zcl_abapgit_object_wdcc DEFINITION
INTERFACES zif_abapgit_object .
PROTECTED SECTION.
METHODS after_import
RAISING
zcx_abapgit_exception .
PRIVATE SECTION.
ENDCLASS.
@ -230,10 +233,33 @@ CLASS zcl_abapgit_object_wdcc IMPLEMENTATION.
tadir_insert( iv_package ).
after_import( ).
corr_insert( iv_package ).
ENDMETHOD.
METHOD after_import.
DATA: lt_cts_object_entry TYPE STANDARD TABLE OF e071 WITH DEFAULT KEY,
ls_cts_object_entry LIKE LINE OF lt_cts_object_entry,
lt_cts_key TYPE STANDARD TABLE OF e071k WITH DEFAULT KEY.
ls_cts_object_entry-pgmid = 'R3TR'.
ls_cts_object_entry-object = ms_item-obj_type.
ls_cts_object_entry-obj_name = ms_item-obj_name.
INSERT ls_cts_object_entry INTO TABLE lt_cts_object_entry.
CALL FUNCTION 'WDR_CFG_AFTER_IMPORT'
EXPORTING
iv_tarclient = sy-mandt
iv_is_upgrade = abap_false
TABLES
tt_e071 = lt_cts_object_entry
tt_e071k = lt_cts_key.
ENDMETHOD.
METHOD zif_abapgit_object~exists.