List Of Business Partner
I created a new for replacing List of business partners form.I need to display the newly created form when i press tab key from customer textbox of A/R Invoice form.For that my code is
if (pVal.ItemUID == "4") & (pVal.EventType == PbouiCOM.BoEventTypes.et_KEY_DOWN) & (pVal.Before_Action == true & pVal.CharPressed == 9)
BubbleEvent = false;
string xmlFile = "";
xmlFile = "ListOfBusinessPartners.srf";
oCommonmethods.LoadFromXML(ref xmlFile, SBO_Application);
The problem is when i pressed the tab key both the forms are coming ...Please suggest solution for this problem.
Yatsea Li replied
Are you going to filter some customer in A/R invoice when type tab in cardcode. Actually you cann't change the system choosefromlist, but you can set the condition for it, It is unnecessary to create a new BP list form for it.
try the following code:
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
Or it doesn't meet your requirement, you would like to block the CFL of B1, you may set BubbleEvent = fale in Before Action for ChooseFromList Event. But this is the last option.
Edited by: Yatsea Li on Oct 10, 2008 4:54 PM