ALV display one column like two

4.7k views Asked by At

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.

1

There are 1 answers

2
icbytes On

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