cancel
Showing results for 
Search instead for 
Did you mean: 

How to Activate the Right Click

Former Member
0 Kudos

Hai to All,

In my screen i have header part and matrix. In matrix i added new item in right click option. Now my aim is if i click the new option i want to perform some event how i can?

If anyone knows tell me

Its urgent..............

Regards,

Anitha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Anitha,

As you use menu events and item events we also have Right Click Events. Write your functionality in the Sbo_Appln_RightClickEvent.

Hope this is helpful.

regards,

Vasu Natari.

Answers (3)

Answers (3)

Former Member
0 Kudos

i found the solution

Former Member
0 Kudos

Hi Anita,

Select right click event first

and place the below code in the right click event

If eventInfo.FormUID = "ACT" Then 'give form uid

If eventInfo.ItemUID = "5" And eventInfo.ColUID = "0" Then

If (eventInfo.BeforeAction = True) Then

Dim oMenuItem As SAPbouiCOM.MenuItem

Dim oMenus As SAPbouiCOM.Menus

oMenuItem = SBO_Application.Menus.Item("1280") 'do not change

oMenus = oMenuItem.SubMenus

Try

Dim oCreationPackage As SAPbouiCOM.MenuCreationParams

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

oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING

oCreationPackage.UniqueID = "Del"

oCreationPackage.String = "Delete Row"

oCreationPackage.Enabled = True

Try

oMenus.AddEx(oCreationPackage)

Catch ex As Exception

End Try

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

Else

Dim oMenuItem As SAPbouiCOM.MenuItem

Dim oMenus As SAPbouiCOM.Menus

Try

SBO_Application.Menus.RemoveEx("Del")

Catch ex As Exception

MessageBox.Show(ex.Message)

End Try

End If

End If

End If

after this got to menu event and place below code

If (pVal.MenuUID = "Del") And (pVal.BeforeAction = False) Then

omatrix = oPopup1.Items.Item("5").Specific

Try

omatrix.DeleteRow()

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try

End If

Former Member
0 Kudos

hi,

use this for right click for matrix

RIGHT_CLICK_BEFOREACTION(ref SAPbouiCOM.ContextMenuInfo eventInfo, out bool BubbleEvent, SAPbouiCOM.Application oSboApplication, SAPbobsCOM.Company oCompany)

{

BubbleEvent = true;

oForm.EnableMenu("1293", true);

}

this will help u.

thank you,