Event on matrix cell

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

Similar Messages

  • How to catch cell lost focuse event of matrix

    Dear all
    can you tell me how to catch the cell lost fouc event of matrix.
    i want to check the value is entered the that cell, which is not greter than the extising value..
    thanks in advance......

    Hi
    For that you can use either validate or lost focus event
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            ' BubbleEvent sets the behavior of SAP Business One.
            ' False means that the application will not continue processing this event.
            ' Validate event
            If (pVal.FormType = 133) And (pVal.ItemUID = 38) And (pVal.ColUID = 1) And _
              (pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE) Then
                If (pVal.Before_Action) Then
                    'write your code
                End If
            End If
            'Lost focus event
            If (pVal.FormType = 133) And (pVal.ItemUID = 38) And (pVal.ColUID = 1) And _
             (pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS) Then
                If (pVal.Before_Action) Then
                    'write your code
                End If
            End If
        End Sub
    Hope this helps
    Regards
    Arun

  • 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 Advance

    sOLVED

  • Menu Events in Matrix

    Hello,
    I created an UDO with Document and Document Lines.
    The Document Lines reside in a Matrix.
    Everything works fine but:
    The System Menus like "Delete Row(Ctrl+K)" are disabled while working in this UDO Form.
    How can I fix this?
    Can someone help?
    Thanks in advance.
    Rudy.
    Message was edited by: Ruediger Gertz

    Hello Trinidad,
    thank you for you promptly answer.
    Yes. The form mode is changing, but the addon don't receive the event(sometimes).
    For the 2nd problem: How can I receive the keyboard shortcut "Ctrl+K" while the cursor is in the matrix.
    I would like to remove the system "row delete" menu temporarly and replace it with my own menu entry. But I want to keep the normal usability for the user (Ctrl+K = remove a line from the matrix).
    Is there a chance to do something like that?
    In my own event tracker tool, I can't see any event fired, when I type Ctrl+K while the curser is in a matrix cell...
    Thank you in advance.
    Rudy.
    Message was edited by: Ruediger Gertz

  • 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

  • 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 help

    use 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,
    -- Raja

    As 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,
    Ganesh

    Hi 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 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 you

    Hi 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

  • Any way to update a matrix cell without events being produced in B1 8.8

    Hi
    I have written some code to update the gl code column in the sales order matrix depending on a field value
    This works fine but generates the usual screen flicker / events being produced
    I update it using -
    matrix.Columns.Item("159").Cells.Item(pVal.Row).Specific.STRING = recset.Fields.Item(0).Value
    Is there a faster to do this please ?
    I have tried the new matrix.SetCellWithoutValidation command but this only works on udf fields
    Thanks for any ideas
    Regards Andy

    Hello Andy,
    You may read this thread to prevent your addon from re-processing the entered data.
    Freezing the form is also good idea.
    Regadrs
    János

  • 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

  • Event in Matrix with BOM?

    Hi expert,
    As you can see i'm new in developing and I have e lot of boring questions
    Problem is that:
    I want to copy from OITM values from UDF into the standard document "Quotation" rows.
    So, I want OITM.U_II_001 field value will be copied in field U_II_001 in the matrix of quotation document.
    Actually, i trap the event et_VALIDATE. When I insert a New ItemCode the code is executed:
    if (pVal.ItemUID == "38" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE & pVal.Before_Action == true)
         // ColUID = 1 is "ItemCode"
         if (pVal.ColUID=="1")
              string oValore;
              oValore = ReadItemCode(pVal) ;
              AddNewValueInRow(pVal, oValore);
    This code runs well if I add manually single rows in document.
    Problem is that: If I add an Item with BOM, the code is not executed for each item in the BOM!
    How can I solve the problem? I want to execute the code to fill the UDF fields for each item in BOM too...
    Exist other event I need to trap instead of et_VALIDATE?
    Could you say me where I can to find this kind of informations?
    Thanks in advance,
    Jonny Cortonicchi

    Thanks for your Interest!
    This is the code where I inizialize connections (UI and DI).
    Finally I add an event handler to manage the change value for ItemCode in the body of document:
            public QuotationForm()
                SetApplication();
                SetConnectionContext();
                ConnectToCompany();
                SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler( SBO_Application_ItemEvent );
    This is the code where I trap the et_VALIDATE event for ItemCode column:
    private void SBO_Application_ItemEvent( string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent )
           BubbleEvent = true;
           if ( ( ( pVal.FormType == 149 & pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD ) & ( pVal.Before_Action == true ) ) )
                // Item 38 = Matrix
                if (pVal.ItemUID == "38" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE & pVal.Before_Action == true)
                     // ItemCode Column
                     if (pVal.ColUID == "1")
                          string oValore;
                          oValore = ReadItemCode(pVal);
                          AddNewValueInRow(pVal, oValore);
    Finally, the two methods.
    First to Read the ItemCode inserted in row
    The second read data from OITM and fill fields in matrix.
    This code read the ItemCode from column 1 of matrix in the quotation form:
            private string ReadItemCode( SAPbouiCOM.ItemEvent pVal )
                SAPbouiCOM.Matrix oMatrix;
                SAPbouiCOM.EditText oValore;
                try
                    oMatrix = (SAPbouiCOM.Matrix)oQuotationForm.Items.Item("38").Specific;
                    oValore = (SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(pVal.Row).Specific;
                    return oValore.Value;
                catch (Exception ex)
                    SBO_Application.MessageBox("Impossibile leggere ItemCode: " + ex.Message);
                    throw;
    And this method read from OITM and fill fields in form:
            private void AddNewValueInRow(SAPbouiCOM.ItemEvent pVal, string oValore)
                SAPbouiCOM.Matrix oMatrix;
                try
                    string s;
                    SAPbobsCOM.Items oArticoli;
                    oMatrix = (SAPbouiCOM.Matrix)oQuotationForm.Items.Item("38").Specific;
                    oArticoli = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
                    oArticoli.GetByKey(oValore);
                    s = oArticoli.UserFields.Fields.Item("U_II_001").Value.ToString();
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_II_001", s);
                    s = oArticoli.UserFields.Fields.Item("U_II_002").Value.ToString();
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_II_002", s);
                    s = oArticoli.UserFields.Fields.Item("U_II_003").Value.ToString();
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_II_003", s);
                    s = oArticoli.UserFields.Fields.Item("U_II_004").Value.ToString();
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_II_004", s);
                    s = oArticoli.UserFields.Fields.Item("U_II_005").Value.ToString();
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_II_005", s);
                catch (Exception ex)
                    SBO_Application.MessageBox("Impossibile Impostare la colonna U_II_001: " + ex.Message);
                    throw;
    As i wrote, the event et_VALIDATE when the item inserted has a BOM of type MODEL runs only for parent item and NOT for children.
    Thanks,
    Jonny Cortonicchi

Maybe you are looking for

  • Code for Hot spot in ALV report to call transaction

    Hi, I  hv never use hot spot to link as a call transaction can u give the link or code how to make hot spot on a particular fields  i am working on a ALV report in that report in the belnr coloumn when user click on belnr i want to call FB03 transact

  • My regular icloud/apple id no longer works on my itunes

    my regular icloud/apple id no longer works on my itunes Somehow I got signed out of itunes on my pc. It will not sign back in using my apple account that works fine on icloud and apple via internet and on my iphone. Now I can't sink my iphone with my

  • Issue with Vendor BP in SUS

    Hi All, We are on SRM 4.0 with   EBP _ SUS scanario. We  flagged one vendor as portal vendor.  That vendor is  transferred to SUS  but without  BP number created. When we are assignhing contact persons  using transciation USERS_GEN system is giving e

  • MS Word to TIFF

    Hi all, I want to convert MS Word document into TIFF format (TIFF type 3 or 4). How to do it? Thanks, Bala

  • HOWTO: Monitoring WebLogic Server with Hyperic HQ

    For those of you that administer WebLogic Server deployments, you may be interested in this HOWTO - it demonstrates how to get up and running monitoring your WebLogic deployments with Hyperic HQ. HQ auto-discovers WebLogic instances, thus shortening