簡體   English   中英

在SAP業務一8.81的“管理”菜單下創建子菜單(文件夾)

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM