![](/img/trans.png)
[英]How to Creating sub menus (folders) under the Administration menu in SAP business one studio 9.2 using C# code
[英]Creating sub menus (folders) under the Administration menu in SAP business one 8.81
我正在为SAP业务一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业务1中已经创建的菜单项中添加子文件夹?
刚刚更改了oMenuItem = this.app.Menus.Item("43530");
到oMenuItem = this.app.Menus.Item("43525");
而且有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.