Hi all!
===============
Source Coding :
===============
Private Sub vAppl_ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As
Boolean)
If pVal.FormType = 2000000100 Then
If pVal.EventType = et_ITEM_PRESSED And pVal.ItemUID = "17" Then
Test()
End If
End If
End Sub
-
When I Clicked a butten (item) it should work a Event at vAppl_ItemEvent.
In upper source code it should be work Test() Function.
A problem of vAppl_ItemEvent is a working twice same Event( Test Function ).
Thank you for your help.
Hi Choi,
You should take care of Before_Action property of the ItemEven object (pVal). The Event is executed twice, first before executing SBO´s default procedure, and seccond after executing SBO´s default procedure.
So you must decide when you want to handle the event, and look at the pVal.Before_Action property before calling Test function.
Hope helps,
Ibai Peñ
> A problem of vAppl_ItemEvent is a working twice same
> Event( Test Function ).
You get the Event BEFORE pressing (validate here for example) and after pressing (do actions after something it's done). You are able to distinguish those zwo events using the BeforeAction property of the item event.
So if you want to catch the event just once, decide if you want to catch before or after pressing and just add some code to your if-clause.
If pVal.EventType = et_ITEM_PRESSED And pVal.ItemUID = "17" And pVal.BeforeEvent = false Then Your code End If
Add a comment