2008 Nov 18 10:08 AM
Hi,
In "SELECT SINGLE ...", the WHERE condition for the key field "EPCGKEY" does not
test for equality. Therefore, the single record in question may not be unique.
what does it mean?
2008 Nov 18 10:14 AM
Hello Anil,
Its becoz in the SELECT SINGLE query, WHERE clause must have all the key fields so that a unique record is selected.
BR,
Suhas
Hi,
In "SELECT SINGLE ...", the WHERE condition for the key field "EPCGKEY" does not
test for equality. Therefore, the single record in question may not be unique.
what does it mean?
2008 Nov 18 10:12 AM
Hi,
What ever condintion you are passing to select does makes the Full Unique Key ...that why this waring message is displayed. Try Select UPTO 1 row.
2008 Nov 18 10:14 AM
Hello Anil,
Its becoz in the SELECT SINGLE query, WHERE clause must have all the key fields so that a unique record is selected.
BR,
Suhas
2008 Nov 18 10:14 AM
there is only 1 primary key and i have passed it..
but i'm passing the primary key and i'm selecting the primary key..is that a problem?
Edited by: Anil Kalive on Nov 18, 2008 3:45 PM
2008 Nov 18 10:15 AM
Hello,
While using select single... you must specify all the keys of the database table, if you are not using all the keys use select UP TO 1 ROWS.
Thanks,
Jayant
2008 Nov 18 10:17 AM
Hi,
From the database table you are going to extract a record, there can be few other key fields existing in DB table along with key field EPCGKEY.
So while extracting the record there is a chance of having more records in the database table with the same key value you are passing in field EPCGKEY.
I think you are not using all the key fields in the where clause of SELECT SINGLE query.
Its very important to use all the key fields in the where clause when using SELECT SINGLE Query.
Go through the key field documentation (F1 Help) for the SELECT single query.
With Regards,
Dwaraka.S
2008 Nov 18 10:22 AM
Hi,
The Select will return more than one possible record but limiting with the single option in Select.
If you need to remove the warning then better declare one internal table and use into table <internaltable> instead of select single.
sampe code:
Previoulsy the warning is due to:
select-options : s_matnr for mara-matnr.
data: l_matnr type mara-matnr.
.....
....
select single matnr from mara into l_matnr where matnr in s_matnr.
This code will give warning message.
Change the code as below:
types: begin of t_mara,
matnr type mara-matnr,
end of t_mara.
data: it_mara type standard table of t_mara.
.......
.....
select matnr from mara into table it_mara where matnr in s_matnr.
This code will not give any warning message.
This is as per my understanding <<Text removed by moderator>>
THANKS,
Edited by: Matt on Nov 18, 2008 3:04 PM Do NOT ask for points
2008 Nov 18 10:38 AM
use select - endselect with upto 1 rows
if you use select single * ....where condition IN ..., then this will mean that you are checking for non uniqueness.
Better use
select * from table
into int_table
...
where condition in ....
2008 Nov 18 10:47 AM
Hi:
Do one thine, instead of using select statement, please function module EHSWA_195_MARA_READ which returns the entire things as per your requirement.
Regards
Shashi
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |