‎2008 Jul 16 11:44 PM
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
‎2008 Jul 16 11:46 PM
Hi,
which one are you using for the report..SALV or ALV function modules??
Thanks
Naren
‎2008 Jul 17 4:15 AM
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
‎2008 Jul 17 4:43 AM
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
‎2008 Jul 17 5:07 AM
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).
‎2008 Jul 28 10:29 PM