2

Is it possible with cl_gui_alv_grid to make two columns with the same header?

Suppose I want to display data like this :

    | Tuesday       | Wednesday     | Thursday      |
    |---------------|---------------|---------------|
    | Po | Delivery | Po | Delivery | Po | Delivery |
    |----|----------|----|----------|----|----------|
    |  7 |   245.00 |  4 |   309.00 | 12 |   774.00 |
    |  4 |   105.00 |  2 |    88.00 |  3 |   160.00 |
    | 10 |   760.00 |  5 |   291.00 | 20 |  1836.00 |
    ...

For this I think about two solutions, but I don't know if it possible.

First solution : Make two levels of field catalog, in the first one three columns, and in the second 6 columns.

Second : Make field catalog with 3 columns, and concatenate two values under each column.

Thanks.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
shmoolki
  • 1,551
  • 8
  • 34
  • 57
  • possible duplicate of [ABAP Alv\_grid Merge cells and style formating of cells](http://stackoverflow.com/questions/27000012/abap-alv-grid-merge-cells-and-style-formating-of-cells) – vwegert Nov 30 '14 at 09:04
  • You can check this Stack Overflow question http://stackoverflow.com/questions/27000012/abap-alv-grid-merge-cells-and-style-formating-of-cells and use that table to merge horizontal or vertical. –  Nov 30 '14 at 08:45

1 Answers1

1

There is a strange workaround on a german site, which deals with inheriting from alv_grid in order to override some crucial methods, to allow it, to merge cells, the source is a well known and appreciated german abap page, but, as it says, it is in german. Let us hope, any translator engine can translate this for You in a proper way, but as it looks like, this could be a step in the right direction.... but as it seems, You should fix all columns for that ( or at least those with merged cells ).

Please refer to this and tell me, if it helped:

Merge cells of alv-grid

icbytes
  • 1,831
  • 1
  • 17
  • 27
  • It seems very good I check that monday at work, thank you icbytes – shmoolki Nov 14 '14 at 12:53
  • As I saw it, we directly took it into one of our systems, it is exactly, matching some old requirements, which we had from customers, new to abap. – icbytes Nov 14 '14 at 13:53