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

Create Sub Menu

Hi Dear;

how can i create submenu under sales A/R.

How can i know the menu id for each menu

thank you Dear;

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 28, 2007 at 09:20 AM

    Hi,

    Dim oMenus As SAPbouiCOM.Menus ' The menus collection

    Dim oMenuItem As SAPbouiCOM.MenuItem ' The new Menu item

    ' Get the menus collection from the application

    oMenus = SBO_Application.Menus

    Dim oCreationPackage As SAPbouiCOM.MenuCreationParams

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

    oMenuItem = SBO_Application.Menus.Item("2048") ' Sales A/R menu ID

    oMenus = oMenuItem.SubMenus

    ' New menu parameters

    oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING

    oCreationPackage.UniqueID = "xxxxx"

    oCreationPackage.String = "New Menu"

    oCreationPackage.Enabled = True

    oCreationPackage.Position = 15 'what ever position u need

    Try ' If the manu already exists this code will fail

    oMenus.AddEx(oCreationPackage)

    Catch er As Exception ' Menu already exists

    SBO_Application.MessageBox("Menu Already Exists")

    End Try

    Regards,

    varma

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 26, 2007 at 06:43 AM

    Dany ,

    Try this,

    U create one xml file and write this code...

    <?xml version="1.0" encoding="utf-8" ?>

    <Application>

    <Menus>

    <action type="add">

    <Menu String="Purchase Indent" Enabled="1" Position="0" Checked="0" FatherUID="2304" Type="1" UniqueID="PI" />

    </action>

    </Menus>

    </Application>

    String is the caption of ur submenu

    Position is here u have to locate(if Sales A/R is in 3rd u give 4 for position)

    FatherUid is the id of which mainmenu that u can identify by click view --> System information --> then u drag near sales the id will be displayed in status bar.

    Uniqueid is the ur form id

    Call this xml in sub main

    If it helps give reward points,

    Regards,

    Anitha

    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.