@@ -39,7 +39,8 @@ CLASS y_check_db_access_in_ut DEFINITION PUBLIC INHERITING FROM y_check_base CRE
3939 END OF keys .
4040
4141 TYPES : BEGIN OF properties,
42- name TYPE string ,
42+ program_name TYPE string ,
43+ class_name TYPE string ,
4344 risk_level TYPE string ,
4445 has_framework TYPE abap_bool ,
4546 END OF properties.
@@ -128,12 +129,14 @@ CLASS Y_CHECK_DB_ACCESS_IN_UT IMPLEMENTATION.
128129
129130 METHOD add_line_to_defined_classes .
130131 TRY .
131- DATA (class_config ) = VALUE properties( name = get_class_name( structure ) ).
132+ DATA (class_config ) = VALUE properties( program_name = program_name
133+ class_name = get_class_name( structure ) ).
132134 CATCH cx_sy_itab_line_not_found.
133135 RETURN .
134136 ENDTRY .
135137
136- IF line_exists ( defined_classes[ name = class_config-name ] ).
138+ IF line_exists ( defined_classes[ program_name = program_name
139+ class_name = class_config-class_name ] ).
137140 RETURN .
138141 ENDIF .
139142
@@ -191,7 +194,8 @@ CLASS Y_CHECK_DB_ACCESS_IN_UT IMPLEMENTATION.
191194 RETURN .
192195 ENDIF .
193196
194- DATA (defined_superclass ) = VALUE #( defined_classes[ name = superclass ] OPTIONAL ).
197+ DATA (defined_superclass ) = VALUE #( defined_classes[ program_name = program_name
198+ class_name = superclass ] OPTIONAL ).
195199
196200 " Avoiding false-positives (inheriting from global class which is out of scan scope)
197201 result = xsdbool ( defined_superclass-has_framework = abap_true
@@ -206,7 +210,8 @@ CLASS Y_CHECK_DB_ACCESS_IN_UT IMPLEMENTATION.
206210 RETURN .
207211 ENDTRY .
208212
209- IF NOT line_exists ( defined_classes[ name = class_name
213+ IF NOT line_exists ( defined_classes[ program_name = program_name
214+ class_name = class_name
210215 has_framework = abap_false ] ).
211216 RETURN .
212217 ENDIF .
@@ -238,7 +243,8 @@ CLASS Y_CHECK_DB_ACCESS_IN_UT IMPLEMENTATION.
238243
239244
240245 METHOD get_forbidden_tokens .
241- DATA (class ) = VALUE #( defined_classes[ name = class_name ] OPTIONAL ).
246+ DATA (class ) = VALUE #( defined_classes[ program_name = program_name
247+ class_name = class_name ] OPTIONAL ).
242248
243249 DATA (risk_lvl ) = COND #( WHEN class IS NOT INITIAL THEN class-risk_level
244250 ELSE space ).
0 commit comments