cancel
Showing results for 
Search instead for 
Did you mean: 

Add a Button to existing form

Former Member
0 Kudos

I m building addon in which I want a button in good receipt form and code on its click event.Pls help me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos



 Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent


        If ((pVal.FormType = 721 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then

            oOrderForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)

            If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
oItem = oOrderForm.Items.Add("Explain2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                oItem.Left = 5
                oItem.Top = 95
                oItem.Width = 100
                oStatic = oItem.Specific
                oStatic.Caption = "Doc NO"

 If pVal.FormType = "721" And pVal.ItemUID = "Explain2" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.Before_Action = False Then


 'your code

end if
end if

Former Member
0 Kudos

Thank u very much

Answers (0)