2010 Dec 30 6:53 AM
in a inspecting program in ABAP: Avoid "SELECT * or SELECT SINGLE *" All the queries SELECT * and SELECT SINGLE * queries should be output.
A new message should be created for each query.
It must be possible to restrict the search in the version to table names (eg, "ZMI_CO_ * ") in the framework of a select option.
It should be possible to further restrict the result to a column count (eg, only tables with 8 or more columns). It should be possible to give the value as parameter).
Title on the selection screen:
Select option: "Table Name" (table name)
Parameters: number of columns (column count) <Object> <objectname> line <line
<tablename> table is read with SELECT. "
Example:
Function ZMI_ARC_VBAK_CHECK line 81
Table T001 is read with SELECT.
"<Object> <Object name> line <line number
Table <Table name> is read with SELECT *. "
Example:
Function ZMI_ARC_VBAK_CHECK line 81
Table T001 is read with SELECT *.
in a inspecting program in ABAP: Avoid "SELECT * or SELECT SINGLE *" All the queries SELECT * and SELECT SINGLE * queries should be output.
A new message should be created for each query.
It must be possible to restrict the search in the version to table names (eg, "ZMI_CO_ * ") in the framework of a select option.
It should be possible to further restrict the result to a column count (eg, only tables with 8 or more columns). It should be possible to give the value as parameter).
Title on the selection screen:
Select option: "Table Name" (table name)
Parameters: number of columns (column count) <Object> <objectname> line <line
<tablename> table is read with SELECT. "
Example:
Function ZMI_ARC_VBAK_CHECK line 81
Table T001 is read with SELECT.
"<Object> <Object name> line <line number
Table <Table name> is read with SELECT *. "
Example:
Function ZMI_ARC_VBAK_CHECK line 81
Table T001 is read with SELECT *.
2010 Dec 30 7:13 AM
Hi Naveen,
Please follow the below method:
Select all program names from TADIR / REPOSRC table and Function Modules from TFDIR.
For each program and main program of function module use READ REPORT statement followed by SCAN ABAP SCOUCE with tokens..
Doing above steps you will be having only un-commented code lines (One Complete code till period '.' as one record in internal table) in an internal table.
There try to find if the code Lines is having SELECT * or SELECT SINGLE * as its first 8 / 15 Chars.
If so you may try finding which table is being used there (By Splitting the one complete code at 'FROM' and spaces ).
Lastly keep appending the Desired Program names and the Line Number of Program into another table. and later you may report the Program name with line of Code or can give Interactive Functionality using EDITOR_PROGRAM function module which will Navigate to Corresponding line of code of the chosen Program.
Hoping it Helps!!
Thanks,
Preyansh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |