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
Similar Messages
-
Hi All,
I am trying to do the check to my program i.e CODE INSPECTOR. i am seeing the following warning messages below.
1 warning message
Program zraj0xxx include zraj0xxx row 000083 Column0000
%LINR-VBUP contains a hyphen
(The Hyphen is used as a dereferencing operator! )
Note: when i double click on the above message its taking me to the below code of my program.
DATA %COUNT-VBUP(4) TYPE X.
DATA %LINR-VBUP(2).
TABLES VBPA.
DATA %COUNT-VBPA(4) TYPE X.
DATA %LINR-VBPA(2).
2 warning message
Program zraj0xxx include zraj0xxx row 000079 Column0000
Field string VLPMA is not referenced statically in the program
Note: when i double click on the above message its taking me to the below code of my program.
SELECTION-SCREEN: BEGIN OF BLOCK PROG
WITH FRAME TITLE TEXT-F58.
TABLES: VLPMA,
VLKPA.
TABLES VBUP.
3 warning message
Program zraj0xxx include zraj0xxx row 000001 Column0000
TEXT- GOH from the text pool is not used.
Note: when i double click on the above message its taking me to the below code of my program.
REPORT ZHYD0147 LINE-SIZE 255 NO STANDARD PAGE HEADING
MESSAGE-ID ZB
LINE-COUNT 065(001).
Thanks in advance.
Rajesh.Hi Rajesh,
First warning message.
DATA %COUNT-VBUP(4) TYPE X.
DATA %LINR-VBUP(2).
TABLES VBPA.
DATA %COUNT-VBPA(4) TYPE X.
DATA %LINR-VBPA(2).
Here you are not supposed to use hyphen but instead use '_'.
Second warning message
Program zraj0xxx include zraj0xxx row 000079 Column0000
Field string VLPMA is not referenced statically in the program
That means you are not using this VLPMA any where in your program so bettr delete fromt he Top Include.
Note: when i double click on the above message its taking me to the below code of my program.
Third warning message
Program zraj0xxx include zraj0xxx row 000001 Column0000
TEXT- GOH from the text pool is not used.
this also means that you are not using this Text elemnt anywhere of your program.So delete this one also.
Thanks
Rohini. -
Customizing the code inspector with check for two executable statements in same line
Hi Everyone,
I have a reuirement to customize the code inspector.I need to create a check 'Two executable statements should not be in the same line'.
While doing so i am facing one problem as in internal table it is capturing the report as word by word with same row number nd different line number.
If anyone have worked on this before then help me out.
I am using CL_CI_TEST_SCAN as superclass and making the changes in the run method.
Regards,
KhushbooIn the source code you will have this in comment right, use the "#EC ENHOK.
-
Select query gives error in Code inspector and extended program check
Hi,
I have a query .
SELECT pernr
FROM pa9100
INTO TABLE t_nca_tab
WHERE endda EQ c_date AND
z_nca_required EQ c_yes.
This query gives me an error in Code inspector like :
Large table pa0001: No first field of table index in WHERE condition
I have one more query that gives error in extended program check
SELECT SINGLE stell ename
INTO (g_stell, g_name)
FROM pa0001
WHERE pernr EQ wa_nca_tab-pernr AND
endda EQ c_date.
The warning says:
*In "SELECT SINGLE ...", the WHERE condition for the key field "SEQNR" does not
test for equality. Therefore, the single record in question may not be unique.*
Its too urgent.
Please reply.
Regards,
Binay.The first field is PERNR .. so if UR not giving pernr it will fetch
all the data from the said table and between the given dates ..
Check if this is your requirement ...
write the select as ...
where r_pernr is a range ...
SELECT pernr
FROM pa9100
INTO TABLE t_nca_tab
WHERE pernr in r_pernr <----
endda EQ c_date AND
z_nca_required EQ c_yes.
As UR using select single it's expecting to use all the key
fields in the where condition ...
U can ignore this warning message -
Execute ABAP Code Inspector from Outside of SAP
Hi all...
For reporting purpose, I would like to use ABAP Code Inspector (transaction SCI) for generating output as a file, it should call from outside of SAP through RFC function module and generate the list (output) as flat file (or XML), does anyone have been done with similar work like this? I wonder if you could share your experience with me...
thanks in advance,
yayan irianto.I managed to set up the variant, however found a problem.
I used "Search ABAP Statement Patterns" under "Search Functs" and set the pattern like followings.
SELECT + INTO *
SELECT SINGLE + INTO *
However following statements were detected.
SELECT * INTO TABLE IT_DRAW FROM DRAW.
SELECT MANDT INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE * INTO TABLE IT_DRAW FROM DRAW.
SELECT SINGLE MANDT INTO TABLE IT_DRAW FROM DRAW.
It's because + means one ABAP token in the code inspector.
Is there anyway to find only "SELECT SINGLE *" and "SELECT *" ? -
Hi Abapers,
I have done recording for Tcode:pa30 in my report and used call transaction method. because of this i'm getting one error in when i check code inspector.
error message:
CA CL_CI_TEST_CRITICAL_STATEMENTS0002
Critical Statements
Call of Transaction &1
&1 = Name of Transaction
For CALL TRANSACTION there must already be a suitable transaction authorization with the calling transaction.
Kindly help me out to fix this error.
Thanks in advance.Hi
Goto SE24
enter this class CL_CI_TEST_CRITICAL_STATEMENTS
and see its documentation.
It shows the all critical errors that are there in code.
Regards
Anji -
How to exclude the standard Include programs in Code Inspector?
I am running code inspector (SCi) on all the development objects using a package. But in certain repository objects standard include programs have been used. I want to exclude the standard include programs while running SCI on the package. What are the ways to achieve this?
Hi,
while defining an object set choose:(in the menu)
Edit - Exclude View Maintenance Function Groups.
This should exclude most or at least some of the includes from being checked.
Kind regards,
Hermann -
Hi All,
I am doing Code Inspector Check for my Program.
Doing this, I am getting an Error Message Indicating to use TYPE TABLE OF instead of OCCURS 0 statement while declaring Internal Tables.
Question is, Is there any difference between TYPE TABLE OF and OCCURS 0 (Performance wise) ?
Helpful answers will be rewarder by points.
Thanks & Regards
Swatantra PathakHI,
Yes.
OCCURS 0 is obsolete now.
When we define internal table with OCCURS 0 it will allocate a default memory of 8KB. In TYPE TABLE/STANDARD TABLE OF it is dynamic i.e as and when we get a record memory will be allocated.
eg: If ur itab is with OCCURS 0 and u have data of size 2kb then 6KB memory is wasted i.e allocated and not used.
eg2: If ur itab is with OCCURS 0 , Each record accupies 1 KB. Then after filling 8 records and at the time of getting 9 th records another 8KB is allocated. If u have 9 records in ur table then 7KB is wasted.
If u r getting allocated with some memory(Resource) and not using means performancewise it is bad.
Hope above examples are clear.
Thanks,
Vinod. -
Differences between SLIN and Code Inspector
Hi,
Can anyone tell me the differences between SLIN and Code Inspector(SCI)..?
and in which cases we use SLIN and SCI..?
and as an ABAPer, which one should we prefer..?
Thanks,
Pradeep.Hi
Extended syntax check or SLIN is used to check the program in all aspects for the different syntaxes like
When you use select single whether you have passed all the key fields or not>
whether you have maintained the text elements texts or not,
Have you used UNIT...CURRENCY along with the QTY and AMOUNT fields when displayed using the WRITE statement
and check for all the varities of statements used in the code, and if there is some problem with that statement/command, it will display as error or warning.
Check following links -
slin
can any one tell me abt SLIN T-CODE
Reward points if useful
Regards
Anji -
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.
SylvainHi 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 remove Unicode errors from extended check and code inspector
Hi
We are working on making all our ABAP program to make unicode compliant. We are activating unicode flag in attribute and correcting syntax errors. After this when we do the extended checks or SLIN or code inspector, usually giving error for many statements such as whenever there is message.
<b>Code is :</b>message a208 with text-004.
<b>Error description is</b> :
The message 208 for id zz has no long text.
You can hide this message using "#EC *
208 is - & does not exist in & &. And text 004 is - Cannot open the output file
By using #EC * we can remove errors. But Is this the correct way and what does this indicate? Please explain.Hi Yogesh,
Can you check whether the message number 208 in message id ZZ has the Self Explanatory checkbox as checked or not? I think it is not checked and u have also not maintained any long text. Hence the error.
By using #EC - you do not remove the error, however u hide it from SLIN.
It is used if there is some known error you cannot avoid which is returned by SLIN and you dont want it to be reported. Also, a way to "cheat" the reviewer who might be checking for errors.
Not good !!
Regards,
Aditya -
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 / 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.
SharIn the source code you will have this in comment right, use the "#EC ENHOK.
-
Code Inspector and Extended program check in one program
Hello SAP gurus,
We have a requirement where we need to create one tool which will have both code inspector and extended program check functionality and report should display all error, warning messages which are found from these checks.
Can anyone provide some suggestions on this?
Thanks,
Khushboo DandHi,
Go to Se38 and check how code inpsector and extended syntax check. I dont remember the exact function module name but just debug a little u will be able to find it.
Nabheet -
Check code inspector results after release
Hello experts,
I introduced the Code Inspector upon release of a workbench transport request.
All transport requests are released by developers, but the team lead sometimes wants to very the result afterwards.
Is there a way to get the code inspector results after a few days after the release?
Thanks a lot.
DimitriDear Dimitri,
You can test released transport via SCII just as you can test unreleased transports.
Go to SCII, check 'Request/Task' and give the name of the released transport in the Object Selection tab and press F8 or the execute button.
I know that this is long after you asked the question but perhaps somebody here can use the information.
Regards,
Hans
Maybe you are looking for
-
IMovie Sound cutting after exporting.......
Hello, So I BEEN REALLY STRESS OUT ABOUT IMOVIE.. I FILM WEDDINGS AND SWEET 16 PARTIES SO I BEEN EDITING ON IMOVIE CASUE ITS BEEN REALLY EASY FOR ME JUST DROPING SOUNDTRACKS AND TITLES VERY QUICK... THE PROBLEM THAT I BEEN HAVING LATELY IS WHEN I EXP
-
How to change log level in log4j at runtime
Hi, I have a small requirement where the default log level is info, but if the user wants to invoke the Java program with debug level, the Debug should start off. I am trying to achieve this using this code.. Logger root = Logger.getRootLog
-
Missing "Identity" Field from Get-MailboxCalendarConfiguration
I've been migrating users from 2007 over to a new Exchange server. For some reason, on the new server the delegates aren't working correctly. Delegates do not get any notifications for meetings, etc. Trying to work this out, I've compared to the fi
-
Options for HTML to PDF conversion
I need to convert HTML to PDF from a custom command line app. I see that Acrobat XI does a good job of converting HTML files to PDF but I can't seem to find the SDK. I do see the Acrobat X SDK but I'm not sure if it has the capability I need. Can a
-
Enemy Territory Quake Wars won't run because of video card/driver
I have installed Enemy Territory Quake Wars to my Tecra A9-51U and when it trys to load it comes up with the message: "The current video card / driver combination does not support the necessary features: GL_ARB_texture_rectangle or GL_EXT_texture_rec