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
Similar Messages
-
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 -
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 -
Can we replace this SELECT query by more efficient code
can we replace this SELECT query by more efficient code ?:-
SELECT * FROM zv7_custord
INTO TABLE G_T_ZV7_CUSTORD
WHERE ( SENDER in S_SENDER and
ORDNUM in S_ORDER and
ZDATE in S_DATE ) OR
( SENDER in S_SENDER AND
STATUS = SPACE )
ORDER BY IDOCNUM.Hi
U can leave ORDER BY option and sort the table by yourself and try to split the query:
SELECT * FROM zv7_custord
INTO TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
ORDNUM in S_ORDER and
ZDATE in S_DATE .
SELECT * FROM zv7_custord
APPENDING TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
NOT ORDNUM in S_ORDER and
NOT ZDATE in S_DATE and
STATUS = SPACE
or
SELECT * FROM zv7_custord
INTO TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
ORDNUM in S_ORDER and
ZDATE in S_DATE .
SELECT * FROM zv7_custord
APPENDING TABLE G_T_ZV7_CUSTORD
WHERE SENDER in S_SENDER and
STATUS = SPACE.
* Sort the table key fields
SORT G_T_ZV7_CUSTORD BY <KEY1> <KEY2> .....
DELETE ADJACENT DUPLICATES FROM G_T_ZV7_CUSTORD COMPARING <KEY1> .....
Max -
Error in Code Inspector-while checking syntax in TR
Hi,
I am getting a error in code inspector:
Table 'Table_name' sub-object type TABL sub-object name 'table_name'
Buffering type is initial but delivery class is "C".
How to avoid this?
Thanks.Please check the" technical setting" of the table mentioned using SE11 and make it "fully buffered"
a® -
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 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 -
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 error for cl_salv_table= factory
hi all,
when performing Extended Program check, I am getting some warning message
code
DATA: lc_msg TYPE REF TO cx_salv_msg.
*. Create Instance for ALV
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = ts_z3rl_docket.
CATCH cx_salv_msg INTO lc_msg .
ENDTRY.
Error message;
No Exception Handling After the CATCH Statement
(The message can be hidden with "#EC NO_HANDLER)
how to handle this message?? how to recitfy this?
kindly helpBasically, this message appears because, you are trying to CATCH the exception in the exception object, but you are not accessing this exception object. If you do want to give the message, if you catch some exception, you should do like this:
*. Create Instance for ALV
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = ts_z3rl_docket.
CATCH cx_salv_msg INTO lc_msg .
lv_string = lc_msg->get_text( ). " <
message lv_string type 'I'. "<
ENDTRY.
Or, if you don't want to handle the exception, you can do like this:
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = ts_z3rl_docket.
CATCH cx_salv_msg. "#EC NO_HANDLER
ENDTRY.
Regards,
Naimesh Patel -
Error in extended program check
Hi,
I m getting following error in Extended Program Check..
<b>The current ABAP command is obsolete
Tables with headers are no longer supported in the OO context.</b>
for the below declaration..
<b>data: I_fieldcatalog type slis_t_fieldcat_alv WITH HEADER LINE .</b>
could anyone help me.
Thanks in advance.Hi,
Use as follows
<b>DATA: I_fieldcatalog type slis_t_fieldcat_alv,
wa_fieldcaalog like line of I_fieldcatalog.</b>
When you use HEADERLINE you will get one WOrkarea and an intenral table with one declaration.
In your case I_fieldcatalog is a workarea and I_fieldcatalog[ ] is the table.
This usage is obsolete as it leads to confustion with CLEAR.
When you use CLEAR I_fieldcatalog you may assume that table is cleared but here only workarea is cleared.
So you need to use the above given declaration and change all your
APPEND I_fieldcatalog. to
APPEND wa_fieldcatalog toI_fieldcatalog.
simlarly for INSERT and MODIFY.
Regards,
Sesh. -
Structure Enhancement Error Error in Extended Program Check in ECC 6.0
Hi Experts,
I am working on ECC 6.0 I am a structure like "BAPIACWT09" , "BAPIACCAIT" in my program when i run Extended Program Check i am getting an error
<b>
"BAPIACWT09" can be enhanced. After a structure enhancement, the semantics of the parameter transfer may change.</b>
How to eliminate this ErrorRaghu,
Every structure has to be created with an enhancement category.
In Transaction SE11, when you are creating a structure or a table , go to extras - enhancement category to see it.
I guess BAPIACWT09 has been defined with a category of can be enhanced, and SAP is warning you that if the enhancement is used in the future your program can have syntax errors.
There is nothing you can do about this. If you find out something, Please share. -
Select-options in SELECT query - syntax error
Hi all,
I get the error below when I try to use the select options in a SELECT query . Please help me.
"The IN operator with "SO_AWART" is followed neither by an internal
table nor by a value list."
The code i have used(Logical database PNP is used):
TABLES: pernr,
catsdb.
INCLUDE ztime_cwtr_top. " global Data
INCLUDE ztime_cwtr_f01.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
PARAMETERS P_THRES TYPE I.
SELECTION-SCREEN END OF BLOCK B1.
Get data from CATSDB table. Workdates within the date interval are considered.
SELECT pernr workdate awart catsquantity beguz enduz status
FROM catsdb
INTO TABLE it_catsdb
WHERE pernr = pernr-pernr AND
workdate GE pn-begda AND
workdate LE pn-endda AND
status IN ('20', '30') AND
awart IN so_awart .
awart IN ('1100', '1137', '1138', '1139', '1140',
'1147', '1148', '1149', '1157', '2003' ).
when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
I have tried different options like using only the select-options in the where condition.
Thanks in advance.....
MadhuSolved.
Code with syntax error:
include z...top .
include z...fo1.
select-options: xxxxxxx
Code with no syntax error:
select-options: xxxxxxx
include z...top .
include z...fo1.
Thanks for all your help,
Madhu -
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.GHi 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. -
Hi can Some one help me how to fit the query in the Main query, I need to selete SYS_ID the below Work around query is getting the output correctly
but when i tried to put in the main query am getting ORA-00933 not sure how to fix this. Can some one advice me where am making wrong.
Work Around query :
SELECT ALTID.B_SYS_ID FROM N08.B_ALT_ID_TB ALTID WHERE ALTID.B_ALT_ID
IN ( SELECT MEDCO.RE_MEDCD_ID_NUM
FROM N09.T_MEDCD_ID MEDCO
INNER JOIN N09.T_POLY POLY
ON POLY.RE_UNIQUE_ID = MEDCO.RE_UNIQUE_ID) AS B_SYS_ID
Need to integerate the above column in the below query.
Main Query :
SELECT 'Diff' AS SC,
POLY.ID,
ALTID.B_SYS_ID FROM N08.B_ALT_ID_TB ALTID WHERE ALTID.B_ALT_ID
IN ( SELECT MEDCO.RE_MEDCD_ID_NUM
FROM N09.T_MEDCD_ID MEDCO
INNER JOIN N09.T_POLY POLY
ON POLY.RE_UNIQUE_ID = MEDCO.RE_UNIQUE_ID) AS B_SYS_ID,
NULL AS BEG_DT,
NULL AS ID,
FROM
N09.T_POLY POLY
Oracle Version : 10gR2
Thanks in advance.Hi,
Hillbird wrote:
Hi Frank,
Thanks for your responces. The Error am getting is at line number 7 & col# 55 -- ON POLY.RE_UNIQUE_ID = MEDCO.RE_UNIQUE_ID) AS B_SYS_ID,.
I also changed the alias name in thesubquery as S-poly and left the main query alias as POLY. You still haven't posted a completed query, or any sample data and results.
But still i am getting the same error message.
Error Message
ORA-00933 : Sql command not properly ended
oo933 00000 - "Sql command not properly ended"
Vendor Code 933 Error at line 7 column 55
Iam framing a select query, The work around query is used to checkhow to reterive the value from the DB and with the business rules. on which the framing
select query the B_sys_id comes in column 3 and i still have more columns to select. Hence i even tried as below
SELECT 'Diff' AS SC,
POLY.ID,
ALTID.B_SYS_ID FROM N08.B_ALT_ID_TB ALTID WHERE ALTID.B_ALT_ID
IN ( SELECT MEDCO.RE_MEDCD_ID_NUM
FROM N09.T_MEDCD_ID MEDCO
WHERE POLY.RE_UNIQUE_ID = MEDCO.RE_UNIQUE_ID),
NULL AS BEG_DT,
NULL AS ID,
FROM
N09.T_POLY POLY
But still the same error message i got.
Hence i just tried as below
SELECT 'Diff' AS SC,
1 as dummy,
2 as dummy_1,
ALTID.B_SYS_ID FROM N08.B_ALT_ID_TB ALTID WHERE ALTID.B_ALT_ID
IN ( SELECT MEDCO.RE_MEDCD_ID_NUM
FROM N09.T_MEDCD_ID MEDCO
INNER JOIN N09.T_POLY POLY
ON POLY.RE_UNIQUE_ID = MEDCO.RE_UNIQUE_ID)
This is working.
Can you please let me know what is that i need to do if i want to add more columns in the select clause after
this line ON POLY.REUNIQUE_ID = MEDCO.RE_UNIQUE_ID)_
Thanks.
A query (not counting sub-queries) has, at most, only one of each type of clause: one SELECT clause, followed by one FROM clause, followed (optionally) by one WHERE clause. All items to be returned go together in the one SELECT clause. All tables needed are named in the on FROM clause. All filtering conditions go together in the one WHERE clause.
Perhaps you meant something like this:
SELECT 'Diff' AS SC
, POLY.ID
, ALTID.B_SYS_ID
, NULL AS BEG_DT
, NULL AS ID
FROM N08.B_ALT_ID_TB ALTID
JOIN N09.T_POLY POLY ON altid.column_a = poly.column_b
WHERE ALTID.B_ALT_ID IN (
SELECT MEDCO.RE_MEDCD_ID_NUM
FROM N09.T_MEDCD_ID MEDCO
WHERE POLY.RE_UNIQUE_ID = MEDCO.RE_UNIQUE_ID
)With the little information I have, I can't even guess what the real join condition(s) might be. I used
ON altid.column_a = poly.column_bjust to show the correct syntax. -
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
Maybe you are looking for
-
MSI 845PE MAX2-FIR...6 USB Ports?
Okay, so I recently installed my MSI mobo. everything went exceptionally well. No major issues at all...except... Well, here goes... The manual states that this motherboard has 6 USB 2.0 compatability...2 Rear, and 4 Front. Okay, obviously the 2 re
-
Just want to be sure...
Itunes 7.5 will work with 1st gen shuffle?thanks!
-
hey everyone, i just bought my macbook pro yesterday.( new 15" 2.2GHz i7 processor) i put it on charge while using it and it became really hot. also when I'm on Skype the fan starts spinning a lot and my macbook heats up and i cant keep it on my lap.
-
I am using JDeveloper 10.1.2. When I drag and drop a component onto the Struts Page Flow diagram, nothing is placed on the diagram. I've checked the thumbnail and there are no components on it. I followed some instructions I found in a previous post
-
All songs randomly erased off ipod
Hi-- My ipod has been giving me some problems as of late, skipping tracks and freezing. However, the other day when I turned it on it no longer contained any of the tracks that were previously on there. There are no songs, playlists, etc. I didn't do