Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV GRID

Former Member
0 Likes
920

Hi Guys,

I have developed ALV (Grid Display) report to display stock details.

now user is requesting me to show the materials which are having negative stock in red color, it means only specific records in the output should show in different color so please let me know if we can do this.

Thanks in Advance...

Best Regards

Venkatesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
893

hi,

use th following link,

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm

Regards

Jayapriya

6 REPLIES 6
Read only

Former Member
0 Likes
893

Hi,

Refer to this link..

Read only

Former Member
0 Likes
893

hi,

1. Add an additional field in your output table. this field is used to input the color information.

e.g. COLOR(4) TYPE C. ITAB-COLOR = 'C700'.

2. if you use functiom module to call alv, set the layout :

LS_LAYOUT-INFO_FIELDNAME = 'COLOR'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

IS_LAYOUT = LS_LAYOUT

IT_FIELDCAT = LT_FIELDCAT

TABLES

T_OUTTAB = ITAB.

3. if it is ALV class, use this:

SLA-INFO_FNAME = 'COLOR'.

CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IS_VARIANT = GS_VARIANT

I_SAVE = 'A'

IS_LAYOUT = SLA

CHANGING

IT_OUTTAB = ITAB[]

IT_FIELDCATALOG = GT_FIELDCAT[]

EXCEPTIONS

INVALID_PARAMETER_COMBINATION = 1

PROGRAM_ERROR = 2

TOO_MANY_LINES = 3

OTHERS = 4.

Read only

Former Member
0 Likes
894

hi,

use th following link,

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm

Regards

Jayapriya

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
893

Hi,

IF you are talking about the colouring of the columns in ALV grid you can use emphasise option in fieldcatalog.

emphasize (highlights column in colour)

Value range: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)

'X' = The column is highlighted in the default color for colour highlighting.

'Cxyz' = The column is highlighted in the coded colour:

- C: Color (coding must start with C)

- x: Color number

- y: Intensified

- z: Inverse

Also you can refer:-

http://www.geocities.com/mpioud/Z_ALV_DYNAMIC_DATA_V3.html

If you want to change the color of rows, refer:-

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

Read only

Former Member
0 Likes
893
Read only

Former Member
0 Likes
893

Hi,

Thank You all for your valuable information