Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Code inspector

Former Member
0 Kudos

i get the following information in code inspector

ObjectType 0OBJ Object name Entire Object Set Sub-Object Type Sub-Object Name

1 Object(s), Tot. No. of Statements: 518

No. of Operative Statements: 404

Operative Statements in

3 FORM Routine(s): 97

1 Function Module(s): 276

Outside Modularization Units: 31

1 Object(s), Tot. No. of Statements: 518

No. of Operative Statements: 404 Operative

Statements in 3 FORM Routine(s): 97

1 Function Module(s): 276 Outside

Modularization Units: 31

how can i avoid this?

please advice

3 REPLIES 3

Former Member
0 Kudos

Hi Kittu,

Just follow the below points.

1) If you have declared any variables/constants/internal tables and if you are not using them then these wil cause some errors in code inspector so delete trose unused variables.

2)Do Intital check after everey select statement if you are using into statement.

Example

SELECT single matnr form mara into V_matnr where matnr in S_matnr.

if v_matnr is not initial.

endif.

if you do sy-subrc check and you dont use v_matnr in further steps this will result error in code inspector so better do Initial check

also for internal tables

3) If you use any text messages . Define them in the Text messages I mean use text-001 , text-002 etc.. Instead of hard coding.

4) for remaining things, just click on the messages in code inspector and it will propose some commands to use like #EC , #EC NEEDED etcc....

Reward if useful

Thanks,

Nageswar

Former Member
0 Kudos

Hi,

In most of the errors or warnings obtained using the code inspector, the method to rectify them will also be provided in the messages. Follow the instructions given in it & you can avoid these errors/warnings.

Regards

Sayee

Former Member
0 Kudos

Hi Kittu, check this matter, may be of some help.

The Code Inspector is a tool for checking Repository objects regarding performance, security, syntax, and adherence to name conventions.

In the Code Inspector, ABAP Unit tests can be used for any object sets.

The Code Inspector allows developers to define which objects are to be checked and which quality aspect of the code is to be inspected (e.g. performance, security).

It is also possible to define global check variants as general programming guidelines, to ensure standardized programming within a development community.

When configuring the check variant, you can activate ABAP Unit tests by choosing Dynamic Tests ? ABAP Unit. Existing ABAP Unit tests will then run alongside a regular code inspection.

The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.

Also Kittu, The Code Inspector indicates possible problems. However, note that, especially with performance issues:-

There is no rule without exception.

If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.

In the Code Inspector, you can define inspections that, with the help of check variants, examine certain sets of objects. As the result of an inspection, you receive information messages, warning messages, or error messages on different properties of the examined objects.

The range of functions in the Code Inspector is limited to checking static object definitions and can therefore only point out certain problems.

It cannot, for example, give a precise statement as to how the overall performance of a program is. To be able to do this, you need to analyze program execution yourself at runtime – for example, using the Runtime Analysis Tool (transaction code SE30), the Performance Trace (ST05), or the Global Performance Analysis Function (ST30).

kindly reward if found helpful.

cheers,

Hema.