2009 Feb 04 1:47 AM
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
2009 Feb 04 1:56 AM
hi,
use th following link,
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
Regards
Jayapriya
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
2009 Feb 04 1:54 AM
2009 Feb 04 1:55 AM
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.
2009 Feb 04 1:56 AM
hi,
use th following link,
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
Regards
Jayapriya
2009 Feb 04 3:57 AM
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
2009 Feb 04 4:16 AM
Hi
Check out the following link.
http://www.sapdev.co.uk/reporting/alv/alvgrid.htm
http://sapprograms.blogspot.com/2008/03/color-in-alv.html
Hope this helps
Regards,
Jayanthi.K
2009 Feb 10 4:46 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |