Skip to Content

How to add a row in matrix when the form is in ok mode ?

Hi friends,

<b> How to add a row in matrix when the form is in ok mode i.e .If i navigate the form ,the form comes in the ok mode .</b>

I want to get a new row when ever i navigate the screen.The new row next to last row of the matrix to be added.

<b> if i used the matrix.addrow() .It is copying the previous row.But if i used the DBdatasource.Item(1).clear()</b> , It is clearing the entire matrix and adding a row .

Please help me to solve this problem . If any code example please send me that .



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 04, 2006 at 10:09 AM

    HI friends i got it

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi ,

      I have given the following code example.Hope it helps


      '//*** Check form in OK MODE

      ElseIf oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then

      '//*** tO add a new row


      Dim oMatrix2 As SAPbouiCOM.Matrix

      oMatrix2 = SBO_Application.Forms.Item("formID").Items.Item("matrixid").Specific

      Dim val As Integer = (pVal.Row - 1)

      If oMatrix2.RowCount >= 1 And val <> -1 Then

      oEdit2 = oMatrix2.Columns.Item("V_0").Cells.Item((pVal.Row - 1)).Specific

      '// ** Get the Last Row

      If pVal.Row = (oMatrix2.RowCount + 1) Then

      oEdit = oForm.Items.Item("1000001").Specific

      If oEdit2.String <> Nothing Then

      '//** Clear the dbdatasource



      End If

      End If

      '// End of matrix row count check

      End If


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.