Avoid duplicate key error (#5663)

Follow-up #5652

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2022-06-29 14:39:10 +02:00 committed by GitHub
parent 394212630d
commit 01297df9a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -471,7 +471,13 @@ CLASS zcl_abapgit_object_clas IMPLEMENTATION.
RETURN.
ENDIF.
lt_tpool_main = lt_tpool.
" Copy single records to be able to catch duplicate key error
LOOP AT lt_tpool ASSIGNING <ls_tpool>.
INSERT <ls_tpool> INTO TABLE lt_tpool_main.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise( |Inconsistent textpool in { ms_item-obj_type } { ms_item-obj_name }| ).
ENDIF.
ENDLOOP.
LOOP AT it_langu_additional INTO lv_langu.