Application Development 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: 

computing minimum value of the values in the internal table.

Former Member
0 Kudos

Hi,

am an new abap programmer i want to find the minimum value among some 100 values appended in an internal table.

can anyone help me out..

Advance Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Just sort your internal table by that field and read the first entry.

Let's say you have an internal table ITAB and you wish to find the minimum value of the field F1. You would do something like this...

SORT ITAB BY F1 ASCENDING.
READ TABLE ITAB INDEX1. (assuming that the internal table had a header line)

WRITE : 'The Minimum Value of F1 in ITAB is:' , ITAB-F1.

Hope that's clear enough...

Regards,

Anand Mandalika.

1 REPLY 1

Former Member
0 Kudos

Hi,

Just sort your internal table by that field and read the first entry.

Let's say you have an internal table ITAB and you wish to find the minimum value of the field F1. You would do something like this...

SORT ITAB BY F1 ASCENDING.
READ TABLE ITAB INDEX1. (assuming that the internal table had a header line)

WRITE : 'The Minimum Value of F1 in ITAB is:' , ITAB-F1.

Hope that's clear enough...

Regards,

Anand Mandalika.