In alvs how to add colore
how to add colore to the particular fields in alvs?
could u plz explain clearly with code and comments
Hi,
go thr below code,
tables used -
tables: mkpf,
mseg,
lfa1,
makt.
global hashed tables used
data: begin of wa_mkpf, "header
mblnr like mkpf-mblnr,
mjahr like mkpf-mjahr,
budat like mkpf-budat,
xblnr like mkpf-xblnr,
end of wa_mkpf.
data: ht_mkpf like hashed table of wa_mkpf
with unique key mblnr mjahr
with header line.
data: st_mkpf like standard table of wa_mkpf
with header line.
data: begin of wa_mseg, " line items
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
zeile like mseg-zeile,
bwart like mseg-bwart,
charg like mseg-charg,
matnr like mseg-matnr,
lifnr like mseg-lifnr,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
end of wa_mseg.
data ht_mseg like hashed table of wa_mseg
with unique key mblnr mjahr zeile
with header line.
data st_mseg like standard table of wa_mseg
with header line.
cache structure for lfa1 records
data: begin of wa_lfa1,
lifnr like lfa1-lifnr,
name1 like lfa1-name1,
end of wa_lfa1.
data ht_lfa1 like hashed table of wa_lfa1
with unique key lifnr
with header line.
cache structure for material related data
data: begin of wa_material,
matnr like makt-matnr,
maktx like makt-maktx,
end of wa_material.
data: ht_material like hashed table of wa_material
with unique key matnr
with header line.
result table
data: begin of wa_lst, "
budat like mkpf-budat,
mblnr like mseg-mblnr,
lifnr like mseg-lifnr,
name1 like lfa1-name1,
xblnr like mkpf-xblnr,
zeile like mseg-zeile,
charg like mseg-charg,
matnr like mseg-matnr,
maktx like makt-maktx,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
mjahr like mseg-mjahr,
end of wa_lst.
data: ht_lst like hashed table of wa_lst
with unique key mblnr mjahr zeile
with header line.
data: begin of wa_lst1, " sumary by material
matnr like mseg-matnr,
maktx like makt-maktx,
erfmg like mseg-erfmg,
erfme like mseg-erfme,
color_line(4) TYPE c, " Line color
color_cell TYPE lvc_t_scol, " Cell color
celltab type LVC_T_STYL,
end of wa_lst1.
data: ht_lst1 like hashed table of wa_lst1
with unique key matnr
with header line.
structures for alv grid display.
itabs
type-pools: slis.
data: it_lst like standard table of wa_lst with header line,
it_fieldcat_lst type slis_t_fieldcat_alv with header line,
it_sort_lst type slis_t_sortinfo_alv,
it_lst1 like standard table of wa_lst1 with header line,
it_fieldcat_lst1 type slis_t_fieldcat_alv with header line,
it_sort_lst1 type slis_t_sortinfo_alv.
structures
data: wa_sort type slis_sortinfo_alv,
ls_layout type slis_layout_alv.
color management.
DATA : wa_color TYPE lvc_s_scol.
Internal table for color management.
DATA : it_color TYPE TABLE OF lvc_s_scol.
itab for input enabling.
DATA: lt_celltab TYPE lvc_t_styl. "
global varialbes
data: g_lines type i.
data: g_repid like sy-repid,
ok_code like sy-ucomm.
selection-screen
"text: Dates:
select-options: so_budat for mkpf-budat default sy-datum.
"text: Material numbers.
select-options: so_matnr for mseg-matnr.
selection-screen uline.
selection-screen skip 1.
"Text: show summary by material.
parameters: gp_bymat as checkbox default ''.
parameters: gp_hier as checkbox default 'X'.
start-of-selection.
perform get_data.
perform show_data.
end-of-selection.
FORM get_data *
form get_data.
select mblnr mjahr budat xblnr
into table ht_mkpf
from mkpf
where budat in so_budat. " make use of std index.
have we retrieved data from mkpf?
describe table ht_mkpf lines g_lines.
if g_lines > 0.
if true then retrieve all related records from mseg.
Doing this way we make sure that the access is by primary key
of mseg.
The reason is that is faster to filter them in memory
than to allow the db server to do it.
select mblnr mjahr zeile bwart charg
matnr lifnr erfmg erfme
into table ht_mseg
from mseg
for all entries in ht_mkpf
where mblnr = ht_mkpf-mblnr
and mjahr = ht_mkpf-mjahr.
endif.
fill t_lst or t_lst1 according to user's choice.
if gp_bymat = ' '.
perform fill_ht_lst.
else.
perform fill_ht_lst1.
endif.
endform.
form fill_ht_lst.
refresh ht_lst.
Example: how to discard unwanted data in an efficient way.
loop at ht_mseg.
filter unwanted data
check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
check ht_mseg-matnr in so_matnr.
read header line.
read table ht_mkpf with table key mblnr = ht_mseg-mblnr
mjahr = ht_mseg-mjahr.
clear ht_lst.
* note : this may be faster if you specify field by field.
move-corresponding ht_mkpf to ht_lst.
move-corresponding ht_mseg to ht_lst.
perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.
perform read_material using ht_mseg-matnr changing ht_lst-maktx.
insert table ht_lst.
endloop.
endform.
form fill_ht_lst1.
data: colorear.
refresh ht_lst1.
Example: how to discard unwanted data in an efficient way.
hot to simulate a collect in a faster way
loop at ht_mseg.
filter unwanted data
check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
check ht_mseg-matnr in so_matnr.
* note : this may be faster if you specify field by field.
read table ht_lst1 with table key matnr = ht_mseg-matnr
transporting erfmg.
if sy-subrc <> 0. " if matnr doesn't exist in sumary table
" insert a new record
clear ht_lst1.
ht_lst1-matnr = ht_mseg-matnr.
perform read_material using ht_mseg-matnr changing ht_lst1-maktx.
ht_lst1-erfmg = ht_mseg-erfmg.
ht_lst1-erfme = ht_mseg-erfme.
if colorear = ''.
colorear = 'X'.
refresh it_color.
ht_lst1-color_cell[] = it_color[].
MOVE 'C410' TO ht_lst1-color_line.
else.
colorear = ' '.
refresh it_color. clear it_color.
MOVE 'MATNR' 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.
MOVE 'MAKTX' TO wa_color-fname.
MOVE '3' 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.
MOVE 'ERFMG' TO wa_color-fname.
MOVE '5' 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.
ht_lst1-color_cell[] = it_color[].
clear ht_lst1-color_line.
endif.
insert table ht_lst1.
else." a record was found.
" collect erfmg. To do so, fill in the unique key and add
" the numeric fields.
ht_lst1-matnr = ht_mseg-matnr.
add ht_mseg-erfmg to ht_lst1-erfmg.
modify table ht_lst1 transporting erfmg.
endif.
endloop.
endform.
implementation of cache for lfa1.
form read_lfa1 using p_lifnr changing p_name1.
read table ht_lfa1 with table key lifnr = p_lifnr
transporting name1.
if sy-subrc <> 0.
clear ht_lfa1.
ht_lfa1-lifnr = p_lifnr.
select single name1
into ht_lfa1-name1
from lfa1
where lifnr = p_lifnr.
if sy-subrc <> 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.
insert table ht_lfa1.
endif.
p_name1 = ht_lfa1-name1.
endform.
implementation of cache for material data
form read_material using p_matnr changing p_maktx.
read table ht_material with table key matnr = p_matnr
transporting maktx.
if sy-subrc <> 0.
ht_material-matnr = p_matnr.
select single maktx into ht_material-maktx
from makt
where spras = sy-langu
and matnr = p_matnr.
if sy-subrc <> 0. ht_material-maktx = 'n/a in makt'. endif.
insert table ht_material.
endif.
p_maktx = ht_material-maktx.
endform.
form show_data.
if gp_hier = 'X'. "no anda.
perform show_hierarchicalALV.
else.
if gp_bymat = ' '.
perform show_ht_lst.
else.
perform show_ht_lst1.
endif.
endif.
endform.
form show_hierarchicalALV.
st_mkpf[] = ht_mkpf[].
st_mseg[] = ht_mseg[].
call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM =
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header =
i_tabname_item =
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo =
IS_PRINT =
IS_REPREP_ID =
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = st_mkpf
t_outtab_item = st_mseg
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.
form show_ht_lst.
"needed because the FM can't use a hashed table.
it_lst[] = ht_lst[].
perform fill_layout using 'full display'
changing ls_layout.
perform fill_columns_lst.
perform sort_lst.
g_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
is_layout = ls_layout
it_fieldcat = it_fieldcat_lst[]
it_sort = it_sort_lst
tables
t_outtab = it_lst
exceptions
program_error = 1
others = 2.
endform.
form show_ht_lst1.
"needed because the FM can't use a hashed table.
it_lst1[] = ht_lst1[].
perform fill_layout using 'Sumary by matnr'
changing ls_layout.
perform fill_columns_lst1.
perform sort_lst.
g_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
is_layout = ls_layout
it_fieldcat = it_fieldcat_lst1[]
it_sort = it_sort_lst
tables
t_outtab = it_lst1
exceptions
program_error = 1
others = 2.
endform.
form fill_layout using p_window_titlebar
changing cs_layo type slis_layout_alv.
clear cs_layo.
cs_layo-window_titlebar = p_window_titlebar.
cs_layo-edit = 'X'.
cs_layo-edit_mode = space.
MOVE 'COLOR_LINE' TO cs_layo-info_fieldname.
Field that identify cell color in inetrnal table
MOVE 'COLOR_CELL' TO cs_layo-coltab_fieldname.
move 'CELLTAB' TO cs_layo-stylefname.
endform. " armar_layout_stock
form set_pf_status using rt_extab type slis_t_extab.
create a new status
and then select extras -> adjust template -> listviewer
set pf-status 'VISTA'.
endform. "set_pf_status
define add_lst.
clear it_fieldcat_lst.
it_fieldcat_lst-fieldname = &1.
it_fieldcat_lst-outputlen = &2.
it_fieldcat_lst-ddictxt = 'L'.
it_fieldcat_lst-seltext_l = &1.
it_fieldcat_lst-seltext_m = &1.
it_fieldcat_lst-seltext_m = &1.
if &1 = 'MATNR'.
it_fieldcat_lst-emphasize = 'C111'.
endif.
append it_fieldcat_lst.
end-of-definition.
define add_lst1.
clear it_fieldcat_lst.
it_fieldcat_lst1-fieldname = &1.
it_fieldcat_lst1-outputlen = &2.
it_fieldcat_lst1-ddictxt = 'L'.
it_fieldcat_lst1-seltext_l = &1.
it_fieldcat_lst1-seltext_m = &1.
it_fieldcat_lst1-seltext_m = &1.
append it_fieldcat_lst1.
end-of-definition.
form fill_columns_lst.
set columns for output.
refresh it_fieldcat_lst.
add_lst 'BUDAT' 10.
add_lst 'MBLNR' 10.
add_lst 'LIFNR' 10.
add_lst 'NAME1' 35.
add_lst 'XBLNR' 15.
add_lst 'ZEILE' 5.
add_lst 'CHARG' 10.
add_lst 'MATNR' 18.
add_lst 'MAKTX' 30.
add_lst 'ERFMG' 17.
add_lst 'ERFME' 5.
add_lst 'MJAHR' 4.
endform.
form fill_columns_lst1.
set columns for output.
refresh it_fieldcat_lst1.
add_lst1 'MATNR' 18.
add_lst1 'MAKTX' 30.
add_lst1 'ERFMG' 17.
add_lst1 'ERFME' 5..
endform.
Horacio Zapettini
Program to Calculate FI Opening Balance
How to find the Opening balance for a given period in FI Module for a Particular GL A/c.
I was calculated opening balance, code is below maybe it will be helpful.
*find period.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = s_budat-low
i_periv = i_tab-periv "'K4'
IMPORTING
e_buper = v_donem
e_gjahr = v_gjahr
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
*calc opening balance hesabý
SELECT * FROM knc1 WHERE kunnr = i_tab-kunnr
AND bukrs = i_tab-bukrs " s_bukrs
AND gjahr EQ v_gjahr.
v_dnm = v_donem.
opening balance first calc > old year ,
WHILE v_dnm > 1.
v_dnm = v_dnm - 1.
CONCATENATE 'knc1-um' v_dnm 's' INTO v_field_name_borc.
CONCATENATE 'knc1-um' v_dnm 'h' INTO v_field_name_alacak.
ASSIGN (v_field_name_borc) TO old
add days which is from selected date-low month
IF v_donem > 1.
v_dnm = v_donem - 1.
ELSE.
v_dnm = v_donem.
ENDIF.
SELECT SINGLE * FROM t009b WHERE periv = i_tab-periv "'K4'
AND bdatj = s_budat-low+0(4)
AND poper = v_dnm.
t009b-butag = t009b-butag + 1.
IF s_budat-low+6(2) NE t009b-butag.
v_date_high = s_budat-low - 1.
IF v_donem = 1.
v_date_low = s_budat-low.
v_date_low+4(4) = '0101'.
ELSE.
CONCATENATE t009b-bdatj t009b-bumon t009b-butag INTO
v_date_low.
ENDIF.
SELECT * FROM bsad WHERE bukrs EQ i_tab-bukrs "IN s_bukrs
AND kunnr = i_tab-kunnr
AND budat BETWEEN v_date_low AND
v_date_high
AND umskz = space
AND blart IN s_blart.
IF bsad-shkzg = 'S'.
i_tab-dmbtr_s = i_tab-dmbtr_s + ( bsad-dmbtr ).
ELSEIF bsad-shkzg = 'H'.
i_tab-dmbtr_h = i_tab-dmbtr_h + ( bsad-dmbtr ).
ENDIF.
ENDSELECT.
SELECT * FROM bsid WHERE bukrs EQ i_tab-bukrs "IN s_bukrs
AND kunnr = i_tab-kunnr
AND budat BETWEEN v_date_low AND
v_date_high
AND umskz = space
AND blart IN s_blart.
AND gsber IN gsber.
IF bsid-shkzg = 'S'.
i_tab-dmbtr_s = i_tab-dmbtr_s + ( bsid-dmbtr ).
ELSEIF bsid-shkzg = 'H'.
i_tab-dmbtr_h = i_tab-dmbtr_h + ( bsid-dmbtr ).
ENDIF.
ENDSELECT.
ENDIF.
"opening balance ( þirket bazlý )z1 degeri
i_tab-z1 = i_tab-z1 + ( knc1-umsav + i_tab-dmbtr_s - i_tab-dmbtr_h ).
for israel
i_tab-dmbtril_s = i_tab-dmbtr_s .
i_tab-dmbtril_h = i_tab-dmbtr_h .
ENDSELECT.
reward if useful.
Similar Messages
-
How to add color only in header
how to add color only in header and arrange a background color selected from desktop
You can place rectangle in header section on master page which would be applied on sub pages and then fill rectangle with color.
If you are after a specific color then simply use color code and fill.
Thanks,
Sanjit -
Hi Experts, oo hierarchical alv, how to add checkbox on every header?
Hi Experts,
I am working on oo hierarchical alv, how can I add checkbox on every header? thanks in advance!
Kind regards
DawsonHi Dawson,
Just refer the below program & pass the check box functionality (mentioned in bold) in REUSE_ALV_HIERSEQ_LIST_DISPLAY in your program.
TYPE-POOLS : slis.
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
CALL BACK FORM
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
LOOP AT itab.
itab-flag = 'X'.
MODIFY itab.
ENDLOOP.
IMPORTANT.
WHATROW-REFRESH = 'X'.
ENDFORM. "ITAB_user_command
Regards
Abhii... -
How to add colors to a CSV file?
Hi there,
I'm exporting data to a CSV file using printWriter.
Question: is it possible to add colors, bold text or stretch the length of a column in the produced CSV file?
This, of course, should be the end result of the file (not do it when the file is open)
Thank you!xianwinwin wrote:
Question: is it possible to add colors, bold text or stretch the length of a column in the produced CSV file?Of course if you assumed that you'd be looking at the file with a fixed-width font, you could insert a bunch of tabs or spaces to get columns to match up, but I strongly advise you not do that. I think of CSV as a poor-man's excel data file or perhaps a flat database file, but most importantly it holds data in a standard format that can be read and manipulated by many different programs, including ones you write yourself. It is not meant to be for pretty visualization. Try to pretty it up and you possibly ruin it's main reason for existing. For nice visualization I'd create a small app that read the CSV, formatted it nicely and either displayed the data or stored it in some pretty format as a non-CSV file. -
ALV , How to add a Field after it has been deleted
Hi,
I am formating a ABAP Webdynpro ALV: I remove a field by using :
l_value->if_salv_wd_column_settings~delete_column( lv_field_name).
How will I be able to add the field again ?
I tried the following :
l_value->if_salv_wd_column_settings~CREATE_COLUMN( lv_field_name).
but getting a 'null' object reference in the following standard code :
if ls_column-r_column->r_cell_editor->visible_fieldname is initial.
RegardsHi.
After create_column method you have to create cl_salv_wd_uie_text_view object:
data:
" Variables para configurar los ALVs.
lr_alv_config_table type ref to cl_salv_wd_config_table,
lr_lr_wd_table_usage TYPE REF TO if_wd_component_usage,
lr_wd_table TYPE REF TO iwci_salv_wd_table,
lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column TYPE REF TO cl_salv_wd_column,
lr_text type ref to cl_salv_wd_uie_text_view,
lr_header type ref to cl_salv_wd_column_header.
" Initialize variables
lr_lr_wd_table_usage = wd_this->wd_cpuse_alv_1001( ).
if lr_lr_wd_table_usage->has_active_component( ) is initial.
lr_lr_wd_table_usage->create_component( ).
endif.
lr_wd_table = wd_this->wd_cpifc_alv_1001( ).
lr_alv_config_table = lr_wd_table->get_model( ).
lr_column_settings ?= lr_alv_config_table.
lr_table_settings ?= lr_alv_config_table.
" Delete Column.
lr_column_settings->delete_column( 'OBJID' ).
" Create column.
lr_column = lr_column_settings->create_column( 'OBJID' ).
create object lr_text.
lr_text->set_text_fieldname( 'OBJID' ).
lr_column->set_cell_editor( lr_text ).
" Change the header of the column.
lr_column->GET_HEADER( receiving value = lr_header ).
if lr_header is bound.
lr_column->delete_HEADER( receiving value = lr_header ).
endif.
lr_column->create_HEADER( receiving value = lr_header ).
lr_header->SET_TEXT( exporting value = 'Objid Field' ). -
Hi everyone:
I need to use different color for backgrounds than those i
see in the color palette, ?How can i add another colors?.
Thanks.Hola Mauricio
Mira yo te puedo ayudar pero no se como explicartelo en ingles.
Si hablas castellano me lo dices y con gusto te ayudo.
Saludos -
How to add colors instead of overlap
I have drawn two boxes of red and green (solid). Since they are of
smaller size than the background, I am able to move them around using
the cursor.
When I overlap one over another, the one on the top hides the bottom
one.
How can I add these two colors? I.e. in the area where red and green
are overlapping, it should become yellow.
I want to do it with out reducing the opacity.
Does anyone know how to do it?
Thanks in advance.
AlexChange the Blending Mode of the top layer to Screen. This includes all the lower layers, including the background, which you may not want. To get around this, group the two layers you are combining, and then set the Blending Mode for the group from Pass Through to Normal.
EDIT:
Said it before, and I'm sure I'll say it again: I have GOT to type faster! -
How to add coloring to Calendar
For the longest time we wished we could have some color formatting in the Calendar web part. I just stumbled on some instructions for how to do that, and they actually worked.They are herehttp://blog.metrostarsystems.com/2014/07/16/sharepoint-2013-any-color-coded-calendar-step-by-step/Here's a low-quality image of my SharePoint page, you can see some of the colors in the calendar. Blue , of course, is the built in color.. I added the green , orange, red and dark blue.
This topic first appeared in the Spiceworks CommunityViewing the calendar, with the day selected you want to add the appointment to, tap on the + in the upper right corner of Calendar and that will bring up the add box.
-
HOW TO ADD COLORS TO JTABLE ROWS??
I want to change the colors of alternate rows in my JTable. I am doing so using CellRenderer, but then I am not able to view the selected rows.
tell me how can I change the row color as well as a selected row should be identifiable from others, as ordinary JTable.
thanksHi,
try this:
define your own DefaultTableCellRenderer like this:
class MyRenderer extends DefaultTableCellRenderer {
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column){
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (isSelected) setBackground( Color.anyColor );
return this;
Hope it helps!
Regards, Paul -
How to add colors from one doc to another in CS2
I thought I could pull a text frame with text and colors in fill background out to the sideboard to create a snippet but it didn't work.
Is this only in CS3? or what is the easiest way to transfer swatches between docs?Unable to change black default setting in Win IDCS2.
Somehow, I managed to change the default black swatch to a value other than black--and I can't get rid of it! I didn't think it was possible to change this default black setting, but I did, and now everything--type and graphics--has shifted to that value. I'm trying to print to monochrome. The PDF file of all documents I print reflect that color PMS output value, even though I set the output to "composite gray, text as black." I've tried to import the swatches palate from previous documents, but that doesn't change the black setting. What can I do to get my default black setting back?
Thanks, Mike -
How to add colors on my ipad calendar for different types of events
Lets say i want to make all the birthdays on my calendar a certain color will i be able to do that
You will have to make a separate "Birthdays" calendar. All of the items in one calendar are the same color, so if you create a new calendar for just birthdays that will be a different color than your main calendar. Unfortunately Apple doesn't allow us to select our own colors for calendars so you are stuck with whatever color the calendar program assigns you. Pretty frustrating to have such a basic thing as customizing calendar colors not available. Perhaps someday someone at Apple will take the hour of coding needed to make this happen?
-
How to add colors to table cells
Hi ALL,
Does anyone have any idea of adding colors to table cells?For example i am displaying monthly chart in a table view i want to fill the cells with colors when columns are saturday and sunday.
Thanks in advanceHi,
I want to pass the colors at bean level.For example
private DefaultTableViewModel createNewTable
(DefaultTableViewModel model) {
Vector data = createData();
Vector colName = new Vector();
/* Define column names */
colName.addElement("1stColumn");
colName.addElement("2ndColumn");
colName.addElement("3rdColumn");
model = new DefaultTableViewModel(data, colName);
return model;
private Vector createData() {
Vector dataVec = new Vector();
Vector retVector = new Vector();
/* 1st entry */
dataVec.addElement("Row 1, Column 1");
dataVec.addElement("Row 1, Column 2");
dataVec.addElement("Row 1, Column 3");
retVector.addElement(dataVec);
/* 2nd entry */
dataVec = new Vector();
dataVec.addElement("Row 2, Column 1");
dataVec.addElement("Row 2, Column 2");
dataVec.addElement("Row 2, Column 3");
retVector.addElement(dataVec);
/* more entries */
return retVector;
suppose I want to pass the color at Row2,Column1.Can anyone post the sample code ?
its little urgent.Thanks in advance -
hi
i use CL_SALV_TABLE to show alv.
how i insert color to some texts in top of page.
thanks
have a nice dayHi,
only the last answer shows into the right direction.
Creating your object, there is parameter I_S_LAYOUT. You must pass a structured field of type LVC_S_LAYO. This must be used to store the name of the table field storing color information:
<pre>
like this...
data:
LS_LAYOUT type VC_S_LAYO.
LS_LAYOUT-CTAB_FNAME = 'COLORS'.
pass this parameter when creating the CL_SALV_TABLE object.
In your internal table, you need a field named COLORS of type LVC_T_SCOL. This should <b>not</b> be part of the field catalog.
The coloring of specific cells is done like
loop at itab.
PERFORM alv_color
USING lv_fnam col_positive 1 0
CHANGING itab-colors.
modify itab.
endloop." at itab.
where lv_fnam is the name of the field where you set the color. If the name is space, ALV will color the whole line, then comes the color (use TYPE-POOLS col), then intensify and inverse (0 or 1) attributes.
You can still make the above loop better using loop .. assigning ...
The form looks like this:
*& Form alv_color
set field color
FORM alv_color USING pv_fieldname TYPE fieldname
pv_color TYPE c
pv_intensify TYPE i
pv_inverse TYPE i
CHANGING pt_colors TYPE LVC_T_SCOL.
DATA:
ls_colors TYPE LINE OF LVC_T_SCOL.
READ TABLE pt_colors TRANSPORTING NO FIELDS WITH KEY
fieldname = pv_fieldname
color-col = pv_color
color-int = pv_intensify
color-inv = pv_inverse
BINARY SEARCH.
CHECK sy-subrc <> 0.
ls_colors-fieldname = pv_fieldname.
ls_colors-color-col = pv_color.
ls_colors-color-int = pv_intensify.
ls_colors-color-inv = pv_inverse.
INSERT ls_colors INTO pt_colors INDEX sy-tabix.
ENDFORM. "alv_color
</pre>
By the way: This is first time I see someone uses CL_SALV_TABLE - Usually CL_GUI_ALV_GRID (similar but I think more powerful) is used. Is ther any advantage?
Hope it really helps.
Regards,
Clemens -
How should I add color to this shot?
On a recent outdoor shooting I had taken this video on a village road on a sunny afternoon. The road had trees lined up on one side and I had encountered this situation of alternate shady and bright areas, shady areas being dark on account of tree shade. The screenshot will give the idea of the scene:
Any advise as to how to add color grading to this shot will be deeply appreciated.Wow Tom, your recipe work like charm!
Thanks for this tip. -
Add color tint to b/w original
hi there -
I want to add a tint to some old black and white footage, like they used to do in the silent era. My original footage is b/w, so from what I can tell color correction doesn't help with this.
Any ideas on how to add color that isn't already there?
thanks much
RMIt would depend on what exactly you were trying to treat...
I'm not at my system, but I ran some prior tests and was able to select a range of grayscale to affect, and then you could use mattes or masks to further isolate specific areas/ranges.
Might take some work, but that's what it's all about, right...finding a creative solution to a given challenge?
K
Maybe you are looking for
-
I am trying to use songs I purchased from iTunes, from my library if you will, in my video (slideshow) using Windows Movie Maker. Does anyone know if that is possible to do? If so, would you please tell me how to do that?
-
Urgent.. Characterset of flat file target in OWB
OWB mapping reads from the database source and writes to flat file target in unix os but junk characters are displayed for non english characters in the target file . The database table contains french,spanish,german,arabic characters.The nls db para
-
Refresh a Report in Web Template
Hi Can we refresh a particular report ( Data Provider) without pop of variable screen again using already selected variable values once you have logged into the Web Application. Our users want to just want to refresh a report with refresh button to v
-
i have created a class whcih converts a xml file to a xslfo using a xslt this works within the IDE but when i call it from a jsp i get a error within tomcat which says stylesheet requires attribute version this is not required when i run it in the id
-
I am doing a 9-1-1 reporting system. I am selecting calls by Agency and type of call for a given month. That works fine, but I need them printed in desending sequence by number call far a call type. Don't see anyway to accomplish that with one query.