Skip to Content
0
Former Member
Oct 31, 2013 at 10:17 AM

Cfl on system form.. filtering...

108 Views

hi..

i have one requirement..

i open the delivery document in sales

in bottom copy from button combo is there..

once press sales order will pop up once select sales order that object will open..

here can i filter the cfl ..

what i need is sales order docdate = today date should be list out in the object

is it possible..

may i know first is it possible..

for sample ..in comobo select evnet before action=true

i put below code but not working..

is it possible first filter the object in system form..

Public Sub cflcardcode()

Try

Dim oCFLs As SAPbouiCOM.ChooseFromListCollection

Dim oCons As SAPbouiCOM.Conditions

Dim oCon As SAPbouiCOM.Condition

'oForm = SBO_Application.Forms.Item("TT")

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 = "17"

oCFLCreationParams.UniqueID = "CFL1"

oCFL = oCFLs.Add(oCFLCreationParams)

' Adding Conditions to CFL1

oCons = oCFL.GetConditions()

oCon = oCons.Add()

oCon.Alias = "DocEntry"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

oCon.CondVal = 73

oCFL.SetConditions(oCons)

' oCFLCreationParams.UniqueID = "CFL2"

'oCFL = oCFLs.Add(oCFLCreationParams)

Catch

MsgBox(Err.Description)

End Try

End Sub