Skip to Content
author's profile photo Former Member
Former Member

ItemEvent problem..

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Feb 14, 2005 at 09:09 AM

    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ñ

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2005 at 09:13 AM

    > 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
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.