on 09-09-2008 1:35 PM
Hi,
I created button in PO on Form load event. its working fine.but
how to add a button on the active(PO) form once My add-on is started?
Regards,
Ganesh k
Ganesh,
you must add the button on system form everytime the form is loaded. There is no method for loading once and dont care about new opening of form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Petr,
i will expalin little bit more about my problem. currently i created a button while the PO is Loaded. sofar is working fine.
now the add-on is disconnected..and new PO is opened. now PO screen in Active Status. now my add-on is connected again. since i written button creation code on the form load event. the active form doesnt contain the button.
how to add button on active PO?
(Without closing the Active Form and Opening again)
regards,
Ganesh K
Ganesh,
When the Add-On loads, you can check the oApplicatication.Forms collection and check if there is any PO open.
Public Function OpenPO() As Boolean
For Each iform As SAPbouiCOM.Form In oApplication.Forms
If iform.TypeEx = PO_FORM_TYPE Then Return True
Next
Return False
End Function
Regards,
Vítor Vieira
Hi,
i checked for the existance of my button in my active form, if not exist i added my button in et_FORM_ACTIVATE Event. its working now.
If pVal.EventType = et_FORM_ACTIVATE And pVal.FormTypeEx = "142" And FLAG = False Then
oOrderForm = sbo_application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
Dim ii As Integer
For ii = 0 To oOrderForm.Items.Count - 1
If oOrderForm.Items.Item(ii).UniqueID = "MyBtnId" Then
FLAG = True
End If
Next ii
If FLAG = False Then
ADDBUTTON()
End If
End If
Thanks For the Suggestions..
regards,
Ganesh K
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.