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

Sort on Internal table

Former Member
0 Likes
779

Hi,

I have an internal table with the below data.

date

________

________

________

________

20040130

20071231

i want it to be sorted so that the result is as follows

date

20040130

________

________

________

________

20071231

Is there any sort technique by which i can achieve the above result????

Cheers,

Raghav.

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
754

Hi,

i don't think there is any sort technique for this...

try to delete the space values in the itab.now u will have two records

then try to insert blank record between the two records..

Regards,

Nagaraj

8 REPLIES 8
Read only

former_member386202
Active Contributor
0 Likes
754

Hi,

Do like this

sort itab by date.

Regards,

Prashant

Read only

Former Member
0 Likes
754

Hi,

use sort decending

or sort asscending

regards,

siva chalasani.

Read only

Former Member
0 Likes
754

Hi,

sort itab by datefield.

Read only

0 Likes
754

If i sort it by ascending, the result is

________

________

________

________

20040130

20071231

and by descending sort the result is

20071231

20040130

________

________

________

________

Can anyone please help out???

Read only

0 Likes
754

hi,

As per my knowledge their is no sort technique for that.

to achieve u r requirement. give input in the same order in which order you wantt, to internal table and use it without sorting

regards,

pavan

Edited by: pavan kumar pisipati on Dec 26, 2007 11:14 AM

Read only

satykumar
Product and Topic Expert
Product and Topic Expert
0 Likes
754

Hi,

Use stmt SORT it ASCENDING BY date.

Regards,

Satyendra

Read only

Former Member
0 Likes
754

HI

Satwik

yes directly u can write

sort itab_name by field(date) ascending.

it solves u r problem...

plzz reward if helpfull

for any further quiries my mailid is mutyalasunilkumar@gmail.com ok

dont forget to reward....

Read only

former_member404244
Active Contributor
0 Likes
755

Hi,

i don't think there is any sort technique for this...

try to delete the space values in the itab.now u will have two records

then try to insert blank record between the two records..

Regards,

Nagaraj