Naming convention thru Code Inspector

Hi Friends,
   Can we use code inspector to check the naming conventions?.
Thanks in advance.
Regards,
saravanan.D

Hi,
The code inspector can of course be used to check for adherence of the ABAP code to your naming conventions.
You can find information about Code inspector <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">at this link</a>.
Regards,
Anand Mandalika.

Similar Messages

  • Implement Naming convention using code inspector

    Hi,
    We have to implement naming convention using code inspector,if anybody has already done it plz help
    me inunderstanding the problem.
    help is appreciated.

    We're also using the code inspector for naming conventions.
    Try this link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/how to build a new check for the code inspector
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/evaluating the quality of your abap programs and other repository objects with the code inspector

  • Code inspector

    Hi,
    I need to crate a new check for NAMING CONVENTIONS using code inspector.
    When i went through the documentation its says that check varient is stilll under construction.
    If anyone has idea about how to create a new check to Naming conventions, it would be great help to me..
    Thanks,
    Raghavendra.

    Hi,
    Chk these links:
    Re: Naming convention thru Code Inspector
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/evaluating the quality of your abap programs and other repository objects with the code inspector
    Best Regards,
    Anjali

  • Code Inspector Errors during Upgrade?

    Hi,
    We are moving from 4.7 to Netweaver 7 . During the upgrade we found there are errors using Code inspector, Please confirm me that whether errors coming thru Code inspector , whether we need to correct these?
    But the programs have no syntax errors, all programs compiled properly.
    Thanks
    Sa_R

    Hi,
    Its not required to resolve all of them, they will be arranges as Errors, Warnings etc.
    So try to resolve the Errors.
    Each error has how it can be solved some times they will give you options to hidethe rros by putting some comments on the perticular line.
    Regards,
    Sesh

  • Checking naming convention of internal tables in code inspector

    Can anyone please explain how in the code inspector can I check names of internal tables (like it_) that I use in a report program ? I know that I can specify it_ in Programming Convention -> Naming Convention->Program Global -> Data but this entry is not specific to internal tables as it also applies to variables and work areas. Apart from this is there any entry I can maintain in the Extended Naming Conventions for Programs(introduced in ECC 6.0)? Kindly reply at the earliest.

    Hi,
    Check these links for implementing the custom conventions in the code inspector
    https://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
    https://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
    hope it helps you.
    Thanks!

  • Code Inspector - Naming conventions &mExtended Naming conventions for Progs

    Hi experts,
    I had a look into the naming conventions enforced by 'DEFAULT' variant of code inspector (SCI).
    the relevant categories are: "Naming Conventions", and "Extended Naming conventions for Programs" under "Programing conventions".
    in the "Extended Naming conventions for Programs" category, for functions, (applicable while calling the functions) it says,
    importing parameter : I[:type:]_
    exporting parameter : E[:type:]_
    changing parameter  : C[:type:]_
    tables parameter    : T[:type:]_
    but in the "naming conventions" category, for functions (applicable while defining the functions), it says,
    importing parameter : P_*
    exporting parameter : P_*
    changing parameter  : P_*
    tables parameter    : P_*
    I felt, while defining the function too, its better to have beginning with  I_, E_, C_ or T_ instead of P_
    is the 'DEFAULT' variant of code inspector is provided and recommended by SAP?
    for easier maintenance and clearer understanding, which naming convention is more suitable, or is there any official guidelines released by SAP for ABAP developers.
    appreciate the opinions from experienced abap developers.
    thanks,
    Madhu_1980

    Frank,
    Thanks for your answer.
    But what about Entity Objects, View Objects, View Links, and Application Modules.
    I would like my developers to have an easy way to name them and also find them via intellisense.
    So I was thinking in naming them the following way :
    Entity Objects :
    EO_Employee
    EO_Department
    View Objects :
    VO_Employees
    VO_Departments
    View Links :
    VL_EmployeesToDepartments
    Application Module :
    AM_HRService
    However the use of "_" is not so "Java naming oriented".
    So other alternatives would be:
    1. take the "_" :
    1.1 EOEmployee (I don't like the fact of having 3 capital letters together).
    1.2 EoEmployee (I don't like the fact of having Entity Object with a lowercase "o").
    2. Use the prefix at the end, but this way I loose the intellisense feature I want:
    ex: EmployeeEO
    Which naming approach are you using for big projects ?
    Thanks,
    Claudio.

  • PO Naming Convention for specific company code

    Hi experts!
    Is there any way to know this PO naming convention is belongs to which company code?
    For eg: PO naming convention starts with 600*******.
    How will i know which company code is using the naming convention for their purchase order?
    Please help.
    Thanks.
    Crystal

    Hi Crystal,
    Naming convention is based on document type not company code :
    Refer the below customsing path:
    SPROMaterials ManagementPurchasingPurchase Order--Define Document Types
    SPROMaterials ManagementPurchasingPurchase Order--Define Number Ranges
    Regards
    Ramesh Ch

  • How to create new check for SELECT* , Naming conventions etc..

    Hi all,
       I would like have a solution for the below checks are possible or not in ABAP - CODE INSPECTOR. If possible can you please give me the solution..
    a). Performance checks i.e, SELECT* , LOOP without field strings, FOR ALL ENTRIES IN SELECT STATEMENT.
    b). Custom naming conventions.
    c). to check if further modularization can be done in the program,
    d). also the coding standards.
    PLEASE help me , i am struck with it for long time in getting the solution...

    > a). Performance checks i.e, SELECT* , LOOP without field strings, FOR ALL ENTRIES IN SELECT STATEMENT.
    > b). Custom naming conventions.
    > c). to check if further modularization can be done in the program,
    > d). also the coding standards.
    the code inspector allows the creation of new checks, you should consult the documentation how to do it.
    The main problem of the code inspector are hits, which are actually no problem. And I think this is a problem with your checks:
    + SELECT*  this is no performance problem, only in cases when the table is really wide then a field list makes sense, i.e your check
       will find a lot of false hits
    + LOOP without field strings  ... you mean fs =field symbols, same as with SELECT *
    + FOR ALL ENTRIES IN SELECT STATEMENT   ???? FOR ALL ENTRIES is fine
    + Custom naming conventions  ... hmmm be more precise, I think it can be hard
    + to check if further modularization can be done in the program,
        before you want to program can you please explain how you check manually .... I would be interested
    +  also the coding standards.   .... what is that?

  • 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

  • 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

  • SAP naming conventions: customer DDIC objects, ABAP programming

    SAP Note 16466 Customer name range for SAP objects contains the SAP naming conventions for customer DDIC objects. Rule of thumb is that the names reserved for customer objects start with 'Y' or 'Z'. However, this note contains the naming convention for DDIC objects only.
    ABAP Code Inspector (transaction SCI) contains the following naming convention for ABAP programming:
    - Global types: T_
    - Global constants: C_
    - Global data: gv_
    - Global field-symbols: FS_
    - Global parameters: P_
    - Global select-options: S_
    - Global field-groups: FS_
    - Local types: LT_
    - Local constants: LC_
    - Local data: v_
    - Local field-symbols: LFS_
    This is the only place I know for ABAP programming naming convention. Does SAP has somewhere else any additional naming convention guidelines for ABAP programming?
    Thanks in advance for your help.
    Regards,
    Jarmo Tuominen

    Naming convention guidelines for ABAP programming is available in here: [Manage Successful Customer Development|https://websmp206.sap-ag.de/~sapidb/011000358700004444532001E].
    Naming Data Types and Objects
    The names of data types and objects have the form: <Classifier>_<Data type>_<Descriptor>.
    The names of data types and objects have up to 30 characters.
    Exceptions: names of input parameters and select options have up to 8 characters, and <Data type> and _ are omitted.
    First component: Classifier
    T Data type
    C  Constant
    G  Global data object
    L  Local data object
    FS Field symbol
    P  Input parameter
    S  Select option
    P  Formal parameter in form
    FM Formal parameter in function
    Second component: Data Type
    <t> Elementary data type, optionally followed by length
    C<n> Type C of length <n>
    N<l> Type N of length <n>
    X<l> Type X of length <n>
    D    Type D
    T    Type T
    I    Type I
    P<d> Type P with <d> decimals
    F    Type F
    WA  Work area
    IT  Internal table
    Third component: Descriptor
    Use meaningful English names. Later, your code may be maintained or analyzed by a programmer or support consultant who is not familiar with another language.
    Use only alphanumeric characters (A-Z and 0-9) and separate words with underscores (_). Hyphens are reserved for separating components in structured data types.
    Examples:
    G_I_COUNTER (global counter)
    T_IT_BOOKING_LIST (type for list of bookings)
    G_IT_BOOKINGS (global internal table of bookings)
    PSMOKER (input parameter for smoker flag: note omission of data type and _ for brevity)
    Edited by: Jarmo Tuominen on Feb 21, 2011 2:13 PM

  • Code Inspector - DDIC objects

    Hi All,
      Is there any way in code inspector through which I could check the naming conventions for Tables, Data elements, Domains, Structures etc., according to project requirement( Not for FM, Reports Classes ).
    Any help is highly appreciated.
    Thanks & Regards,
    Venkat

    Goto SCI transaction and define a check variant which will examine your code for errors. In this variant you can specify the naming convention for your Local Variables, Global Variables etc. In the same variant you can define the Performance Checks like Loop within a loop, nested selects, security checks, programming conventions etc. Make the variant global so that everybody has access to it.
    2. Now you are ready to use this variant. Goto SCII --> Select Single --> Select an entry from the dropdown --> give the corresponding progam name/class name --> Give a variant name under Check Variant.
    3. Execute.
    4. It will show all the discrepancies in your code from where you can double click and goto the respective line of code and correct the error.
    Note that you can also use a STANDARD VARIANT.

  • Storage Location Naming Convention without WM!

    Dear all
    We are facing serious problem in our Storage Location for Raw Material.
    We have 4 types of Raw Material Seating (S), Panel (P), Metal (M), Wood (W). And they are all stored under Storage Location: RWSL.
    Requirement:
    Although we have visual guideline as to which industrial rack will store the type of Material, it is insufficient. We need a more refined storage location down to which BIN of the rack we will put the Raw Material.
    Due to limited time and resource, we cannot have WM implemented right now. Thus, we have come out with 2 alternative to overcome this problem:
    Alternative 01:
    We will use the Fixed Bin field in Storage Data 02 by putting the Bin number assigned to each Rack.
    E.g. For Seating material code:SEAT01, we will maintain the Fixed Bin as R12A01/A02, it means this Seating material SEAT01 will be stored at Rack 12, fixed bin A01 or A02.
    Question to Alternative 01: Will it cause problem in GR, GR, Transfer Posting and Stock Count?
    Alternative 02:
    Instead of going into details to put Fixed Bin field in Storage Data 2, we will abandan the existing Storage Location RMSL by introducing new format for Storage Location
    Here is the example of Alternative 02:
    For raw materials, we will use 4 digits location numbers, consistent with other Storage locations, the 4 digits storage location will start with u201CR _ _ _u201D to represent each location
    And,
    R _ _ _ is:
    R = Raw materials
    2nd digit = Division (S= Seating, P =Panel, W=Wood, M=Metal and W=Wood)
    3rd digit = Rack Number (A, B, C, Du2026 and etc.)
    4th digit = Rack Zone - each rack will broken down into zone, each rack can possibility have 2 to 3 zone. 1 Zone can be 1 colume of the Rack
    An example of a possible location and its meaning will be
    RSA1 = Raw materials warehouse, Seating division, Rack A, Zone 1
    RPB3 = Raw materials warehouse, Panel Division, Rack B, Zone 3
    The challenge of this is that instead of having 1 Raw Material Storage Location like RMSL, we will have a lot more storage locations each for division of Raw material due to the Rack Number we have as well as the Rack Zone.
    Question to Alternative 02:
    If we use this alternative, will it impact our future implementation of WM? From design wise, is it feasible?
    Please advise what is the best approach and the feasible design on it.
    Many thanks in advance.
    Edited by: Daimos on May 13, 2009 10:15 AM

    Hi, here is the Pro and Co of both approaches:
    Method 01: Use existing SLOC and add the Storage Bin info
    e.g. SLOC: STM1
             Storage Bin: RSC3, where RS = Rack Seating, C3 = column 3
    Pro 01:
    It will cause less effort as we only need to use LSMW for material master to add in the Storage Bin data for all material of SCM.
    Pro 02:
    I have tested out that in TCode MIGO, apart from SLOC, the pertaining Storage Bin data also appear.  Based on my discuss with Xian Chen, sometimes they use MB1C(GR), MB1A(GI) rather than MIGO due to speed issue, I will need to check the field status if can have Storage Bin field APPEAR, if can, it will solve the problem
    Con 01:
    The Storage Bin information will only appear in MMBE (Stock Overview) but will not appear in the standard SAP Inventory Report (e.g. MB52 Warehouse Stock). To view it from SAP Inventory Report, we may need to customize the standard report to show the new field Storage Bin. It needs Abap effort.
    Con 02:
    We must have a very good naming convention for Storage Bin. And again, in the above example, if a material is put in SLOC STM1 at Storage Bin RA A1 or C4, it will set a very rigid rule in the future if we need to change it, as I fear that one the Storage Bin has been used up. It will not allow us to change (need to do testing to find out)
    Con 03:
    Do we have the time to define all the Storage Bin for each SLOC? Operation wise, the store personnel needs to design it
    Method 02: Use the new SLOC
    Pro 01:
    RSA1 = Raw materials warehouse, Seating division, Rack A, Zone 1. More organized. Easy to tell the material is at which  Rack and which Zone of the Rack.
    Assumption:
    01. we must not have too many rack for one Seating division and also not too many Zone for each
          Division, else it will cause confusion
    02. 1 material should stick to 1 Rack 1 zone as much as possible, else later the PP consultant will 
         have hard to to perform GI due to too many SLOC assigned to a material.
    Pro 02:
    In report wise, we are able to show the SLOC in inventory report. No need to enhance the existing inventory report as we do not use Storage Bin.
    Con 01:
    If there are too many SLOC creation due to it. It may cause problem for PP perform GI as too many selection available for a material. This can be avoided if stick to the General Rule that one material is tied with one SLOC.
    Edited by: Daimos on May 16, 2009 5:07 AM

  • .tpz files naming convention / export from PI 7.0

    Hi,
    When I export the repository or Directory content from PI 7.0 the naming convention PI gives its own naming convention. Starting wit XI3_0 * .tpz
    Why does it start with XI3_0*.tpz for we have PI 7.0?
    Do we need to change any Visual admin or exchange profile parameter to get the naming convention to PI7_0*.tpz
    Thanks
    Sachin

    Hi,
    The import and export functionality of XI 7.0 uses the expression 'XI 3.0' instead of 'XI 7.0' in all transport screens of the Integration Builder. Furthermore the name of XI 7.0 exports will always start with the prefix 'XI_3_0' and not 'XI_7_0'.
    <b>Reason and Prerequisites</b>
    The reason for this behaviour is that the transport code and format of XI 7.0 and XI 3.0 is identical.
    <b>Solution</b>
    There is no fix for the naming convention, but there is a positive consequence: XI 3.0 export files can be produced by XI 3.0 and XI 7.0 and can be imported into XI 3.0 and XI 7.0.
    Refrence Note
    Note 936254 - XI 3.0 Imports and Export in XI 7.0
    Award points if helpful.
    Thanks,
    Tanuj

  • Output CSV File Naming Convention - Receiver File Adapter

    Dear SAP experts,
    I need help regarding my scenario.
    My scenario is this, Customer will send EDI message to XI. XI will then translate the message and convert it into XML.. After, a Receiver File Adapter will receive the XML then convert it into .csv file.
    I've already configured the Receiver File Adapter to convert the XML into .csv file.
    But, my problem now is how will I configure to have my output .csv file has a File Naming Convention.
    The output .csv file must be "CustomerName_YearMonthDate".
    From the EDI message, there is indicated Sender GLN in which, each customer has its own Sender GLN.
    E.g., Globus --> 200, Karstadt --> 300,  Metro --> 400.
    How will I configure so that I can have an output .csv file of,
    If Globus sends the EDI message, the output .csv file is Globus_20080304.csv.
    If Karstadt, Karstadt_20080304.csv.
    If Metro, Metro_20080304.csv.
    Kindly advise for a clear and complete solution.
    Thank you very much for your usual support.
    Fred

    Hi Nisar,
    My target message (XML) in the mapping is this,
    - <ns0:CSV>
        -  <SLI>
               <PERIO> </PERIO>
               <ILN> </ILN?
               <EAN> </EAN>
    perio, iln, and ean was rooted on SLI field. and the CSV is the rootnode of the target message.
    I have created a UDF on the message mapping to accomodate the output customer name, here is the codes:
    String fname="";
    if(GLN.equals("23456"))
    fname ="Globus" +dat;
    else if(GLN.equals("5678"))
    fname ="Karstadt"+dat;
    else if(GLN.equals("6789"))
    fname ="Metro"+dat;
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        "http://sap.com/xi/XI/System/File",
        "FileName");
        conf.put(key,fname );
    E.g.,
    Globus --> 23456 (Sender GLN)
    Karstadt --> 5678 (Sender GLN)
    Metro --> 6789 (Sender GLN)
    This UDF i've made in the Message Mapping was mapped in the root node CSV.
    Is this UDF correct?
    Then on the File Receiver Configurations, here are the configs,
    Transport Protocol: File System (NFS)
    Message Protocol: File Content Conversion
    Adapter Engine: Integration Server
    File Access Parameters
    Target Directory: /var/opt/gsss/sample/csv
    File Name Scheme: .csv
    Processing Parameters
    File Construction Mode: Create
    - Overwrite Existing File
    Write Mode: Directly
    File Type: Text
    Variable Substitution --> ???
    Adapter Specific Message Attributes
    - Use Adapter-Specific Message Attributes
    - Fail if Adapter-Specific Message Attributes Missing
    - File Name
    Run Operating System Command After Message Processing
    Command Line: chmod 664%F
    Content Conversion Parameters
    Recordset Structure: SLI
    SLI.addHeaderLine: 3
    SLI.headerLine: PERIO;ILN;EAN
    SLI.fieldSeparator: ;
    SLI.endSeparator: 'nl'
    Adapter Status:
    Status: Active
    Kindly advise if my configs are correct.
    Thank you very much!
    Fred

Maybe you are looking for