Skip to Content
author's profile photo Former Member
Former Member

Ordering columns in an ALV list

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 27, 2010 at 02: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...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.