Click on a Matrix Cell
Hello. I want to do a click in the ItemCode cell of the Inventory Matrix in certain forms. I use "SBO_Application.Forms(pval.FormUID).Items("38").Specific.Columns("1").Cells(1).Click" in et_FORM_LOAD event and it works with SDK 2004. Unfortunately it doesn't work when I compile it with SDK 2005...
Anybody knows how to do this with 2005????
Thanks
Hi X X,
Which forms do you want to do this on form load? The restriction could be that you do not have a business partner selected and it won't select the column. I tried it after I selected a business partner and the code below (which is the same as yours) works perfectly
SBO_Application.Forms.ActiveForm.Items.Item("38").Specific.Columns.Item("1").Cells.Item(1).Click()
Hope it helps,
Adele
Similar Messages
-
How to disable right click on a Matrix Cell??
Hi,
It is impossible to disable a number of cells in a matrix. So I use the BubbleEvent = False in application item event to disable certain cells. My code is :
If pVal.FormUID = "MyForm" And pVal.BeforeAction = True And pVal.ItemUID = "MyMatrix" Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then
If pVal.Row <4 Then
BubbleEvent = False
End If
End If
End If
It works great with left click. But the cell still can be selected with a right click button. I've tried this code :
If pVal.FormUID = "MyForm" And pVal.BeforeAction = True And pVal.ItemUID = "MyMatrix" Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_RIGHT_CLICK Then
If pVal.Row <4 Then
BubbleEvent = False
End If
End If
End If
and also this code in application rightclick event :
Private Sub SBO_Application_RightClickEvent(ByRef eventInfo As SAPbouiCOM.ContextMenuInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.RightClickEvent
If eventInfo.FormUID = "MyForm" And eventInfo.BeforeAction = True And eventInfo.ItemUID = "MyMatrix" Then
If eventInfo.Row < 4 Then
BubbleEvent = False
End If
End If
End Sub
But it doesn't work... It just make the right click menu not appear, but I still can click and edit the cell with a right click...
Is there a trick?
Regards,
Rinaldi SugionoIt is still the same..
up to now, I use this trick :
Private Sub SBO_Application_RightClickEvent(ByRef eventInfo As SAPbouiCOM.ContextMenuInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.RightClickEvent
If eventInfo.FormUID = "MyForm" And eventInfo.BeforeAction = True And eventInfo.ItemUID = "MyMatrix" Then
If SBO_Application.Forms.Item(eventInfo.FormUID).Items.Item("MyMatrix").Enabled = True And eventInfo.ItemUID = "MyMatrix" Then
If eventInfo.Row > 4 Then
Else
SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.Columns.Item("MyColumn-1").Cells.Item(SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.RowCount).Specific.String =_
SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.Columns.Item("MyMatrix").Cells.Item(SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.RowCount).Specific.String + ""
BubbleEvent = False
End If
End If
End If
End Sub
But it seems too ineffective... It runs slow, and results some "flicky cell"..
Edited by: Rinaldi Sugiono on Sep 23, 2010 4:49 AM -
hello:
i wanna load a new form from a selected cell in a matrix using the cell double click... but i know how to do it.Case SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK
oForm = objMain.objApplication.Forms.Item(FormUID)
If pVal.BeforeAction = False Then
If pVal.ItemUID = "orad1" And pVal.ColUID = "rte" Then
Try
oMatrix = oForm.Items.Item("orad1").Specific
If pVal.Row > 0 Then
Me.LoadForm(FormUID, pVal.Row)
End If
End If
Catch ex As Exception
objMain.objApplication.MessageBox(ex.Message)
End Try
End If
End If -
Hi,
i am creating a form similar to the purchase order form of B1. As in the PO form of B1, when i do tab on the matrix cell of the item code, i want to load the item-master details. To do this, i need to know which event is fired when i do tab in the matrix cell.
Does anybody know about the event fired...or anything else regarding the issue...
Help urgently required,
Thanks....Hi Arpit,
The most efficient way to do this is to bind a Formatted Search to the colum. Not do this capturing events, it's very slow, and a hassle to program.
1) Create (Tools > Queries >Query manager) a user defined query:
<i>SELECT ItemName FROM OITM WHERE ItemCode = $[$MyMatrix.MyColumWithItemCode.0]</i>
2) Save the query
3) Open your own form, click the columncell where you want to show the ItemName, press ALTSHFTF2
4) Tick the 3th radio button <i>Search by Saved Query</i>
5) Double click the input field and select the query saved at step 2
6) Tick the box auto refresh and select in the drop down box your ItemCode column.
Now every time the focus is lost from the ItemCode column, the itemname is displayed in the other column. You can also do this for other values, fields etc.
Those steps I've described can also be done by code. (for a automatic installation or so) See the DI-API help; FormattedSearches and UserQueries objects.
Hope it helps,
Rowdy -
Find row Index of edited matrix cell
Hai,
I have designed a matrix which shows some value. The user is allowed to edit the values in Matrix cell. I want to update the edited value in no object table.Is there any way to find out the row indexes of edited cell of matrix.
If so, How to achieve this?
Thanks in Advance.Using the validate is the same as any other itemevent: C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\CSharp\02.CatchingEvents
The event will be raised when a user exits a field but in this case I don't think it's what you need.
You should:
1. Put a button on your form,
2. when the user clicks it, loop through the matrix
3. Check the Titles, and if they are different to what is in the No Object UDT, do step 4
4. Update the table.
These are important SDK concepts and you should invest some time in learning how to use both the Matrix Object and the UserTables object. The SDK helpfile provides sample codes.
For example, the following method can be used to update a record in a UDT
Private Sub Add_Data_Click()
Dim oUserTable As SAPbobsCOM.UserTable
Set oUserTable = oCompany.UserTables.Item("NoObjectTableName")
oUserTable.GetByKey ("CodeOfValueInNoObjectTable")
'Set default, mandatory fields
oUserTable.Name = "Title"
'Set user field
oUserTable.UserFields.Fields.Item("U_AdditionalUDF").Value = "1"
ret = oUserTable.Update
If ret <> 0 Then
oCompany.GetLastError ret, Str
MsgBox Str
Else
MsgBox "Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table"
End If
End Sub
I do not have the time to write up a full routine for this, but this information should be enough to get you started. Also check the SDK samples C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\CSharp\06.UseMatrix
Edit: To answer your intial question, there is no indicator on the matrix object which shows which rows are edited - you have to implement a logic that checks this yourself.
e.g. you could use the validate event to store the row number (pVal.Row) in a List that you can then use later after the user clicks the button. -
Rep-1813:object r_supp_name too large to fix in matrix cell.
hi all,
im getting an issue while running orale report.
i used layout model as matrix.
im getting error as:
rep-1813:object r_supp_name too large to fix in matrix cell.
r_supp_name is repeating frame of supplier_name field.
i had already set maximum number of records but still my issue not solved.
im unable to rectify it anyone please help me.
thanks,Dear,
I am facing the same problem my question is that you resolve your issue about REP-1813 or still pending if solved kindly share with us.
Regards,
K.J.J.C -
Matrix Report - REP-1813:Object object name too large to fit in matrix cell
I had this problem when running a matrix report. The report details are as follow :
Query : select department,work,salary from sal;
matrix row field : department
matrix column field : work
matrix cell field : salary
data inserted into table sal :
department : 10
work : clerk
salary : 1000
I had created the same record for 60 times. Meaning there are 60 records(with same data) in the table. When I run the report, I got the error. But, if I deleted some records, it worked fine.
In fact, I had already changed the 'Vertical Elasticity' property for all repeating frames to 'Variable'.
Could somebody please help me to solve this. It is urgent. Thanks in advance.Hi,
Your problem is bacause the innermost fame which is printing salary per row&column is printed 60 times. (because the job & dep are same for all 60 records). You get this error when the inner most frame grows to next page. Try this with setting the max no.of records per page to some 38 or 30 depending on page size. You will get it without error.
Regards,
Chandra -
Populating a matrix cell with data selected from a picker
Dear All,
I am new to SAP Bussiness one, please let me know how to get the selected data from a picker in to a matrix cell. I have warehouse code and warehouse name in the picker. I want the user selected warehouse code in the matrix cell
Below is my code But I am not getting the selected code in the matrix cell
I am adding the datasource as below
oUserDataSource = oForm.DataSources.UserDataSources.Add("UDCFL", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
Then I am adding the choose list as below
Private Sub AddChooseFromList()
Try
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
oCFLs = oForm.ChooseFromLists
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
' Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "64"
oCFLCreationParams.UniqueID = "CFL1"
oCFL = oCFLs.Add(oCFLCreationParams)
Catch
MsgBox(Err.Description)
End Try
End Sub
*Then I am binding the data as below to the matrix column*
oColumn = oColumns.Item("colToWhs")
oColumn.DataBind.SetBound(True, "", "UDCFL")
oColumn.ChooseFromListUID = "CFL1"
Then in the event i have added the below code.
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
Dim val As String
Try
val = oDataTable.GetValue(0, 0)
Catch ex As Exception
End Try
oForm.DataSources.UserDataSources.Item("UDCFL").Value = val
End If
But the code is not getting populated in the matrix cell. Please let me know at the earliest
Thanx in AdvancesOLVED
-
Spaces required in an expression for matrix cell
Hi,
I have Kishore, Srikanth and Hemanth in a matrix cell which are getting displayed.
I want 5 spaces before only the name of Hemanth and rest should be the same without spaces neither before the name nor after the name.
all are getting displayed by the expression =Fields!Metric.Value
please helpuse an expression for that
=IIF(Fields!Metric.Value = "Hemanth",Spaces(5) + Fields!Metric.Value,Fields!Metric.Value)
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Can values in matrix cells flow across the pages (Reports 6i)?
Hi,
I have to display more than 1000 char in a matrix cell. The report errors out when the values in the matrix cells exceeds the page. Can values in matrix cells flow across pages?
any help on this?
Thank You,
-- RajaAs far as to make the report work, developing the query accordingly using UNION does help.
But my question is still not answered and no replies as well.
So I think, Two frames with print direction as down and One frame with print direction as Across is not possible.
Regards
Arif -
How to achieve matrix cell value of systems forms matrix ?
Hi,
When user types data in perticular cell of matrix in system Form , i want to achieve that data.
How can i achieve that data ?
Do any one have some sample code plz. fwd it.
Regards,
GaneshHi Makarand,
This should do the trick.
<b>Code (C#):</b>
public override void Handle_ItemEvent(string FormUID, ref ItemEvent pVal, out bool BubblesEvent)
/* Switch by eventtype */
switch(pVal.EventType)
case BoEventTypes.et_VALIDATE:
/* Get a matrix object */
Matrix oMatrix = (Matrix)SBO_Application.Forms.Item(FormUID).Items.Item("MY_MATRIX_ID").Specific;
/* Get a EditText object for the matrix cell */
EditText oEdit = (EditText)oMatrix.Columns.Item("COLUMN_ID").Cells.Item("ROW_NUMBER").Specific;
/* Get the value from the object */
string sValue = oEdit.Value;
/* Do other things you like ;) */
break;
Hope it helps,
Rowdy -
Multiple colours in matrix cell based on condition.
Hi All,
I have a requirement to fill the different colours in one Matrix cell based on the conditions. there are seven conditions if one of these condition fulfil then one colour. if two condition full fill then two different color in same matrix cell if three conditions
full fill then three different color in same cell .....
Thanks in advance.
Zaim Raza.
http://zaimraza.wordpress.com/Hi Raza,
Yes, my above Switch expressions works in such a way as mentioned your sample screen.
But only thing is you need to modify the expression as per your requirements.
For Example:
Take Month and Year wise Sales amount shown as below:
The Expression would be like below(Not Tested)
=Switch
Fields!Salesamount.Value=100,"Orange",
Fields!Salesamount.Value=200,"Aqua",
Fields!Salesamount.Value=300,"Blue",
Fields!Salesamount.Value=400,"Tomato",
Fields!Salesamount.Value=500,"DarkViolet",
Fields!Salesamount.Value=600,"Red",
Fields!Salesamount.Value=700,"Blue"
So, in a single cell "Year-2001"you will get all 7 colors.
Please let me know still you need any info.
bala krishna -
How can I open a popup after clicking in a table cell using Web Dynpro?
Hello,
I am using Web Dynpro to create an application and I would like to click in a table cell and then a popup with confirmation appears.
I already have a table with the information that is displayed in the browser. In fact, I just added a column with images that are print icons.
My problem is that I don't know how to implement the method to set the action: when clicking on the print icon, a popup appears.
Thank you very much in advance.HI Rafael,
Please check the below sample code
To quickly create dialog boxes of a standardized layout (for example, for the confirmation of changes to current data) you can call the CREATE_POPUP_TO_CONFIRM method of the IF_WD_WINDOW_MANAGER. You do not need to create a separate window for this. The dialog box is created automatically by the runtime.
● The CREATE_POPUP_TO_CONFIRM method creates an object of the type IF_WD_WINDOW; the dialog box can be created using its parameters.
method onactionpopup4_1 .
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
insert `Data where changed` into table l_text. "#EC *
insert `Do you want to save?` into table l_text. "#EC *
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesnocancel
message_type = if_wd_window=>co_msg_type_question
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center )."#EC *
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'YES'
action_view = l_api
is_default_button = abap_true ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_no
action_name = 'NO'
action_view = l_api
is_default_button = abap_false ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'CANCEL'
action_view = l_api
is_default_button = abap_false ).
l_popup->open( ).
endmethod.
The SUBSCRIBE_TO_BUTTON_EVENT method of IF_WD_WINDOW assigns the actions to the appropriate buttons
Thanks
Vinay -
How to get information from Matrix Cell
Hello
I have a system matrix, that shows OBOE (Bill of exchange
SAPbouiCOM.Form form = SBO_Application.Forms.ActiveForm;
SAPbouiCOM.Item item = form.Items.Item("5");
matrix = (SAPbouiCOM.Matrix)item.Specific;
And them i need to get value from Column 9 row 1 (it is a checkbox, so i need to get if it is checked)
Now i found only way to serialize this matrix to XML, and then deserialize it, but it is VERY slow
String MatrixXml = matrix.SerializeAsXML(SAPbouiCOM.BoMatrixXmlSelect.mxs_All);
Is there any other faster way to get information of matrix cell ?
Thank youHi Stefano Osler ,
we can get the information from the matrix by using this below line
((SAPbouiCOM.CheckBox)oMatrix.Columns.Item("9").Cells.Item(pval.row).Specific).Checked
if this is true then it is check else unchecked.
with Regards,
MadhuSudhana Rao.G -
How to access a Matrix cell value outside the matrix in textbox?
Hi
I have created a matrix in SSRS. Columns are grouped by Channel Type. I want to access indicated cells value outside the matrix.
After Running the report the report shows
How can I access cell values outside the matrix? Please helpHi Aladin92,
According to your description, there is a matrix in the report, you want to reference the first value of total outside the matrix, right?
In fact, Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope. Are the both textboxes in the same group. To workaround the issue, please refer to the following steps:
1. Click and select the matrix, copy it and paste it in the report above the original matrix.
2. Right-click handle of the first row in the upper matrix, click Insert Rows, then click Inside Group-Above.
3. Right-click second cell of the first row, then click Expression.
4. In the Expression text box, type the expression like below:
="A total of "& ReportItems!Textbox5.Value & "out of 258 BC CCRs have been evaluated"
5. Set the text boxes and rows visibility to be hidden except for the text box with expression.
The following screenshots are for your reference:
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support
Maybe you are looking for
-
Finder Cannot Complete Operation While Trying to Trash Files
When I try to trash files, I receive the following error message, "The Finder cannot complete the operation because some data in (file name trying to trash) could not be read or written. (Error Code - 36)." Any help appreciated - Thanks
-
My story with Sony In 2011 I saw the announcement in a YouTube for Mobile Xperia Active and Sony Ericsson, but has created the company before you buy Sony Ericsson Mobile was a great experience in terms of strength and durability and scratching the m
-
BT Broadband suddenly very slow on Mac OS X 10.5.8
Hello, I'm posting on behalf of my dad as his broadband is now so slow as to be almost unusable. He lives in the Suffolk countryside but should still be able to receive broadband speeds of up to at least 1.5mb/s on his local exchange. His BT broadban
-
Hi I Must to execute a PL/SQL if work fine then I execute other, But if first not work I want out without to execute of the second SET LINESIZE 1000 SET SERVEROUTPUT ON SET TERM ON SET HEAD OFF SET ECHO OFF VAR V_FLAG number SPOOL C:\TEMP\MYLOG.TX
-
What' wrong???
hi everybody, I've a problem which need a genius to solve. I've written some code into the when-button pressed trigger: DECLARE clob_help clob; clob_rec clob; video_h number(38); clip_h number(38); tt_h varchar2(4000); help number(38):=0; cursor c1 i