cancel
Showing results for 
Search instead for 
Did you mean: 

Error During the Matrix fill

Former Member
0 Kudos

hi

I have an user defined form and it contains the matrix. Then i will select the data from Choosefromlist inside the matrix and i will try to fill the matrix using the following code.

<b>Dim CVal As Object

Dim ObjMatrix As SAPbouiCOM.Matrix = OForm.Items.Item(MatUID).Specific

CVal = ObjMatrix.Columns.Item(1).Cells.Item(pVal.Row).Specific

CVal.value = val</b>

if once this code will run the following error will occur

<b> public member 'Value' on type 'IComboBox' not found</b>

what is the error? any one can help me to solve this problem or show me any other way is available to fill the matrix ?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Senthil,

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then

Dim CFLEvent As SAPbouiCOM.IChooseFromListEvent

Dim CFL_Id As String

CFLEvent = pVal

Dim f As SAPbouiCOM.Form

Dim oCFL As SAPbouiCOM.ChooseFromList

CFL_Id = CFLEvent.ChooseFromListUID

f = app.Forms.Item(FormUID)

oCFL = f.ChooseFromLists.Item(CFL_Id)

'app.MessageBox(oCFL.UniqueID)

If CFLEvent.BeforeAction = False And oCFL.UniqueID = "CFL1" Then

Try

Dim oDT As SAPbouiCOM.DataTable

Dim item_id, item_desc As String

oDT = CFLEvent.SelectedObjects

item_id = oDT.GetValue(0, 0)

item_desc = oDT.GetValue(1, 0)

If pVal.ItemUID = "mat" And (pVal.ColUID = "compid" Or pVal.ColUID = "compdesc") Then

Dim mat As SAPbouiCOM.Matrix

Dim txt As SAPbouiCOM.EditText

mat = frm.Items.Item(pVal.ItemUID).Specific

txt = mat.Columns.Item("compid").Cells.Item(pVal.Row).Specific

txt.String = item_id

txt = mat.Columns.Item("compdesc").Cells.Item(pVal.Row).Specific

txt.String = item_desc

End If

Catch ex As Exception

app.MessageBox(ex.Message)

End Try

End If

I think it will help for you.

Answers (2)

Answers (2)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Senthil,

Please don't create several times the same messages.

I have removed another one with exactly the same content as this one.

Regards

Trinidad.

Former Member
0 Kudos

Try using this statement

Dim CVal As SAPbouiCOM.ComboBox

instead of

Dim CVal As Object

see if it works