2009 Apr 24 11:21 AM
Hi ,
I would like to sort the entries in table maintance genrator. I have added the sort ascending and sort descending button on the table maintance genrator screen. but how we can come to know which coloumn is selected on in that genrator.
For example: There are three fields 1.Vendor no. 2. Vendor name and 3.Run date.
Here if user want to sort the data by vendor no ascending, then first he will click on vendor no coloum and then click on Ascending button.
My question is how we will understand user has clicl on Vendor no? for ascending button sy-ucomm will genrate.
Can anyone please guide me in this regards.
Thx
2009 Apr 24 12:21 PM
In the table maintenance generator, depending on events you can set the sort order.
Go to TMG and in the menu Environment -> modification -> events, add an even name that comes from the F4 help of the field (Event at data base entry creation).
In the editor present in the next column, you can write the code to sort the table as per your wish.
Thanks,
Sowmya
2009 Apr 24 11:32 AM
Hi,
data: fieldname(20).
Use "GET CURSOR FIELD fieldname.
This instruction returns you the field in wich the cursor is in this moment.
After that, you can sort your table by this field.
SORT table BY (fieldname) ascending
or
SORT table BY (fieldname) descending
Regards,
Pepe
2009 Apr 24 12:21 PM
In the table maintenance generator, depending on events you can set the sort order.
Go to TMG and in the menu Environment -> modification -> events, add an even name that comes from the F4 help of the field (Event at data base entry creation).
In the editor present in the next column, you can write the code to sort the table as per your wish.
Thanks,
Sowmya