on 05-13-2011 4:58 AM
Dear Experts,
How to add a defined new button in CFL for UDO? Just like CFL for business partner where a new button to add new business partner.
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
oCFLs = oForm.ChooseFromLists
oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "UDO_PRJTYPE"
oCFLCreationParams.UniqueID = "CFL_ProjectType"
oCFL = oCFLs.Add(oCFLCreationParams)
Regards,
Cherine
Hi Shafi,
I have a text box which assign to a CFL which reference my UDO table. When my CFL form open I can't see the NEW button which normally use to new record in my UDO table. Just like the Business Partner CFL, whereby you can add new BP record within the CFL form when you click the NEW button.
Regards,
Cherine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cherine,
Try This....
'Adding CFL To the Matrix
oform = sbo_application.Forms.Item("Frm_Emp")
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
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 = "2"
oCFLCreationParams.UniqueID = "cfl"
oCFL = oCFLs.Add(oCFLCreationParams)
' Adding Conditions to CFL1
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "CardType"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCFL.SetConditions(oCons)
Dim omat As SAPbouiCOM.Matrix
Dim ocolumns As SAPbouiCOM.Columns
Dim ocolumn As SAPbouiCOM.Column
omat = oform.Items.Item("mat_emp").Specific
ocolumns = omat.Columns
ocolumn = ocolumns.Item("col_inst")
ocolumn.ChooseFromListUID = "cfl"
Thanks
Shafi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.