Application Development 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: 

change column order in screen of sm30

former_member186143
Active Contributor
0 Kudos

I have a table with 2 keyfields and their corresponding description fields

I have to keep the keyfields at the top of the table so the description fields come later

I have

key1

key2

description key 1

description key 2

when I generate a screen with sm30 I get the fields in the same order as how I defined the table

How can I change the column order of the table after it is generated ? the column order is protected and also in the layout editor I may not shift the columns ?

perhaps very simple but I can't figure it out and also couldn't find it here on sdn

kind regards

arthur

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Arthur,

It can be done in the layout editor.

Please swap the column by selecting and moving the required column. Just select the cell of the column which you want to move (not the header cell where the column header is given, please select the item cell (for instance, the second cell)) and move it to the needed location.

Hope, it should work. Kindly let me know if any issues.

Regards,

Selva K.

4 REPLIES 4

gerd_rother
Active Participant
0 Kudos

Hi,

Define a maintenance view for your table as described here: http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21ed2d446011d189700000e8322d00/frameset.htm.

When defining the fields you should be abl to put the fields into the order of your choice.

Regards,

Gerd Rother

Former Member
0 Kudos

Hello Arthur,

It can be done in the layout editor.

Please swap the column by selecting and moving the required column. Just select the cell of the column which you want to move (not the header cell where the column header is given, please select the item cell (for instance, the second cell)) and move it to the needed location.

Hope, it should work. Kindly let me know if any issues.

Regards,

Selva K.

gastn_jareo
Active Participant
0 Kudos

As far as I know you can change order of fields, but all key field should be first, all together with no other fields in middle of them.

Then you can't define this order:

key1

description key 1

key2

description key 2

Because KEY1 and KEY2 should be together.

Regards!

0 Kudos

thanks, afterwards it is logical but with normal alv layouts you are so used to drag and drop the columnnames instead of the cells that it even didn't occur to me to try it.

also I figured out the defining ot the maintenance view. I had tried it a few years ago but I don't know where I got stuck in using it. but know it works

kind regards

arthur