Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

slin overview - warning message

Former Member
0 Likes
1,174

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?

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,131

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?

8 REPLIES 8
Read only

Former Member
0 Likes
1,131

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.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,132

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

Read only

Former Member
0 Likes
1,131

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

Read only

Former Member
0 Likes
1,131

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

Read only

Former Member
0 Likes
1,131

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

Read only

Former Member
0 Likes
1,131

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

Read only

Former Member
0 Likes
1,131

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 ....

Read only

Former Member
0 Likes
1,131

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