on 10-09-2008 5:49 PM
Hi,
I have a problem in Business Partners Master Form. I need add conditions in Choose From List in Find Mode when I set an asterisk in the CardCode TextField for filtering the businnes partners list.
When I capture the et_CHOOSE_FROM_LIST itemEvent in BeforeAction, I can't get the ChooseFromList ID for adding the conditions in the ChooseFromList Object.
Sample Code:
Public Sub ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)
....
Select Case pVal.EventType
Case et_CHOOSE_FROM_LIST:
Dim lcflE As SAPbouiCOM.ChooseFromListEvent
Dim id As String
Set lcflE = pVal
id = lcflE.ChooseFromListUID -> The ID is "-1"
End If
....
End Sub
Thank's in advance
Best Regards
Hello Rafea,
if you can't get it via lcflE.ChooseFromListUID -> The ID is "-1",I guess you need to know choosefromlist UID by test one by one with oForm.ChooseFromLists.Item(i). Or you can save the fom as xml then chech the CFL UID.
If pVal.FormType = 139 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
If pVal.ItemUID = "4" Then
If pVal.InnerEvent And pVal.Before_Action Then
BubbleEvent = False
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
Dim oCons As SAPbouiCOM.Conditions
Dim oCFL As SAPbouiCOM.ChooseFromList
'oCFL = oCFLs.Add(oCFLCreationParams)
oCFL = oForm.ChooseFromLists.Item("2")
oCons = oCFL.GetConditions()
'Note: Add the condition only once.
If 0 = oCons.Count Then
Dim oCon As SAPbouiCOM.Condition
oCon = oCons.Add()
oCon.Alias = "Cardcode"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C0001"
'Set your own condition here instead of the system conditions
oCFL.SetConditions(oCons)
End If
BubbleEvent = True
End If
End If
End If
Kind Regards
-Yatsea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rafael,
This is not possible, because the item is not an User Defined Item.
Att,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
11 | |
10 | |
6 | |
5 | |
5 | |
5 | |
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.