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

Alv

Hello,

I am working in alv report, my requirement is i need to color an entire column in my display.

How can i do that ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 07:53 AM

    in the fieldcatalog

    wa_fcat-emphasize = 'C410'.

    add this line to the fieldcatalog of that field u want to colo

    where C = Constant

    4 = Color code , can be from 1 - 7

    1 = Intensified on , (0 or 1)

    0 = Inverse off (can be 0 or 1)

    If ur problem is solved pls reward and close the thread

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 07:55 AM

    hi Johathan,

    Use <b>FORMAT COLOR COL_TOTAL .</b> in TOP-OF-PAGE event...

    i.e,

      t_event-name = slis_ev_top_of_page.
      t_event-form = 'TOP_OF_PAGE'.
      APPEND t_event TO it_event.
    

    Check

    how-to-get-color-for-whole-cell-in-alv

    Regards,

    santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:13 AM

    Hi

    U can simply write like this-

    DATA l_rnd_value TYPE integer2.

    *

    • FIELD-SYMBOLS <vbak> TYPE ty_vbak.

    *

    • LOOP AT gt_vbak ASSIGNING <vbak>.

    *

    • Random value

  • CALL FUNCTION 'RANDOM_I2'

  • EXPORTING

  • rnd_min = 0

  • rnd_max = 3

  • IMPORTING

  • rnd_value = l_rnd_value.

  • *

    • CASE l_rnd_value.

    • WHEN 0.

    • <vbak>-line_color = 'C100'. " Blue.

    • WHEN 1.

    • <vbak>-line_color = 'C300'. " Yellow.

    • WHEN 2.

    • <vbak>-line_color = 'C500'. " Green.

    • WHEN 3.

    • <vbak>-line_color = 'C600'. " Red.

    • ENDCASE.

    *

    • ENDLOOP.

    Hope this helps.

    Regds,

    Seema.

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.