on 07-30-2004 8:27 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.