cancel
Showing results for 
Search instead for 
Did you mean: 

How to take the Nth value?

Former Member
0 Kudos

Hi Experts,

I am having a situation where I need to take the nth value after sorting in ascending order. Suppose, if

1. 10,

2. 20,

3. 30,

4. 40,

5. 50,

How to take the third value that is 30 and put it in the query designer?

Thanks in advance,

Regards,

Kannan

Accepted Solutions (1)

Accepted Solutions (1)

shanthi_bhaskar
Active Contributor
0 Kudos

Kannan,

copy into internal table and you can sort it accordingly.

LOOP AT ITAB WHERE KEY = '30'.

"Move it any variable that is used in query which is of type Customer exit.

ENDLOOP.

Former Member
0 Kudos

Hi,

Well, I am sorting in ascending order and taking a count of it. Now, say - the count is 10 and I want to take the 8th value from it. How to do it?

Thanks in advance,

Regards,

Kannan

shanthi_bhaskar
Active Contributor
0 Kudos

use this.


read table itab with index 8.

Former Member
0 Kudos

Hi,

Can you tell me which Customer Exit I should use for this?

Thanks in advance,

Kannan

Answers (0)