Skip to Content

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

Jun 22, 2017 at 09:18 AM


avatar image

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


End If

End If

Catch ex As Exception


End Try

End Sub

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Danilo Kasparian Jun 23, 2017 at 01:30 PM

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())
10 |10000 characters needed characters left characters exceeded