Wednesday, 5 May 2021

Code inspector - Validating your ABAP code before Moving into the production system

Code inspector: 

It is one of the SAP standard tool to validating your ABAP code before moving into the production system.

with this tool, can perform below listed checks


                                                      

Purpose of the tool:

you can perform an ABAP  program scan to avoid errors in the ABAP program using SAP standard tool called code inspector.


  • you can use this standard tool to ensure that your ABAP code is safe against backdoors or other programming threats. 
  • A common gap in most BASIS administrators is lack of expertise in ABAP programing. 


When to use:

you can use this tool to prevent someone from moving unsafe ABAP code  into production system.


Steps: Let's get your hands dirty

1. Access T-code: SE38



2.Enter a custom program in the transaction se38 program field.
   
* here in my case i'm taking ZDUMMY2 as my custom program.

3. Perform the below navigation.

    Menu --> Program --> Check --> Code Inspector.



4. By doing above process, code inspector tool will perform checks in several areas in the background.

                                        *General errors.
                                        * Performance Checks.
                                        * Security checks.
                                        *Syntax checks and generation.
                                        *Robust programming.
                                        * User interfaces.
as shown below.

for my custom program ZDUMMY2 have 4 error.

one error from General errors
Three errors from Performance check


5. Navigating the General errors section & Performance Checks drop down.





6. With the error info, Check with ABAPer to correct the program in case ABAPer is required.
     Sometimes BASIS consultant can also solves the isssue if it is BASIS relevant.