on 09-10-2008 2:08 PM
Hi Guys,
I am hanging with one issue.. that is really so different and i never faced this type of issue in my experience.. this issue is coming with sales documents. i have to select a combo value after selection of Business Partner.if i am selecting a business partner by the simple way then i have no issue. and my code is working fine... but if i am doing like :
Type C00* in Customer edit text then tab .
after that i can seems there are 2 or more Customer.
if i am selecting any one from all then i have to select combo value corresponding Customer.
if i am doing this then one more CFL is Open... and if i select on another CFL then Application goes to crash.
Sample Code..
Sample of Code
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
oCFLEvento = pVal
If Not oCFLEvento.SelectedObjects Is Nothing Then
objCombo = objForm.Items.Item("ProjCode").Specific
If oCFLEvento.ItemUID = "4" Or oCFLEvento.ItemUID = "54" Then
Dim BPCode As String = String.Empty
BPCode = objUtility.SelectBP(oCFLEvento.SelectedObjects.GetValue(0, 0).ToString().Trim())
Dim A As SAPbouiCOM.Form
A = objSBOAPI.SBO_Appln.Forms.ActiveForm
If A.Title = "List of Business Partners" Then
A.Close()
End If
' i am struck here...when combo is selecting value.. if i comment those lines(2 lines like objcombo.select.....) then no issue. and as u know this is System Form so i can't use datasource.
objCombo.Select("", SAPbouiCOM.BoSearchKey.psk_ByValue)
objCombo.Select(BPCode, SAPbouiCOM.BoSearchKey.psk_ByValue)
End If
End If
Please help me ASAP... looking for genious's reponse.
thanks
deepak
Deepak,
It will always open double CFL since any invoked UI event like combo select or click again fires the original event. but, if what all you want to do is to select a value in combo box when a customer is selected then you can use Lost_Focus event like :
If pVal.FormType = "139" And pVal.ItemUID = "4" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS And pVal.Before_Action = False Then
Try
oform = SBO_Application.Forms.GetFormByTypeAndCount("139", 1)
If oform.Items.Item("4").Specific.value <> "" Then
ocm = oform.Items.Item("cmb").Specific
Dim i As String
i = ocm.Selected.Value
If i <> "0" Then
'--put here your selection function for combobox
ocm.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
End If
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
hope it helps.
regards,
Binita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.