cancel
Showing results for 
Search instead for 
Did you mean: 

create addon under bussiness partner menu

Former Member
0 Kudos
73

hi,

i already created an addon. i want to install that addon under business partner meni item tab. its urgent.

Regards,

Puneeth S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi puneeth,

You can create the menu like this :

SAPbouiCOM.Menus oMenus;

SAPbouiCOM.MenuItem oMenusItem;

SAPbouiCOM.MenuCreationParams oCreationPackage = null;

oCreationPackage = ((SAPbouiCOM.MenuCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)));

oMenusItem = SBO_Application.Menus.Item("43535");

oMenus = oMenusItem.SubMenus;

// Ajout sous-menu "Gestion des affaires"

if (SBO_Application.Menus.Exists("IFC_GEST_AFF") == false)

{

oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;

oCreationPackage.UniqueID = "IFC_GEST_AFF";

oCreationPackage.String = ChangeLanguage.GetName_For_SubMenu(SBO_Application.Language, "1");

oCreationPackage.Position = 1;

oMenus.AddEx(oCreationPackage);

oCreationPackage = ((SAPbouiCOM.MenuCreationParams)(SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)));

}

This create a entry menu in the Business Partners menu.

If you want to create a entry between Business Partners and Banking with sub menu, try this :

SAPbouiCOM.Menus oMenus;

SAPbouiCOM.MenuItem oMenuItem;

SAPbouiCOM.MenuCreationParams oMenuCreationParams;

string sPath = "";

try

{

sPath = System.Windows.Forms.Application.StartupPath;

oMenuCreationParams = (SAPbouiCOM.MenuCreationParams)SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams);

oMenuCreationParams.Type = SAPbouiCOM.BoMenuType.mt_POPUP;

oMenuCreationParams.Image = sPath + "
IMG127 new.BMP";

oMenuCreationParams.Position = 6;

oMenuCreationParams.UniqueID = "IFC_MENU";

oMenuCreationParams.String = "Contrats";

oMenuItem = SBO_Application.Menus.Item("43520");

oMenus = oMenuItem.SubMenus;

if(SBO_Application.Menus.Exists("IFC_MENU") == true)

return;

oMenuItem = oMenus.AddEx(oMenuCreationParams);

System.Runtime.InteropServices.Marshal.ReleaseComObject(oMenuCreationParams);

oMenuCreationParams = null;

oMenuCreationParams = (SAPbouiCOM.MenuCreationParams)SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams);

oMenuCreationParams.Type = SAPbouiCOM.BoMenuType.mt_STRING;

oMenuCreationParams.Image = "";

oMenuCreationParams.Position = 1;

oMenuCreationParams.UniqueID = "IFC_CRAU";

oMenuCreationParams.String = "NAME";

oMenus = oMenuItem.SubMenus;

oMenus.AddEx(oMenuCreationParams);

}

catch (Exception ex)

{

// Catch Error

}

Hope i help you

Michael

Former Member
0 Kudos

hi micheal,

do u have any idea on how to create file attachment screen. which should have buttons upload, browse, display, delete.

Answers (0)