Change how table maintenance includes are excluded from serialization

Non-generated includes can also have author 'SAP'. Fixes #2674.
This commit is contained in:
Frederik Hudák 2019-05-16 13:26:00 +02:00 committed by Lars Hvam
parent d1c5e332d4
commit 5cfb166d87

View File

@ -493,6 +493,11 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
AND object = 'PROG' AND object = 'PROG'
AND obj_name = rt_includes-table_line. AND obj_name = rt_includes-table_line.
LOOP AT rt_includes ASSIGNING <lv_include>. LOOP AT rt_includes ASSIGNING <lv_include>.
" skip autogenerated includes from Table Maintenance Generator
IF <lv_include> CP 'LSVIM*'.
DELETE rt_includes INDEX sy-tabix.
CONTINUE.
ENDIF.
READ TABLE lt_tadir_includes WITH KEY table_line = <lv_include> TRANSPORTING NO FIELDS. READ TABLE lt_tadir_includes WITH KEY table_line = <lv_include> TRANSPORTING NO FIELDS.
IF sy-subrc = 0. IF sy-subrc = 0.
DELETE rt_includes. DELETE rt_includes.
@ -516,10 +521,10 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
LOOP AT rt_includes ASSIGNING <lv_include>. LOOP AT rt_includes ASSIGNING <lv_include>.
lv_tabix = sy-tabix. lv_tabix = sy-tabix.
* skip SAP standard includes and also make sure the include exists * make sure the include exists
READ TABLE lt_reposrc INTO ls_reposrc READ TABLE lt_reposrc INTO ls_reposrc
WITH KEY progname = <lv_include> BINARY SEARCH. WITH KEY progname = <lv_include> BINARY SEARCH.
IF sy-subrc <> 0 OR ls_reposrc-cnam = 'SAP'. IF sy-subrc <> 0.
DELETE rt_includes INDEX lv_tabix. DELETE rt_includes INDEX lv_tabix.
ENDIF. ENDIF.