Skip to content

Commit d235c9c

Browse files
committed
solves #299
1 parent 92f3675 commit d235c9c

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

src/checks/y_check_check_stmnt_position.clas.abap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ CLASS y_check_check_stmnt_position IMPLEMENTATION.
6666
OR token EQ 'DATA'
6767
OR token EQ 'TYPES'
6868
OR token EQ 'CHECK'
69-
OR token EQ 'FIELD-SYMBOLS' ).
69+
OR token EQ 'FIELD-SYMBOLS'
70+
OR token EQ 'CONSTANTS' ).
7071
ENDMETHOD.
7172

7273

src/checks/y_check_check_stmnt_position.clas.testclasses.abap

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,3 +435,31 @@ CLASS ltc_form IMPLEMENTATION.
435435
ENDMETHOD.
436436

437437
ENDCLASS.
438+
439+
440+
CLASS ltc_constants DEFINITION INHERITING FROM ltc_inline_data_declaration FOR TESTING RISK LEVEL HARMLESS DURATION SHORT.
441+
PROTECTED SECTION.
442+
METHODS get_code_without_issue REDEFINITION.
443+
ENDCLASS.
444+
445+
CLASS ltc_constants IMPLEMENTATION.
446+
447+
METHOD get_code_without_issue.
448+
result = VALUE #(
449+
( ' REPORT y_example. ' )
450+
451+
( ' CLASS y_example_class DEFINITION. ' )
452+
( ' PUBLIC SECTION. ' )
453+
( ' METHODS example. ' )
454+
( ' ENDCLASS. ' )
455+
456+
( ' CLASS y_example_class IMPLEMENTATION. ' )
457+
( ' METHOD example. ' )
458+
( ' CONSTANTS main_company TYPE i VALUE 100. ' )
459+
( ' CHECK sy-mandt = main_company. ' )
460+
( ' ENDMETHOD. ' )
461+
( ' ENDCLASS. ' )
462+
).
463+
ENDMETHOD.
464+
465+
ENDCLASS.

0 commit comments

Comments
 (0)