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-Layout

Former Member
0 Likes
652

I have areport whose layout needs to be shuffeled, but I dont want to use the layout settings to make it happen , I want to do through the program , as such I have positioned my fields in the internal table but when it is displayed few of the fields remains in the center of report which I wnat to shift it to the extreme right, internal table is arranged accordingly but still in the output I get the fields not as I want. where in teh report should I make changes to get the desired layout in teh output.

Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
631

Hi,

which one are you using for the report..SALV or ALV function modules??

Thanks

Naren

Read only

Former Member
0 Likes
631

Hi Aarav,

Check the following options, in the function module:

row_pos - output in row

col_pos - position of the column

fix_column

Check this following link on changing layout in alv:

http://www.abapprogramming.net/2007/11/alv-layout-display-sample-code.html

Hope this helps you.

Regards,

Chandra Sekhar

Read only

former_member787646
Contributor
0 Likes
631

Hi

Set the following attributes for the fields of the internal table (From which the data is being displayed in the ALV Grid) and append the records to the Field Catalog internal table .

FIELDNAME = <field in the internal table>

COL_POS = <position_no>

(Append Statement )

Hope this would help you.

Murthy

Read only

Former Member
0 Likes
631

hi,

You have to create your own Field catlog for this purpose.

Afield catlog is just like a internal table so you can specify the

various attributes of display according to your need. Here is a small demo,

x_fieldcat-col_pos = 1.

x_fieldcat-fieldname = 'ZMATNR'.

x_fieldcat-tabname = 'ITAB'.

x_fieldcat-seltext_m = 'MATERIAL'.

APPEND x_fieldcat.

x_fieldcat-col_pos = 2.

x_fieldcat-fieldname = 'ZPOSNR'.

x_fieldcat-tabname = 'ITAB'.

x_fieldcat-seltext_m = 'ITEM'.

APPEND x_fieldcat.

now you can pass this X_fieldcat to your FM ( say REUSE_ALV_LIST_DISPLAY).

Read only

Former Member
0 Likes
631

.