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

alv..

Former Member
0 Likes
569

In ALV output list having f1 f2 f3 f4 columns...now i want this output in a manner like f2 f4 f3 f1..how to do this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
549

Hi..

Just Change the Column positions..

<b>fieldcat-col_pos = 1. " for field 1

append fieldcat to t_fieldcat.

fieldcat-col_pos = 3. " for field 3

append fieldcat to t_fieldcat.

fieldcat-col_pos = 2. " for field 2

append fieldcat to t_fieldcat.

</b>

In ALV output list having f1 f2 f3 f4 columns...now i want this output in a manner like f2 f4 f3 f1..how to do this?

5 REPLIES 5
Read only

former_member491305
Active Contributor
0 Likes
549

Change the coloumn position in the fieldcatalog.

Read only

Former Member
0 Likes
549

hi

u just <b>change the column position</b> in the manner u want in the field catalog

col-pos = '1'..

regards

ravish

<b>plz reward if helpful</b>

Read only

Former Member
0 Likes
549

Hi,

Check the following link:

http://www.sapbrain.com

Regards,

Bhaskar

Read only

Former Member
0 Likes
550

Hi..

Just Change the Column positions..

<b>fieldcat-col_pos = 1. " for field 1

append fieldcat to t_fieldcat.

fieldcat-col_pos = 3. " for field 3

append fieldcat to t_fieldcat.

fieldcat-col_pos = 2. " for field 2

append fieldcat to t_fieldcat.

</b>

Read only

0 Likes
549

In the fieldcatalog preperation use the following code

loop at lt_fcat assigning <lwa_fcat>.

if <lwa_fcat>-fieldname = 'f1'.

<lwa_fcat>-col_pos = 4 .

elseif <lwa_fcat>-fieldname = 'f2'.

<lwa_fcat>-col_pos = 1 .

elseif <lwa_fcat>-fieldname = 'f3'.

<lwa_fcat>-col_pos = 2 .

elseif <lwa_fcat>-fieldname = 'f4'.

<lwa_fcat>-col_pos = 3 .

endif.

endloop.

reward points if helpful..

regards,

santosh.