06-14-2017 3:13 PM - edited 02-03-2024 8:36 PM
Hi,
I’m currently adding new buttons to BP Campaign form to add new functionality. For some reason, the forth button won’t appear on the form even though there is room to fit it. Below is a screenshot of the form of the buttons that appears and the code I used to make the buttons appear. Would you know based with the code why the fourth button does not appear?
Dim oCampForm As SAPbouiCOM.Form
oCampForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
Dim oitmref, Item As SAPbouiCOM.Item
oitmref = oCampForm.Items.Item("1320000002")
'Campaign based On BP
oCampForm.Items.Add("btnBP", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
Item = oCampForm.Items.Item("btnBP")
Item.Top = oitmref.Top
Item.Height = oitmref.Height
Item.Width = oitmref.Width + 60
Item.Left = oitmref.Left + oitmref.Width + 5
Item.LinkTo = "1320000002"
Dim oButton As SAPbouiCOM.Button
oButton = oCampForm.Items.Item("btnBP").Specific
oButton.Caption = "Campaign based On BP"
'Campaign Based on Items
oitmref = oCampForm.Items.Item("btnBP")
oCampForm.Items.Add("btnItem", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
Item = oCampForm.Items.Item("btnItem")
Item.Top = oitmref.Top
Item.Height = oitmref.Height
Item.Width = oitmref.Width
Item.Left = oitmref.Left + oitmref.Width + 5
Item.LinkTo = "1320000002"
Dim oButton1 As SAPbouiCOM.Button
oButton1 = oCampForm.Items.Item("btnItem").Specific
oButton1.Caption = "Campaign Based on Items"
' Campaign Based on Group
oitmref = oCampForm.Items.Item("btnItem")
oCampForm.Items.Add("btnGroup", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
Item = oCampForm.Items.Item("btnGroup")
Item.Top = oitmref.Top
Item.Height = oitmref.Height
Item.Width = oitmref.Width
Item.Left = oitmref.Left + oitmref.Width + 5
Item.LinkTo = "1320000002"
Dim oButton2 As SAPbouiCOM.Button
oButton2 = oCampForm.Items.Item("btnGroup").Specific
oButton2.Caption = "Campaign Based on Group"
'Send Mailing List
oitmref = oCampForm.Items.Item("btnGroup")
oCampForm.Items.Add("btnMailList", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
Item = oCampForm.Items.Item("btnMailList")
Item.Top = oitmref.Top
Item.Height = oitmref.Height
Item.Width = oitmref.Width
Item.Left = oitmref.Left + oitmref.Width + 5
Item.LinkTo = "1320000002"
Dim oButton3 As SAPbouiCOM.Button
oButton3 = oCampForm.Items.Item("btnMailList").Specific
oButton3.Caption = "Send Mail List"
Hi,
The item id length can`t be higher than 10 chars
oCampForm.Items.Add("btnMailList", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
Your btnMailList has 11
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
6 | |
5 | |
5 | |
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.