‎2011 Feb 04 10:07 AM
Hello Everyone,
I have a Z table which I am maintaining it through SM30 which has got 5 fields (ZREFERENCE, Profit Center, GL Account, Posting date and amount), currently the data is getting sorted on the basis of ZREFERENCE field. The requirement is after clicking a sort button the data should get sorted on the basis of the field that I have selected. I have created a button on application tollbar. Need further help in displaying the data in required sorted format...
Thanks & Regards,
Viraj
‎2011 Feb 04 11:18 AM
You can try creating your own PAI module in which u can mention code something like below:
DATA: fld(30),
lin TYPE i,
off TYPE i.
GET CURSOR FIELD fld LINE lin OFFSET off.
fld gives you the fild name on which u put the cursor. Based on that u can try sorting. Dunno if this works or not, but u can give it a try.
‎2011 Feb 04 11:41 AM
You might want to sort the internat table of table maintaince based on the sort is hit before you display.
Refer:http://help-abap.blogspot.com/2008/09/add-custom-button-on-maintianence-view.html
Cheers
Amit.