10-27-2010 2:32 PM
Hi ,
I am trying to make a particular column e.g. PERSA (Business Unit) in the following order in the ALV list but i still get it as the 1st column.
I have ordered it as such in the output table :
*--- Structure of output table
DATA: BEGIN OF outtab OCCURS 100, "N747328
pernr(8) TYPE c, "Pers.No File#
dt_sort(8) type n,
aedtm(12) TYPE c, "Action Date
mgtxt LIKE t530t-mgtxt, "Action reason(text)
persa LIKE t500p-persa, "Business Unit plstx_n LIKE t528t-plstx, "Position Title (text)
ansal(12) type c, "Annual Salary
betrg(7) type c, "Hrly rate*
END OF outtab.
I have even tried using col_pos in the fieldcatalog but it doesn't work.
when 'PERSA'.
ls_alv_field_catalog-ddictxt = 'M'.
ls_alv_field_catalog-seltext_m = 'Business Unit' .
ls_alv_field_catalog-col_pos = '3'.
The interesting thing is persa represents the code of business unit e.g.ETIT whereas earlier i had in the list t500p-name1 which is the description of the business unit. like Information Technology.When i had t500p-name1 i had no issues with the positioning. I don't think that matters.
Kindly suggest.Thanks in advance.
10-27-2010 3:00 PM
Comment the below statement for column PERSA [if you have it in your code].
ls_alv_field_catalog-KEY = 'X'.
also paste the code you've written for field catalog...
10-27-2010 3:21 PM
10-27-2010 3:24 PM
10-27-2010 9:10 PM
There was no ls_alv_field_catalog-KEY = 'X' bit of code but i added ls_alv_field_catalog-KEY = '' and it solved the problem. Thanks.