Add row in matrix

hello expert
i want to know how to add row in matrix as like in SAP b1.i create the code to add row in matrix by button but this is so many time consuming for end user due to this i want to add row functionality automatic as like SAP B1.so pls help me sir for this
                                                                                thanx a lot

Hi
you can add row in matrix on lost focus of a column
Regards

Similar Messages

  • Add row invoice matrix

    Dear all
    I owe add row in matrix woth different information.
    How ican do?
    Sorry for my english
    Thank's

    First, in sap business one open the 'Fattura in uscita' form, then in menu 'View' set 'Informazioni di debug'.
    Here you can see the column number corresponding to the fields you want to add in the row.
    In your code use this information to insert records in the grid. Here's an example in VB6.
    For i = 1 to 10
    'Codice
    Set c = m.Columns("1").Cells(i).Specific
    c.Value = "Cod" & i
    'Quantità
    Set c = m.Columns("11").Cells(i).Specific
    c.String = "10"
    Next i
    (c is a EditBox, m is the Fattura detail matrix)
    Hope this helps
    Ciao

  • Re: Add Row in Matrix

    Hi All,
    I want to add a row in matrix by clicking the Add Row option by right clicking on the matrix. If the form has one matrix means its working well. But if the form has more than one matrix if i activate the Add Row menu and write the code in the MenuEvent i am not able to give the ItemUID so if i add row in any of the matrix one row is added in all the matrix. How can i solve the problem.
    Thanks in Advance.
    Regards,
    Madhavi.

    Hi Madhavi,
    save the position and and the itemuid in a variable.
    use the et_GOT_FOCUS event for this - than you know always in which matrix
    and position you're standing.
    use the variables in the et_MENU_EVENT to add the row in correct matrix and position
    lg David

  • Add Row in Matrix by pressing "Alt" button in last cell of matrix

    Hello All,
    I want to enable the rows of the matrix by pressing "Alt" in the last column so that the next row get enabled instead of
    pressing the "Add Line" Button every time.
    I have done it by pressing "Tab" using pval.charpressed="9"
    But i want to do it by pressing "Alt" key is this posible.
    Please share the code or suggest any way to do it .
    Thanks & Regards,
    Amit

    Hi Amit,
    Only Tab, Enter, Escape, Delete and Back Space are available to charpressed. Alt button has no equivalent coding.
    Thanks,
    Gordon

  • Self-coping row in matrix

    Hey All
    I hava problem with AddRow to Matrix because after add row to Matrix, added row is copy of previous
    I use this code:
    Matryca.AddRow(1, -1)
    Matryca.Columns.Item(1).Cells.Item(i + 1).Click SAPbouiCOM.BoCellClickType.ct_Regular)
    Thanks very much for answers
    regards
    Krzysztof Sala

    Thanks
    it run
    I use:
    i = pVal.Row()
    DBDS1.InsertRecord(i)
    Matryca.LoadFromDataSource()
    Matryca.Columns.Item(1).Cells.Item(i + 1).Click SAPbouiCOM.BoCellClickType.ct_Regular)
    regards
    Krzysztof Sala

  • Adding a row in Matrix

    Hi,
    I have a Form having matrix, and it is bind with 2 UDT Tables. One of 'Master Type' and Other is 'Master Data Lines'.
    All the operation 'ADD,UPDATE,FIND,DELETE, ADD ROW' and the operation for Navigation Buttons are working fine.
    But when I navigate to any previous record,following problem arises :
    1. When i add row to matrix it copies data from the previous row.
    2. Now after 1st operation i change the newly added row , due to this form goes in Update mode.It is also fine.But when i press the Update Button i get the message records updated successfully, but the problem is newly added row in the matrix does not inserted in DataBase
    I need the solution for both problems.
    Thanks in advance.

    Here some sample I used to test it:
    Case SAPbouiCOM.BoEventTypes.et_KEY_DOWN
                            Dim l_Mat As SAPbouiCOM.Matrix
                            l_Mat = oForm.Items.Item("Matrix2").Specific
                            If pVal.CharPressed = 13 And (pVal.Row = l_Mat.RowCount) Then
                                Dim _UDSS As SAPbouiCOM.UserDataSources
                                ' Clear the UDS before adding a new line
                                _UDSS = oForm.DataSources.UserDataSources
                                UDSS.Item("UDSCode").ValueEx = ""
                                UDSS.Item("UDSName").ValueEx = ""
                                UDSS.Item("UDSPhone").ValueEx = ""
                                l_Mat.AddRow()
                            End If
    If you are using DBDatasources is easier (1st post)
    Regards,
    Felipe

  • Add row by right click event

    hello expert
    i want to create add row functionality by right click event like in SAP B1 when we click on matrix colum it give menu for Remove,copy,add row in matrix how i do it by in my userdefiend form matrix

    Hello,
    If you enable the menu on your form Add row (menu id: 1292), Del Row  (menu id: 1293 )it will automatically appear in right click .
    copy should be added indivudally, and developed the functionality for each
    enable them:
    oForm.EnableMenu("1292", True)
                oForm.EnableMenu("1293", True)
    You can use MenuEvent to add/del/copy rows in the matrix or RightClickEvent
    Regards,
    J.

  • How to add data through matrix from sales order row level to

    user defined document type table ...
    i created matrix in user defined form, i placed one edit text box on that form
    when i entered docnum of sales order the data of sales order row level should have to
    upload to matrix , after fill up the some data in matrix that data should have to add to the user defined document type table
                                any one have code pls post it
                                            thanq

    Hi rajeshwar
    Here is a sample function related to ur senario. just check it out and use the concepts.
    Here I have used a CFL to get the itemcode and I have used a query to  add data to matrix.
    This is a function used.
    Private Sub AddValuesInMatrix(ByRef name As String)
            Try
                'Dim quantemp As Double
                oForm = SBO_Application.Forms.Item("itemdts")
                oMatrix = oForm.Items.Item("matrix").Specific
                Dim rs As SAPbobsCOM.Recordset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                '//gitemdesc = "SELECT T0.[ItemName] FROM OITM T0 WHERE T0.[ItemCode] ='" & name & "'"
                oMatrix.Clear()
                rs.DoQuery("SELECT T0.[DocEntry], T0.[ItemCode], T0.[Dscription], T0.[Quantity], T0.[Price], T0.[TaxCode] FROM dbo.[POR1] T0 WHERE T0.[ItemCode] ='" & name & "'")
                rscount = rs.RecordCount
                If (rscount < 1) Then
                    SBO_Application.StatusBar.SetText("No Items Found", SAPbouiCOM.BoMessageTime.bmt_Short)
                Else
                    oForm.Freeze(True)
                    ITE = True
                    For i As Integer = 1 To rs.RecordCount
                        oMatrix.AddRow()
                        oMatrix.Columns.Item("V_5").Cells.Item(i).Specific.Value = rs.Fields.Item("DocEntry").Value
                        oMatrix.Columns.Item("V_4").Cells.Item(i).Specific.Value = rs.Fields.Item("ItemCode").Value
                        oMatrix.Columns.Item("V_3").Cells.Item(i).Specific.Value = rs.Fields.Item("Dscription").Value
                        oMatrix.Columns.Item("V_2").Cells.Item(i).Specific.Value = rs.Fields.Item("Quantity").Value
                        'quansum = quansum + rs.Fields.Item("Quantity").Value
                        oMatrix.Columns.Item("V_1").Cells.Item(i).Specific.Value = rs.Fields.Item("Price").Value
                        'pricesum = pricesum + rs.Fields.Item("Price").Value
                        oMatrix.Columns.Item("V_0").Cells.Item(i).Specific.Value = rs.Fields.Item("TaxCode").Value
                        SBO_Application.SetStatusBarMessage("Data Loading In Progress Please Wait.....>>> " & i & " / " & rs.RecordCount, SAPbouiCOM.BoMessageTime.bmt_Short, False)
                        rs.MoveNext()
                    Next
                    ITE = False
                    oMatrix.AutoResizeColumns()
                    SBO_Application.StatusBar.SetText("Data Loading Completed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                    oForm.Freeze(False)
                    oForm.Refresh()
                End If
            Catch ex As Exception
                SBO_Application.MessageBox("Matrix Load Function : " & ex.Message)
                ITE = False
            End Try
        End Sub
    -Anto

  • In Matrix Value is duplicating while giving add row

    In matrix i have given add row but the value is duplicating from the previous row in update mode.in add mode its ok
    and while clicking update =    error is coming "This entry already exists in the following tables "
    plz help
    its Urgent

    Hi Nikhil k,
    This is a kind of behavior of matrix.
    So what you can do is that after calling the AddRow () Method put the blank values in the newly added row. Use this as follows:
    oMatrix.AddRow();
    oMatrix.FlushToDataSource();
    this.oForm.DataSources.DBDataSources.Item("@DETAILTABLE").SetValue("U_Code", oMatrix.VisualRowCount - 1, "");
                                                this.oForm.DataSources.DBDataSources.Item("@DETAILTABLE").SetValue("U_Name", oMatrix.VisualRowCount - 1, "");
    oMatrix.LoadFromDataSource();
    Hope it helps.
    Thanks & Regards
    Ankit Chauhan

  • Matrix Add Row and Duplicate Row

    Hi All,
    Can anybody suggest me how to work on Add row and duplicate row in any document table.
    Lets take one example
    Sales order document
    In this doc we have table format where we specify item no, item description etc. In this table when we right click on particluar row we have option for add, delete, duplicate rows..etc.
    wht i would like to know is that when we click add row .....one row is added and number is incremented under # column.  Hw to perform and display this auto increment/ decrement of number for these rows under this # column
    thanks
    harish

    Hi,
    I tried following both code, but in that i am geting value. Means i am getting .Value  Why i not getting value.
      matrix.Columns.Item("V_-1").Cells.Item(pVal.Row).Specific.value = matrix.RowCount
    and i also tried for "AddRow",
    If pVal.BeforeAction = False Then
                    Select Case pVal.ItemUID
                        Case "AddRow"
                            matrix = form.Items.Item("mtr").Specific
                            If matrix.RowCount > 0 Then
                                If Trim(matrix.Columns.Item("V_-1").Cells.Item(matrix.RowCount).Specific.value) = "" Then
                                End If
                            End If
                    End Select
                End If
    In both example i not getting .Value.
    Plz tell y ?
    Thanks

  • ADD SIGNATURE IN MATRIX REPORT FOR EACH ROW

    i want add field( signature)in the last of row in matrix report

    Put the signature image in the intersection area of the crosstab. In the image format trigger return true only for the row/column you wish the signature to show up.

  • Matrix Add Row

    hi guys,
    I created one form in screen painter and used this form in VB.net. In this form one grid is available.
    In the menuevent of this form I write the code for open the form when user click on menu. I also write the code for add row in the matrix.
    When I open the form first time both opening the form as well as adding row into the matrix works fine.
    After closing the form and open the form second time menuevent occur more than 2 times.
    Due to this many rows are added in the matrix only one click of add row.
    What would be reason for occuring menuevents more than 2 times?
    Can anyone  help me?
    thanks in advance.

    hi kamil,
    this function is called when click on Menu event.
    when form is loaded.
    // code when form is loaded from XML File.
    Public Sub LoadForm1()
            Dim oXmlDoc As Xml.XmlDocument
            oXmlDoc = New Xml.XmlDocument
            Dim sPath As String
            Try
            sPath = IO.Directory.GetParent(Application.StartupPath).ToString & "\"
            oXmlDoc.Load(sPath & "NewInvoicePO.srf")
            Dim cp As SAPbouiCOM.FormCreationParams
            cp = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
                cp.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
                cp.FormType = "Invoice"
                cp.XmlData = oXmlDoc.InnerXml
                cp.UniqueID = "IndentPO"
                cp.ObjectType = "POHeader"
            oForm1 = SBO_Application.Forms.AddEx(cp)
            oForm1.Title = "Indent PO"
            oForm1.AutoManaged = True
            oForm1.SupportedModes = -1
                'oForm1.DataBrowser.BrowseBy = oForm1.Items.Item("33").Specific().value
                oForm1.Freeze(True)
                oForm1.EnableMenu("1281", True)  '// Add Find Mode
                'oForm1.EnableMenu("1282", True)  '// Add New Record 
                oForm1.EnableMenu("1288", True)  '// Next Record 
                oForm1.EnableMenu("1289", True)  '// Pevious Record 
                oForm1.EnableMenu("1290", True)  '// First Record 
                oForm1.EnableMenu("1291", True)  '// Last record
                oForm1.EnableMenu("1292", True)  '// Add Row
                oForm1.EnableMenu("1293", True)  '// Delete Row
                oForm1.EnableMenu("1294", True)  '// Duplicate Row
            AddDataBindToMainForm()
            CreateMatrixForForm1()
            oDBDataSource4 = oForm1.DataSources.DBDataSources.Add("@INDENTPOMASTER")
            oDBDataSource5 = oForm1.DataSources.DBDataSources.Add("@INDENTPOCHILD")
                oForm1.DataBrowser.BrowseBy = "31"
            GetMaxPONo()
            oForm1.Freeze(False)
                oForm1.Visible = True
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
    I write the following code in the item event when click on close button.
    // code when click on close button
    If pVal.FormUID = "IndentPO" And pVal.ItemUID = "2" And pVal.BeforeAction = True Then
                    Try
                      oForm1.EnableMenu("1288", False)  '// Next Record 
                      oForm1.EnableMenu("1289", False)  '// Pevious Record 
                        oForm1.EnableMenu("1290", False)  '// First Record 
                        oForm1.EnableMenu("1291", False)  '// Last record
                        oForm1.EnableMenu("1292", False)  '// Add Row
                        oForm1.EnableMenu("1293", False)  '// Delete Row
                        oForm1.EnableMenu("1294", False)  '// Duplicate Row
                        Exit Sub
                    Catch ex As Exception
                        'MsgBox(ex.Message)
                    End Try
                End If
    In the first line of the try block I got the error.
    Error : object reference not set to an instance of an object.

  • Add New Row in Matrix

    Hai,
    As soon i click add row button it is displaying following error message.
    DataSource- Out of boundaries [66000-29]. Please let me know how i can correct this error message
    <b>Code below</b>
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            Try
                ' Events of the Blanket Agreement form
                If (FormUID = "UidFrmMatrix") Then
                    If (pVal.Before_Action = False) Then
                        ' Click on Add Row
                        If (pVal.ItemUID = "4") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then
                            Dim f As SAPbouiCOM.Form
                            Dim oMatrix As SAPbouiCOM.Matrix
                            f = SBO_Application.Forms.Item(FormUID)
                            oMatrix = f.Items.Item("Matrix1").Specific
                            f.DataSources.DBDataSources.Item(1).Clear()
                            oMatrix.AddRow(1)
                        End If
                    End If
                End If
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
        End Sub

    You should preferably use string IDs when accessing items in a collection - like a single DBDataSource in the DBDataSources collection!
    I.e. use ...Item("UDT_FROM_SURESH") instead of ...Item(1).
    Thus you can e.g. forget to remember whether the colection was 0-based (what they usually are) or not...
    Another very basic suggestion:
    Check the count before you try to access a member through its index; that will help you to avoid programming errors too.
    Regards,
    Frank

  • Display Total Row In Matrix

    Hi all!
    In my addon application I have Matrix with 10 columns (2 columns with column type Edit Text, 8 columns with column type checkbox) now In 8 columns with type checkbox I want to display Footer as form Id = 60207(Menu service/service Report/Response Time by assignee Report). How To do it?
    please give me the solution to display Footer(Total) of Matrix when the column have column type is checkbox.
    Thanks & Help Me

    Hi !
    Thanks for your reply! when using 2 matrixs have problem as follow:
    My Matrix has 10 columns so will appear horizonal scrollbar so it doesn't solved this problem. My Idea I will add row after the last row and display total but i have problem: 8 columns that i want to add total have column type is checkbox so I can't. HOw to convert column type only the my row? Or give me the other solution. THanks
    Edited by: Tao lao on Apr 8, 2008 12:02 PM

  • Deleting row in matrix.

    Hello.
    I have weird problem.
    If I add some rows to matrix, and then delete rows the method with:
    m_pMatrix->GetRowCount();
    return the number of rows without delete.
    For example:
    If i have matrix with 5 rows, and I delete 2 rows, method with GetRowCount show me 5
    What is wrong ?
    I solved this problem with adding new variable, but why does it work wrong ?
    Sorry for my english.
    Regards
    Kamil Wydra

    Hello.
    Thank You for Your response.
    I try that and it works.
    Thanks again.
    Regards
    Kamil Wydra

Maybe you are looking for

  • Gif image button/javascript not work in mac firefox

    I have a GIF with an image map over it that launches a new page with Javascript. It appears and workd fine in all browsers pc and mac apart from firefox on a Mac where it does not appear. Any ideas? Thanks

  • BAPI relating to Withholding tax codes

    Hi all, I am currently using BAPI_ACC_DOCUMENT_POST for flow of information from SAP to J2EE.When J2EE calls this BAPI, its not taking the withholding tax data which it is ought to take.  J2EE which is interfaced with SAP doesn't have the option of e

  • Pick the true statement about a PeopleSoft project

    Hi, Pick the true statement about a PeopleSoft project 1) Merging projects will merge the objects of 2 projects to one and removes the other project 2) Project creation is not mandatory to migration a project 3) All details of a project including the

  • Really cool Website Effect

    Hey all, I ran across this website yesterday. Was wondering if anyone had the foggiest idea as to where to start to achieve a card-flipping effect like this. I've seen some stuff on page turning in 'Flash Hacks' but I think this brings it to a whole

  • Unable to restore backup, Unable to restore backup

    With each restore I get message that it is defective.