cancel
Showing results for 
Search instead for 
Did you mean: 

Filling The Matrix

Former Member
0 Kudos

Hi

I have a problem with filling the matrix. In the matrix i select the Itemno from the choose from list,after i will try to fill the first row of the matrix.But i cant do it. If any one have idea about this problem please reply me.

Thanks in Advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Senthil,

You try this coding....

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

If pVal.Row = mat.RowCount Then

mat.AddRow()

End If

End If

Catch ex As Exception

'app.MessageBox(ex.Message)

End Try

End If

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi senthil

you say when you select a value fom CFL.... the field who trigger this CFL don´t fill with a selected value from cfl?