Skip to Content
0
Former Member
Jun 05, 2006 at 09:17 PM

ChooseFromList in a Matrix

24 Views

Hi

I'am using a ChooseFromList in a Matrix column bound to the column segment_0 of the table OACT -

and I don't know how to show the account selected.

The next code always returns the segment_0 of the selected account

in the first row of the matrix because i'am using 0 (zero) as record number

in the setvalue property of the datasource:

oForm.DataSources.DBDataSources.Item("OACT").SetValue _

("Segment_0", <b>0</b>, DTable.GetValue("Segment_0", 0))

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And _
  Not pVal.BeforeAction Then
   oForm = CSBOApp.Forms.Item(pVal.FormUID)
   oCflEv = pVal
   CflUID = oCflEv.ChooseFromListUID
   oCFList = oForm.ChooseFromLists.Item(CflUID)
   DTable = oCflEv.SelectedObjects
   If DTable.Rows.Count > 0 Then
      oMatrix = oForm.Items.Item("REG_GrdReg").Specific
      oMatrix.FlushToDataSource()
      oForm.DataSources.DBDataSources.Item("OACT"). _
        SetValue("Segment_0", 0, DTable.GetValue("Segment_0", 0))
      oMatrix.LoadFromDataSource()
   End If
endif

How I can obtain the row number of the actual row?

or is there any other way to do this??

Thaks

Jesica