Welcome Notes

Welcome Viewers

12 April 2017

Display Project Details in CFL


Dear All,
   Today, we will discuss about below points
1) Display Active Project
2) Display Project based on Posting Date.

Code Here,


  '*************************************************************************************************************

    'Type               : Friend  Sub

    'Name               : CardDetailsCondition

    'Parameter          :

    'Return Value       :

    'Author             : Lakshmi Narayanan

    'Created Dt         : 26-11-2016

    'Last Modified By   :                       

    'Modified Dt        :

    'Purpose            : This Method is used for Project Details CFL Condition

    '*************************************************************************************************************

    Friend Sub ProjectDetailsCondition(ByVal SBO_Application As SAPbouiCOM.Application, ByVal oForm As SAPbouiCOM.Form, ByVal cflIndex As Object, ByVal strPostingDate As Object)

        Dim ocfl As SAPbouiCOM.ChooseFromList = Nothing

        'Dim oCFLcollection As SAPbouiCOM.ChooseFromListCollection

        Dim ocondition As SAPbouiCOM.Condition = Nothing

        Dim oconditions As SAPbouiCOM.Conditions = Nothing

        'oCFLcollection = oForm.ChooseFromLists

        ocfl = SBO_Application.Forms.ActiveForm.ChooseFromLists.Item(cflIndex)

        Try

            oconditions = ocfl.GetConditions

            If 0 = oconditions.Count Then

                ocondition = oconditions.Add

                ocondition.Alias = "Active"

                ocondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

                ocondition.CondVal = "Y"

                ocondition.Alias = "ValidTo"

                ocondition.Operation = SAPbouiCOM.BoConditionOperation.co_GRATER_THAN

                ocondition.CondVal = strPostingDate



                ocfl.SetConditions(oconditions)

            End If

        Catch ex As Exception



        Finally

            ocfl = Nothing

            ocondition = Nothing

            oconditions = Nothing



        End Try

       

    End Sub