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

Adding a Sort Button in SM30

Former Member
0 Likes
1,316

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

2 REPLIES 2
Read only

Former Member
0 Likes
802

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.

Read only

Former Member
0 Likes
802

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.