Hi Thomas,
1 You are right.
It seems it is not possible
to
colour the line of SUBTOTAL
(Not the normal data lines)
thru the conventional facility
provided by ALV Functions.
2. Using raw home logic,
one can color it as mentioned in the last answer.
but not thru the functionality provided by SAP for
alv purpose.
This answer may not help your answer,
but probably it will clarify our doubts
and probably the DIFFERENT answers
which many have replied.
Regards,
Amit Mittal.
Hi coloring the cells..
delcare a field in ur internal table.
cellcolor type lvc_t_scol.
data: ls_cellcolor type lvc_s_scol.
and then for that
while populating the totals
ls_cellcolor-fname = 'TOTAL' .
ls_cellcolor-color-col = '7' .
ls_cellcolor-color-int = '1'
APPEND ls_cellcolor TO IT_FINAL-cellcolor
u can get different color for that cell.
regards
vijay
Hi Thomas,
Please check the Demo program ERGP2120.
It has this feature.
Step1: define you internal table like below
DATA: BEGIN OF mylist OCCURS 20, " Internal table for preparing
zuordnung(8) TYPE c,
belegnr(10) TYPE c,
ba(2) TYPE c,
bldatum TYPE d,
bs(2) TYPE c,
s(4) TYPE c VALUE ' ',
wrg(4) TYPE c,
betrag TYPE p DECIMALS 2,
colinfo TYPE slis_t_specialcol_alv,
END OF mylist.
Step2:
LOOP AT lt_mylist.
REFRESH gt_color.
CLEAR gt_color.
IF lt_mylist-betrag > 500000.
CLEAR gt_color.
gt_color-fieldname = 'BETRAG'.
gt_color-color-col = cl_gui_resources=>list_col_positive.
gt_color-color-int = 0.
APPEND gt_color.
ELSEIF lt_mylist-betrag < 100000.
CLEAR gt_color.
gt_color-fieldname = 'BETRAG'.
gt_color-color-col = cl_gui_resources=>list_col_negative.
gt_color-color-int = 0.
APPEND gt_color.
ENDIF.
lt_mylist-colinfo[] = gt_color[].
MODIFY lt_mylist.
ENDLOOP.
Thanks,
Ramakrishna
Message was edited by: Ramakrishna Prasad
Thomas,
While building the Field Catalog, For the Subtotal field, have a stmt
waFieldcatalog-fieldname = 'SUBTOTAL'
<b>waFieldCatalog-emphasize = 'X'.</b>
append waFieldCatalog to ifieldCatalog
Thanks
Kam
Hi Thomas
example on ALV with line color
http://www.geocities.com/mpioud/Z_ALV_LINE_COLOR.html
example on ALV with cell color
http://www.geocities.com/mpioud/Z_ALV_CELL_COLOR.html
http://help.sap.com/saphelp_erp2004/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/fa/efb529f8a611d2b48d006094192fe3/frameset.htm
reward points for helpfull answers and close the thread if your question is solved.
regards,
venu.
Hi,
Follow this link...
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
I hope it will work you.
Thanks.
Hi,
Check this link.
http://www.geocities.com/mpioud/Abap_programs.html
http://www.geocities.com/mpioud/Z_ALV_LINE_COLOR.html
It is about colouring a cell and colouring a line.If so,kindly reward points by clicking the star on the left of reply.
hi If it is normal alv u can do it in different ways.
in end-of-list event
read the report and modify the line where ever subtotals
appear.
i will give a simple code have a look
*-End of list
X_EVENTS_DATA-NAME = 'END_OF_LIST'.
X_EVENTS_DATA-FORM = 'LIST_MODIFY_OUPUT'.
APPEND X_EVENTS_DATA TO IT_EVENTS_DATA.
in the form
READ LINE SY-INDEX INDEX SY-LSIND.
IF SY-SUBRC = 0.
MODIFY LINE SY-INDEX INDEX SY-LSIND
FIELD FORMAT IT_DISPLAY-TOTAL COLOR 4 INVERSE.
ENDIF.
Add a comment