gpt4 book ai didi

c# - SAP business one 8.81 Administration菜单下创建子菜单(文件夹)

转载 作者:太空宇宙 更新时间:2023-11-03 14:18:46 32 4
gpt4 key购买 nike

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

有人知道怎么做吗?

下面的代码只是展示了如何在SAP的Reports菜单下添加菜单。

在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 1 中已创建的菜单项中添加子文件夹?

最佳答案

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

关于c# - SAP business one 8.81 Administration菜单下创建子菜单(文件夹),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5959937/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com