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

SM30 sort using non-key fields

Former Member
0 Likes
2,263

Hi All,

I've created a table in SE11 and generated its table maintenance(SM30), now I need to sort the entries by a non-key field...

I thought of using the event 26, but it isn't triggering!

Instead of this, i used the event AA also I'm scared of leaving any functionality back.

I need an event in which the internal table "TOTAL" is already filled, so i can transfer its data to a local internal table, sort it then overwrite "TOTAL".

Can anyone tell me what's the better event to be used in this case, and if I'm using the correct internal table to do this?

Thanks,

BR

Arline.

6 REPLIES 6
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,146

First of all I think you should not play with total only as we also extract table ..changing the sequence may cause an undesireable effect. You can try to do it pai after endloop..when do you want to sort the data..?

Nabheet

Read only

Former Member
0 Likes
1,146

I don't think it's an easy chore; however, I recall seeing a thread some months ago in the forum where a solution is given. If you search for sort and table maintenance, you should find it.

Rob

Read only

Former Member
0 Likes
1,146

Nabheet

I need to sort the data before displaying not before inserting a new entrie...

What internal table you advise me to use?!

Read only

0 Likes
1,146

What you can try is as follow.

Go to the screen in table maintainence generator.

after MODULE LISTE_INITIALISIEREN. add your own custom module. In it you will have access to extract and total internal table.

Move them in temporary internal table sort your way move back.

Make sure this thing happens only once while calling not everytiime even if user press enter. You can handle it by setting a flag for initial sorting.

Hope it Helps

Nabheet

Read only

Former Member
0 Likes
1,146

Ok Rob, I found a link!

But i still don't know which event to use...

I tried the event 26 but it doesn't triggered!

Nabheet, same problem...

I need an event to trigger the code.

BR

Arline

Read only

0 Likes
1,146

I was not talking about events the logic presented above is implemented directly in maintainence screen of tmg.

Nabheet