11-25-2009 7:01 AM
Hello Experts,
Could you please tell me how to sort a Data base table.. The "SORT " in ABAP works on the internal table.. but how do i sort a Database table..
Please help..
Thanking you in advance.
Regards/-
Tamanna K
11-25-2009 7:03 AM
11-25-2009 7:04 AM
>
> Hello Experts,
>
> Could you please tell me how to sort a Data base table.. The "SORT " in ABAP works on the internal table.. but how do i sort a Database table..
> Please help..
>
>
> Thanking you in advance.
>
> Regards/-
> Tamanna K
hmm...strange requirements!!!,Strange Becuase already the data exists in sorted order in the database based on its primary key fields...
Could you please tell me why you need to sort a DATABASE table??
Vishwa.
11-25-2009 7:06 AM
Hi Tamanna,
This idea looks quite vague. This isnt possible.
You can get the data into an internal table & manipulate as per your requirement.
Hope it helps.
Cheerz
Abhii
11-25-2009 7:07 AM
Use ORDER BY in your select query
Or you can even select your data into an itab and then use SORT.
but if you want to sort the DB table itself, then i dont think it would be possible because the DB table rows are not held in any particular order, the order is applied when you fetch the data from the table.
11-25-2009 7:07 AM
Hi,
Rather sorting the database table,
You can Select the data from that
table into an internal table and then
sort that internal table by as many fields.
Hope it helps
Regards
Mansi
11-25-2009 7:08 AM
Hi,
once you see the contents of the db table in SE11 in the screen it self you can find sort either by ascending or descending. the fields ....
Please elaborate your requirement .. I don't see any need sorting a database table....
Regards,
Nagaraj
11-25-2009 7:10 AM