mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 13:03:01 +08:00
Check that include belongs to the same fugr (#5134)
* Check that include belongs to the same fugr * abaplint Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
86262f4e54
commit
6d02555f96
|
@ -133,6 +133,11 @@ CLASS zcl_abapgit_object_fugr DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
||||||
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
METHODS belongs_incl_to_other_fugr
|
||||||
|
IMPORTING
|
||||||
|
!iv_include TYPE sobj_name
|
||||||
|
RETURNING
|
||||||
|
VALUE(rv_belongs_to_other_fugr) TYPE abap_bool.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
@ -640,8 +645,13 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||||
WITH KEY progname = <lv_include> BINARY SEARCH.
|
WITH KEY progname = <lv_include> BINARY SEARCH.
|
||||||
IF sy-subrc <> 0.
|
IF sy-subrc <> 0.
|
||||||
DELETE rt_includes INDEX lv_tabix.
|
DELETE rt_includes INDEX lv_tabix.
|
||||||
|
CONTINUE.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
"Make sure that the include does not belong to another function group
|
||||||
|
IF belongs_incl_to_other_fugr( iv_include = <lv_include> ) = abap_true.
|
||||||
|
DELETE rt_includes.
|
||||||
|
ENDIF.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
||||||
APPEND lv_program TO rt_includes.
|
APPEND lv_program TO rt_includes.
|
||||||
|
@ -1202,4 +1212,38 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD belongs_incl_to_other_fugr.
|
||||||
|
" make sure that the include belongs to the function group
|
||||||
|
" like in LSEAPFAP Form TADIR_MAINTENANCE
|
||||||
|
DATA ls_tadir TYPE tadir.
|
||||||
|
DATA lv_namespace TYPE rs38l-namespace.
|
||||||
|
DATA lv_area TYPE rs38l-area.
|
||||||
|
DATA lv_include TYPE rs38l-include.
|
||||||
|
|
||||||
|
rv_belongs_to_other_fugr = abap_false.
|
||||||
|
IF iv_include(1) = 'L' OR iv_include+1 CS '/L'.
|
||||||
|
lv_include = iv_include.
|
||||||
|
ls_tadir-object = 'FUGR'.
|
||||||
|
|
||||||
|
CALL FUNCTION 'FUNCTION_INCLUDE_SPLIT'
|
||||||
|
IMPORTING
|
||||||
|
namespace = lv_namespace
|
||||||
|
group = lv_area
|
||||||
|
CHANGING
|
||||||
|
include = lv_include
|
||||||
|
EXCEPTIONS
|
||||||
|
OTHERS = 1.
|
||||||
|
IF lv_area(1) = 'X'. " "EXIT"-function-module
|
||||||
|
ls_tadir-object = 'FUGS'.
|
||||||
|
ENDIF.
|
||||||
|
IF sy-subrc = 0.
|
||||||
|
CONCATENATE lv_namespace lv_area INTO ls_tadir-obj_name.
|
||||||
|
IF ls_tadir-obj_name <> ms_item-obj_name.
|
||||||
|
rv_belongs_to_other_fugr = abap_true.
|
||||||
|
ENDIF.
|
||||||
|
ENDIF.
|
||||||
|
ENDIF.
|
||||||
|
ENDMETHOD.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user