我对SAP Business one studio非常陌生,我想在SAP business one Studio中的“管理”菜单下创建子菜单(文件夹)
管理 - >附加组件 - >我的插件示例。
答案 0 :(得分:0)
您可以使用以下代码在“模块”菜单下添加新菜单...
SAPbouiCOM.Menus oMenus = null;
SAPbouiCOM.MenuItem oMenuItem = null;
//**********************************************************
oMenus = SBO_Application.Menus;
SAPbouiCOM.MenuCreationParams oCreationPackage = null;
//**********************************************************
//Creating a new menu item after the menu whose UID is
//"3328"
//**********************************************************
oCreationPackage = ( ( SAPbouiCOM.MenuCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams ) ) );
oMenuItem = SBO_Application.Menus.Item( "3328" );
try{
//**********************************************************
//Adding the new menu to the main menu
//**********************************************************
oMenus.AddEx( oCreationPackage );
oMenuItem = SBO_Application.Menus.Item( "3328" );
//**********************************************************
//Adding the sub menu of string type to the newly added menu
//**********************************************************
oMenus = oMenuItem.SubMenus;
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;
oCreationPackage.UniqueID = "routesheet";
oCreationPackage.String = "RouteSheet";
oMenus.AddEx( oCreationPackage );
}
这是我在模块菜单下添加名为Route Sheet的新菜单的示例,其中UID为43520.
希望它有效。