Skip to Content
avatar image
Former Member

List Of Employees using Choose List

Hi

   I want to display only active employees using ChooseList

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 30, 2014 at 06:08 AM

    ----------while form is loading..

               Dim oedit As SAPbouiCOM.EditText

                        oedit = oForm.Items.Item("edit box uid").Specific

                        cflcardcode()

                        oedit.ChooseFromListUID = "CFL1"

                        oedit.ChooseFromListAlias = "empID"'

    ------method

    Public Sub cflcardcode()

            Try

                Dim oCFLs As SAPbouiCOM.ChooseFromListCollection

                Dim oCons As SAPbouiCOM.Conditions

                Dim oCon As SAPbouiCOM.Condition

                oForm = SBO_Application.Forms.Item("ORDERFORM")

                oCFLs = oForm.ChooseFromLists

                Dim oCFL As SAPbouiCOM.ChooseFromList

                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams

                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)

                ' Adding 2 CFL, one for the button and one for the edit text.

                oCFLCreationParams.MultiSelection = False

                oCFLCreationParams.ObjectType = "171"

                oCFLCreationParams.UniqueID = "CFL1"

                oCFL = oCFLs.Add(oCFLCreationParams)

                ' Adding Conditions to CFL1

                oCons = oCFL.GetConditions()

                oCon = oCons.Add()

                oCon.Alias = "Active"

                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

                oCon.CondVal = "Y"

                oCFL.SetConditions(oCons)

    Catch

                'MsgBox(Err.Description)

            End Try

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

        When i have written this code then it is working

      oCons = oCFL.GetConditions()

                  oCon = oCons.Add()

                  oCon.Alias = "Status"

                  oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

                  oCon.CondVal = 1

                  oCFL.SetConditions(oCons)

      Thanks