‎2006 Dec 26 10:21 AM
Hi there...
I have to display a sap script....where the data will come directly from the data base tables and structures that are there in SAP...now the requirement is that particular field of a databse table has to be sorted before getting printed on to the SAP script...can anyone provide any leads...on this...
Pablo
‎2006 Dec 26 10:59 AM
ur getting data from database and printing on sap script...but before printing, ur getting data from database to internal table or fields....U can just sort this one and print according to ur requirements.
‎2006 Dec 26 10:24 AM
read data in internal table and then do sorting in ur program on internal table and then pass the data to ur SAP script it wil be more effieicent..
amit
‎2006 Dec 26 10:24 AM
We can sort the data of a DB table at Internal table level. like....
select * from mara into table itab.
sort itab by natnr.
loop at itab.
write: itab.
endloop.
Cheers.
‎2006 Dec 26 10:25 AM
If the program is a customized one, we can get the data into an internal table, SORT and then issue for printing.
Kind Regards
Eswar
‎2006 Dec 26 10:27 AM
1)If you want to sort the data, you would most probably be needing to do it for the purpose of a report or some other application. In that case, you would have to fetch the data from the database table into an internal table in your program and then sort the data using the SORT statement on internal table
2)If you are seeing the contents using SE16, its a ALV grid, so you can sort by whatever field you want.
‎2006 Dec 26 10:59 AM
ur getting data from database and printing on sap script...but before printing, ur getting data from database to internal table or fields....U can just sort this one and print according to ur requirements.
‎2006 Dec 26 2:21 PM
hi
we can sort only I.T. it is not possible to sort dbt
If the program is a customized one, we can get the data into an internal table, SORT and then issue for printing.
deepak