06-22-2017 10:18 AM - edited 02-03-2024 11:04 PM
Dim oDataTable As SAPbouiCOM.DataTable = Nothing
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent = Nothing '
Dim oChooseFromList As SAPbouiCOM.ChooseFromList = Nothing '
Dim sChooseFromListUID As String = String.Empty
Dim oDBDataSource As SAPbouiCOM.DBDataSource = Nothing Dim strPrjCode As String = String.Empty '
Dim strPrjName As String = String.Empty
Try oDBDataSource = oForm.DataSources.DBDataSources.Item(oDataSource)
If pVal.ActionSuccess Then
oCFLEvento = DirectCast(pVal, SAPbouiCOM.IChooseFromListEvent)
oCFLEvento = pVal oDataTable = oCFLEvento.SelectedObjects
If oDataTable Is Nothing Then Exit Sub
If Not oDataTable Is Nothing And pVal.BeforeAction = False Then
For i As Integer = 0 To oDataTable.Rows.Count - 1 If oDataTable.Rows.Count = 1 Then
With oDBDataSource If Not String.IsNullOrEmpty(getColName) Then
strPrjCode = oDataTable.GetValue(getColName, i) .SetValue(prjCodeAlias, i, strPrjCode.Trim())
End If
End With
End If
Exit For
Next
End If
End If
Catch ex As Exception
Finally
End Try
End Sub
It seems you are setting the DataTable value which comes from the ChooseFromList, I believe that you want to set your DataSource,
strPrjCode = oDataTable.GetValue(getColName, i)
oDBDataSource.SetValue(prjCodeAlias, i, strPrjCode.Trim())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.