cancel
Showing results for 
Search instead for 
Did you mean: 

List Of Business Partner

Former Member
0 Kudos

Hi friends,

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.

Nisha

Accepted Solutions (1)

Accepted Solutions (1)

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Nisha,

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.

Kind Regards

-Yatsea

Edited by: Yatsea Li on Oct 10, 2008 4:54 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try this..



If pVal.FormType = 133 And pVal.ItemUID = "4" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_KEY_DOWN And pVal.CharPressed = 9 Then
            If pVal.BeforeAction = True Then
                Try
                    MsgBox("Mahesh")
                    BubbleEvent = False
                    Exit Sub
                Catch ex As Exception
                    OCT_Application.MessageBox(ex.Message)
                End Try
            End If
        End If

Regards,

Mahendra

Former Member
0 Kudos

Hi...

I thing (my opinion) this not possible.

ur from kerala.

Regards..

Billa 2007

Former Member
0 Kudos

Yes

Former Member
0 Kudos

Hi...

I know u

Regards...

Billa 2007

Edited by: Billa 2007 on Oct 13, 2008 9:49 AM