cancel
Showing results for 
Search instead for 
Did you mean: 

Get ItemCode from Matrix

Former Member
0 Kudos

Hi All,

I do encounter a problem to get the ItemCode Value from matrix. Do anyone have this problem. Below is my code

            If pVal.FormTypeEx = "139" and pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS And _
                    pVal.ItemUID = "38" And _
                    pVal.ColUID = "14" Then

                    Dim oMatrix1 As SAPbouiCOM.Matrix
                    Dim oEditText0 As SAPbouiCOM.EditText
		    Dim sItemCode as string

                    oMatrix1 = SBO_Application.Forms.Item(FormUID).Items.Item("38").Specific
                    oEditText0 = oMatrix1.Columns.Item("ItemCode").Cells.Item(pVal.Row).Specific
                    sItemCode = oEditText0.value

		end if

View Entire Topic
Former Member
0 Kudos

Hi,

The problem is that you are putting a wrong column id for the the ItemCode.

The ItemCode column is 1, so you must change your line:

oEditText0 = oMatrix1.Columns.Item("1").Cells.Item(pVal.Row).Specific

You can see from SAP the column Unique ID by turning on the System Information (Edit Menu), and pointing the mouse arrow in the desired column, you will see if the control is a matrix: "Column=..."

Hope it helps