Skip to Content
author's profile photo Former Member
Former Member

create addon under bussiness partner menu

hi,

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

Regards,

Puneeth S

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2008 at 06:30 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.