ALV GRID (2) Detailed 3 colors

Source: Internet
Author: User

ALV grid color settings are divided into three types, rows, columns, cells

0. Color

Color Field CHAR4 Type

First, the line

1. First define the Color field in the inner table of the display, type C (4), as

Color (4) Type C

2. ALV Layout type specify Color field

  Data:ls_lay type Slis_layout_alv.  " ALV Layout  ' COLOR '.

Second, column

Set the Fieldcat on it, for example

DATA : Lth_cat type Slis_fieldcat_alv,         ltd_cat type Slis_t_fieldcat_alv.  Lth_cat'aufnr'.  Lth_cat' order number '.  Lth_cat'C610'.  Lth_cat'X'.  Append Lth_cat to Ltd_cat.  Clear Lth_cat.

Three, cell

1, first in the display of the inner table to define the Color field, the field type is Lvc_t_scol, which is a table fields,

Colort type Slis_t_specialcol_alv,

2, Slis_t_specialcol_alv contains two fields, color (specify color), fieldname (Specify which field's cell display color)

3. Specify a color field in the ALV layout

' Colort '.

Four, the effect

is the row color, cell color

ALV GRID (2) Detailed 3 colors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.