简体   繁体   中英

ALV display one column like two

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM