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: 

shuffing of column order in internal table

Former Member
0 Kudos

Hi All,

I have internal table having 50 columns. I m populating this table by ws_upload function module.

My query is that i want to shuffle order of fields in internl table so that i can upload dynamic format from ws_upload.

in normal scenario :

f1,f2,f3,f4,f5 and upload file is also in the same order.

in another case

upload file format is in order f3,f4,f5,f1,f2

now i need to change order of fields in internal table

how this can be ..?

Gopal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Just create another internal table with the correct column order and MOVE CORRESPONDING (It should be possible to copy the whole table at once)

2 REPLIES 2

andreas_mann3
Active Contributor
0 Kudos

Hi,

there must be a header in your file, of which i can assign the fields to internal table.

-> use CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE method.

look here:

Andreas

Former Member
0 Kudos

Just create another internal table with the correct column order and MOVE CORRESPONDING (It should be possible to copy the whole table at once)