About inserting color to rows in alv
hi ,
could any one tell me how to insert colors to rows in alv.
regards,
pavan.
hi,
try like this
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
line_color(4) TYPE c, "Used to store row color attributes
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
DATA: ld_color(1) TYPE c.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
*Populate field with color attributes
LOOP AT it_ekko INTO wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
IF ld_color = 8.
ld_color = 1.
ENDIF.
CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
MODIFY it_ekko FROM wa_ekko.
ENDLOOP.
ENDFORM. " DATA_RETRIEVAL
reward if usefull....
Similar Messages
-
How to get Inserted and Deleted Rows in ALV
I have looked at the BC_EDIT* examples but I still can't figure out how to determine which rows were Inserted and Deleted from the ALV list. Can someone please provide me the code to do this?
Thanks.
SandyHi sandy,
i dont think you will have issue in inserting a row in ALV because whenever the user done some actions say for eg clicking the pushbutton at the toolbar you could insert the a new row into the ALV.for creating pushbutton you need to use the events TOOLBAR,USER_COMMAND.
deleting a row may also follow the above procedure.
Have a look at the demo program
BCALV_GRID_05
Cheers,
Abdul Hakim -
Hi Freinds,
I want to color a particular row based on the condition in ALV report can any one tell me how to do it.
Thanx and advance,
LineHi,
REPORT zrnp_alv_so MESSAGE-ID z7new .
TABLE DECLARATION
TABLES: vbak , "Sales Document: Header Data
vbap , "Sales Document: Item Data
makt , "Material Descriptions
lips . "SD document: Delivery: Item data
DECLARATION OF TYPE-POOL
*THIS TYPE-POOL CONTAINS THE EVENTS,
TYPE-POOLS : slis.
DECLARATION OF EVENTS
DATA: i_event TYPE slis_t_event.
DATA: t_event TYPE slis_alv_event.
DECLARATION OF LIST HEADER
DATA: i_listheader TYPE slis_t_listheader.
DECLARATION OF FIELD CATALOG FOR SCREEN 1
DATA: i_fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DECLARATION OF FIELD CATALOG FOR SCREEN 2
DATA: i_fldcat2 TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DECLARATION OF FIELD LAYOUT
DATA: i_layout TYPE slis_layout_alv.
SORTING OF OUTPUT
DATA: i_sort TYPE slis_t_sortinfo_alv.
*DATA DECLARATION
DATA: v_auart TYPE tvak-auart,
v_vkorg TYPE tvko-vkorg,
v_kunnr TYPE kna1-kunnr,
v_matnr TYPE mara-matnr ,
v_spart TYPE tvta-spart .
TYPES: BEGIN OF it_so ,
vbeln TYPE vbeln_va , "SALES ORDER NO.
auart TYPE auart , "SALES DOC. TYPE
vkorg TYPE vkorg , "SALES ORG.
spart TYPE spart , "DIVISION
kunnr TYPE kunag , "SOLD TO PARTY
posnr TYPE posnr_va , "SALES DOC. ITEM
matnr TYPE matnr , "MATERIAL NO
maktx TYPE maktx , "DESCRIPTION
kwmeng TYPE kwmeng , "QUANTITY
vrkme TYPE vrkme , "SALES UNIT
line_color(4) TYPE c ,
END OF it_so .
TYPES: BEGIN OF it_del ,
vbeln TYPE vbeln_vl , "SALES ORDER NO.
posnr TYPE posnr_vl , "SALES DOC. ITEM
matnr TYPE matnr , "MATERIAL NO
werks TYPE werks_d , "PLANT
lgort TYPE lgort_d , "STORAGE LOCATION
charg TYPE charg_d , "BATCH NO.
lfimg TYPE lfimg , "ACTUAL DELIVERY QTY.
vrkme TYPE vrkme , "SALES UNIT
END OF it_del .
TYPES: BEGIN OF type_vbfa ,
vbelv TYPE vbeln_von , "Preceding sales and distribution document
posnv TYPE posnr_von , "Preceding item of an SD document
vbeln TYPE vbeln_nach, "Subsequent sales and distribution document
posnn TYPE posnr_nach, "Document category of subsequent document
vbtyp_n TYPE vbtyp_n ,
END OF type_vbfa .
DATA: it_so1 TYPE STANDARD TABLE OF it_so ,
it_del1 TYPE STANDARD TABLE OF it_del ,
it_vbfa TYPE STANDARD TABLE OF type_vbfa,
it_del_ful TYPE STANDARD TABLE OF it_del.
DATA: wa_so TYPE it_so ,
wa_del TYPE it_del ,
wa_vbfa TYPE type_vbfa,
wa_it_del_ful TYPE it_del.
DATA: i_title_vbfa TYPE lvc_title VALUE 'SALES ORDER LIST DISPLAYED'.
DATA: i_title_vbpa TYPE lvc_title VALUE
'DELIVERY DETAILS DISPLAYED AGAINST GIVEN SALES ORDER'.
*SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-004 .
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln ,
s_auart FOR v_auart ,
s_vkorg FOR v_vkorg ,
s_spart FOR v_spart ,
s_kunnr FOR v_kunnr ,
s_matnr FOR v_matnr .
SELECTION-SCREEN END OF BLOCK blk1 .
*AT SELECTION SCREEN *
AT SELECTION-SCREEN.
SELECT SINGLE vbeln
FROM vbak INTO vbak-vbeln
WHERE vbeln IN s_vbeln.
IF sy-subrc <> 0.
MESSAGE e202.
ENDIF.
*START OF SELECTION *
START-OF-SELECTION .
PERFORM data_select.
PERFORM t_sort USING i_sort .
PERFORM event_cat USING i_event .
PERFORM fld_cat USING i_fldcat[] .
PERFORM t_layout USING i_layout .
PERFORM fld_cat2 USING i_fldcat2[] .
PERFORM call_alv.
DATA SELECT *
*& Form DATA_SELECT
text
--> p1 text
<-- p2 text
FORM data_select .
REFRESH: it_vbfa, it_so1, it_del_ful ,it_del1 .
BREAK-POINT.
SELECT
a~vbeln
a~auart
a~vkorg
a~spart
a~kunnr
b~posnr
b~matnr
c~maktx
b~kwmeng
b~vrkme
INTO TABLE it_so1 FROM vbak AS a
JOIN vbap AS b ON bvbeln = avbeln
JOIN makt AS c ON cmatnr = bmatnr
AND c~spras = sy-langu
WHERE a~vbeln IN s_vbeln .
COLURING DISPLAY *
DATA: ld_color(1) TYPE c .
LOOP AT it_so1 INTO wa_so.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
IF ld_color = 8.
ld_color = 1.
ENDIF.
CONCATENATE 'C' ld_color '10' INTO wa_so-line_color.
wa_ekko-line_color = 'C410'.
MODIFY it_so1 FROM wa_so.
ENDLOOP .
IF sy-subrc = 0.
SELECT vbelv
posnv
vbeln
posnn
vbtyp_n
INTO TABLE it_vbfa
FROM vbfa
FOR ALL ENTRIES IN it_so1
WHERE vbelv = it_so1-vbeln
AND posnn = it_so1-posnr
AND vbtyp_n ='J' .
IF sy-subrc = 0.
SELECT vbeln
posnr
matnr
werks
lgort
charg
lfimg
vrkme
FROM lips INTO TABLE it_del_ful
FOR ALL ENTRIES IN it_vbfa
WHERE vbeln = it_vbfa-vbeln
AND posnr = it_vbfa-posnn.
ENDIF.
ENDIF.
ENDFORM. " DATA_SELECT
EVENT CATALOG ****************************************
*& Form EVENT_CAT
text
-->P_I_EVENT text
FORM event_cat USING p_i_event TYPE slis_t_event .
REFRESH p_i_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
et_events = p_i_event
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE p_i_event WITH KEY name = slis_ev_top_of_page INTO t_event.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO t_event-form.
MODIFY p_i_event FROM t_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
CLEAR t_event .
ENDFORM. " EVENT_CAT
*********FORM FOR EVENT TOP_OF_PAGE*********************************
FORM top_of_page .
REFRESH i_listheader.
DATA: t_header TYPE slis_listheader.
DATA: v_text(50).
WRITE sy-datum TO v_text.
CLEAR t_header.
t_header-typ = 'S'.
t_header-key = 'Date'.
t_header-info = v_text.
APPEND t_header TO i_listheader.
CLEAR t_header.
CLEAR v_text.
WRITE: 'SALES ORDER REPORT ' TO v_text .
t_header-typ = 'S'.
t_header-key = 'TITLE'.
t_header-info = v_text.
APPEND t_header TO i_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader.
I_LOGO = 'ALV_BACKGROUND'.
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
FIRST ALV GRID DISPLAY ***************************************
*& Form CALL_ALV
text
--> p1 text
<-- p2 text
FORM call_alv .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND1'
i_callback_top_of_page = 'TOP_OF_PAGE'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
i_grid_title = i_title_vbfa
is_layout = i_layout
it_fieldcat = i_fldcat[]
it_sort = i_sort
it_events = i_event
TABLES
t_outtab = it_so1
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " CALL_ALV
FIRST FIELDCATALOG *************************************
*& Form FLD_CAT
text
-->P_I_FLDCAT[] text
FORM fld_cat USING p_i_fldcat TYPE slis_t_fieldcat_alv.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES ORDER NO.'.
i_fldcat-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'AUART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES DOC. TYPE'.
i_fldcat-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VKORG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES ORG.'.
i_fldcat-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 12. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'SPART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DIVISION'.
i_fldcat-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KUNNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SOLD TO PARTY'.
i_fldcat-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES DOC. ITEM'.
i_fldcat-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 17. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'MATERIAL NO.'.
i_fldcat-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MAKTX'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DESCRIPTION'.
i_fldcat-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KWMENG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'QUANTITY'.
i_fldcat-col_pos = 9. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-do_sum = 'X'. " For doing "SUM"
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES UNIT'.
i_fldcat-col_pos = 10. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
ENDFORM. " FLD_CAT
ALV SORTING ***************************************
*& Form SORT
text
-->P_I_SORT text
FORM t_sort USING p_i_sort TYPE slis_t_sortinfo_alv .
DATA: i_sort TYPE slis_sortinfo_alv .
REFRESH p_i_sort .
CLEAR i_sort.
i_sort-spos = 1.
i_sort-tabname = 'IT_SO1'.
i_sort-fieldname = 'VBELN'.
i_sort-up = 'X'.
i_sort-subtot = 'X'.
i_sort-group = '*'.
APPEND i_sort TO p_i_sort.
ENDFORM. " SORT
*FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTANDARD'.
*ENDFORM. "Set_pf_status
**********FORM FOR EVENT USER_COMMAND1*******************************
FORM user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*CASE R_UCOMM .
WHEN '&IC1' .
IF rs_selfield-FIELDNAME = 'VBELN' .
ENDIF .
WHEN OTHERS .
ENDCASE .
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_so-vbeln
AND posnv = wa_so-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = wa_vbfa-vbelv
posnr = wa_vbfa-posnn.
IF sy-subrc = 0.
CLEAR wa_del.
MOVE wa_it_del_ful TO wa_del.
APPEND wa_del TO it_del1.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
SECOND ALV GRID DISPLAY ***********************************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND2'
i_callback_top_of_page = 'TOP_OF_PAGE'
I_BACKGROUND_ID = 'ALV_BACKGROUND'
i_grid_title = i_title_vbpa
it_fieldcat = i_fldcat2[]
it_sort = i_sort
TABLES
t_outtab = it_del_ful
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM . "USER_COMMAND1
FORM FOR EVENT USER_COMMAND 2 ******************************
FORM user_command2 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
IF SY-SUBRC = 0.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = WA_SO-vbeln
AND posnv = WA_SO-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = rs_selfield-value
posnr = wa_vbfa-posnn.
IF rs_selfield-fieldname = 'VBELN'.
SET PARAMETER ID 'VL' FIELD wa_vbfa-vbeln .
CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN.
ENDIF .
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM . "USER_COMMAND2
SECOND FIELDCATALOG ******************************************
*& Form FLD_CAT2
text
-->P_I_FLDCAT2[] text
FORM fld_cat2 USING p_i_fldcat2 TYPE slis_t_fieldcat_alv .
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-tabname = 'IT_DEL_FUL'."TABLE NAME
i_fldcat2-seltext_m = 'DELIVERY NO.'.
i_fldcat2-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-hotspot = 'X'.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'DELIVERY ITEM'.
i_fldcat2-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'MATERIAL NO.'.
i_fldcat2-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'WERKS'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'PLANT.'.
i_fldcat2-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LGORT'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ST. LOCATION'.
i_fldcat2-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'CHARG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'BATCH NO.'.
i_fldcat2-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LFIMG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ACT. DEL. QTY.'.
i_fldcat2-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'SALES UNIT.'.
i_fldcat2-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
ENDFORM. " FLD_CAT2
ALV LAYOUT *******************************************
*& Form LAYOUT
text
-->P_I_LAYOUT text
FORM t_layout USING p_i_layout TYPE slis_layout_alv .
p_i_layout-zebra = 'X'.
p_i_layout-totals_text = 'GRAND TOTAL ='.
p_i_layout-CONFIRMATION_PROMPT = 'X'.
p_i_layout-DEF_STATUS = ' '.
p_i_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " LAYOUT
Note: Reward points if helpful. -
How to color a row in ALV grid display
Hi,
A few rows in the output of ALV grid display should be shown in different color.How can I achieve this?Hi,
Try out this code
DATA : BEGIN OF G_T_CASH OCCURS 0,
PARTICULARS TYPE CHAR120,
AMOUNT1 TYPE CHAR20,
AMOUNT2 TYPE CHAR20,
AMOUNT3 TYPE CHAR20,
ROW_COLOR TYPE CHAR4,----
add this in the internal table for alv
END OF G_T_CASH.
CLEAR G_WA_CASH.
G_WA_CASH-PARTICULARS = 'Opening Cash Balance'.
G_WA_CASH-AMOUNT1 = G_DMBTR.
G_WA_CASH-AMOUNT2 = ''.
G_WA_CASH-AMOUNT3 = ''.
while appending other values also add the following code
G_WA_CASH-ROW_COLOR = 'C200'.----- C200 depicts light gray color
APPEND G_WA_CASH TO G_T_CASH.
add the following code in layout
MOVE 'ROW_COLOR' TO WA_LS_LAYOUT-INFO_FIELDNAME.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BYPASSING_BUFFER = ' '
I_SAVE = 'A'
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = WA_LS_LAYOUT
IT_FIELDCAT = G_T_CATALOG
IT_EVENTS = GT_EVENTS
TABLES
T_OUTTAB = G_T_CASH[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Let me know if the problem still persist.
Regards,
Janaki -
Hi my friends,
I have written a small ALV Grid where some rows should be colored, dependend on their status in a table. But it's not working and I can't find out, why it is not working. I've already studied all the topics in this forum, which are related to 'row color alv grid', but I can't find the mistake in my code. Is anyone able to find out what is wrong here?
Thanks a lot for your help!
*& Report /BMC_TST_SHOWLOG
REPORT /BMC_TST_SHOWLOG.
TYPES: BEGIN OF log_table.
TYPES: log_level TYPE /bmc_log_message,
cr_date TYPE /bmc_cr_date,
message TYPE /bmc_log_message,
linecolor(4) TYPE c.
TYPES: END OF log_table.
DATA: lt_log TYPE TABLE OF log_table with HEADER LINE,
lt_log2 TYPE TABLE OF log_table with HEADER LINE,
lt_log_list TYPE TABLE OF log_table,
lt_line LIKE LINE OF lt_log_list,
container_r TYPE REF TO cl_gui_custom_container,
grid_r TYPE REF TO cl_gui_alv_grid,
gc_custom_control_name TYPE scrfname VALUE 'CONTAINER_LOG',
fieldcat_r TYPE lvc_t_fcat,
layout_r TYPE lvc_s_layo,
logA TYPE /bmc_log_level,
logB TYPE /bmc_log_level,
logC TYPE /bmc_log_level,
logD TYPE /bmc_log_level,
logE TYPE /bmc_log_level,
ls_ct TYPE lvc_s_scol,
ok_code LIKE sy-ucomm.
*DATA BEGIN OF ls_log_list OCCURS 0.
*DATA: log_level TYPE /bmc_log_message,
* cr_date TYPE /bmc_cr_date,
* message TYPE /bmc_log_message,
* rowcolor(4) TYPE c.
*DATA END OF ls_log_list.
*DATA: lt_log_list TYPE TABLE OF log_table.
PARAMETERS: loglevlA TYPE c AS CHECKBOX,
loglevlB TYPE c as CHECKBOX,
loglevlC TYPE c As CHECKBOX,
loglevlD TYPE c aS CHECKBOX,
loglevlE TYPE c AS CHECKBOX,
dateA TYPE /bmc_cr_date OBLIGATORY,
dateB TYPE /bmc_cr_date.
CALL SCREEN 0200.
MODULE user_command_0200 INPUT.
CASE ok_code.
WHEN 'BACK'.
SET SCREEN 0.
MESSAGE ID 'BC400' TYPE 'S' NUMBER '057'.
WHEN OTHERS.
ENDCASE.
ENDMODULE.
MODULE clear_ok_code OUTPUT.
CLEAR ok_code.
ENDMODULE.
MODULE status_0200 OUTPUT.
SET PF-STATUS 'DYNPRO200'.
SET TITLEBAR 'D0200'.
ENDMODULE.
MODULE display_alv OUTPUT.
PERFORM display_alv.
ENDMODULE.
FORM display_alv.
IF grid_r IS INITIAL.
*----Creating custom container instance
CREATE OBJECT container_r
EXPORTING
container_name = gc_custom_control_name
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
*----Creating ALV Grid instance
CREATE OBJECT grid_r
EXPORTING
i_parent = container_r
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
PERFORM get_log_data.
*----Preparing field catalog.
PERFORM prepare_field_catalog CHANGING fieldcat_r.
*----Preparing layout structure
PERFORM prepare_layout CHANGING layout_r.
*----Here will be additional preparations
*--e.g. initial sorting criteria, initial filtering criteria, excluding
*--functions
CALL METHOD grid_r->set_table_for_first_display
EXPORTING
is_layout = layout_r
CHANGING
it_outtab = lt_log2[]
it_fieldcatalog = fieldcat_r
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
ELSE.
CALL METHOD grid_r->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc <> 0.
*--Exception handling
ENDIF.
ENDIF.
CALL METHOD grid_r->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
CALL METHOD grid_r->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
ENDFORM.
FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = '/BMC_LOG'
CHANGING
ct_fieldcat = pt_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc ne 0.
*--Exception handling
ENDIF.
LOOP AT pt_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'UUID'.
ls_fcat-no_out = 'X'.
MODIFY pt_fieldcat FROM ls_fcat.
WHEN 'LOG_LEVEL'.
ls_fcat-coltext = 'Meldungsart'.
ls_fcat-outputlen = '25'.
MODIFY pt_fieldcat FROM ls_fcat.
WHEN 'CR_DATE'.
ls_fcat-coltext = 'Erstellungsdatum'.
ls_fcat-outputlen = '20'.
MODIFY pt_fieldcat FROM ls_fcat.
WHEN 'CR_TIME'.
ls_fcat-no_out = 'X'.
MODIFY pt_fieldcat FROM ls_fcat.
WHEN 'MESSAGE'.
ls_fcat-coltext = 'Nachricht'.
ls_fcat-outputlen = '50'.
MODIFY pt_fieldcat FROM ls_fcat.
ENDCASE.
* CASE ls_fcat-value.
* WHEN '1'.
* ls_fcat-line_color = 'c100'.
* ENDCASE.
ENDLOOP.
ENDFORM.
FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo.
ps_layout-zebra = 'X'.
ps_layout-grid_title = 'Log'.
ps_layout-smalltitle = 'X'.
ps_layout-info_fname = 'linecolor'.
ENDFORM.
FORM get_log_data.
if loglevlA = 'X'.
logA = '1'.
ENDIF.
if loglevlB = 'X'.
logB = '2'.
ENDIF.
if loglevlC = 'X'.
logC = '3'.
ENDIF.
if loglevlD = 'X'.
logD = '4'.
ENDIF.
if loglevlE = 'X'.
logE = '5'.
ENDIF.
IF dateB ne 0.
SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA and cr_date <= dateB.
ELSE.
SELECT log_level cr_date message FROM /bmc_log INTO CORRESPONDING FIELDS OF TABLE lt_log_list WHERE log_level = logA
OR log_level = logB OR log_level = logC OR log_level = logD OR log_level = logE and cr_date >= dateA.
ENDIF.
* and cr_date >= dateA.
SORT lt_log_list ASCENDING.
LOOP AT lt_log_list INTO lt_line.
IF lt_line-log_level = '1'.
lt_line-log_level = 'Info'.
lt_line-linecolor = 'C100'.
ENDIF.
IF lt_line-log_level = '2'.
lt_line-log_level = 'Warning'.
lt_line-linecolor = 'C200'.
ENDIF.
IF lt_line-log_level = '3'.
lt_line-log_level = 'Error'.
lt_line-linecolor = 'C300'.
ENDIF.
IF lt_line-log_level = '4'.
lt_line-log_level = 'Debug'.
lt_line-linecolor = 'C400'.
ENDIF.
IF lt_line-log_level = '5'.
lt_line-log_level = 'Trace'.
lt_line-linecolor = 'C500'.
ENDIF.
APPEND lt_line TO lt_log2.
ENDLOOP.
ENDFORM.
SELECTION-SCREEN BEGIN OF SCREEN 0100 TITLE text-001 AS WINDOW.
SELECTION-SCREEN END OF SCREEN 0100.> change to this
>
> <b>ps_layout-stylefname = 'LINECOLOR'.</b>
>
> sorry ignore the above line
>
> just debug and check what is happening
>
> Message was edited by:
> Chandrasekhar Jagarlamudi
Hi,
I've changed the line to <b>ps_layout-stylefname = 'LINECOLOR'.</b>, but then I'm getting a runtime error 'ASSIGN_TYPE_CONFLICT' in program 'SAPLSLVC in line 2975'...
I don't have any idea what is causing that. -
How to change a color for a row in ALV grid display
Hi,
how to change a color for a row in ALV grid display based on a condition.Any sample code plzHello Ramya,
Did you check in [SCN|How to color a row of alv grid]
Thanks! -
Hi,
I want to color alternative rows in ALV when I dsiplay the ALV.
How can I do this?
Regards,
Vishal.Hi Vishal
Use the method set_design of interface IF_SALV_WD_TABLE_SETTINGS.
pass the value '00' for alternating color.
DATA : lr_table_settings TYPE REF TO if_salv_wd_table_settings.
data:
l_VALUE type ref to Cl_Salv_Wd_Config_Table.
l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model(
lr_table_settings = l_value.
lr_table_settings->set_design('00' ).
Regards
Naresh -
Coloring column in an ALV tree
Hi all,
What I want to do is set background color for columns in a tree-view ALV(class cl_gui_alv_tree). However no matter how I set the field EMPHASIZE in the fieldcatalog internal table, the display of the ALV tree keeps unchange. Anyone can help me on this?
Thanks,
Chen ChangHi,
<b>If u want to change the node colr in ALV tree do as follows</b>
Adding Root Nodes for the tree.
Key:
NODE_KEY, RELATKEY, RELATSHIP, HIDDEN, DISABLED, ISFOLDER, N_IMAGE,
EXP_IMAGE, <b>STYLE</b>, LAST_HITEM, NO_BRANCH, EXPANDER, DRAGDROPID, TEXT
perform f9101_node_list using: '1' 'ROOT' '' '' '' c_x '' '' '' '' ''
c_x '' text-003.
Adding subitems for the root node.
perform f9101_node_list using:
Material Details
'MATRL' '1' '' '' '' '' '' '' '' '' '' '' ''
text-001,
Document Details
'DOCU' '1' '' '' '' '' '' '' '' '' '' '' ''
text-002.
form f9101_node_list using value(pnodekey)
value(prelatkey)
value(prelatship)
value(phidden)
value(pdisabled)
value(pisfolder)
value(pimage)
value(pexpimage)
value(pstyle)
value(plastitem)
value(pnobranch)
value(pexpander)
value(pdragdropid)
value(ptext).
w_nodes-node_key = pnodekey.
w_nodes-relatkey = prelatkey.
w_nodes-relatship = prelatship. "Natural number
w_nodes-hidden = phidden.
w_nodes-disabled = pdisabled.
w_nodes-isfolder = pisfolder.
w_nodes-n_image = pimage. "Icons / embedded bitmap
w_nodes-exp_image = pexpimage. "Icons / embedded bitmap
<b> w_nodes-style = pstyle.</b> w_nodes-last_hitem = plastitem. "Tree Control: Column Name / Item
"Name
w_nodes-no_branch = pnobranch.
w_nodes-expander = pexpander.
w_nodes-dragdropid = pdragdropid.
w_nodes-text = ptext.
append w_nodes to i_nodes.
endform. " f9101_node_list
Try changing the style so that u can change the column color.
If u want that in ALV grid
1. different color in line of alv
2. Coloring Cells/rows in ALV Grid.
Got this from forum
report .
Use of colours in ALV grid (cell, line and column) *
Table
tables : mara.
Type
types : begin of ty_mara,
matnr like mara-matnr,
matkl like mara-matkl,
counter(4) type n,
free_text(15) type c,
color_line(4) type c, " Line color
color_cell type lvc_t_scol, " Cell color
end of ty_mara.
Structures
data : wa_mara type ty_mara,
wa_fieldcat type lvc_s_fcat,
is_layout type lvc_s_layo,
wa_color type lvc_s_scol.
Internal table
data : it_mara type standard table of ty_mara,
it_fieldcat type standard table of lvc_s_fcat,
it_color type table of lvc_s_scol.
Variables
data : okcode like sy-ucomm,
w_alv_grid type ref to cl_gui_alv_grid,
w_docking_container type ref to cl_gui_docking_container.
parameters : p_column as checkbox,
p_line as checkbox,
p_cell as checkbox.
at selection-screen output.
perform get_data.
perform fill_catalog.
if w_docking_container is initial.
perform create_objects.
endif.
*& Form create_objects
form create_objects.
create object w_docking_container
exporting
ratio = 60
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
create object w_alv_grid
exporting
i_parent = w_docking_container.
Field that identify color line in internal table
move 'COLOR_LINE' to is_layout-info_fname.
Field that identify cell color in inetrnal table
move 'COLOR_CELL' to is_layout-ctab_fname.
call method w_alv_grid->set_table_for_first_display
exporting
is_layout = is_layout
changing
it_outtab = it_mara
it_fieldcatalog = it_fieldcat
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
endform.
*& Form get_data
form get_data.
select * from mara up to 5 rows.
clear : wa_mara-color_line, wa_mara-color_cell.
move-corresponding mara to wa_mara.
add 1 to wa_mara-counter.
move 'Blabla' to wa_mara-free_text.
if wa_mara-counter = '0002'
and p_line = 'X'.
Color line move 'C410' to wa_mara-color_line.
elseif wa_mara-counter = '0004'
and p_cell = 'X'.
Color cell
move 'FREE_TEXT' to wa_color-fname.
move '6' to wa_color-color-col.
move '1' to wa_color-color-int.
move '1' to wa_color-color-inv.
append wa_color to it_color.
wa_mara-color_cell[] = it_color[].
endif.
append wa_mara to it_mara.
endselect.
endform.
*& Form fill_catalog
form fill_catalog.
Colour code : *
Colour is a 4-char field where : *
- 1st char = C (color property) *
- 2nd char = color code (from 0 to 7) *
0 = background color *
1 = blue *
2 = gray *
3 = yellow *
4 = blue/gray *
5 = green *
6 = red *
7 = orange *
- 3rd char = intensified (0=off, 1=on) *
- 4th char = inverse display (0=off, 1=on) *
Colour overwriting priority : *
1. Line *
2. Cell *
3. Column *
data : w_position type i value '1'.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATNR' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATNR' to wa_fieldcat-ref_field.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATKL' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATKL' to wa_fieldcat-ref_field.
Color column
if p_column = 'X'.
move 'C610' to wa_fieldcat-emphasize.
endif.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'COUNTER' to wa_fieldcat-fieldname.
move 'N' to wa_fieldcat-inttype.
move '4' to wa_fieldcat-intlen.
move 'Counter' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'FREE_TEXT' to wa_fieldcat-fieldname.
move 'C' to wa_fieldcat-inttype.
move '20' to wa_fieldcat-intlen.
move 'Text' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
endform.
Check this link to get code for different colors http://www.sapdesignguild.org/resources/ma_guidelines/VisualDesignRules/colors.html
Try this out the same thing will work for Reuse also.
Thanks & Regards,
Judith.
Message was edited by: Judith Jessie Selvi -
Coloring each row Dynamically in WebDynpro using SALV_WD_TABLE component
Hi All,
We have a requirement in WebDynpro ABAP ,to display the ALV table rows with different colors on the bases of come condition at runtime.
We have checked but got only for column wise but not row wise.
Can we archive it for Row wise also?
Thanks in advance.
CBHi Saji,
Please go through this...
coloring the rows of alv dnamically
Color ALV column and rows
Cell color change in ALV
Cheers,
Kris. -
Hi ,
I need to insert a row in ALV output. On click of a Inser Row button a pop up should show with a parameter.Once the value in entered in the parameter enter is hit , the first column of the new row should have value put in that parameter as non editable field.
The Insert row of standard toolbar inserts a blank row . Is there any way to incorporate the above logic in the standard toolbar?
I'm using CL_GUI_ALV_GRID to display the ALV.
It would be helpful if you provide sample coding.
Thanks.
Ajith
Edited by: Ajith Krishna on Oct 28, 2008 8:01 PMHello Ajith
The enhanced version of sample report ZUS_SDN_ALVGRID_EDITABLE_8A demonstrates how to implement your requirement.
*& ZUS_SDN_ALVGRID_EDITABLE_8A
*& Thread: Insert a row in ALV
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1105097"></a>
*& Thread: Blanking values on ALV Grid Row Duplicate
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1057161"></a>
*& Thread: Delete line event in ALV
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="945471"></a>
REPORT zus_sdn_alvgrid_editable_8a.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knb1.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
DATA:
gt_outtab TYPE ty_t_outtab.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
mt_sel_rows TYPE lvc_t_row.
CLASS-METHODS:
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object
sender,
handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_toolbar.
* define local data
DATA: ls_button TYPE stb_button.
LOOP AT e_object->mt_toolbar INTO ls_button.
CASE ls_button-function.
when cl_gui_alv_grid=>MC_FC_LOC_INSERT_ROW.
ls_button-function = 'INSERT_ROW'.
MODIFY e_object->mt_toolbar FROM ls_button INDEX syst-tabix.
WHEN cl_gui_alv_grid=>mc_fc_loc_delete_row.
ls_button-function = 'DELETE_ROW'.
MODIFY e_object->mt_toolbar FROM ls_button INDEX syst-tabix.
WHEN cl_gui_alv_grid=>mc_fc_loc_copy_row OR
cl_gui_alv_grid=>mc_fc_loc_copy.
ls_button-function = 'COPY_ROW'.
MODIFY e_object->mt_toolbar FROM ls_button INDEX syst-tabix.
WHEN OTHERS.
CONTINUE.
ENDCASE.
ENDLOOP.
ENDMETHOD. "handle_toolbar
METHOD handle_user_command.
* define local data
DATA: lt_rows TYPE lvc_t_row,
ls_row TYPE lvc_s_row.
REFRESH: mt_sel_rows.
CASE e_ucomm.
when 'INSERT_ROW'.
WHEN 'DELETE_ROW'.
WHEN 'COPY_ROW'.
WHEN OTHERS.
RETURN.
ENDCASE.
" User wants to delete or copy rows => store them in class attribute
" and trigger PAI afterwards where we actually delete /copy the rows
" and do the recalculations (in case of deletion)
CALL METHOD sender->get_selected_rows
IMPORTING
et_index_rows = mt_sel_rows
* et_row_no =
* Trigger PAI
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = e_ucomm
* IMPORTING
* rc =
ENDMETHOD. "user_command
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
START-OF-SELECTION.
SELECT * FROM knb1 INTO CORRESPONDING FIELDS OF TABLE gt_outtab
UP TO 15 ROWS
WHERE bukrs = p_bukrs.
PERFORM init_controls.
SET HANDLER:
lcl_eventhandler=>handle_toolbar FOR go_grid,
lcl_eventhandler=>handle_user_command FOR go_grid.
" Used to replace standard toolbar function code with custom FC
go_grid->set_toolbar_interactive( ).
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
** CALL METHOD go_grid1->refresh_table_display
*** EXPORTING
*** IS_STABLE =
*** I_SOFT_REFRESH =
** EXCEPTIONS
** FINISHED = 1
** others = 2
** IF sy-subrc <> 0.
*** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
** ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'INSERT_ROW'.
perform INSERT_ROW.
WHEN 'DELETE_ROW'.
PERFORM delete_rows.
WHEN 'COPY_ROW'.
PERFORM copy_rows.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
CALL METHOD go_grid->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
finished = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog_knb1 .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Only non-key fields are editable
ls_fcat-edit = 'X'.
MODIFY gt_fcat FROM ls_fcat
TRANSPORTING edit
WHERE ( key NE 'X' ).
ENDFORM. " BUILD_FIELDCATALOG_KNB1
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
* Display data
CALL METHOD go_grid->set_table_for_first_display
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " INIT_CONTROLS
*& Form delete_rows
* text
* --> p1 text
* <-- p2 text
FORM delete_rows .
* define local data
DATA: ls_row TYPE lvc_s_row.
SORT lcl_eventhandler=>mt_sel_rows BY index DESCENDING. " !!!
LOOP AT lcl_eventhandler=>mt_sel_rows INTO ls_row.
DELETE gt_outtab INDEX ls_row-index.
ENDLOOP.
" After deleting rows do RE-CALCULATION
* perform RECALCULATION.
ENDFORM. " delete_rows
*& Form COPY_ROWS
* text
* --> p1 text
* <-- p2 text
FORM copy_rows .
* define local data
DATA: ld_next TYPE i,
ls_row TYPE lvc_s_row,
ls_outtab TYPE ty_s_outtab.
SORT lcl_eventhandler=>mt_sel_rows BY index DESCENDING. " !!!
LOOP AT lcl_eventhandler=>mt_sel_rows INTO ls_row.
READ TABLE gt_outtab INTO ls_outtab INDEX ls_row-index.
CLEAR: ls_outtab-akont. " In your case: clear GUID
ld_next = ls_row-index + 1.
INSERT ls_outtab INTO gt_outtab INDEX ld_next.
ENDLOOP.
ENDFORM. " COPY_ROWS
*& Form INSERT_ROW
* text
* --> p1 text
* <-- p2 text
form INSERT_ROW .
* define local data
DATA: ld_value1 type SPOP-VARVALUE1,
ls_outtab TYPE ty_s_outtab.
CALL FUNCTION 'POPUP_TO_GET_ONE_VALUE'
EXPORTING
textline1 = 'Enter Value (4 Chars):'
* TEXTLINE2 = ' '
* TEXTLINE3 = ' '
titel = 'Enter Value'
valuelength = 4
IMPORTING
* ANSWER =
VALUE1 = ld_value1
EXCEPTIONS
TITEL_TOO_LONG = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_outtab-kunnr = ld_value1.
ls_outtab-bukrs = ld_value1.
append ls_outtab to gt_outtab.
endform. " INSERT_ROW
Regards
Uwe -
Insert Blank row After every Row in alv report
How to insert blank row After every row in Alv report
what do you mean by a 'blank row'? ALV displays tabular data with 'any' number of columns. Now if you actually want a blank row (no columns at all, just a row), then that is just not possible. If I'm not mistaken, this question was posted before, so try to do a search on SCN. See what is says.
-
Coloring of a (specific) row in ALV report-How?
Hi Experts,
Am looking to assign a color for a (specific)row in ALV report.......so, pls. let me know How to get it done?
thanqTABLES:LFA1.
SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
DATA:BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
LAND1 LIKE LFA1-LAND1,
ORT01 LIKE LFA1-ORT01,
REGIO LIKE LFA1-REGIO,
SORTL LIKE LFA1-SORTL,
CFIELD(4) TYPE C,
END OF ITAB.
data:col(4).
data:num value '1'.
SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
IN LIFNR.
LOOP AT ITAB.
concatenate 'C' num '10' into col .
ITAB-CFIELD = col.
num = num + 1.
if num = '8'.
num = '1'.
endif.
MODIFY ITAB.
ENDLOOP.
TYPE-POOLS:SLIS.
DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA:EVE TYPE SLIS_T_EVENT WITH HEADER LINE.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT-WINDOW_TITLEBAR = 'VENDORS DETAILS SCREEN'.
LAYOUT-EDIT = 'X'.
LAYOUT-info_fieldname = 'CFIELD'.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = FCAT.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT
TABLES
T_OUTTAB = ITAB.
this is for coloring cols
REPORT ZBHCOLOR_COLS.
TABLES:LFA1.
SELECT-OPTIONS:C_LIFNR FOR LFA1-LIFNR. " FOR GRID ONLY
PARAMETERS:LIST RADIOBUTTON GROUP ALV DEFAULT 'X',
GRID RADIOBUTTON GROUP ALV.
DATA:BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
LAND1 LIKE LFA1-LAND1,
ORT01 LIKE LFA1-ORT01,
SORTL LIKE LFA1-SORTL,
REGIO LIKE LFA1-REGIO,
COL TYPE LVC_T_SCOL,
END OF ITAB.
DATA:COLR TYPE LVC_S_SCOL.
SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB.
LOOP AT ITAB.
IF ITAB-LIFNR IN C_LIFNR.
COLR-FNAME = 'NAME1'.
COLR-COLOR-COL = '5'.
COLR-COLOR-INT = '1'.
COLR-COLOR-INV = '0'.
COLR-NOKEYCOL = 'X'.
APPEND COLR TO ITAB-COL.
COLR-FNAME = 'LIFNR'.
APPEND COLR TO ITAB-COL.
MODIFY ITAB.
ENDIF.
ENDLOOP.
TYPE-POOLS:SLIS.
DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
LAYOUT-ZEBRA = 'X'.
layout-coltab_fieldname = 'COL'.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = FCAT.
IF LIST = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT
TABLES
T_OUTTAB = ITAB.
ELSEIF GRID = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FCAT
TABLES
T_OUTTAB = ITAB.
ENDIF.
Reward points if useful. -
Changing font size(bold) or color of a particular row in ALV Grid Digplay
Hi Experts ,
I am having a requirment to highlight some particular rows in ALV Grid Display . To achieve this i need to change font size or make it bold or change color of that row .
Please give me some inputs .
Thanks in Advance.
VijyetaHi
Coloring An Entire Row
Coloring a row is a bit (really a bit) more complicated. , you should add an additional field to your list data table. It should be of character type and length at least 4. This field will contain the color code for the row.
First you have to declaration of our list data table u201Cgt_listu201D.
DATA BEGIN OF gt_list OCCURS 0 .
INCLUDE STRUCTURE SFLIGHT .
DATA rowcolor(4) TYPE c .
DATA END OF gt_list .
Adding the field that will contain row color data
As you guess, you should fill the color code to this field. But how will ALV Grid know that you have loaded the color data for the row to this field. So, you make it know this by passing the name of the field containing color codes to the field u201CINFO_FNAMEu201D of the layout structure.
e.g.
ps_layout-info_fname = <field_name_containing_color_codes>. u201Ce.g. u2018ROWCOLORu2019
You can fill that field anytime during execution. But, of course, due to the flow logic of screens, it will be reflected to your list display as soon as an ALV refresh occurs.
Try this link also:
Possible functionalities in ALV
Regards
Neha -
Append/Insert(not Single) Mutliple rows on ALV Webdynpro
Hello Friends,
We all know that the std button Append/Insert , can insert only one row on a single click.
My specific requirement is :
1) that when User clicks on this button(single click), we need to see 'n' rows( n will be provided as a input box for th user to provide like 5,10,12 etc) appended/inserted at the end of the ALV list .
2) In all the new rows, some of the columns should be defaulted to some data.
Is there any approach to achieve this requirement?
Regards
Vinay.Hello Kiran,
As i mentioned earlier, I already implemented the above said approach. Its working..
But just wanted to check if there is any facility as these new rows will not be captured centrally in the
r_param->t_inserted_rows (in data check event). So that i can move on with other processing .
FYI... there is a method in the class CL_SALV_WD_CONFIG_TABLE - IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_APPEND_ROWS_ALLOWED( which is obsolete now).
I dont know why this facility is not provided.
May be we need to check this faciltiy as well with Thomas Jung to re-add this in future.
Anyways..i continue with my approach...
Regards
Vinay. -
How to put color in certain row to ALV grid report.
Kindly help.
Thanks..
Moderator Message: FAQ.
Edited by: kishan P on Nov 20, 2010 7:37 PMHi
A) You need to define a new field for color in your output table: this field has to be a CHAR 3
B) In layout structure you need to indicate the name of the field for color: IS_LAYOUT-INFO_FIELDNAME = <field for color>
C) While populating the output table you need to set the color attribute in the field for color:
ITAB-COLOR = 'Cxy'.
C is a constant (the value has to start wiht C)
x is the color number (from 1 to 9, see the SAP help)
y is Intensified (0 = off 1 = on)
Max
Moderator Message: Please do not answer basic and Frequently asked question.
Edited by: kishan P on Nov 20, 2010 7:38 PM
Maybe you are looking for
-
Why cant i print from my ipad using airport express but i can print from my mac using the express
why cant i print from my ipad using airport express but i can print from my mac using the express
-
Can't print on bluetooth printer?
I have a HP PhotoSmart C5580 A.I.O printer with bluetooth capabilities. I have been trying to set it up on my MacBook Pro (running on Leopard) for months now. My bluetooth is turned on, and the printer is listed under devices on the bluetooth. Howeve
-
How to export a book project from iPhoto '11?
how to export a book project from iPhoto '11?
-
Creating views in a new schema to access certain rows of tables in source schema
Hi, Oracle 10.2.0.4 We are trying to mask certain data from some users. My suggestion is that we create a new schema view_schema on the same instance where we have source tables say in source_schema. We then create views in view_schema as below CREAT
-
Received Mac Book Pro 13" uncharged, is it normal?
I received my new Mac Book Pro 13" yesterday. Welcome pack says that all Apple devices are charged and ready to use... but it didn't power on. I plugged in to charge it and it could start with battery at 0%. I shutdown and it charged fully in 2 hours