Hi expert all
i have problem regarding chose from list edit box.please . i have used object id 17 to select sales order No, customer name , orderdate from sap business one chose from list.
If (pVal.ItemUID = "btn") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And (pVal.BeforeAction = True) Then
SBO_Application.MessageBox("11")
Try
Dim sSql As String
Dim oEdit As SAPbouiCOM.EditText
Dim strname As String
oItem = oForm.Items.Item("OrdrVal") '''''''''''''''''''''''''''' order no come from chose from list object id 17
oEdit = oItem.Specific
strname = oEdit.value''''''''''''''''''''''''''' let see order no 2
SBO_Application.MessageBox("15")
Dim RS As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
sSql = "select U_calM,U_MTrip,U_WghT,U_Ttype from ORDR WHERE Docentry ='" & Trim(strname) & "'"
SBO_Application.MessageBox("16")
RS.DoQuery(sSql)
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
' RS.MoveFirst()
Do While Not (rs.EoF)
oForm.Items.Item("CalVal").Specific.value = rs.Fields.Item("U_calM").Value
oForm.Items.Item("MVal").Specific.value = rs.Fields.Item("U_MTrip").Value
oForm.Items.Item("WVal").Specific.value = rs.Fields.Item("U_WghT").Value
oForm.Items.Item("TVal").Specific.value = rs.Fields.Item("U_Ttype").Value
SBO_Application.MessageBox("17")
rs.MoveNext()
Loop
End If
oItem = oForm.Items.Item("OrdrVal") '''''''''''''''''''''''''''' order no come from chose from list object id 17
oEdit = oItem.Specific
strname = oEdit.value''''''''''''''''''''''''''' let see order no 2
if above order no edit box manually i put 7 then its working.... but when i select order no 7 from chose from list this program not executing...?
Please suggest me or advice me..?