Trigger a user defined event

Hello,
 In my application, there will appear a dialog when an error occurs. I hope when pressing the "OK" button on the dialog can notify the main loop to stop, please advise how todo this.
Thanks
David 

Hi DavidLee,
see the two possibilities to solve your problem.
Mike
Attachments:
EventStructure.PNG ‏11 KB
Event2.PNG ‏17 KB

Similar Messages

  • USER DEFINED EVENT IN FUNCTION EXIT

    HI,
      CAN WE TRIGER AN USER DEFINED EVENT  IN AN  FUNCTION EXIT FOR XK01.

    Hi,
    if you identified the correct place then yes we can trigger the event. you want any workflow event to be raised.
    do you have any such exit with you.
    Regards
    vijay

  • USER DEFINED EVENTS IN ALV

    HI ALL
    JUST WANT TO KNOW CAN WE HANDLE USER DEFINED EVENTS BY SETTING USER DEFINED PF -STATUS IN ALV
    FOR EG :
    call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                I_CALLBACK_PF_STATUS_SET = K_STATUS
               I_CALLBACK_PF_STATUS_SET = 'ZTEST1'
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
               i_callback_u ser_command = 'USER_COMMAND'
                I_CALLBACK_USER_COMMAND  = K_USER_COMMAND
                 IS_LAYOUT                = GD_LAYOUT
                IT_SPECIAL_GROUPS        = KR_SP_GROUP
               i_grid_title           = outtext
               is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               IS_VARIANT               = K_VARIANT
              IT_EVENTS                = KR_EVENTS[]
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISPLAY_ALV_REPORT
    I HAVE MY OWN PF-STATUS IN WHICH I HAVE CREATED 1 BUTTON WHEN I GET THE OUT PUT AND CLICK ON THAT BUTTON THAN IT GOES TO STANDARD PROGRAM ....I WANT WHEN IT CLICK ON THAT BUTTON IT GOES TO MY Z PROGRAM HOW CAN I DO THAT ...
    IF POSSIBLE PLZ PROVIDE CODE OR SOME EXAMPLE .
    THANKS
    TARAN

    U can have button on application toolbar.
    You just have to use the new pf status in your report program.
    You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality.
    Have a look at below code for using the new status.
    TYPE-POOLS: slis.
    DATA: i_qmel LIKE qmel OCCURS 0.
    data v_repid type repid.
    SELECT * FROM qmel INTO TABLE i_qmel.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = v_repid
    <b>I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'</b>
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    i_structure_name = 'QMEL'
    TABLES
    t_outtab = i_qmel
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>form set_pf_status using rt_extab type slis_t_extab.
    set pf-status 'TEST'.
    endform.</b>
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    data lv_ucomm type sy-ucomm.
    lv_ucomm
    = sy-ucomm.
    CASE lv_ucomm.
    WHEN 'BUTTON'. "Double Click line Item
    **Write ur functinality here
    endcase.
    endform.
    Also have a look at below links.
    http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
    ALV report
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • DSC - can't acknowledge or clear a user defined event

    I wrote this code for alarms but now I have modified it to handle events.  So, first create the event (create alarm button), then try to acknowledge it or clear it.  There should be a time inserted for acknowledging and clearing.  It does't work.  I have used the exact event URL to acknowledge it.  Please help.
    Thanks
    Matt
    Attachments:
    User Defined Alarms.vi ‏52 KB

    Hi Matt,
    Thank you for attaching the new code, I didn't realize there was a path in that constant since the original box was so small. Part of the problem you are seeing actually lies within that path, you should be locating to \\*\Process Name\UserDefinedAlarm now that you switched from working with events to alarms. Also, you are still using the Set User Defined Event.vi and Read Events.vi, which need to move over to their Alarm counterparts.
    Once you have those changes made, you need to alter the way you are trying to acknowledge the alarms. The problem isn't within logging the time but that the alarms are not being acknowledged at all. If you use the Read Alarms.vi and then wire the "alarms" output into the acknowledge function then it will acknowledge all of the active events (you may have to change the acknowledge type to Alarms). If you only want to acknowledge a single alarm at a time then you will need to trim down that cluster to focus on your selected alarm.
    Finally, the way you are logging to the multicolumn listbox is not functioning correctly. I would suggest you look at the DSC Alarms Demo example (Help » Find Examples... » Toolkits and Modules » Datalogging and Supervisory Control » Alarms and Events » DSC Alarms Demo.lvproj). In that example there is a subVI, which is not part of the Alarms & Events palette but probably should be, named Format Alarm Data.vi. It is used in the first three examples under that project and should work better for logging all of your alarm interaction than searching through the database.
    Regards,
    Peter W.

  • Fire non-user defined event inside another event

    I want to call a normal/non-user defined event after an operation has occured inside a different normal/non-user definded event. Is this possible?
    The reason I don't want to use a user defined event is that if this can be done this way it would be much cleaner implemenation. Also, cleaner than using a sub-vi which would require a lot of wiring.

    From my experimentation with this, it appears that the fired event
    will not actually execute until the event currently being executed
    (the one that fires the other event) is completely finished. The
    "time" terminal of the second event idicates the time when it was told
    to fire, but it does not actually execute then. You cannot say do
    steps 1,2,3 in an event, temporarily leave that event to do code in
    another event, then come back to the first event and complete steps
    4,5. If the second event is fired after step #3, then steps 4 and 5
    will finish first before the second event executes. This contrasts
    with other languages such as Delphi were you can leave one event
    temporarily.
    On Mon, 25 Oct 2004 11:46:45 -0500 (CDT), chrisger o.email> wrote:
    >simple control (any type) you can write the desired value to the
    >"val(signaling)" property of the control. this changes the value AND
    >raises the "value changed" event, just like the user pushed the
    >button. then you can catch this event in the next turn of your loop.

  • Use SP Transaction Notification for trigger on user defined table

    Hi i need some help. I have a user defined table in sap (@LAU_ACCT) .
    I need way to catch the event on the table (update , delete , add).
    I heard about SP Transaction Notification , but how use it with udt ?
    Thanks!

    Hi Pavel,
    it is only possible if the UDT is registered as part of an object ( UDO ) - further info http://scn.sap.com/thread/3277846 . So for pure UDT actions you have to find another way ( SQL trigger, UI API, periodic query ).
    regards,
    Maik

  • User defined event!!

    Hii all,
    I'm much more familier with events in java. Sometimes, i think, is there any way to define an event of my own or not??
    I've googled a lot but couldn't find anything valueable. could you else please help me out??
    thanks
    Dev.

    thanks yawmark ,
    actually Suppose the following code
    class AClass extends JFrame
        JButton b1;
        public AClass()
           b1 = new JButton("Press");
           b1.addActionListener(this);
        private void b1ActionPerformed(ActionEvent ae)
         // code to be performed....
    }What I'm actually want to know is, could i replace that <b1ActionPerformed> by my own event??
    thanks again
    Dev

  • User-defined event assistance needed

    I have a 3D cast member that contains a bunch of animations
    defined by start and end points. For example, from 200 to 5000
    milliseconds is a rotation animation, and between 5001 and 6000 is
    a translation animation. I need to know when each of these
    animations have finished. I used animationEnded initially, but I am
    not sure how to set animationEnded to fire after a defined span of
    animation has terminated.
    Do I need to write a custom event to capture this? If so, how
    do you define an event? I am looking at using registerForEvent, I
    just don’t know how to write the event itself.
    Any help is appreciated.

    > For example, let?s say that you have a 2D sprite
    onstage, and it is rotating
    > through a script. Could you create a custom event that
    will detect when its
    > rotation is greater than 270? Can one write a custom
    event that detects when a
    > 3D cast member changes from a ?playing? state to a
    ?paused? state? I
    > understand how to register the event, it?s actually
    writing the event that I am
    > lost on.
    I think you're expecting something more than exists.
    You *the programmer* has to determine when to fire the event.
    It's not
    something you can ask to have automatically calculated for
    you. You have
    to write code to detect when the rotation goes beyond 270
    degrees, or
    when a 3D sprite's state changes. All of this will involve
    you polling
    for information required from a regular event like #exitFrame
    or a
    timeout object.
    When you detect that it's time to fire the event you use
    member.sendEvent(#eventName)

  • Extending java.util.EventObject to create user defined Events

    Dear All,
    Can someone point me to a decent tutorial/article/example that explains how and when to extend java.util.EventObject class to create my own EventObject and Event mechanism.
    Please not the waterEvent, pipe and source example from the java beans tutorial :))
    regards
    Rupinder

    ??

  • How to compose user-defined Event?

    I want to realize a event and event listener pair to work, the basic idea as follows:
        interface ConditionChangeListener extends EventListener {
             public void conditionChange(ConditionChangeEvent cce) {}
        class ConditionChangeEvent extends EventObject {
       class EventHandler implements ConditionChangeListener {
            public void conditionChange(ConditionChangeEvent cce) {
                    // do my work;
        class EventSource {
            // how can I fire a ConditionChangeEvent?
        }but how can I fire a ConditionChangeEvent in my code like above?
    Thanx

    class ConditionChangeEvent extends EventObject {[...]
    "yourEventQueue".dispatchEvent( "new
    ConditionChangeEvent" )
    or
    "yourEventQueue".postEvent( "new ConditionChangeEvent"
    }Is this enough or don't you know how to get
    "yourEventQueu" or is your problem how to create the
    new ConditionChangeEvent?Sorry for this answer - every time I see the word event I think one must talk about AWTEvent. But this is not what you are doing! So what you need is the whole
    "event generator idiom"
    described at the page
    http://www.javaworld.com/javaworld/jw-09-1998/jw-09-techniques-p2.html
    Hope now this is a real help for you

  • How to create a user defined trigger and execute my form

    Hi All,
    I am working with oracle Apps r12 and oracle forms 10g.
    I have created a custom form. So i need to create a special menu and when the user click the menu it need to open a new block and query it accordingly.
    I have followed this link
    http://egeapp.egeseramik.com:8000/pls/prod/fndgfm/fnd_help.get/us/fnd/@g_special#g_special
    and created a special menu in my custom form
    In PRE_FORM trigger i have coded this
    APP_SPECIAL.INSTANTIATE('SPECIAL3','&ACTION HISTORY DETAILS',NULL,TRUE,'LINE');
    and IN PRE_BLOCK i have coded this
    APP_SPECIAL.ENABLE('SPECIAL3',PROPERTY_ON);.
    Now the special menu is enabled when i press it shows error
    that frm-40700 no such trigger:special3.
    Now i came to know that we need to create a user defined trigger put the code and when we press special menu it need to query it accordingly.
    Can any one tell the steps that how to do that accordingly.
    Thanks & regards
    Srikkanth

    Hi ,
    The problem is fixed, the link mentioned below might be use full for doing this.
    http://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T457083.htm
    regards
    Srikkanth

  • How can I access user defined column(in query) inside the trigger?

    Hi
    I have 3 unions and each query displays different records on some criteria. I also have a column hard-coded
    Ex:
    select a.col1, a.col2,
    add as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    change as update
    from table1 a
    where ...
    union
    select a.col1, a.col2,
    del as update
    from table1 a
    where ...
    And I need to display a column in the report only if update is Add. I was thinking of writing a format trigger for that field. But I do not know how can I access this user defined column named update in the trigger?
    Any help?

    Try ":update" minus the double-quotes. Ex:
        IF :update = 'add' THEN
          RETURN(TRUE);
        ELSE
          RETURN FALSE;
        END IF;
    You'll want to place your hard-coded values in single-quotes. Ex:
        select a.col1, a.col2,
        'add' as update
    - Brian

  • Problems with After Report trigger Updating using User-defined functions

    Hi,
    I have a report which uses SQL to select data that uses a user-defined stored function in the WHERE clause.
    I use the same SQL in the After Report trigger with and UPDATE statement to flag all records selected as being run.
    Data is being selected by the report no problem, but the records are not being updated. In a test, If I remove the conditions using the user functions, the records update as expected. In Live conditions I must have these conditions in the script.
    I originally tried putting the UPDATE in a formual column, but that would not fire on records where that page was not paged through (or paged to end) in the Runtime Previewer.
    Can anyone advise?

    In case anyone is interested.
    The issue was that the stored functions have roles assigned for security.
    PL/SQL for After Report doesn't seem to recognise the roles having been assigned for the report, so the implicit cursor update/select I had wouldn't work.
    I changed the SELECT into an explicit CURSOR and introduced a FOR LOOP, keeping the UPDATE as an implicit statement.
    I know see this was more of a PL/SQL issues than a report one, but such is life. So if anyone feels the urge to move it to the PL/SQL forum, then feel free!!
    Have a problem free afternoon. :-)

  • ALTER USER를 실행한 사용자를 확인하는 방법(SYSTEM EVENT TRIGGER)

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-07
    ALTER USER를 실행한 사용자를 확인하는 방법(SYSTEM EVENT TRIGGER)
    ================================================================
    PURPOSE
    자신이나 또는 다른 user들의 password를 바꾸는 등의 alter user command를
    사용한 사용자를 확인하는 방법을 알아보자.
    Explanation & Example
    1. 사용자 정보를 저장할 event table을 생성한다.
    Create event table and users to store the alterations made:
    SQL> connect / as sysdba;
    create table event_table
    ora_sysevent varchar2(20),
    ora_login_user varchar2(30),
    ora_instance_num number,
    ora_database_name varchar2(50),
    ora_dict_obj_name varchar2(30),
    ora_dict_obj_type varchar2(20),
    ora_dict_obj_owner varchar2(30),
    timestamp date
    create user test1 identified by test1;
    grant create session, alter user to test1;
    create user test2 identified by test2;
    grant create session to test2;
    2. SYS user에서 AFTER ALTER Client Event Trigger 를 생성한다.
    Note: This step creates a trigger and it is fired whenever the user "test1"
    issues ALTER command (It can be ALTER USER or ALTER TABLE)
    SQL> CREATE or REPLACE TRIGGER after_alter AFTER ALTER on database
    BEGIN
    IF (ora_dict_obj_type='USER') THEN
    insert into event_table
    values (ora_sysevent,
    ora_login_user,
    ora_instance_num,
    ora_database_name,
    ora_dict_obj_name,
    ora_dict_obj_type,
    ora_dict_obj_owner,
    sysdate);
    END IF;
    END;
    3. test1 user로 접속한 후 test2 user의 password를 변경하는 작업을 실행한다.
    SQL> connect test1/test1
    SQL> alter user test2 identified by foo;
    4. test2 user의 password가 test1 user에 의해 변경되면 그런 내용을
    event_table 에서 확인할 수 있다.
    Now that we have altered the "test2" user password from user "test1", the
    event_table should have captured this details.
    Now Login in as sys and Query on event_table:
    SQL> connect / as sysdba;
    SQL> select * from event_table;
    ORA_SYSEVENT ORA_LOGIN_USER ORA_INSTANCE_NUM
    ORA_DATABASE_NAME
    ORA_DICT_OBJ_NAME ORA_DICT_OBJ_TYPE
    ORA_DICT_OBJ_OWNER TIMESTAMP
    ALTER TEST1 1
    T901.IDC.ORACLE.COM
    TEST2 USER
    13-JUN-02
    event_table의 내용을 조회하여 LOGIN_USER와 ALTERED USER 는
    ORA_LOGIN_USER와 ORA_DICT_OBJ_NAME column을 통해 확인할 수 있다.
    비슷한 방법으로 아래의 event에서 trigger를 생성하여 확인할 수 있다.
    1) BEFORE DROP
    2) AFTER DROP
    3) BEFORE ANALYZE
    4) AFTER ANALYZE
    5) BEFORE DDL
    6) AFTER DDL
    7) BEFORE TRUNCATE
    8) AFTER TRUNCATE
    Related Documents
    Oracle Application Developer's Guide

  • How to handle form close event or escape key press event for user defined f

    Experts,
    Please let me know how to handle form close event or escape key press event for user defined form...
    Thanks & Regards,
    Pravin.

    Hi
    You can catch the form close event like this
    If ((pVal.FormType = 139 And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_CLOSE)) And (pVal.Before_Action = True)) Then
          Try
                   SBO_Application.SetStatusBarMessage(pVal.EventType.ToString())
          Catch ex As Exception
                    SBO_Application.SetStatusBarMessage(ex.Message)
            End Try
          End If
    Hope this helps
    Regards
    Arun

Maybe you are looking for