在 SAP Business One 8.81 中的“管理”菜单下创建子菜单(文件夹)

本文关键字:菜单 创建 文件夹 管理 One Business SAP 中的 | 更新日期: 2023-09-27 17:55:54

我正在为SAP Business One 8.81开发一个薪资附加组件。我可以在SAP应用程序附带的最后一个菜单项(即报告)下方添加菜单。我正在尝试在SAP的管理/设置菜单下为我的工资单附加组件添加设置子菜单。

有谁知道如何做到这一点?

下面的代码仅显示了如何在SAP的"报告"菜单下方添加菜单。

它采用 c# 格式,文件名为 GUI

.cs
oCreationPackage = ((SAPbouiCOM.MenuCreationParams)(app.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)));
                oMenuItem = this.app.Menus.Item("43520");
                string sPath = Application.StartupPath;
                //parent menu
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP;
                oCreationPackage.UniqueID = "eim_payroll";
                oCreationPackage.String = "EIM Payroll";
                oCreationPackage.Enabled= true;
                oCreationPackage.Position = 15;
                oCreationPackage.Image = sPath + @"'EIM_Payroll_icon.bmp";
                oMenus = oMenuItem.SubMenus;
                //If the menu already exists this code will fail
                oMenus.AddEx(oCreationPackage);
                //Get the menu collection of the newly added pop-up item
                oMenuItem = this.app.Menus.Item("eim_payroll");
                oMenus = oMenuItem.SubMenus;
                //create the setup menu item for master data
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP;
                oCreationPackage.UniqueID = "setup";
                oCreationPackage.String = "Setup";
                oMenus.AddEx(oCreationPackage);
                oMenuItem = this.app.Menus.Item("setup");
                oMenus = oMenuItem.SubMenus;
                //Get the menu collection of the newly added pop-up item
                oMenuItem = this.app.Menus.Item("setup");
                oMenus = oMenuItem.SubMenus;
                //create the payroll menu item for master data
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP;
                oCreationPackage.UniqueID = "payroll1";
                oCreationPackage.String = "Payroll";
                oMenus.AddEx(oCreationPackage);

如何在已在 SAP Business One 中创建的菜单项中添加子文件夹?

在 SAP Business One 8.81 中的“管理”菜单下创建子菜单(文件夹)

刚刚将oMenuItem = this.app.Menus.Item("43530");更改为oMenuItem = this.app.Menus.Item("43525");并且它有效