Doubt in Color of matrix Column
Hi, All
I want to give some back color to selected records in rows. How it is possible.
I have tried it but it is giving color to all colums but i need color only for selected rows.plz help me with a sample code.
By
Firos.C
Hi,
Yeah as far as i know no workaround..... no color for cell or row.
Its avaliable only for col.
But check these thread as there is one workaround which is suggested.,..
Matrix Row Color Change
Matrix/Gris Row ForeColor
Hope it helps,
Vasu Natari.
Edited by: vasu natari on Jul 29, 2009 12:54 PM
Similar Messages
-
Hi,
I've some difficulties to set the color of a matrix column.
I've tried to convert to integer an hexa color code (like #FF0000)
or using System.Drawing.Color.MyColor.ToArgb()
In both case the color of the column doesn't match the color I specify.
For example using LightSkyBlue give me an orange column.
Thanks for your help.I totaly forgot how I made it in the past in non sap forms. There is calculation as
Private Sub Command1_Click()
r = Val(InputBox$("Red Value"))
B = Val(InputBox$("Blue Value"))
G = Val(InputBox$("Green Value"))
*Lng$ = B * 65536 + G * 256 + r*
MsgBox Lng$
End Sub
there is no conversion to hex, just multiplication.
Edited by: Petr Verner on Jul 24, 2008 3:50 PM -
Change Matrix column backcolor in standard form
Hi, all
Is it possible to change the Matrix column backcolor in standard form?
thanks.hi,
yes it is possible.
oMatrix.Columns.Item("1").BackColor = 16316664 'color codes
regards,
varma -
Not able to color different rows with different colors in a column of table
Hi,
I am trying to to display different rows with different colors in a column of the table based on some decode condition.
I have gone through the following threads :
Can we colour the rows in the column of a table
Changing Color of a value in a column
This is what i have done :
1.Added the following code to custom.xss(changed the name to Custom.xss as suggested in one of the above threads) --- in path ---- jdev\myhtml\OA_HTML\cabo\styles
<style selector=".1">
<includeStyle name="DefaultFontFamily"/>
<property name="font-size">11pt</property>
<property name="font-weight">Bolder</property>
<property name="color">#008000</property>
<property name="text-indent">3px</property>
</style>
<style selector=".2">
<includeStyle name="DefaultFontFamily"/>
<property name="font-size">11pt</property>
<property name="font-weight">Bolder</property>
<property name="color">#FFFF00</property>
<property name="text-indent">3px</property>
</style>
2. Sql query of the VO is :
select comments,role ,decode(role,'REQUESTER','1','2') Colorattr from xxat_sars_action_history where request_id = :1 and event_name = :2 and action_code <> 'PENDING'
order by sequence_num desc
3. Coded the following in the process request of the controller:
OATableBean table = (OATableBean)webBean.findIndexedChildRecursive("CommentsTB");
OAMessageStyledTextBean roleBN = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("role");
OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(roleBN,"Colorattr");
roleBN.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
where 1 and 2 form the colors ( i have even tried with 'Red' and 'Yellow'...as it was not working replaced with 1 and 2)
4.The query returns data fine with corresponding 1 and 2 values.
But different colors are not getting reflecting on to the UI.
I am testing this on my local jdev.
Please do let me know if i am missing something.
Thanks ,
Sushma.Any Clues please.....
Thanks,
Sushma. -
How to Calculate Line items Total of Matrix Column
hai experts,
Im facing a problem like
1. i have a matrix with a column Labour Costs in that im taking some cost.
2. in footer a have a Edit Text like Total Labour Cost
3 when i enter amount in matrix column it sholud disply that value in total labour cost and when we add new row ,labour cost it should add to 'total labour cost' in footer.Like Invoice Documents.Where do you want to implement this like sapscript / smartforms or adobe forms? please specify.
-
How to set default value in matrix column
Hi all,
Does any one know how to set a default value in matrix column ?. I just want , when an event right click and add row. so i set a default value in a column field for example 'Test'. FYI the matrix is in the UDO.
so my code will be like this
If pVal.ItemUID = "Matrix" And pVal.MenuUID = "1292" Then
Try
Dim oColumn As SAPbouiCOM.EditTextColumn
Dim matrix As SAPbouiCOM.Matrix
matrix = oForm.Items.Item("Matrix").Specific
oColumn = mat.Columns.Item("Code").specific
oColumn.Value = "Test"
Catch ex As Exception
Debug.Print(ex.Message)
Debug.Print(ex.ToString)
End Try
End If
I have run it and when i right click and add row it still can not set the default value in one of the matrx column.
does any one know how to solve it. thanks in advanceHi Bodhi
Sandeep is right you can set value using SetValue() function
If pVal.ItemUID = "Matrix" And pVal.MenuUID = "1292" Then
Try
Dim matrix As SAPbouiCOM.Matrix= oForm.Items.Item("Matrix").Specific
oForm.DataSources.DBDataSources.Item("UDT").Clear()
matrix .AddRow()
matrix .FlushToDataSource()
With form.DataSources.DBDataSources.Item("UDT")
.SetValue("UDF", matrix .RowCount - 1, "Test")
End With
matrix .LoadFromDataSource()
Catch ex As Exception
Debug.Print(ex.Message)
Debug.Print(ex.ToString)
End Try
End If -
SSRS 2008R2 : Not able to use Previous aggregrate function in matrix columns cell
Hi Expert,
I have used a matrix tablix in my report. It is working fine. But when I am trying to use Previous aggregrate in one matrix column cell I get the below error:
The use of previous aggregrate function ia a tablix cell with in 'Tablix1' is not supported.
Please help me regarding that.
Thanks RanaHi Rana,
In your scenario, you use previous function in the “Data” cell, right? Previous function cannot be used in the overlapping parts of row group and column group. One workaround of this issue is use custom code to get the previous value.
Public Shared previous as Integer
Public Shared current as Integer
Public Shared Function GetCurrent(Item as Integer) as Integer
previous=current
current=Item
return current
End Function
Public Shared Function GetPrevious()
return previous
End Function
Then you can use the expression below in the “Data” cell to get the previous value:
=Code.GetCurrent(fields!Score.Value) & "-Previous-" & iif(Code.GetPrevious()=0,"",Code.GetPrevious())
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
TechNet Community Support -
Check box in matrix column bind correctly but doesn't appear check sign
Dear Sirs,
I have a check box in a matrix column (the matrix is placed i an extra folder in the item master data form).
The column is bound to a DBDataSource related to the user defined table @IIT_ITM1 as reported in the following code. The table field bound to the check box column is alphanumeric of size 1.
I use the following code:
oCln = oMtx.Columns.Add("Per_coll", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
oCln.DisplayDesc = true;
oCln.Description = "For test";
oCln.TitleObject.Caption = "For test";
oCln.ValOn = "Y";
oCln.ValOff = "N";
oCln.Width = 60;
oCln.DataBind.SetBound(true, "@IIT_ITM1", "U_IIT_PerColl");
oCln.Editable = true;
The problem is: the binding to the database work (if I click on the check box and save the data, then the database content change accordingly) but I CANNOT LET THE USER SIGN APPEAR on the check box control!
Does anyone have the solution?
Thank you for help
MassimoNo response from the forum
-
Length of Uniqueid for matrix Column
There appears to be an inconsistency in the length of the UniqueID that can be used for a matrix column.
For an Addon in 2005 I have UDFs whose name is 12 characters long (including the U_), when appearing in matrix on a system form the system uses the UDF name for the columnID.
However if I try to do the same thing when adding a column to a matrix on a user form I get error -7013 'The string value entered is too long; it should be less than 10 characters [66000-14]'.
Mirroring the UDF name as the column Id allows me to have generic code with out the need to jump through hoops to aling columns and field names.
Is this a known issue for which there is a fix available?Hi Graham,
It's a known issue but I'm not sure if a fix will be provided (it's a 'by design' feature and not a bug). I tested this in SBO 2007A and you still cannot have a matrix column in a user-defined form with a unique id of more than 10 chars.
Unfortunately, you'll need to code a workaround or reduce your UDF sizes to 10 characters.
Also, if you haven't already done so, I'd recommend you create a suggestion on the development collaboration forum:
/community [original link is broken]
Kind Regards,
Owen -
Color to the column details in report
Is it possible to apply color to the column details of a particular column in Interactive report ?
Yogesh
Edited by: yogeshyl on Jan 27, 2010 10:32 AMI assume you mean a different table header colour.
There is a class that it uses:
.apexir_WORKSHEET_DATA th {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#4E4E4E url(../ws/report_bg.gif) repeat-x scroll 0 0;
border-bottom:1px solid #AAAAAA;
border-top:1px solid #CCCCCC;
color:#FFFFFF;
font-size:8pt;
font-weight:bold;
letter-spacing:1px;
white-space:nowrap;
}So you make changes to this to suit what you want - i.e. you could add that style with your own implementation to overwrite the built in design, in a header region of your page.
Ta,
Trent -
How can I change the color of a column header?
I need to change the color for some column header, how can I do it in webdynpro ABAP? Is it possible?
hi ,
i have used in alv....
<font color="RED">text</font>
but i think it is not possible to change the colour in table ui element.
regards,
sahai.s -
How to change colors of individual column bar in the same data series
in mac numbers, how to change colors of individual column bar in the same data series. The entire column series gets selected in the column bars and cannot select to change colors of specifc bars.
Hi Kiran,
no its not possible through Theme editor also ,because these colors are coming from Compiler which u are using.
Regards,
Govindu -
How to display calculated matrix columns in a graph?
Hi,
I am working in VisualStudio 2010 hitting SQL Server 2012 to build SSRS reports.
I have a need to graph year over year percentage growth as derived from two SSRS matrix columns. Everything is working except that the chart displays only one value for each year series, rather than displaying the correct percentages for each audience
for each of the two years.
The values in the chart series properties are called with the expression: =ReportItems!YoYGrowthPercent2014.Value (or =ReportItems!YoYGrowthPercent2014.Value, respectively), where "YoYGrowthPercent2014" is the name of the detail cell holding
the expression to calculate the growth percentage at the audience level in the matrix.
It looks like it should work yet the results are incorrect. I've read several hundred articles and posts at this point and do not have an answer.
Is there any way to do this? It seems like it should be so simple, and yet...
Thank you!
~Khrys.I can reproduce your issue. If you toggle open Audience P I think you will find the very last value for the last Category and the last Product_Group will be around 15% for Growth 2014 and around 23% for Growth 2015. The chart series expression
is choosing the last value for ReportItems!YoYGrowthPercentage as it doesn't know how to attribute that ReportItem to the Audience matrix. If you want a chart to display only the percentage for Audience, I suggest that you have a separate data
source with the values for GrowthPercentage for only the Audiences, and make that the data source for your chart. Also, I would make the growth figures in your matrix also a matrix by doing the percentage calculation directly in the table. You would pull in
the value for this year and the value for last year into your data set, and then do the calculation within the report as follows:
=SUM(Fields!Value.Value)/Sum(Fields!LastYearValue.Value)-1
Create a second Column Group adjacent after, also by year. Your query could look something like this, depending on how your tables are structured:
SELECT a.Audience, a.Category, a.ProductGroup, a.Year, a.Value, b.Year as LastYear, ISNULL(b.Value,0) as LastYearValue
FROM YoYGrowth a LEFT OUTER JOIN
YoYGrowth b ON a.Audience = b.Audience and a.Category= b.Category and a.ProductGroup = b.ProductGroup
AND a.Year-1 = b.Year
Hope it helps. Cheers,
Martina White -
How to show image in matrix by selecting matrix column type as "it_PICTURE"
Hi All!
Can i show image in matrix, by selecting matrix column type as "it_PICTURE". If yes please write the steps.
Thanks & Regards
SurojitHi
First you have to set the matrix column type as it_PICTURE then bind that column to a userdatasource or dbdatasource. In the following code I am using userdatasource . This code will set the picture to a sepecified columns first row. Please create small image and paste it in your c drive (15X15 size image-- "c:\pic.png")
Dim oColumn As SAPbouiCOM.Column
Dim mtxDisp As SAPbouiCOM.Matrix = form.Items.Item("mtxDisp").Specific
form.DataSources.UserDataSources.Add("udsPic", BoDataType.dt_SHORT_TEXT, 254)
oColumn = mtxDisp.Columns.Item("colPic")
oColumn.DataBind.SetBound(True, "", "udsPic")
mtxDisp.AddRow()
mtxDisp.GetLineData(1) '*Loads UserDataSources from line X*'
mtxDisp.DataSources.UserDataSources("udsPic").ValueEx = "c:\pic.png"
mtxDisp.SetLineData(1) '*Sets Matrix line X based on current UserDataSource values*'
Hope this helps
Regards
Arun -
how do change color of a column in ALV.
Hi
The below abap program shows how to change the colour of individual ALV cells /fields. Only a small number of changes are required from a basic ALV grid which include adding a new field to ALV data declaration table(it_ekko), populating this field with the field name identifier and colour attributes and finally adding an entry to layout control work area. These changes are highlighted in bold below.
REPORT zdemo_alvgrid .
REPORT ZALV_CELLCOLOR.
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,
CELLCOLOR TYPE LVC_T_SCOL,
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,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform set_cell_colours.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
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-do_sum = 'X'.
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-totals_text = 'Totals'(201).
gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'. "CTAB_FNAME
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
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
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.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into CORRESPONDING FIELDS OF TABLE it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform. "top-of-page
*& Form SET_CELL_COLOURS
Set colour of individual ALV cell, field
FORM SET_CELL_COLOURS .
DATA: WA_CELLCOLOR TYPE LVC_S_SCOL.
DATA: ld_index TYPE SY-TABIX.
LOOP AT IT_EKKO into wa_ekko.
LD_INDEX = SY-TABIX.
Set colour of EBELN field to various colors based on sy-tabix value
WA_CELLCOLOR-FNAME = 'EBELN'.
WA_CELLCOLOR-COLOR-COL = sy-tabix. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '1'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '0'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
Set colour of NETPR field to color 4 if gt 0
if wa_ekko-netpr gt 0.
WA_CELLCOLOR-FNAME = 'NETPR'.
WA_CELLCOLOR-COLOR-COL = 4. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '0'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '0'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
endif.
Set colour of AEDAT field text to red(6)
WA_CELLCOLOR-FNAME = 'AEDAT'.
WA_CELLCOLOR-COLOR-COL = 6. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '0'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '1'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
ENDLOOP.
ENDFORM. " SET_CELL_COLOURS
Maybe you are looking for
-
Itunes has encountered an error and needs to close...HELP!
I am trying to get my son's new ipod nano ready for music, I have downloaded itunes, but it will not open. When I click on the icon, a message that says "itunes has encountered a problem and needs to close" It asks if I want to send an error report.
-
User exit or BADI for purchase order
Hi, I want send outbound IDOC for purchase order to 3rd party integration system. It is too hard to map between standard purchase order IDOC and business object of 3rd party system because the structure of standard purchase order IDOC is so complicat
-
Alright I consider myself a fairly computer literate person but do excuse me if this issue is not actually all that interesting. Know that I would call apple care but what I am trying to do isn't exactly supported by them so they wouldn't help me. I
-
Good News All-In-One has been updated for CS-6
You can now go to All-In-One website and get the update to their programs so that they will now work in Photoshop CS6. I was able to get the download last week after talking to the technician and received an e-mail today that the update is available
-
Get Info sees different "Open With" for the same file on different computer
I've got a laptop (17") and a desktop, both with OSX 10.4.3. I had a disk problem with the laptop, but was able to get everything off the disk, reformat it, and put it all back. Everything's been working fine until today, when I tried to use the Equa