Showing posts with label ABAP code inspector. Show all posts
Showing posts with label ABAP code inspector. Show all posts

How to suppress messages during code inspection using pseudo comments?

Suppressing messages during Code check using pseudo comments in ABAP?


There are different ways of finding out whether a particular message may be hidden and the code for hiding such messages using pseudo-comments.

1. From the message results, navigate to the message to suppress.
2. Expand the folder icon to display its details.
3. Then, check the icon is displayed before the message as shown.





4. This will display the dialog box, as shown. This will inform you how the code can be handled.



5. Note the comment. This may be included in the coding with the statement that
generated the message as shown as follows:

SELECT * FROM ZDATABASE_TABLE.                "EC# CI_NOWHERE





How to improve performance by database checks in ABAP?

Database-specific performance checks by Code inspector

Use SCII or SCI transaction code

Within the checks, expand the Performance Checks category.

From the list of checks that appear, select the checks shown in the following screenshot:



During this, the code inspector checks the syntax of the program and refers to the attributes and technical settings of the tables involved.

  • CHECK or EXIT statements used within a SELECT statement instead of highlighting a WHERE clause.




  • SELECT statements included in a loop such as a DO loop or within a loop at ITAB.



  • Any SELECT statements that use the BYPASSING BUFFER addition.



  • SELECT statements that are without a WHERE clause will be included in the warning.

The following is one such example:

SELECT * FROM ZMYTAB INTO IT_TAB



  • Any table that is buffered but is included in a subquery will also result in a warning. This is because the buffering may not be used in this case, since the result of the subquery will be used at the database level in order to determine the selection set of the main SELECT statement.



SELECT FIELD1 INTO TABLE IT_FIELDS
FROM ZTAB1
WHERE FIELD2 EQ 'ABC' AND
FIELD3 IN ( SELECT FIELD1 FROM ZTAB2
WHERE FIELD2 EQ 'Z1' AND FIELD3 EQ'A'.)



  • If the ZTAB2 table is buffered, a warning message will appear in the result.