cancel
Showing results for 
Search instead for 
Did you mean: 

Bad Value In CFL(Choose From List)

Former Member
0 Kudos

Hello

I have a matrix with 5 columns and a CFL in each one.

When i choose a value from the CFL and i try to set it in the matrix, i obtain an exception saying "bad value" , but the strange thing is that I get this exception just in the first line of the matrix but in the other lines, i don't have this error.

Best Regards

Med BENNANI

Accepted Solutions (1)

Accepted Solutions (1)

former_member689126
Active Contributor
0 Kudos

Hi

Is your matrix column bounded to any dbdatasource..

Regards

Arun

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Mohammed ,

Could you please post the code of the event handler in charge of the CFLs ?

Kind regards,

Amin.

Former Member
0 Kudos

Hi AMine

you find bellow the Code of event handler for the choosefromlist

Dim OCFL As SAPbouiCOM.ChooseFromList

OCFL = Me.oSboForm.ChooseFromLists.Item(ChooseFromListUID)

Dim CFLValue As String()

CFLValue = Functions.GetValues(SelectedObject)

Dim oEdit1 As SAPbouiCOM.EditText

'Dim val As String

Dim oDataTable As SAPbouiCOM.DataTable

oDataTable = SelectedObject

If oDataTable.UniqueID = "CFL_5" Then

'Try

' CType(CType(Module1.oSBO.oApplication.Forms.Item(Me.oSboForm.UniqueID).Items.Item("Matrix").Specific, Matrix).Columns.Item("U_Month").Cells.Item(oMatrix.RowCount).Specific, EditText).Value = SelectedObject.Columns.Item(2).Cells.Item(i).Value.ToString

'Catch ex As Exception

'End Try

Try

'bAddLine.Enabled = False

Try

Dim ss As String = oDataTable.GetValue(2, 0)

oEdit1 = oMatrix.Columns.Item("U_Month").Cells.Item(oMatrix.RowCount).Specific

oEdit1.String = ss

Me.oSboForm.Items.Item("btnAddRow").Enabled = False

iRow = 0

Catch ex As Exception

Me.oSboForm.Items.Item("btnAddRow").Enabled = False

End Try

Catch ex As Exception

End Try