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

ALV GRID: How can i change the color of a COLUMN

I am using the cl_gui_alv_grid class very often and it works norally very well. But now i have a request to change the color of a GRID-COLUMN.

SAP Help shows you a solution which works in this way:

Release 4.7

DATA: BEGIN OF GT_OUTTAB OCCURS 0.

INCLUDE STRUCTURE <DDIC-Struktur>.

DATA: CT TYPE LVC_T_SCOL. "Table for colors

DATA: END OF GT_OUTTAB.

But if you use it in this way; following errors occurs:

1.) You have to use the table type : ANY TABLE in the method: me->set_table_for_first_display

2.) if you add the type LVC_T_SCOL to your DDIC-Structure, then an error occurs: you cannot use an table-type in a flat structure!

3.) The LVC_T_SCOL contains field names, they are not permitted. (for exp. INT ...)

Can somebody help me, to solve this problem?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on May 03, 2004 at 08:45 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2004 at 10:15 AM

    Hello Peter,

    Thank You for Your prompt replay.

    I was afraid to do it in this way 😊

    So i have to build the fieldcat manually instead using the FILEDCAT_MERGE ...

    Anyway, it works!

    Thank You and BR

    Michael

    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.