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

Internal Table

Former Member
0 Likes
599

I am having many values in the internal table..Key field is RNO..I want to select the highest value of RNO from the internal table..

Example :

RNO

1

2

3

4

Now i need to find the highest value which is 4.

1 ACCEPTED SOLUTION
Read only

soumya_jose3
Active Contributor
0 Likes
582

Hi,

sort itab desc. "Sorting internal table in descending order.

read table itab index 1 into var. "variable var contains the highest value.

Regards,

Soumya.

5 REPLIES 5
Read only

soumya_jose3
Active Contributor
0 Likes
583

Hi,

sort itab desc. "Sorting internal table in descending order.

read table itab index 1 into var. "variable var contains the highest value.

Regards,

Soumya.

Read only

Former Member
0 Likes
582

Hi,

Sort your internal table by RNO decending. Then read the table with index 1.

Rgds,

Bujji

Read only

Former Member
0 Likes
582

Hello,

U can do like this.


sort itab by rno descending.
read table index 1.
write: itab-rno.

Hope this solve ur issue.

Cheers,

Vasanth

Read only

Former Member
0 Likes
582

Hi,

Use

APPEND ITAB SORTED BY <FIELD>.

By default, it will keep the maximum value as a first record.

U can select the first record by using index 1.

If useful, please award points.

Read only

Former Member
0 Likes
582

thanks