Skip to Content
avatar image
Former Member

Multiline Column Header in ALV Display

Hi,

I need to display multiline header in alv display. I am using salv factory method for this. Below is the image of expected output. I need this using oops concept. Not traditional reuse_alv_grid_display method. The data to be displayed is stored in internal table with fileds:

1. Sales_ord_num

2. Start_date

3. End_date

4. First_name

5. last_name

Thanks.

cust-blocks.png (4.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • As a side note, personally, I try to avoid using ALV to emulate look and feel of Excel. E.g. in this example why do you have "Date" on top of the "Start Date" and "End Date"? Someone is not clear that those both are dates? What value does the second line really add?

    In most cases I find that the users are quite happy to find that a longer label can be displayed in a tooltip. This keeps the screen uncluttered and custom reports somewhat standardized.

    Just sayin'...

  • Former Member

    You are right. But the actual data is not this. I am not displaying dates or customer name.It was just for demonstration purposes.

  • Get RSS Feed

2 Answers

  • May 16, 2017 at 06:27 AM

    Hi Karan,

    For Multiple header, you can either use classical ALV or Hierarchical ALV (REUSE_ALV_HIERSEQ_LIST_DISPLAY CL_SALV_HIERSEQ_TABLE).

    In Hierarchical ALV, we will pass two internal tables one for header and another for Item. When calling the FM just empty the Header internal table and pass the values in item internal table and display the output. Hope it works for your requirement.

    Regards

    Rajkumar Narasimman

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Raj,

      Thanks for the reply. But this is not exactly what i am looking for. I have implemented alv using factory method and i do not want to change that.

      Regards,

      Karan

  • May 16, 2017 at 06:29 AM
    Add comment
    10|10000 characters needed characters exceeded

    • Hi, you should better open a new question, as per forum rules of engagement, with a link to this thread for providing the context.

      Quickly, Enno Wulff defined the GUI status "0200", which contains the toolbar. In the new question, you should explain if you created it or not.

      By the way, as says Enno Wulff, this tweak of ALV is not supported by SAP, and some functions cannot work correctly, like sorting, filtering, etc.