Hi,
I need to know "How to create a button in Existing Form for eg Purchase Order"
I tried to create a button in the ItemEvent with the following code, but this is not working
Private Sub oApplication_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
If pVal.FormTypeEx = "142" Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
Dim ofrm As SAPbouiCOM.Form = oApplication.Forms.Item(FormUID)
Dim oitm As SAPbouiCOM.Item = oForm.Items.Add("Bnt1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
Dim oBtn As SAPbouiCOM.Button
'oFrm = SBO_Application.Forms.Item("142")
'oFrm.Items.Add("PRHelp", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItm.Top = oFrm.Items.Item("2").Top
oItm.Left = oFrm.Items.Item("2").Left + oFrm.Items.Item("2").Width + 10
oItm.Width = 90
oBtn = oItm.Specific
oBtn.Caption = "Purchase Requistion"
End If
End If
End Sub
regards,
Manojkumar