Skip to Content
0

delete row of system matrix on form load

Nov 11, 2016 at 02:52 PM

60

avatar image

Hello I need delete some rows from a system matrix, the problem that I have it's when I instance the matrix into my variable this stops there and the code not continues, I don't know why. this is my code. the code stops on this line oMatrix = oForm.Items.Item(13).Specific

 Private Sub SBO_Application_ItemEvent(FormUID As String, ByRef pVal As ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        BubbleEvent = True
        If pVal.FormTypeEx = "65213" Then
            If pVal.EventType = BoEventTypes.et_FORM_LOAD And pVal.BeforeAction = False Then
                Dim oMatrix As SAPbouiCOM.Matrix
                Dim oProd As String
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                oMatrix = oForm.Items.Item(13).Specific
                For i = 0 To oMatrix.RowCount - 1
                    oProd = oMatrix.Columns.Item("ItemCode").specific.value
                Next
            End If
            If pVal.EventType = BoEventTypes.et_FORM_CLOSE And pVal.BeforeAction = False Then
                oForm = Nothing
            End If
        End If
    End Sub
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

DIEGO LOTHER Nov 11, 2016 at 03:12 PM
0

Hi Werner,

Try this:

oMatrix = oForm.Items.Item("13").Specific

Kind Regards,

Diego Lother

Show 2 Share
10 |10000 characters needed characters left characters exceeded

ups you right was the "13" in the item number, many thanks..

0

Hi Werner,

Great.

Don't forget to accept the answer as a correct answer clicking on the accept button below my answer.

Kind Regards,

Diego Lother

img1.png (3.9 kB)
0