Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Choose from the list condition

How to change condition in Choose from the list and pass more than 1 condition

Edited by: Pavana Punja on Oct 6, 2008 8:10 AM

replied

Hi Pavana,

try this Following steps,

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then

If pVal.ItemUID = "CFL edittxt Uid"

Dim oCFLs As SAPbouiCOM.ChooseFromListCollection = oForm.ChooseFromLists

oCFL = oCFLs.Item("CFLid")

oCFL.SetConditions(Nothing)

oCons = oForm.ChooseFromLists.Item("CFLid").GetConditions

oCon = oCons.Add()

oCon.Alias = "AliasName"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

oCon.CondVal = "Conditionvalue"

'//setting multiple conditions

oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND

oCon = oCons.Add()

oCon.Alias = "AliasName"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL

oCon.CondVal = "Conditionvalue"

oForm.ChooseFromLists.Item("CFLid").SetConditions(oCons)

'//

you can set your needed logical operation in oCon.Relationship(And,Or) and oCon.Operation(equal,not equal,less than etc)

you can repeat the same for multiple conditions.. if your conditions change in run time means save it an array or in variables and pass that values through loop also.

Regards,

Ganesh k

Endif

End if

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question