0% found this document useful (0 votes)
52 views6 pages

Ztest Assist Cases

The document contains a list of violations and issues found in the ABAP program ZTEST_ASSIST_CASES. These include lack of exception handling, hard-coded strings that should be constants, missing checks for SY-SUBRC after database operations, and incorrect use of logical and arithmetic operators instead of their word equivalents. Standard internal table processing such as sorting is also missing in some places.

Uploaded by

joga srikanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views6 pages

Ztest Assist Cases

The document contains a list of violations and issues found in the ABAP program ZTEST_ASSIST_CASES. These include lack of exception handling, hard-coded strings that should be constants, missing checks for SY-SUBRC after database operations, and incorrect use of logical and arithmetic operators instead of their word equivalents. Standard internal table processing such as sorting is also missing in some places.

Uploaded by

joga srikanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

24.01.

2022
Dynamic List Display
1

Obj. Type Sub-Object Name Line Rule Violation Message Note Short text

PROG ZTEST_ASSIST_CASES 13 Check of SY-SUBRC Handling - HAWKEYE


No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 13 Search problematic SELECT * statements -
HAWKEYE Existence check. No fields used
PROG ZTEST_ASSIST_CASES 13 Tenuous use of FOR ALL ENTRIES - HAWKEYE
Possible use of LT_SBOOK without prior content validation
PROG ZTEST_ASSIST_CASES 33 ARITHMETIC OPERATORS INSTEAD OF WORDS
Use operators (+, -, *, /, =) instead of words ADD, SUBTRACT, MULTIPLY,
DIVIDE, MOVE
PROG ZTEST_ASSIST_CASES 35 ARITHMETIC OPERATORS INSTEAD OF WORDS
Use operators (+, -, *, /, =) instead of words ADD, SUBTRACT, MULTIPLY,
DIVIDE, MOVE
PROG ZTEST_ASSIST_CASES 37 ARITHMETIC OPERATORS INSTEAD OF WORDS
Use operators (+, -, *, /, =) instead of words ADD, SUBTRACT, MULTIPLY,
DIVIDE, MOVE
PROG ZTEST_ASSIST_CASES 39 ARITHMETIC OPERATORS INSTEAD OF WORDS
Use operators (+, -, *, /, =) instead of words ADD, SUBTRACT, MULTIPLY,
DIVIDE, MOVE
PROG ZTEST_ASSIST_CASES 55 Search problematic statements for result
of SELECT/OPEN CURSOR without ORDER BY SELECT .. UP TO .. ROWS without ORDER BY
found
PROG ZTEST_ASSIST_CASES 55 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 70 INTERNAL TABLES - SORT BY BREAK LEVEL
FIELDS Sort by the break level fields before entering the LOOP
PROG ZTEST_ASSIST_CASES 72 INTERNAL TABLES - SORT BY BREAK LEVEL
FIELDS Sort by the break level fields before entering the LOOP
PROG ZTEST_ASSIST_CASES 85 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for LV_STR1(5)
PROG ZTEST_ASSIST_CASES 87 Data Variables - Use of Defaults No
Implied Defaults. Specify Length - C
PROG ZTEST_ASSIST_CASES 87 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for LV_STR3
PROG ZTEST_ASSIST_CASES 90 BYTE & CHARACTER STRINGS Use XSTRING
instead of TYPE X for LV_XSTR2(16)
PROG ZTEST_ASSIST_CASES 91 BYTE & CHARACTER STRINGS Use XSTRING
instead of TYPE X for LV_XSTR3
PROG ZTEST_ASSIST_CASES 103 HARD CODING 'A' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 104 HARD CODING 'B' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 105 HARD CODING 'C' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 107 Case Without When Others Case
statement without When Others for Case on line 101
PROG ZTEST_ASSIST_CASES 110 HARD CODING 'K' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 111 HARD CODING 'L' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 112 HARD CODING 'M' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 113 Case Without When Others Case
statement without When Others for Case on line 109
PROG ZTEST_ASSIST_CASES 129 EXCEPTION HANDLING - USE CLASS BASED
CATCH ENDCATCH is Obsolete
PROG ZTEST_ASSIST_CASES 134 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After ENDCATCH
PROG ZTEST_ASSIST_CASES 144 EXCEPTION HANDLING - USE CLASS BASED
CATCH ENDCATCH is Obsolete
PROG ZTEST_ASSIST_CASES 172 MESSAGE CLAUSE MISSING ON OPEN Use
Message Clause when Opening a file
PROG ZTEST_ASSIST_CASES 192 EXCEPTION HANDLING MISSING or Wrong
Exception CX_SY_CREATE_OBJECT_ERROR is not handled
PROG ZTEST_ASSIST_CASES 197 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 199 Search problematic SELECT * statements -
HAWKEYE Existence check. No fields used
PROG ZTEST_ASSIST_CASES 199 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 206 INTERNAL TABLES - LOOP AND ASSIGN Use
LOOP AT ITAB and assign to a field symbol instead of work area
PROG ZTEST_ASSIST_CASES 208 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 216 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 216 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 219 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 219 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 223 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 227 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 229 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 235 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 238 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for TEXT2
PROG ZTEST_ASSIST_CASES 242 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 244 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 259 HARD CODING 'AC' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 259 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 259 Search problematic SELECT * statements -
HAWKEYE Existence check. No fields used
PROG ZTEST_ASSIST_CASES 265 Data Variables - Use of Defaults No
Implied Defaults. Specify Length - C
PROG ZTEST_ASSIST_CASES 265 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for LV_ONE
PROG ZTEST_ASSIST_CASES 266 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for LV_TWO(2)
PROG ZTEST_ASSIST_CASES 277 Search problematic SELECT * statements -
HAWKEYE Select-Statement can be transformed. 7.1% of fields used
PROG ZTEST_ASSIST_CASES 277 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 281 INTERNAL TABLES - DELETE ADJACENT
COMPARING Use COMPARING with DELETE ADJACENT DUPLICATES
PROG ZTEST_ASSIST_CASES 293 STANDARD INTERNAL TABLE PROCESSING SORT
on Standard Table LT_FLIGHT7 is missing
PROG ZTEST_ASSIST_CASES 293 HARD CODING 'LH' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 295 HARD CODING 'LH' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 300 HARD CODING 'LH' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 300 STANDARD INTERNAL TABLE PROCESSING
Missing Binary Search on READ itab LT_FLIGHT7
PROG ZTEST_ASSIST_CASES 300 STANDARD INTERNAL TABLE PROCESSING SORT
on Standard Table LT_FLIGHT7 is missing
PROG ZTEST_ASSIST_CASES 300 STANDARD INTERNAL TABLE PROCESSING SORT
on Standard Table LT_FLIGHT7 is missing
PROG ZTEST_ASSIST_CASES 300 STANDARD INTERNAL TABLE PROCESSING SORT
on Standard Table LT_FLIGHT7 is missing
PROG ZTEST_ASSIST_CASES 308 INTERNAL TABLES � WITH HEADER Internal
table GT_TAB WITH HEADER LINE not Allowed
PROG ZTEST_ASSIST_CASES 309 INTERNAL TABLES � WITH HEADER Internal
table GT_TAB2 WITH HEADER LINE not Allowed
PROG ZTEST_ASSIST_CASES 311 INTERNAL TABLES � WITH HEADER Internal
table LT_DATA2 WITH HEADER LINE not Allowed
PROG ZTEST_ASSIST_CASES 316 Search problematic statements for result
of SELECT/OPEN CURSOR without ORDER BY SELECT .. UP TO .. ROWS without ORDER BY
found
PROG ZTEST_ASSIST_CASES 316 Search problematic SELECT * statements -
HAWKEYE Select-Statement can be transformed. 7.1% of fields used
PROG ZTEST_ASSIST_CASES 316 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 324 HARD CODING 'LH' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 338 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 350 HARD CODING 'LH' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 350 STANDARD INTERNAL TABLE PROCESSING SORT
on Standard Table LT_DATA2 is missing
PROG ZTEST_ASSIST_CASES 350 STANDARD INTERNAL TABLE PROCESSING SORT
on Standard Table LT_DATA2 is missing
PROG ZTEST_ASSIST_CASES 350 STANDARD INTERNAL TABLE PROCESSING
Missing Binary Search on READ itab LT_DATA2
PROG ZTEST_ASSIST_CASES 365 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 395 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 397 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 399 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 401 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 403 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 405 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 417 INTERNAL TABLES - LOOP AND ASSIGN Use
LOOP AT ITAB and assign to a field symbol instead of work area
PROG ZTEST_ASSIST_CASES 444 INTERNAL TABLES - MODIFY IN LOOP ASSIGN
Modify/Update not required inside Loop assigning
PROG ZTEST_ASSIST_CASES 452 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for LV_STRING1
PROG ZTEST_ASSIST_CASES 455 Offsets and Subscripting Offset
statement on line 455 can cause issues in Unicode programs.
PROG ZTEST_ASSIST_CASES 473 PARAMETER PASSING IN FORMS Define
CHANGING parameter(s) by REFERENCE
PROG ZTEST_ASSIST_CASES 481 Slow parameter passing - HAWKEYE
Parameter is an internal table and is passed by VALUE
PROG ZTEST_ASSIST_CASES 501 HARD CODING 'AC' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 501 Read Table with FIELD SYMBOL IS ASSIGNED
or SY-SUBRC check missing for field symbol <FS_SFLIGHT11> in Read TABLE statement
PROG ZTEST_ASSIST_CASES 507 HARD CODING 'AC' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 520 Search problematic SELECT * statements -
HAWKEYE Select-Statement can be transformed. 20.0% of fields used
PROG ZTEST_ASSIST_CASES 522 HARD CODING 'LH' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 522 INTERNAL TABLES - LOOP AND ASSIGN Use
LOOP AT ITAB and assign to a field symbol instead of work area
PROG ZTEST_ASSIST_CASES 522 INTERNAL TABLES - SINGLE READ Read ITAB
directly to get at record instead of Looping
PROG ZTEST_ASSIST_CASES 531 Search problematic statements for result
of SELECT/OPEN CURSOR without ORDER BY SELECT .. UP TO .. ROWS without ORDER BY
found
PROG ZTEST_ASSIST_CASES 534 INTERNAL TABLES - LOOP AND ASSIGN Use
LOOP AT ITAB and assign to a field symbol instead of work area
PROG ZTEST_ASSIST_CASES 534 HARD CODING 'AA' string is hard coded.
Consider defining it as a constant
PROG ZTEST_ASSIST_CASES 535 INTERNAL TABLES - SINGLE READ Read ITAB
directly to get at record instead of Looping
PROG ZTEST_ASSIST_CASES 547 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for LV_TAB
PROG ZTEST_ASSIST_CASES 553 STRUCTURES OBSOLETE Use type statement
to build local structures
PROG ZTEST_ASSIST_CASES 555 STRUCTURES OBSOLETE Use type statement
to build local structures
PROG ZTEST_ASSIST_CASES 559 STRUCTURES OBSOLETE Use type statement
to build local structures
PROG ZTEST_ASSIST_CASES 564 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 566 Search problematic statements for result
of SELECT/OPEN CURSOR without ORDER BY READ TABLE ... INDEX 1 for result of
statement at Include ZTEST_ASSIST_CASES line 564
PROG ZTEST_ASSIST_CASES 568 Search problematic statements for result
of SELECT/OPEN CURSOR without ORDER BY READ TABLE ... INDEX 1 for result of
statement at Include ZTEST_ASSIST_CASES line 564
PROG ZTEST_ASSIST_CASES 568 Read Table with FIELD SYMBOL IS ASSIGNED
or SY-SUBRC check missing for field symbol <FS_TAB> in Read TABLE statement
PROG ZTEST_ASSIST_CASES 583 DATA VARIABLES - USE OF TYPE VS LIKE
Use keyword TYPE instead of LIKE when declaring variables LV_CARRID2
PROG ZTEST_ASSIST_CASES 594 DATA VARIABLES - USE OF TYPE VS LIKE
Use keyword TYPE instead of LIKE when declaring variables LS_FLIGHT10
PROG ZTEST_ASSIST_CASES 595 DATA VARIABLES - USE OF TYPE VS LIKE
Use keyword TYPE instead of LIKE when declaring variables LV_CONNID
PROG ZTEST_ASSIST_CASES 622 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 622 Search problematic SELECT * statements -
HAWKEYE Existence check. No fields used
PROG ZTEST_ASSIST_CASES 622 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 627 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 627 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 639 Data Variables - Use of Defaults No
Implied Defaults. Use explicit typing - L_COMP
PROG ZTEST_ASSIST_CASES 646 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 649 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 658 BYTE & CHARACTER STRINGS Use STRING
instead of TYPE C for NAME(20)
PROG ZTEST_ASSIST_CASES 662 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Dynamic ASSIGN
PROG ZTEST_ASSIST_CASES 662 EXCEPTION HANDLING MISSING or Wrong
Exception Exception Handling missing
PROG ZTEST_ASSIST_CASES 667 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After Reading Database Statement
PROG ZTEST_ASSIST_CASES 679 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After CALL FUNCTION
PROG ZTEST_ASSIST_CASES 688 DATA VARIABLES - USE OF TYPE VS LIKE
Use keyword TYPE instead of LIKE when declaring variables WA_ENQ
PROG ZTEST_ASSIST_CASES 693 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After ENQUEUE
PROG ZTEST_ASSIST_CASES 708 EXCEPTION HANDLING MISSING or Wrong
Exception CX_SY_CREATE_OBJECT_ERROR is not handled
PROG ZTEST_ASSIST_CASES 710 Check of SY-SUBRC Handling - HAWKEYE
No Handling of SY-SUBRC After CALL METHOD
PROG ZTEST_ASSIST_CASES 756 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 757 PARAMETER PASSING IN FORMS Define the
parameter U_ONE as a USING-VALUE(..) or CHANGING parameter
PROG ZTEST_ASSIST_CASES 758 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 785 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 787 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 812 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 814 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 840 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 841 PARAMETER PASSING IN FORMS Define the
parameter U_ONE as a USING-VALUE(..) or CHANGING parameter
PROG ZTEST_ASSIST_CASES 842 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 863 PARAMETER PASSING IN FORMS Define
CHANGING parameter(s) by REFERENCE
PROG ZTEST_ASSIST_CASES 869 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 871 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 891 PARAMETER PASSING IN FORMS Define
CHANGING parameter(s) by REFERENCE
PROG ZTEST_ASSIST_CASES 897 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 898 PARAMETER PASSING IN FORMS Define the
parameter U_TWO as a USING-VALUE(..) or CHANGING parameter
PROG ZTEST_ASSIST_CASES 899 Logical Operators Instead of Words Use
operators (>=, <=, =, <>, >, <) instead of literals GE, LE, EQ, NE, GT, LT
PROG ZTEST_ASSIST_CASES 919 PARAMETER PASSING IN FORMS Define
CHANGING parameter(s) by REFERENCE
PROG ZTEST_ASSIST_CASES 941 INTERNAL TABLES - LOOP AND ASSIGN Use
LOOP AT ITAB and assign to a field symbol instead of work area
PROG ZTEST_ASSIST_CASES 946 INTERNAL TABLES - MODIFY IN LOOP ASSIGN
Modify/Update not required inside Loop assigning

You might also like