Extended program check and code inspector
Hi Gurus,
I developed on report . I wrote at end of and at new in loop but extended code checking it showing one error is:
1)The LOOP statement processing will be limited
(FROM, TO and WHERE additions in LOOP)
Interaction with group change processing (AT NEW, ...) is undefined
(The message can be hidden with "#EC *)
2)The LOOP statement processing will be limited
(FROM, TO and WHERE additions in LOOP)
Interaction with group change processing (AT NEW, ...) is
(The message can be hidden with "#EC *)
and I wrote select statement for input validation extended check showing warning as:
Syntax check warning
This warning is only displayed in SLIN
In "SELECT SINGLE ...", the WHERE condition for the
test for equality. Therefore, the single record in q
Internal Message Code: MESSAGE GSB
(The message can be hidden with "#EC *)
I want to remove those warnings and errors please can any body help me.
Regards,
Shashikumar.G
Hi Sashi,
1) The LOOP statement error is coming because, you must have used LOOP AT itab WHERE ... something like this.. this means that you are limiting theh records processed in the LOOP. Under this case you can not use AT events..
To use AT events, fill another internal table with the records that you want to process and use AT event in loop at that table..
2) You have used SELECT SINGLE in your code, but the select query does not have the full primary key in the WHERE condition.. it is mandatory to define complete primary key value so that the system will get only single record...
To remove this error, instead of SELECT SINGLE, use SELECT..UP TO 1 ROWS..
Let the query be as it is.. only remove SINGLE keyword and put UP TO 1 ROWS after the FROM clause and Before WHERE clause...
Thanks and Best Regards,
Vikas Bittera.
Similar Messages
-
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 -
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 -
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 -
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 -
Hi ,
I'm getting errors(Obsolete statements) when checking for extended program check for a report program.
When I'm going for "UCCHECK" i'm not getting any errors & in code inspector also it is not showing the errors.
Here what is the reason for this?why it showing error in one transaction & not showing the same in other transaction..
Here I'm pasting the code..
REPORT ZHCM_OBSOLETE.
infotypes : 0000.
DATA: BEGIN OF itab1 OCCURS 0,
col1 TYPE i,
col2 TYPE i,
col3 TYPE string,
END OF itab1 VALID BETWEEN col1 AND col2.
DATA: BEGIN OF itab2 OCCURS 0,
col1 TYPE i,
col2 TYPE i,
col3 TYPE string,
END OF itab2 VALID BETWEEN col1 AND col2.
itab1-col1 = 1.
itab1-col2 = 6.
itab1-col3 = 'Itab1 Int1'.
APPEND itab1 TO itab1.
itab1-col1 = 9.
itab1-col2 = 12.
itab1-col3 = 'Itab1 Int2'.
APPEND itab1 TO itab1.
itab2-col1 = 4.
itab2-col2 = 11.
itab2-col3 = 'Itab2 Int1'.
APPEND itab2 TO itab2.
provide col3 FROM itab1
col3 FROM itab2
BETWEEN 2 AND 14.
WRITE: / itab1-col1.
* \, itab1-col2, itab1-col3, itab1_valid.
WRITE: / itab2-col1.
* , itab2-col2, itab2-col3, itab2_valid.
SKIP.
ENDPROVIDE.
Thanks in advance..
Pradeepa
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:22 PMHi,
You are probably getting obsolete statements on the declaration of internal tables. Avoid using begin of itab occurs 0, this statement is not used as it automatically creates a header line. Use types statement to define a type and then use it to create an internal table and workarea, this will remove the obsolete statements in extended program check.
types : begin of t_itab,
col1 type i,
col2 type i,
col3 type string,
end of t_itab.
data itab type table of t_itab
data wa_type t_itab.
Use these to populate your internal table.
begin of itab occurs 0 was a statement which was used in prior versions (<4.0) and now are considered obsolete, but still functional due to backward compatibility.
Hope this helps you.
Regards,
Sachin Dargan.
Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:22 PM -
Extended Program Check - Multiple Programs
Hi All,
I am looking for a program or utility, where I would be able to do EXTENDED PROGRAM CHECK with multiple programs at the same time.
Let me know if anybody has come across the same.
Thanks,
Mayankwell there is a way..
code inspector
goto SCI,
create a object, include all the programs you want to check.
now create an inspection, in SCI or SCII, give this object you have created and execute with SAP default check variant. -
Help me with extended program check
what is extended program check?
in one of my program im getting an warning message
field string x_sort is not statically referenced in the program
what does it mean by statically referenced?Extended Syntax Check -
Many checks are excluded from the standard syntax check for performance reasons. The extended program check performs a complete check that includes the interfaces of external procedures called from your program.
Errors in the extended program check cause exceptions, which in turn cause runtime errors when you run the program. You must correct them. The exception to this is coding that cannot be reached. However, you should delete this to minimize the size of your program and make the source code easier to understand.
Warnings in the extended program check should also be corrected. If your program contains statements that are definitely correct but still produce warnings in the extended program check, you can exclude them from the check using pseudocomments ( "#EC ).
You should always run the extended program check on a new program. You have not finished developing a new program until you can run the extended program check on it without any errors or warnings. Messages are permissible, since they are generally not critical.
The extended program check is also only a static check. It cannot eliminate all of the circumstances that could lead to exception situations or runtime errors. For example, any statements in which you specify arguments dynamically as the contents of fields, or in which you call procedures dynamically, cannot be checked statically.
Code Inspector -
The Code Inspector is a tool for checking Repository objects regarding performance, security, syntax, and adherence to name conventions.
Please have a look at below link for details of code inspector.
[Code Inspector|http://help.sap.com/saphelp_nw04/helpdata/en/56/fd3b87d203064aa925256ff88d931b/frameset.htm]
I hope it helps.
Thanks,
Vibha
Please mark useful answers -
Extended Program check for internal table
TYPES:BEGIN OF TY_FINAL,
VBELN TYPE VBAP-VBELN,
VBELV TYPE VBAP-VBELV,
POSNV TYPE VBAP-POSNV,
WERKS TYPE VBAP-WERKS,
ZZ_MODEL_NO TYPE VBAP-ZZ_MODEL_NO,
VKORG TYPE VBAK-VKORG,
TEXT(70) TYPE C,
END OF TY_FINAL.
Declaration of Variables *
DATA: IT_VBAK TYPE STANDARD TABLE OF TY_VBAK ,
IT_VBAP TYPE STANDARD TABLE OF TY_VBAP ,
IT_FINAL TYPE STANDARD TABLE OF TY_FINAL WITH HEADER LINE.
DATA: W_VBAK TYPE TY_VBAK ,
W_VBAP TYPE TY_VBAP ,
W_FINAL TYPE TY_FINAL ,
W_LAYOUT TYPE SLIS_LAYOUT_ALV ,
W_VARIANT_SAVE TYPE C ,
W_REPID TYPE SY-REPID .
In the above code i have declared IT_FINAL TYPE STANDARD TABLE OF TY_FINAL WITH HEADER LINE. in extended program check iam getting error as( Tables with headers are no longer supported in the OO context.
can any one plz suggest me to avoid this error.
Thanks in Advance.
Moderator message - Duplicate post locked
Edited by: Rob Burbank on May 19, 2009 9:12 AMHi,
DATA: IT_VBAK TYPE STANDARD TABLE OF TY_VBAK ,
IT_VBAP TYPE STANDARD TABLE OF TY_VBAP ,
" If you declare the internal table with header line in OO context it wll give you error. As OO wil not
" support the header line concept. Declare Internal table without header line and create the work area
" for the internal table
IT_FINAL TYPE STANDARD TABLE OF TY_FINAL. " WITH HEADER LINE.
DATA: W_VBAK TYPE TY_VBAK ,
W_VBAP TYPE TY_VBAP ,
W_FINAL TYPE TY_FINAL , " Use this work area
W_LAYOUT TYPE SLIS_LAYOUT_ALV ,
W_VARIANT_SAVE TYPE C ,
W_REPID TYPE SY-REPID -
Extended program check ( sapslin prog)
Hi,
i have one requirement, in extended program check for checking the text elements,(chracter -strings).
There is a sap standard programavailabel. ( Code slin,function pool sapslin) , if i am checking EPC for my z program ,the sapling is not comparing the text elements and text literals character by character,It is checking whether the text element is created or not.(for example if i created a text literal as "cat" and for that if i created text element as "ca". ) then also the EPC (sapslin) is not identifying that error.
please guide me with the proper code.REPORT ZTEXT_ELEMENTS_CHECK .
include <icon>.
PARAMETERS : P_TEXT(40) TYPE C.
TYPES : BEGIN OF TY_RESULT,
id type c,
key(3) type c,
ENTRY TYPE STRING,
STATUS TYPE C,
END OF TY_RESULT.
DATA : LEN TYPE I,
POS TYPE I,
ACTLEN TYPE I,
COMPLEN TYPE I,
count type i,
STR TYPE STRING.
DATA : BEGIN OF TY_PROG.
INCLUDE STRUCTURE ABAPTEXT.
DATA : END OF TY_PROG.
data : i_data type table of abaptext with header line.
DATA : I_PROGRAM TYPE TABLE OF ABAPTEXT WITH HEADER LINE.
DATA : I_TEXTELEMENT TYPE TABLE OF TEXTPOOL WITH HEADER LINE.
DATA : I_RESULT TYPE TABLE OF TY_RESULT WITH HEADER LINE.
READ REPORT P_TEXT INTO I_data.
READ TEXTPOOL P_TEXT INTO I_TEXTELEMENT LANGUAGE SY-LANGU.
break-point.
loop at i_data.
if I_data-LINE cp '00'.
i_program-line = i_data-line.
append i_program.
endif.
endloop.
LOOP AT I_TEXTELEMENT.
LOOP AT I_PROGRAM.
SEARCH I_PROGRAM-LINE FOR I_TEXTELEMENT-ENTRY.
IF SY-SUBRC EQ 0.
LEN = STRLEN( I_TEXTELEMENT-ENTRY ) + 1.
POS = SY-FDPOS.
STR = I_PROGRAM+POS(LEN).
SHIFT STR RIGHT DELETING TRAILING ''''.
CONDENSE STR NO-GAPS.
ACTLEN = STRLEN( I_TEXTELEMENT-ENTRY ).
COMPLEN = STRLEN( STR ).
IF ACTLEN = COMPLEN.
I_RESULT-ENTRY = I_TEXTELEMENT-ENTRY.
I_RESULT-STATUS = 'T'.
APPEND I_RESULT.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
loop at i_result.
loop at i_textelement where entry = i_result-entry or id = ''.
i_result-id = i_textelement-id.
i_result-key = i_textelement-key.
modify i_result from i_result.
endloop.
endloop.
loop at i_textelement where id = 'I'.
clear count.
loop at i_result where key = i_textelement-key.
count = 1.
endloop.
if count = 0.
i_result-id = i_textelement-id.
i_result-key = i_textelement-key.
i_result-entry = i_textelement-entry.
i_result-status = 'F'.
append i_result.
endif.
endloop.
LOOP AT I_RESULT.
if i_result-status = 'F'.
WRITE : /3 I_RESULT-id, 15 I_RESULT-key,
30 I_RESULT-ENTRY, 40 I_RESULT-STATUS,ICON_INCOMPLETE AS ICON
endif.
ENDLOOP.
Hope it is useful.
Please reward. -
Error at new statement on extended program check need help
Hi all ,
This is the code :
LOOP AT i_stocks INTO wa_stocks WHERE NOT pulkt IS INITIAL AND
NOT bstkt IS INITIAL AND
NOT fprctr IS INITIAL AND
( write_off_fix <> 0 OR
write_off_pup <> 0 ).
AT NEW fprctr.
CLEAR: l_prctrsum_fix, l_prctrsum_pup.
ENDAT.
IF wa_stocks-bukrs <> lastbukrs.
lastbukrs = wa_stocks-bukrs.
PERFORM document_header USING xreversal.
i_counter = 1.
CLEAR lastkostl.
ENDIF.
ADD wa_stocks-write_off_pup TO l_prctrsum_pup.
ENDLOOP
On Extended program check its says :
The LOOP statement processing will be limited
(FROM, TO and WHERE additions in LOOP)
Interaction with group change processing (AT NEW, ...) is undefined
(The message can be hidden with "#EC *)
It means at statement AT NEW fprctr .
Need help , How can i resolve this error ?
Regards .
Edited by: ujjwal dharmak on Feb 19, 2010 9:55 AM
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on Feb 19, 2010 9:04 AMSince you are using where condition in loop statement and also using the control break statement thats why it is showing the error for you.
So if you want you can do like this
loop at itab into wa.
if not wa-f1 is initial ....<and other conditions>.
continue.
endif.
at new f1.
endat.
endloop.
It will resolve your problem but I am having the doubt how the at new will work properly...
Regards
Shiba Prasad Dutta -
Error while Extended Program Check
Dear All,
When I m cheking Extended Program Check for my program i m getting following warning error how can i clear it.
Not all supported date formats are handled
Check use of a generic service method or handle all formats
Regards
Balamurugan NHello,
Please check which date format is causing the Problem in your code and Try to use Standard function Modules like
CONVERT_DATE_FORMAT etc which suffice your Problem and later do check Extended Program check.
Please let us know, if you resolve by other ways.
Thanks ,
Sudheer. -
Extended program check - The program ZZZ does not exist as a main program
Program ZZZ is the Include program of program AAA. I dont understand this error on Extended program check."The program ZZZ does not exist as a main program"
why are you runnign Code inspector the include program.You shoudl check only your main programs
-
Problem in Extended Program Check..
Hi Experts,
after finishing my report i am doing syntax check and Extended Program Check( E P C )
in EPC it displays some Errors , warnings and messages.
how to rectify those issues.
i ve a one error like below.
Program: ZBSR_PS_ROJ Row: 632 [Prio 3]
Use addition CURRENCY when outputting WA_OUTPUT-PLANNED_COST
Use auxiliary field when outputting with MESSAGE
(The message can be hidden with "#EC UOM_IN_MES)
how to rectify this.
Rgds,
sudeer.hi sudeer,
in ur case u can do that in 2ways like:
at the end of the write statement u can mention the CURRENCY type. like
WRITE:/10 wa_output-planned_cost CURRENCY 'USD'.
(or)
while checking Extending Program Check, it will mention some code like " #EC for warnings or " #EC UOM_IN_MES for errors
WRITE:/10 wa_output-planned_cost. "#EC UOM_IN_MES
so u can go for 2nd one its better.
thanks,
sudharsan. -
Extended Program check getting this error
LOOP AT LT_LINES.
CONCATENATE IT_FINAL-TEXT LT_LINES-TDLINE INTO W_FINAL-TEXT SEPARATED BY SPACE.
ENDLOOP.
APPEND W_FINAL TO IT_FINAL.
CLEAR W_FINAL.
In extended program check iam getting the error as : At "LOOP AT itab" one of the additions "INTO", "ASSIGNING" or "TRANSPORTING NO
FIELDS" is required in the OO context . .can any one suggest me to avoid this error
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on May 19, 2009 9:06 AMHi,
Since header line concept has become obsolete now a days using the concepts of header lines will give an EPC error. something like the one which you have got. this is one of the concept of header line.
So it is better to create a work area of the table which you have declared and then in loop at lt_lines use the addition into work_area, something similar to the code below.....
data : fs_work_area like line of lt_lines.
LOOP AT LT_LINES INTO fs_work_area.
CONCATENATE IT_FINAL-TEXT fs_work_area-TDLINE INTO W_FINAL-TEXT SEPARATED BY SPACE.
ENDLOOP.
in the code whereever you uare using lt_lines as a work area just change it with fs_work_area only for work area purpose....
Regards,
Siddarth
Maybe you are looking for
-
I've asked a similar question to this on an Office Community Forum but nobody knows the answer. So I was hoping that an IT professional responsible for installing and deploying Office 2013 might know. If you download an installation disk image (ISO/
-
How do I produce an excel file using java code
How do i produce an excel file using java code. If it is possible would ne one have ne source code as an example. I have tried looking up information on outputing the information to a *.csv file but unfortunality i have had no luck in finding any inf
-
LR 3.6 Export to Photoshop CS5 - Images have massive problems.
Windows 7 x64 Lightroom 3.6 Photoshop CS5 When I use the Export to Photoshop feature (or if I export to PSD or export to TIFF and then open in Photoshop), the images look like this: When the original in Lighroom looks like this: If I zoom in to 100%
-
Scrowing with touchpad not working when pdf file is opened in one of the the browsers tabs
When I have a .pdf open from one of the browser's tabs I am not able to scroll with my touch pad in the rest of the browser's tabs. Once I close the tab with the pdf everything is working fine. I using Firefox on my Toshiba Satellite Pro laptop.
-
Procedure with IN and OUT date parameters
Hello Guys, could you please tell me where i am doing wrong, i want to get or return the date from the below procedure. It is throwing below error when i try to execute it, appreciate your help. Execute Statement: exec get_nxt_trd_dt('09/03/2010') Er