Skip to Content

How to work with matrix in SAP B1?

Feb 07 at 09:52 AM


avatar image


I created UDO which has matrix in SAP B1 and I used UDV (UDV of query which selects all Items code) in first column in order to select all items code, so in matrix of UDO it's impossible to choose from list more than one Item, except to select one by one

How can I choose from list more than one item in matrix of UDO?

I tried to use below codes but there one issue

    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        If pVal.BeforeAction AndAlso pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD AndAlso pVal.FormTypeEx = "UDO_FT_RLPY" Then
            Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.Item(FormUID)
            Dim oMatrix As SAPbouiCOM.Matrix
            oMatrix = oForm.Items.Item("C_0_1").Specific 'ISSUE IS HERE, to this line (C_0_1 is the Unique ID of first column of matrix, I do know well if it is that I have to use there because it brings error)
            If pVal.Modifiers = SAPbouiCOM.BoModifiersEnum.mt_SHIFT Then
                Dim lastRowSelected As Integer = oMatrix.Rows.SelectedRows.Item(oMatrix.Rows.SelectedRows.Count - 1, SAPbouiCOM.BoOrderType.ot_RowOrder)
                If lastRowSelected < pVal.Row Then
                    For i As Integer = pVal.Row To lastRowSelected + 1
                End If
            End If
        End If 
    End Sub

I tried to see in all examples of matrix in SDK sample but there is no example which can solve my issue, even here in the portal there is no one who solved this issue

Is there someone who can help me please?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers