Skip to Content
author's profile photo
Former Member

Menu Item Slow Performance

hi there,

i developed and add on for SAP B1.

My add on adds 1 menu in module and about 20 to 30 submenus. it tooks very long to load those menu.

My code for adding menu is :

BSI_oMenus.Add "BSI_HRMS_SubMenu1", "Recruitment and Selection", mt_POPUP, BSI_oMenus.Count BSI_oMenus.Add "BSI_HRMS_SubMenu2", "Personal Database", mt_POPUP, BSI_oMenus.Count

and so on...

is there any other ways to create additional menu with many submenus.

because my add on takes about 5-10 minutes before finishing to create all menu.

Thanks,

Arief

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Jul 30, 2004 at 08:43 AM

    Freezing the command centre window before adding the menu items, and unfreezing it after you are finished will help. This stops the application redrawing the window for every menu entry added.

    John.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 31, 2004 at 03:20 AM

    Desr Arief, Menu Item slow the loading performance because it's always flickering many times . So the first thing you do is to Freeze the Command Center Form. I forgot the FormUID of ommand center ... prehaps 168/169 (sorry because i have no SBO here). In <b>menu event</b>

    add the ....

    oForm.Freeze True

    'You code here

    ***************

    'add the menu coding

    BSI_oMenus.Add "BSI_HRMS_SubMenu1", "Recruitment and Selection", mt_POPUP, BSI_oMenus.Count BSI_oMenus.Add "BSI_HRMS_SubMenu2", "Personal Database", mt_POPUP, BSI_oMenus.Count

    oForm.Freeze False

    oForm.Update

    That's all ... Happy Coding My Friend

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Aug 02, 2004 at 10:54 AM

    Hi,

    In version 2004 (AKA 6.7) you can find a new functionality that allows you to add multiple menu items

    in different hierarchy in one action using XML standards.

    using a simple Application.LoadBatchActions (<MENU XML>)

    <u>XML Sample</u>

    <Application>

    --<Menus>

    -


    <action type="add">

    -


    <Menu Checked="0" Enabled="0" FatherUID="43520" String="MyMenu1" Type="2" UniqueID="MyMenu1" Image="C:/MyPic.bmp">

    -


    <Menus>

    -


    <action type="add">

    -


    <Menu Checked="1" Enabled="0" FatherUID="MyMenu1" String="MySub1" Type="1" UniqueID="MySub1" />

    -


    </action>

    -


    </Menus>

    -


    </Menu>

    -


    <Menu Checked="0" Enabled="1" FatherUID="43520" String="MyMenu2" Type="2" UniqueID="MyMenu2" >

    -


    <Menus>

    -


    <action type="add">

    -


    <Menu Checked="0" Enabled="0" Position="0" FatherUID="MyMenu2" String="MySub21" Type="1" UniqueID="MySub21" />

    -


    </action>

    -


    </Menus>

    -


    </Menu>

    -


    </action>

    --</Menus>

    </Application>

    Regards,

    Yaniv G.

    SDK Consultant,

    SAP Manage Israel.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Add comment
    10|10000 characters needed characters exceeded