Hi,
My treatment plant loop is SAP
I want to retrieve a field OCRD and put a combobox order entry (ORDR)
The code is ok but after he completes the execution of code
"OComboBoxIncoterm.Select (WsCodeIncoterm, SAPbouiCOM.BoSearchKey.psk_ByValue)"
It is the beginning of treatment to stop sas
I hope to be clear
oform = SBO_application.Forms.Item(FormUID)
Dim oChaineSql As String = Nothing
Dim vRS As SAPbobsCOM.Recordset
vRS = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)
Dim oNumPartenaire As SAPbouiCOM.EditText
Dim oComboBoxIncoterm As SAPbouiCOM.ComboBox
oItemexistant = oform.Items.Item("4") ' Recup partenaire
oNumPartenaire = oItemexistant.Specific
If oNumPartenaire.Value <> "" Then
oitem = oform.Items.Item("U_INCOT")
oComboBoxIncoterm = oitem.Specific
oComboBoxIncoterm.DataBind.SetBound(True, "ORDR", "U_OCA_INCOT")
If oComboBoxIncoterm.Selected.Value = "" Then
Dim WsCodeIncoterm As String = ""
oChaineSql = "SELECT U_OCA_Incot FROM [OCRD] WHERE CardCode = " + oNumPartenaire.Value
'Executes SQL query
vRS.DoQuery(oChaineSql)
' Lecture SQL query
vRS.MoveFirst()
While Not vRS.EoF
WsCodeIncoterm = vRS.Fields.Item("U_OCA_Incot").Value
vRS.MoveNext()
End While
If WsCodeIncoterm <> "" Then
oComboBoxIncoterm.Select(WsCodeIncoterm, SAPbouiCOM.BoSearchKey.psk_ByValue)
' SetValueComboBox(WsCodeIncoterm)
End If
End If
End If
HELP !!!
Thanks