Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sorting a number in first column of matrix

Hi All,

I tried following code for sorting number of first column of matrix. But when i click on AddRow menu it gives error and when i use commented line code that time it adds one row but number shows in column last row number.

And when i click on DeleteRow menu it delete only first time second time it is not working.

Can anybody tell me where i am wrong ? Plz suggest me exact code.

Public Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)

Dim item As Matrix

formd = SBO_Application.Forms.ActiveForm

item = formd.Items.Item("2").Specific

Dim i As Integer

If pVal.MenuUID = "1292" Then

' item.AddRow(1, 1)

item.Columns.cells.item(item.RowCount).specific.value = item.RowCount

BubbleEvent = False

End If

If pVal.MenuUID = "1293" Then

For i = 1 To item.VisualRowCount

item.Columns.Item("V_-1").Cells.Item(i).Specific.value = i



BubbleEvent = False

End If

End Sub

Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question