2007 Sep 05 1:45 PM
In my ALV report I am displaying SO & DN as separate columns. I want to give them each a different color.
In my BUILF_FIELDCATALOG, I tried the following but that gives them the same color i.e. blue. I would like to give them different colors. Also it puts them side by side even though when I comment the code out for the delivery, it goes back to the correct column.
WHEN 'VBELN_VA'.
wa_fieldcatalog-seltext_l = 'Order No.'.
wa_fieldcatalog-reptext_ddic = 'Order No.'.
wa_fieldcatalog-emphasize = 'X'.
wa_fieldcatalog-key = 'X'.
MOVE: wa_fieldcatalog-seltext_l TO wa_fieldcatalog-seltext_m,
wa_fieldcatalog-seltext_l TO wa_fieldcatalog-seltext_s.
ADD 1 TO wa_fieldcatalog-col_pos.
WHEN 'VBELN_VL'.
wa_fieldcatalog-seltext_l = 'Delivery'.
wa_fieldcatalog-reptext_ddic = 'Delivery'.
* wa_fieldcatalog-emphasize = 'X'.
* wa_fieldcatalog-key = 'X'.
MOVE: wa_fieldcatalog-seltext_l TO wa_fieldcatalog-seltext_m,
wa_fieldcatalog-seltext_l TO wa_fieldcatalog-seltext_s.
ADD 1 TO wa_fieldcatalog-col_pos.
2007 Sep 05 1:52 PM
Put clear wa_fieldcatalog between 2 statement. means after vbeln_va update clear the fieldcatelog
2007 Sep 05 1:52 PM
Put clear wa_fieldcatalog between 2 statement. means after vbeln_va update clear the fieldcatelog
2007 Sep 05 1:52 PM
You can find how to do that in <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907">this document.</a> Just as you can find the answer to your other 3 threads about the same report you are writing.
2007 Sep 05 1:56 PM
Use the following Form to color the cells after building the field catalog ....
[code]
&----
*& Form SET_CELL_COLORS
&----
text
----
FORM SET_CELL_COLORS.
LOOP AT ITAB.
L_INDEX = SY-TABIX.
IF ITAB-VGBEL = 'DELETED'.
LS_CELLCOLOR-FNAME = 'VGBEL'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '1'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
IF ITAB-FACT = 'XXXXXX'.
LS_CELLCOLOR-FNAME = 'FACT'.
LS_CELLCOLOR-COLOR-COL = '3'.
LS_CELLCOLOR-COLOR-INT = '1'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
LS_CELLCOLOR-FNAME = 'CL_QUANT'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDLOOP.
ENDFORM. " SET_CELL_COLORS
/code]