cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically changing the order of columns in Table UIelement

Former Member
0 Kudos

Hello Guys

dynamically i want to change the order of columns of TABLE, can one give sample code

Thanks

Vijaya

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member213957
Participant
0 Kudos

Hi laxmi,

follow the below steps:

1. get the table id from the root->view( 'table id')

2. get the all columns form from the table object

3. change the position value of each column how you want.

like lr_column->set_fixed_position

or

if you using dynamic coding, add the column which order you want like tablel->add_column

thanks & regards,

Kishorekumar SVS

former_member184578
Active Contributor
0 Kudos

Hi,

Check the code in the below threads:

http://scn.sap.com/thread/3160303

http://scn.sap.com/thread/3371694

Hope this helps u.,

Regards,

Kiran

Former Member
0 Kudos

You can user as,  sort your_internal_table by your desire.  and modify your z-table from your internal table.  and use select statement and it will sort the table.  as, sort itab by date. modify z_table from table itab.  select * from itab into corresponding fields of table itab.  itab is your internal table.