cancel
Showing results for 
Search instead for 
Did you mean: 

Item - The item is not a user-defined item [66000-8] SAP B1

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member233854
Active Contributor
0 Kudos

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())