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

Read Statement

Former Member
0 Likes
639

Hello friends,

I have to read a internal table based on it_zzsd-Kunnr.

I am using,

READ TABLE it_knvv WITH KEY kunnr = it_zzsd-kunnr.

However in table it_knvv there are multiple records for a single it_zzsd-kunnr.

I just want to pick the first.

Will the read statement serve my purpose or it wont.

Shejal.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

Hi,

Yes..READ TABLE will pick the first record that matches the key..

Thanks,

Naren

4 REPLIES 4
Read only

Former Member
0 Likes
617

Hi,

Yes..READ TABLE will pick the first record that matches the key..

Thanks,

Naren

Read only

Former Member
0 Likes
616

It will pick the first, but that first record will depend on the order in which it is sorted.

Rob

Read only

ferry_lianto
Active Contributor
0 Likes
616

Hi,

Yes, you can use READ TABLE statement to select first record when the condition is matching.

Regards,

Ferry Lianto

Read only

0 Likes
616

Thanks Everyone.

Shejal.