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: 

selection of particular records

Former Member
0 Kudos

Hi! Please tell me how to select last 100 vbelns.

Thanks and Regards,

Jagan.

1 ACCEPTED SOLUTION

former_member207020
Active Contributor
0 Kudos

HI JAGAN,

Sort your internal table by descending. And select the first 100 records .

sort itab by vbeln descending.

Thanks & Regards

6 REPLIES 6

former_member207020
Active Contributor
0 Kudos

HI JAGAN,

Sort your internal table by descending. And select the first 100 records .

sort itab by vbeln descending.

Thanks & Regards

former_member195383
Active Contributor
0 Kudos

Select all vebeln in to an internal table. Sort that internal table by assending or descending or descending. Then in a loop you can select your required entries. Hope it helps you out

former_member206439
Contributor
0 Kudos

Hi

SORT the internal table Decending order and write the select statment SELECT UPTO 100 rows

Former Member
0 Kudos

Hi,

In the SELECT QUERY use the additions UPTO 100 ROWS AND ORDER BY VBELN DESCENDING

But i think this causes a bit performance issue as the soring will be done at the database level.

With regards,

Dwaraka.S

Former Member
0 Kudos

Hi,

Try like below.

SELECT * FROM mseg INTO TABLE itab UP TO 100 ROWS ORDER BY mblnr

DESCENDING.

Former Member
0 Kudos

Hello,

Sort your internal table by the following code.

SORT itab by vbeln descending.

Then select the first 100 rows of itab.

Regards

Arindam