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

Dynamic Column Arrangement

Former Member
0 Likes
629

Hi.

does any one knows how to Re-arrange the sequence of columnes in the internal table during RUNTIME.

The Table contains the Data

For eg: tableA has Col1 Col2 Col3.

During Runtime i want:

TableA Col2 Col1 Col3.

Please help with with a code example.

Edited by: Alvaro Tejada Galindo on Feb 19, 2008 2:07 PM

Hi.

does any one knows how to Re-arrange the sequence of columnes in the internal table during RUNTIME.

The Table contains the Data

For eg: tableA has Col1 Col2 Col3.

During Runtime i want:

TableA Col2 Col1 Col3.

Please help with with a code example.

Edited by: Alvaro Tejada Galindo on Feb 19, 2008 2:07 PM

5 REPLIES 5
Read only

Former Member
0 Likes
611

Why not display the table as an ALV GRID (OO please not SLIS) and then you can re-arrange the fields dynamically to your hearts content with the standard GRID functionality. You can also exclude fields from the display (dynamically) as well..

Not quite the answer you want but otherwise I can't see any reason for re-arranging an internal table at run time other than by sorting.

If you need generally to re-arrange the structure at run time then normally your application design probably needs to be looked at again.

Cheers

jimbo

Read only

0 Likes
611

No. I know. that users can change while displaying the ALV.

But thats not my requrirment. The table is generated but what i want is that sequence of the internal table columns to be changed.

Read only

0 Likes
611

Can you please explain for give a small code example of the statement that you made please :

ALV GRID (OO please not SLIS) and then you can re-arrange the fields dynamically to your hearts content with the standard GRID functionality. You can also exclude fields from the display (dynamically) as well..

Read only

Former Member
0 Likes
611

hmmm, why at runtime?

why dont you just declare the itab the way you need it?

or are col1 and col2 of same type and you just wish to swap their values?

Read only

Former Member
0 Likes
611

None...

If there is please send reply to <REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 19, 2008 2:08 PM