Tuesday 18 February 2014

SAP Code Inspector

Scenario: Code Inspector is used to analyse the Syntax and the performance of the development objects. The below post describes how to create code Inspectors for particular set of developed objects and saving the same so that the result can be analysed later.


Step1. Suppose we have a report, for which code Inspector needs to be checked.

















Step2. Right click on the Report Name and navigate along the highlighted Path.

















Step3.  The Result of Code Inspector displays, the below details. What if we want to store the result of the Code Inspector so that at a later point of time we can just check the result of the core inspector.














Step4. To Store the Result of the code inspector, Go to Tcode- SCI.







Case-1

Step5.  IN the inspector Section, click on the Create Button .



















Step6. Choose the radio button  SINGLE - provide the REPORT name and click on the Execute button.
























Step7. The Code Inspector Result for the REPORT is displayed as below.















CASE-2

Step8. If we want to store the code inspector result, In the OBJECT Set Option : Provide a Name and Click on the Create Button.





















Step9. In the program Section: Provide the Report Name and SAVE the Object Set and Go Back



























Step10. In the Inspector Section: Provide a NAME  and click on Create Button.




















Step11. In the object Set Option: Provide the Above created Object Set Name. In the Variant Section, from the F4 help provide as 'DEFAULT'.  This Default variant is provided by the standard. At last SAVE it. The traffic Light is RED at this point. Now Click on the Execute Button.

















Step12. The traffic light turns into Green. To display the result click on the Display Log button.

















Step13. It shows the code Inspector result details. This result is stored in the Data Base Table . Later point of time the User can come and provide the Inspector name and can see the result. No need to run the Code Inspector again.














CASE-3

Step14. In above Code Inspector We have used a Standard variant 'DEFAULT'. Let's create our own variant and use it in the code Inspector. Provide A Variant  name and click on the Create button.


















Step15. Select some of the point needs to be checked by the code inspector run and Save the Variant.






























Step16. Let's use the same Object Key. click on the Change button.






















Step17. The report name is provided before.
























Step18. Every time the code Inspector is changed a new version is generated without deleting the previous version result. Click on the Change button.




















Step19.  Click on the  Create New Version Button.

















Step20. In the Variant Section from the F4 option, choose the above created Variant Name.













Step21. Save it. Execute the same.

















Step22. The light turns green. Click on the Show Result button.


















Step23. The details of the code inspector for the object set with the new variant is displayed below.















Step24. If U want to see the result of the Code Inspector of Version-001. Mention the same and click on the Show result button.


















Step25. The result of the code inspector - version-001 is displayed.












Step26. If U want the result of Version-2. provide the same & click on the show result button.




















Step27. The result is displayed below.














_________________________________________________________________________________

No comments:

Comments system

Disqus Shortname