cancel
Showing results for 
Search instead for 
Did you mean: 

Choose From List on User form

Former Member
0 Kudos

Hi all,

My client want when i pick Business partner master data only customer and leads should be displaye, but not vendors. What can i do for this.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Kuldeep,

You can do it by filtering your choose from list. On beforeaction = true, and on choose from list event use this piece of code

if (pVal.ItemUID == enControlName.CustomerCode)

                                    {

                                        SAPbouiCOM.ChooseFromList oCFLEvento = default(SAPbouiCOM.ChooseFromList);

                                        SAPbouiCOM.Condition oCon = default(SAPbouiCOM.Condition);

                                        SAPbouiCOM.Conditions oCons = default(SAPbouiCOM.Conditions);

                                        oCFLEvento = this.m_SBO_Form.ChooseFromLists.Item("CFL_2");

                                        oCFLEvento.SetConditions(null);

                                        oCons = oCFLEvento.GetConditions();

                                        oCon = oCons.Add();

                                        oCon.Alias = "CardType";

                                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

                                        oCon.CondVal = "C";

                                        oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;

                                        oCon = oCons.Add();

                                        oCon.Alias = "CardType";

                                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

                                        oCon.CondVal = "L";

                                        oCFLEvento.SetConditions(oCons);

                                    }

Hope it will help

Thanks

Answers (0)