Experts,
Try
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
If pVal.BeforeAction = False Then
objForm = oform
Dim OCFEvent As SAPbouiCOM.IChooseFromListEvent
OCFEvent = pVal
Dim SFcl As String
SFcl = OCFEvent.ChooseFromListUID
Dim OCFl As SAPbouiCOM.ChooseFromList
OCFl = objForm.ChooseFromLists.Item(SFcl)
If OCFEvent.Before_Action = False Then
Dim ODataTable As SAPbouiCOM.DataTable
ODataTable = OCFEvent.SelectedObjects
Select Case pVal.ItemUID
Case "4"
Dim Str As String
Dim ORec As SAPbobsCOM.Recordset
Dim OPROD As SAPbobsCOM.Recordset
OPROD = objSBOAPI.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Str = "Select * from [@Table] where DocEntry='" & ODataTable.GetValue("DocEntry", 0) & "' and Series='" & ODataTable.GetValue("Series", 0) & "'"
ORec = objSBOAPI.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
ORec.DoQuery(Str)
If ORec.EoF = False Then
Try
objForm.Items.Item("4").Specific.value = ORec.Fields.Item("DocNum").Value
Catch ex As Exception
End Try
End If
End Select
End If
End If
End Select
Catch ex As Exception
End Try
This code is written but i am unable to select the choose from list items, i am unable to see anything wrong in code above. Pelase help. It is taking click event.