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

Primary key

Former Member
0 Likes
644

HIi Experts,

I Used select single * from a customised table and select 3 fields in that table i used.the problem is i used where condition.

in that where condition no primary key exist.

how can i do this problem.please send me clearly.

Thanks & regards

Srinivasareddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

Hi,

if you execute the statement the first row of the rows that satisfies your condition will be placed in the result set.

As far you won't place a write lock (FOR UPDATE) PK is irrelevant here.

Please keep in mind that you can not specify an internal table after the INTO clause.

Flat structures are assumed here.

bye

yk

5 REPLIES 5
Read only

Former Member
0 Likes
617

Hi,

if you execute the statement the first row of the rows that satisfies your condition will be placed in the result set.

As far you won't place a write lock (FOR UPDATE) PK is irrelevant here.

Please keep in mind that you can not specify an internal table after the INTO clause.

Flat structures are assumed here.

bye

yk

Read only

narin_nandivada3
Active Contributor
0 Likes
616

Hi Srinivasareddy,

Use DISTINCT keyword in select statement... this avoids duplicates...

please go through this link...

[Select Distinct|http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=414]

For further help regarding select statement based on performance issue go through the below link

[Performance tuning when using select|http://www.sapmaterial.com/performanc_tuning.html]

Hope this would help you.

Good luck

Narin

Read only

Former Member
0 Likes
616

Hi,

IF you use SELECT SINGLE then you must use all the primary keys of the table to get valid data.

And in your case if you can not specify Primary keys then you can go for SELECT * FROM ZTABLE UP TO 1 ROWS statement.

Regards,

Sujit

Read only

Former Member
0 Likes
616

Hi Srini,

You can use SELECT DISTINCT ..

Check out this link:

http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=414

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
616

Thank you for yor response.

I solved my problem with your answer.