Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Contents
1. 2. 3. 4. 5. 6. 7. 8. 9. General Checks ................................................................................................................................ 2 Statement Statistics ......................................................................................................................... 2 Performance Checks ........................................................................................................................ 3 Security Checks................................................................................................................................ 3 Syntax Check/Generation ................................................................................................................ 3 Programming Conventions .............................................................................................................. 3 Metrics and Statistics....................................................................................................................... 4 Dynamic Tests ................................................................................................................................. 4 User Interfaces ................................................................................................................................ 4
10. Search Functions.............................................................................................................................. 4 11. Application Checks............................................................................................................................ 5 12. Internal Performance Tests ............................................................................................................... 6 13. Internal Tests .................................................................................................................................... 7 14. Proxy Checks .................................................................................................................................... 7
1|P ag e
1. General Checks
The category General Checks contains data formatting:
Table Names from SELECT Statements Creates a list of the database tables read statically in a program using the SELECT statement. (This list can be summarized).
Table Attributes Statistics Statistics of Table Properties This check supplies statistical information for tables based on the following criteria:
Table Buffering o Buffering not allowed / Buffering allowed, but switched off [Warning] / Buffering switched off o Single records buffered / Generic area buffered / Fully buffered Indexes o Only primary index / Number of secondary indexes Size Category o Not maintained [warning] / Size category of 0-9 Delivery Class o Delivery Class A / C / L / G / E / S / W Enhancement Category o According to DDIC error for classification [error] o Not classified / not enhanceable / enhanceable and character-type / enhanceable and character-type or numeric / can be enhanced as required
2. Statement Statistics
These statistics count the statements contained in the program objects. Comments, in contrast to macro definitions, are counted also. The display option 'Sort' allows summarization of the result for the set of objects (= 'No' sorting), person responsible, or package. The non-summarized result comes up if you have sorting by 'Object'. The statement statistics contain the following parameters: Only Operative Statements The number of operative statements is determined - that is, declarative statements such as data or object declarations are not counted. For Each Modularization Unit The statistics are split up according to statements in the modularization units (dialog module, form routine, function module, method) and according to statements outside of such units. Without Multiple-Used Statements If this parameter is not set, the statements of all the Includes used in a program object are counted as well. Since Includes can be used as often as desired, this results in multiple counts. If the parameter is set, the statements of Includes that are included throughout the system in more than one program are not counted.
2|P ag e
3. Performance Checks
The category Performance contains checks for performance and resource use. Analysis of WHERE Condition for SELECT Analysis of WHERE Condition for UPDATE and DELETE SELECT Statements that Bypass the Table Buffer SELECT Statements with Subsequent CHECK SELECTs in Loops Changing Database Accesses in Loops Nested Loops Performance-Intensive Operations on Internal Tables Performance-Intensive Parameter Passing EXIT Statement Within a SELECT/ENDSELECT Loop Table Attributes Check
4. Security Checks
The category Security contains checks for critical statements, cross-client queries, authority check shortage, and so on.
Critical Statements Dynamic and Client-Specific Accesses Using SELECT Dynamic and Client-Specific Accesses Using INSERT, UPDATE, MODIFY, DELETE Handling SY-SUBRC Changing Database Accesses Outside Update Modules Client-specific shared object methods
5. Syntax Check/Generation
The category Syntax check/generation contains checks for ABAP syntax check and generation: Syntax Check Extended Program Check Generation of Programs
6. Programming Conventions
The category 'Conventions' contains checks for programming conventions ABAP naming conventions This check examines whether objects such as types, classes, fields, and so on, defined in an ABAP program adhere to the name conventions specified using the test parameters.
3|P ag e
8. Dynamic Tests
ABAP Unit tests are not static checks; they are calls of special sections of code in the application program. Error messages - such as those triggered by calling methods of the class Cl_AUnit_Assert generally originate in the application code. The list of possible messages comprises: Tolerant Critical Fatal Summary Rfc Call System Timeout
9. User Interfaces
SAP GUI Usability Check Standard Checks Web Dynpro Web Dynpro Programming Conventions Screen Check( Screen Generation and Screen Check for Usability und Accessibility)
4|P ag e
Search for statements ABAP Statement Search Function The check allows you to search the source code for several statement patterns. In the pattern, the characters + and * have special meaning: + represents a token (any token) * represents a sequence of tokens (any sequence) The characters + and * also have special meaning in the pattern specification. This only applies if a word contains characters other than + and *. Otherwise the above meaning applies. + represents a single character * represents any sequence of characters Example: READ TABLE * WITH KEY +COMP+ = + This pattern searches for an ABAP statement that contains any sequence of tokens after READ TABLE, followed by WITH KEY. After that, a token is expected that is precisely 6 characters long, begins and ends with any character, and has the character sequence COMP at its centre. At the end of the statement, '=' and any word is expected
HR Decoupling: Check Infotype Classes Examines whether the programming conventions are observed for the infotype classes for decoupling the business logic. Function module cannot be used Database changes with &1 are not allowed SET/GET &1 is not allowed MESSAGE is not allowed IMPORT/EXPORT is not allowed External call of (routine) in (program)
5|P ag e
Analysis of instructions from the SQL trace (performance trace, transaction ST05)
SQL trace check: Analysis of the WHERE condition for SELECT An examination in the SQL trace of WHERE conditions in the SELECT statements. JOINs are not checked. Access to the following buffered tables is checked: SELECT-statement does not contain any WHERE conditions As fully buffered tables can be buffer load processes here, this message is only posted with fully buffered tables if the option 'Suspected buffer loaders also' has been selected. WHERE condition contains only the client field in the SQL trace (possibly generated by the DB interface, or - with CLIENT SPECIFIED - explicitly listed in the ABAP Code) As client-dependent tables that are either fully or generically buffered with one field can be buffer load processes here, this message is only posted for tables of this kind if the option 'Suspected buffer loaders also' has been selected. WHERE condition does not contain any fields of table indexes WHERE condition does not contain any first fields of table indexes In each case, these statements result in a complete database table search (or a search in all entries for a client), as no indexes can be used. The priority of the message depends upon whether the table is buffered. In the case of unbuffered tables, the priority also depends on the size category of the table: Size category 0, 1 => Warning Size category >= 2 => Error
SQL trace check: Analysis of the WHERE conditins for UPDATE and DELETE An analysis is carried out in the SQL trace of the WHERE conditions n the UPDATE and DELETE statements UPDATE dbtab SET ... WHERE DELETE FROM dbtab WHERE ... This analysis searches for the following criteria: UPDATE / DELETE statement without WHERE condition WHERE condition in the SQL trace contains the customer field only (possibly generated from the DB interface or - with CLIENT SPECIFIED explicitly listed in the ABAP Code) WHERE condition does not contain any fields of table indexes WHERE condition does not contain any first fields of table indexes In each case, these statements result in a complete database table search (or a search in all entries for a client), as no indexes can be used. The priority of the message depends on the size category of the table: Size category 0, 1 => Warning Size category >= 2 => Error
6|P ag e
Test of CL_ABAP_COMPILER Recognizing Dead Code Empty Test Check for Enhance ability of Tables
7|P ag e