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

Text color of header in SALV_TABLE

Hello,

I am using the object CL_SALV_TABLE to put some data on screen in an ALV grid. I have also created a header for this list. My question is if it is possible, and when yes, how it is possible to change the colour of the text in the header information.

In the example program below i want to have the text CHANGE_TO_ANOTHER_COLOR in a different color.

&----


*& Report ZTEST_ALV

*&

&----


*&

*&

&----


REPORT ztest_alv.

DATA lr_table TYPE REF TO cl_salv_table.

DATA lr_grid TYPE REF TO cl_salv_form_layout_grid.

DATA lt_t000 TYPE STANDARD TABLE OF t000.

INITIALIZATION.

SELECT * FROM t000

INTO TABLE lt_t000.

START-OF-SELECTION.

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = lr_table

CHANGING

t_table = lt_t000.

*---Create GRID

CREATE OBJECT lr_grid.

lr_grid->add_row( ).

lr_grid->create_label(

row = 1

column = 1

text = 'CHANGE_TO_ANOTHER_COLOR' ).

lr_table->set_top_of_list( lr_grid ).

lr_table->display( ).

Regards,

Peter

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 12:44 PM

    Hi,

    I refresh this question once again. Hopefully somebody knows if this is even possible or not.

    Regards,

    Peter

    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.