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

ALV underline

Hi guys. I was just wondering if there is a way for me to segregate records in ALV using an underline.

For instance, if I have 3 records

LIFNR MATNR

C1000 12345

C1000 12345

C1000 12222

C1000 12222

C1001 12222

Its should display in alv like:

C1000 12345

C1000 12345

-


<--- underline since new matnr

C1000 12222

C1000 12222

-


<--- underline since new vendor

C1001 12222

please help. Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2005 at 06:09 AM

    Hi, Ferdinand,

    Fill the ALV sort internal table with this attribute LS_SORT-group = 'UL' and pass it to ALV List function module.

    Here is some sample code

    data : gt_sort TYPE slis_t_sortinfo_alv,

    ls_sort TYPE slis_sortinfo_alv.

    ls_sort-fieldname = 'LIFNR'.

    ls_sort-spos = 1.

    ls_sort-group = 'UL'.

    ls_sort-tabname = 'GT_OUTTAB'.

    ls_sort-up = 'X'.

    APPEND ls_sort TO gt_sort.

    ls_sort-fieldname = 'MATNR'.

    ls_sort-spos = 2.

    ls_sort-group = 'UL'.

    ls_sort-tabname = 'GT_OUTTAB'.

    ls_sort-up = 'X'.

    APPEND ls_sort TO gt_sort.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    it_fieldcat = gt_fieldcat

    it_sort = gt_sort

    TABLES

    t_outtab = gt_outtab

    Let me know if u have any issues. Reward me with points if it is helpful.

    Best Regards,

    Vijay

    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.