2006 May 07 7:12 AM
Hi all,
Does anyone know how I can color spesific lines in a table
control?
I've only been able to color columns.
Thanx,
Baruch.
2006 May 07 9:23 AM
Hi
Are you speaking about classical TABLE CONTROL? No ALV?
In this case you should modify the attribute using the LOOP/ENDLOOP statament into LOOP/ENDLOOP of TC in PBO:
PROCESS PBO.
LOOP AT ...
MODULE LOOP_SCREEN.
ENDLOOP.
PROCESS PAI.
MODULE LOOP_SCREEN.
IF ......
LOOP AT SCREEN.
SCREEN-INTENSIFIED = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDLOOP.
If you're speaking about ALV:
In your OUTPUT TABLE you need add a new field to manage the color:
DATA: BEGIN OT T_OUTPUT OCCURS 0,
..............
TCOLOR TYPE SLIS_T_SPECIALCOL_ALV,
END OF T_OUTPUT.
It needs to specify the field name in layout structure:
IS_LAYOUT-coltab_fieldname = 'TCOLOR'.
So while you're appending the record into T_OUTPUT you fill the structure TCOLOR too.
These is a table where you need all fields (so the cells of a row) you want to change the color.
DATA: WA_COLOR TYPE SLIS_SPECIALCOL_ALV.
T_OUPUT-FIELD = ...........
REFRESH T_OUTPUT-TCOLOR.
WA_COLOR-FIELDNAME = <field name>
WA_COLOR-COLOR-COL = <color number>.
APPEND WA_COLOR TO T_OUTPUT-TCOLOR.
This way is ok for classical ALV, if you're using OO ALV the way is the same but change the structure you have to use:
IS_LAYOUT-CTAB_FNAME = 'TCOLOR'.
Where TCOLOR is like LVC_T_SCOL
Max
Hi all,
Does anyone know how I can color spesific lines in a table
control?
I've only been able to color columns.
Thanx,
Baruch.
2006 May 07 9:23 AM
Hi
Are you speaking about classical TABLE CONTROL? No ALV?
In this case you should modify the attribute using the LOOP/ENDLOOP statament into LOOP/ENDLOOP of TC in PBO:
PROCESS PBO.
LOOP AT ...
MODULE LOOP_SCREEN.
ENDLOOP.
PROCESS PAI.
MODULE LOOP_SCREEN.
IF ......
LOOP AT SCREEN.
SCREEN-INTENSIFIED = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDLOOP.
If you're speaking about ALV:
In your OUTPUT TABLE you need add a new field to manage the color:
DATA: BEGIN OT T_OUTPUT OCCURS 0,
..............
TCOLOR TYPE SLIS_T_SPECIALCOL_ALV,
END OF T_OUTPUT.
It needs to specify the field name in layout structure:
IS_LAYOUT-coltab_fieldname = 'TCOLOR'.
So while you're appending the record into T_OUTPUT you fill the structure TCOLOR too.
These is a table where you need all fields (so the cells of a row) you want to change the color.
DATA: WA_COLOR TYPE SLIS_SPECIALCOL_ALV.
T_OUPUT-FIELD = ...........
REFRESH T_OUTPUT-TCOLOR.
WA_COLOR-FIELDNAME = <field name>
WA_COLOR-COLOR-COL = <color number>.
APPEND WA_COLOR TO T_OUTPUT-TCOLOR.
This way is ok for classical ALV, if you're using OO ALV the way is the same but change the structure you have to use:
IS_LAYOUT-CTAB_FNAME = 'TCOLOR'.
Where TCOLOR is like LVC_T_SCOL
Max
2006 May 07 12:38 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |