Code Inspector: Enhancement / Adding own rules?

Hi All,
I wonder whether there is a way to add own rules to the Code Inspector.
With own rules I mean checking the coding against our development guidelines, just two examples:
1) Before SELECT ... FOR ALL ENTRIES it needs to be checked, whether the internal table is not initial.
2) No direct table update to SAP tables.
I locked to SCII. I believe it is not a solution to define a new check variant, since I haven't found the possibility there to add own rules (just naming conventions, searching for characters).
Thus, I wonder whether there is any user-exit, BAdI etc. I could use - or do I really have to write my own parser - which would be a nightmare (multiple meanings of statements (INSERT can change an internal table or database table - depending on the table / variable given); considering global variables, method parameters etc.).
Any advise is welcome!
Best regards
Lars

Hi Lars,
Check the below link to customize SCI as per your requirement.
http://sapignite.com/enhancement-of-code-inspector/
<removed by moderator>
Thanks
SA
Edited by: Thomas Zloch on Feb 18, 2011 5:44 PM - please do not beg for points, age old thread by the way

Similar Messages

  • How to create and transport my own globel check variant for Code Inspector

    Hi,
    I want to create my own global check variant with Code Inspector, so that I can transport the Variant in other systems, but I can not save my variant whitout registering a SSCR-Key.
    Can anybody help me?
    Best regards
    Marcus

    I have solved it myself and will post the solution here soon.

  • Code Inspector / Extended Check - Error  in Inbound Custom Function Module

    I have created a new cutom FM for Inbound IDOC Application Posting.
    In the  TABLE   Parameter of FM  the following Tables difined.
    IDOC_CONTRL                     LIKE     EDIDC
    IDOC_DATA                     LIKE     EDIDD
    IDOC_STATUS                     LIKE     BDIDOCSTAT
    RETURN_VARIABLES     LIKE     BDWFRETVAR
    SERIALIZATION_INFO     LIKE     BDI_SER
    while checking with Code Inspector Tool I got an Error for  BDI_SER.(  Last Table Parameter of the FM)
    Syntax check warning
    "BDI_SER" can be enhanced. After a structure enhancement, the semantics of the
    parameter transfer may change.
    Internal Message Code: MESSAGE G_B
    (The message can be hidden with "#EC ENHOK)
    Type "BDI_SER" or the type of one of its subcomponents can be enhanced. The semantics of the parameter transfer may change after a structure enhancement.
    For the execution of a Remote Function Call (RFC), the actual parameter and formal parameter do not have to be of the same type. In the case of structure types, the actual parameter and formal parameter can contain additional components at the end. These additional components are set to their initial values.
    Check whether the enhancement category of the relevant type correct is set or whether the category "cannot be enhanced" should be used.
    How to fix this error?  other wise how to supress the Message by adding "#EC ENHOK
    where I have to add the Comment "#EC ENHOK.
    please help to give details .
    Thanks in advance.
    Shar

    In the source code you will have this in comment right, use the "#EC ENHOK.

  • Create new check in code inspector.

    Hi All,
      I am doing a customizing in code inspector but i don't know whether we can create a new check in code inspector which will check for the performance issues. So please can anyone help me in giving a solution for adding a new performance check in code inspector....... since i am new to ABAP i am unable to figure it out...

    Have you really checked that the existing categories "performance checks" and "internal performance checks" do not contain already what you're looking for?
    You can create an own check as described in this blog
    /people/peter.inotai/blog/2006/11/02/code-inspector--how-to-create-a-new-check
    Thomas

  • Code Inspector Selection

    Hello,
    I am trying to use the Code Inspector and I would like to check only specific Includes from a Function Group.
    In my Object Set I specified the Function Group I wanted to scan (Tab Classes, Function Groups, etc.) and I specified the Include I wanted to specially verify in the Program Tab.
    It takes a lot of time to run and I get a runtime error. I have about 10 Includes to check so it should not take that long.
    Is there a way to combine 2 different selections in the standard selection fields without considering modifying the source code?
    I've checked the Code Inspector documentation but did not really find something that could help me solve my problem.
    Does anyone have a solution?
    Thanks in advance.
    Sylvain

    Hi guys,
    Thanks for the answers but it's not solving my problem.
    Here is an example of the situation I am going through:
    The SAP standard program SAPLYDEVCM contains a lot of standard Includes and some new Customer specific Includes that were added during the project.
    I want to scan only the Customer Includes Y* and Z*. When I enter the specific Include names the Code Inspector scan all Includes of the main program SAPLYDEVCM and that is not what I want.
    Is it possible to scan only the Customer Specific Includes?
    I hope my example was clear enough.
    Thanks for the help.
    Regards,
    Sylvain

  • Code Inspector Showing Error!!!

    Hi All,
    How to correct the following error raised by Code Inspector Check!!!!
    ProgramZFTSRPRECC Include ZFTSRPRECC Row 1 Column 0
    The namespace of the programZFTSRPRECC has the setting "C" and cannot be
    tested
    A possible cause for this is that an SAP program is being checked in a customer
    system
    Note, the following rule applies after a change in the sourcecode:
    For testing the namespace settingis ignored for one week.
    regards,
    naveen.....

    Check the attributes of the program, whether u may be selected "C" in Application option, if yes change to something else and test.
    Pls get back with the result.

  • How to change Variant in Code inspector from Global to local.

    Hi,
    I have created my own variant,object set and inspection through T-code SCI and this has been created only for my id.
    Now when i go to SE38 and run Code Inspector i want the CI to use my variant instead of the Global DEFAULT variant.
    Kindly tell me how can i change from DEFAULt to my Local Variant.
    Many Thanks.

    Hi,
    abap_learner_das wrote:
    > Now when i go to SE38 and run Code Inspector i want the CI to use my variant instead of the Global DEFAULT variant.
    in that case you have to create a variant called "DEFAULT" as your local one. That variant will be used in SE38.
    In SE38 you can only use the DEFAULT variant. either the global one (if your user does not have a local one named DEFAULT) or the local one of your user.
    HTH,
    Hermann

  • Code Review of User Exits with Code Inspector

    Hi,
        We are using Code Inspector(Tcode - SCI) for checking the quality of ABAP Codes. It is working fine for all custom programs. But when we are checking the code of User Exits i: e MV50AFZ1 or ZXM06U22 then it checks the std SAP program (SAPMV50A) or (SAPLXM06) for these exits in place of checking that particular Exit only . How the customer/User Exits can be checked using Code Inspector. Pls advice.

    Hi there!
    Today, I stumbled over the same problem: Defining an Include for user exits leads to a check of the surrounding function group from SAP which I don't want to correct at all.
    Is there a nice an elegant way of filtering out the SAP modules from checking? If not, the only way to get around this seems to be building an own implementation of the Code Inspector integration into CTS.
    Thanks, Markus

  • Code Inspector: Examine programs in extern SAP systems?

    Would it be possible to call from the Solution manager the code inspector and examine a program of a connected 4.6c-er system?

    Hi there!
    Today, I stumbled over the same problem: Defining an Include for user exits leads to a check of the surrounding function group from SAP which I don't want to correct at all.
    Is there a nice an elegant way of filtering out the SAP modules from checking? If not, the only way to get around this seems to be building an own implementation of the Code Inspector integration into CTS.
    Thanks, Markus

  • CODE INSPECTOR - help

    hi gurus
    I have a misterious error in the CODE INSPECTOR. My function module was already implemented but code inspector show that it is not implemented. I use netweaver 7.10
    in Syntax Check/Generation ->Test of Environment Determ.
    Function Group /PACkGEWEB/PMGF_CARACTERIS Sub-Object Type FUGR Sub-Object Name /PACkGEWEB/PMGF_CARACTE
    Function module /PACkGEWEB/PMFWL_CARACTERIS must be implemented
    When a click in information it´s showed the message below:
    In Release 7.10, the package check for development projects was changed. One major change is the introduction of
    the concept of the object environment. The object environment is,
    simply put, the list of additional object that are needed
    for the correct usability of the current object. The environment is determined by tools provided for the purpose.
    To enable the determination of the environment for function modules, enhancements are needed for the storage of
    function modules in certain cases. This enhancement takes place automatically when the function modules is saved.
    In addition, you can use the RS_REPAIR_FUNC_WITH_TYPE_POOLS report to implement the conversion for a set of function
    groups (and the function modules contained therein).
    To determine whether a conversion is necessary, use the #syntax check/generation>environment determination test#."
    What do I have to do for remove this "error" in my code inspector ?

    I think its better to avoid delete statements inside the loop
    instead of using delete statement inside the loop
    use
    delete table itab where condition
    or
    if u have to use loop at any cost
    modify internal table with flag=X
    and then delete all records from the itab at one shot using above statement
    Regards
    Vikas C

  • Code Inspector/ATC checks for VKOS/VKOI object types

    Dear Experts,
    I found a strange behavior while executing CI checks on a transport request. TR contained only IMG Activity objects (Object Type VKOS/VKOI). After CI checks it gave errors "Recognized dead code". There is no coding for these kind of object type, I don't know where it was able to find the dead code. On debugging I found that, it is trying to populate Program name concatenatinv " SAPIC " and the object type. ( SAPICVKO). But there is no such program existing. It then gives "Recognized dead code" error.
    Has anyone faced such error before? I guess this is error in the standard program.
    Thank you.

    Other language NUnit test frameworks similar to ABAP Unit (AUnit) commonly have project extensions for storing test results. These are useful for the unit level regression (did a new change break any existing functions). History of test results, help narrow down the nature of a current failure by answering the question of 'When did this break?' or when did it last pass? In systems dependent upon outside components the history can provide a pattern for occasional failures due to factors outside the system under test.
    I see that ABAP unit test results can be added into the Code Inspector under the Check Variant.
    1. Is it common or recomended to use the Code Inspector (SCI) to store AUnit test results?
    2. Is it common or recomended to use Code Inspector Object variants to collect individual AUnit tests for a regresssion style 'TestSuite'?
    3. What reporting or tools exists for Code Inspector history?
    4. Is Application Logging the better spot for AUnit results history?
    (also posted on the wiki.. apologies - I'm new to the forum and wiki)
    Will Loew-Blosser

  • Code Inspector Development

    Hi all,
            We have been assigned to make our own code inspector  in 4.6 right from scratch , at this point of time we are not able to understand how to proceed.Kindly help with the flow.
    Regards
    Gaurav Mehrotra

    Hi try this
    To build a new Code Inspector check, you have to do the following:
    ·     Create a new global class that extends one of the existing Code Inspector classes
    ·     Implement the instance constructor
    ·     Implement the actual check routine in the RUN method
    ·     Implement method GET_ERROR_TEXT to output message texts
    ·     Include the new check into the check variant tree
    Additionally, if your check has user parameters:
    ·     Add user parameters as private class attributes to your check class
    ·     Set flag HAS_ATTRIBUTES in the instance constructor
    ·     Implement methods GET_ATTRIBUTES and PUT_ATTRIBUTES to get and write away attributes
    ·     Implement method QUERY_ATTRIBUTES of interface IF_CI_TEST to create the Pop-Up for the parameter input
    Hope thsi Helps
    Anirban

  • Code Inspector & ABAP UNIT Testclasses

    Hallo all,
    I am currently trying to implement automated checks using the code inspector. I especially want to see if all our developers use our naming conventions. Also, we use ABAP Unit tests. Unfortunately, the generated test classes are not compliant with our name conventions (And also these Test classes are not interesting to be checked).
    Now, I receive many warnings, mostly from the Unit test implementations.
    Now: Is there a way to exclude these local test classes from my object set?
    Thanks for you help!
    Best regards,
    Martin Imme

    Other language NUnit test frameworks similar to ABAP Unit (AUnit) commonly have project extensions for storing test results. These are useful for the unit level regression (did a new change break any existing functions). History of test results, help narrow down the nature of a current failure by answering the question of 'When did this break?' or when did it last pass? In systems dependent upon outside components the history can provide a pattern for occasional failures due to factors outside the system under test.
    I see that ABAP unit test results can be added into the Code Inspector under the Check Variant.
    1. Is it common or recomended to use the Code Inspector (SCI) to store AUnit test results?
    2. Is it common or recomended to use Code Inspector Object variants to collect individual AUnit tests for a regresssion style 'TestSuite'?
    3. What reporting or tools exists for Code Inspector history?
    4. Is Application Logging the better spot for AUnit results history?
    (also posted on the wiki.. apologies - I'm new to the forum and wiki)
    Will Loew-Blosser

  • How to create code inspector variant?

    Hi all,
    how to create code inspector variant?
    Regards,
    Jeetu

    Go to SE38 - Type in your program name
    Then in menu Go to Program - > check -> Extended program check ->
    You can select the rules to check
    Press the edit button and save with some name
    regards
    Vivek
    reward points if this helps

  • Regarding Code inspector

    Hi,
    I am new to code inspector. I just worked on enhancement using BADIs.
    1) What is the purpose of Code inspector ?
    2) How can I use code inspector for my particular code inside one of the BADI method ?
    Please throw some light on this.

    Hi Tushar,
    These links gives you a good idea about what the code inspector does.
    1. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/a-c/code%20inspector%20user%20manual">Code Inspector User Manual</a>.
    2. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/how%20to%20build%20a%20new%20check%20for%20the%20code%20inspector">How to Build a New Check for the Code Inspector</a>
    3. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/evaluating%20the%20quality%20of%20your%20abap%20programs%20and%20other%20repository%20objects%20with%20the%20code%20inspector">Evaluating the Quality of Your ABAP Programs and Other Repository Objects with the Code Inspector</a>
    Regards,
    Anand Mandalika.

Maybe you are looking for

  • How to catch ClassCastException from JSP page?

    I get a ClassCastException within my JSP page and I know where my bug is. However, this classcastexception message is displayed in the browser and I want to catch this exception to also log it into my log file. But I can't find the place where to cat

  • Getting an ORA-39126 when importing

    When i am doing Connected to: Oracle Database 10g Release 10.2.0.3.0 - Production Master table "SYSTEM"."SYS_IMPORT_SCHEMA_02" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_SCHEMA_02":  system/********@o10g directory=my_imp_dir CONTENT=A

  • The CWGraph3D axis loose fit behavior

    The CWGraph3D control's X,Y and Z axis behave as if they have a loose fit.  That is, they do not make their axis minimum and maximum limits correspond to what their data values are but instead round the minimum down and maximum up to some integer inc

  • Premiere CC eating up memory while playing back ProRes 4444

    We are editing footage shot on the Amira on two Mac Pros with Premiere Pro CC 2014. One of the Macs plays back the native footage fine at half resolution. Looking at the activity monitor, the whole system is using about 12GB of RAM and stays there. H

  • Looking for Labview driver for Agilent 4294A (HP)

    Help! I've been browsing the driver database looking for the Labview GPIB driver for Agilent(formerly HP) 4294A Gain-Phase Analyzer. Does anyone know where I can get it?