cancel
Showing results for 
Search instead for 
Did you mean: 

crete a new menu.

Former Member
0 Kudos

HI Everybody

I am developing an Application in which i need to develop a new menu. like purchase, sales and production i need to place a new menu..

is it possible and let me know thw information about it.

Thanks Regarding

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Try to see this [thread|;.

Regards

Sierdna S

Former Member
0 Kudos

hi narayan,

Dim oMenu As SAPbouiCOM.Menus = SBO_Application.Menus

Dim oFolderItem As SAPbouiCOM.MenuItem

Dim oMenuItem As SAPbouiCOM.MenuItem

If SBO_Application.Menus.Exists("Menu1") Then

SBO_Application.Menus.RemoveEx("Menu1")

End If

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

oMenuItem = oMenuItem.SubMenus.Add("Menu1", "ZZZZ", SAPbouiCOM.BoMenuType.mt_POPUP, 9)

oFolderItem = oMenuItem.SubMenus.Add("SubMenu1", "AAA", SAPbouiCOM.BoMenuType.mt_STRING, 0)

oFolderItem = oMenuItem.SubMenus.Add("SubMenu2", "BBB", SAPbouiCOM.BoMenuType.mt_STRING, 1)

this code helps u to create a mainmenu and submenus under it between Production and MRP

Enjoy

regards,

varma

Former Member
0 Kudos

Hi...

use this code it will work

Private Sub AddMenuItem()

Try

Dim oMenuItem As SAPbouiCOM.MenuItem

Dim oMenus As SAPbouiCOM.Menus

Dim oCreationPackage As SAPbouiCOM.MenuCreationParams

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

oMenuItem = SBO_Application.Menus.Item("2304") Rem under purchase module

oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING

If SBO_Application.Menus.Exists("MenuID") Then

SBO_Application.Menus.RemoveEx("MenuID")

End If

oCreationPackage.UniqueID = "SubMenu"

oCreationPackage.String = "SubMenu Name"

oCreationPackage.Enabled = True

oCreationPackage.Checked = True

oCreationPackage.Position = 0

oMenus = oMenuItem.SubMenus

oMenus.AddEx(oCreationPackage)

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try

End Sub

Regards...

Billa 2007

Former Member
0 Kudos

Hi Narayana Reddy

Search this forum for "menu"... You cam find more threads with examples.

Regards

Sierdna S.

Former Member
0 Kudos

Yes its possible plz check the following sample which is provided be SAP SDK.

C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\05.AddingMenuItems

Vasu Natari.

Former Member
0 Kudos

S I hav gone through it..

oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP

this is use full to create a sub menu under any menu .

but i need to create a menu it self like production and purchase.

in betwen production and mrp.

is it possible.

Former Member
0 Kudos

yes its possible...see the VIDS sample and follow the same.

Vasu Natari.