‎2009 Jul 10 12:41 PM
Hi,
I have written follo select stmt ,
SELECT BELNR "Case1
GJAHR
EBELN
EBELP
DMBTR FROM EKBE
INTO TABLE IT_EKBE
FOR ALL ENTRIES IN IT_BKPF2
WHERE BELNR = IT_BKPF2-AWKEY+0(10).
When doing syntax chk , getting warning as "Lenth specification of AWKEY is ignored when FOR ALL ENTRIES IN used".
I activated the object.
Bur while releasing it to quality , in Code inspector 1 error is coming saying
"Large table EKBE : No first field of a table index in WHERE condition".But still i managed to release it.
What is the meaning of that Error. Is it that i m not using a primary key in WHERE cond while accessing a huge table EKBE ?
Is it going to impact anywhere in quality or production server as requset got released with ERROR ?
How to remove such errors which r appearing in code inspector and not in Syntax check.
Waiting 4 ur replies ....
Thanks,
Poonam.
‎2009 Jul 10 12:45 PM
HI,
FOR ALL entries expects fields of same length...
U need to change ur code..Put a field of type belnr and pass the values
loop at it_bkpf2.
it_bkpf2-belnr = IT_BKPF2-AWKEY+0(10).
modify it_bkpf2.
endloop.
SELECT BELNR "Case1
GJAHR
EBELN
EBELP
DMBTR FROM EKBE
INTO TABLE IT_EKBE
FOR ALL ENTRIES IN IT_BKPF2
WHERE BELNR = IT_BKPF2-belnr.
Regards,
Nagaraj
‎2009 Jul 10 12:45 PM
There will not be any problem with this code in any servers.
but the error you getting in code inspector is because you have not included all key fields of the table in where condition so the index will not be used in the query.
if you use all key fields of table in where condition then the index gets fired internally and the data retrieval becomes faster.
it will not impact anywhere in the system but have a practise to use all key fields of tables in where condition wherver possible.
‎2009 Jul 10 12:52 PM
Hi,
Code Inspector checks can be performed using the Extended Program Check in SE38 for the program. Code inspector results are suggestions as per good programming practices. You might face performance problems in larger systems if your where clause is not following an index.
In this specific case you can have logical errors also as you might have the same FI doc number across different financial years.
Cheers
Nitesh