What is Triggering and Handling Events  in ABAP  OOPs

Gowri

) TYPE type ..
To declare static events, use the following statement:
CLASS-EVENTS ... ...
It links a list of handler methods with corresponding trigger methods.  There are four different types of event.
It can be
·        An instance event declared in a class
·        An instance event declared in an interface
·        A static event declared in a class
·        A static event declared in an interface
The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies. 
For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler.  You can either specify a single instance as the trigger, using a reference variable
After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling).  If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
Handler methods are executed in the order in which they were registered.  Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
"Example  :
REPORT demo_class_counter_event.
CLASS counter DEFINITION.
  PUBLIC SECTION.
    METHODS increment_counter.
    EVENTS  critical_value EXPORTING value(excess) TYPE i.
  PRIVATE SECTION.
    DATA: count     TYPE i,
          threshold TYPE i VALUE 10.
ENDCLASS.
CLASS counter IMPLEMENTATION.
  METHOD increment_counter.
    DATA diff TYPE i.
    ADD 1 TO count.
    IF count > threshold.
      diff = count - threshold.
      RAISE EVENT critical_value EXPORTING excess = diff.
    ENDIF.
  ENDMETHOD.
ENDCLASS.
CLASS handler DEFINITION.
  PUBLIC SECTION.
    METHODS handle_excess
            FOR EVENT critical_value OF counter
            IMPORTING excess.
ENDCLASS.
CLASS handler IMPLEMENTATION.
  METHOD handle_excess.
    WRITE: / 'Excess is', excess.
  ENDMETHOD.
ENDCLASS.
DATA: r1 TYPE REF TO counter,
      h1 TYPE REF TO handler.
START-OF-SELECTION.
  CREATE OBJECT: r1, h1.
  SET HANDLER h1->handle_excess FOR ALL INSTANCES.
  DO 20 TIMES.
    CALL METHOD r1->increment_counter.
  ENDDO.
The class COUNTER implements a counter. It triggers the event CRITICAL_VALUE when a threshold value is exceeded, and displays the difference. HANDLER can handle the exception in COUNTER. At runtime, the handler is registered for all reference variables that point to the object.
Reward  points if it is usefull ...
Girish

Similar Messages

  • Fork : triggering and terminating event ?

    Hi Experts,
    I am a begginer in  Workflow ..
    I just want to know how Fork can be used for paralled processing with triggering and  terminating event.
    It would be appreciated if provided with some scenarion in detailed steps.
    Thanks in advance.
    Ganesh..

    Mike,
    It would be HELPFUL for me if i get my problem solved as earlier so i can concentrate on other my commited topics..thats why expecting info., from the experts.
    Anyway , you  triggered me to read SAP help..thanks for the indirect motivation..
    Let me start reading the SAP help information!!!
    Thanks .
    Ganesh

  • Dynamic Creation of list box on excel sheet and handling events

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

  • How to throw and handle event defined in component interface

    Hi folks,
    I have defined a component interface with an event 'open_info'
    I have some sub components which are implementing that component interface. I also get the two events generated (the interface check box is not marked)
    I use those sub components and try to handle the event. but unfortunately the event is not handled.
    I'm not sure if I do everything right. I checked the interface checkbox at the events tab of the controller of the sub component. I then may handle the event in the embedding main component. but it appears to be a different event.
    probably I eed to access the interface controller and throw the event there, but I don't know how.
    I couldn't fnd documentation or wdr* components which deal with that issue. do you have any suggestions?
    regards
    stefan

    Hi Stefan,
    Do the following in the component being used:
    say component name is ZCMP_01
    go to COMPONENTCONTROLLER
    Create an Event with necessary parameters if needed, say Event name is EVNT_01 and has an importing parameter, say PARAM_01 type char10,
    Make sure you have set the interface check box. Now this event is available in the INTERFACECONTROLLER.
    Say ZCMP_01 has a view with a button, on click of the button, call a method in the COMPONENTCONTROLLER.
    Perform all the required operations, At the required point, fire EVNT_01
    wd_this->fire_EVNT_01_evt(
          PARAM_01 = 'sample' ).
    Now the other component that has to use ZCMP_01, say ZCMP_02
    In the component properties od ZCMP_02, add usage for ZCMP_01, say USG_CMP_01
    Go to the view in ZCMP_02 where you wish to handle the event EVNT_01 of ZCMP_01,
    Go to Methods tab, create an event hadler, say EVNT_01_HNDLR ... method type = Event Handler,
    Event = EVNT_01, Controller = INTERFACECONTROLLER, Component Use, USG_CMP_01.
    Now your event handler will have foll parametrs: WDEVENT .. type ref to CL_WD_CUSTOM_EVENT,
    PARAM_01 type CHAR10
    Handle the event as required.
    Regards,
    Reema.

  • How to make a cell in a JTable to be uneditable and handle events

    I tried many things but failed,How do you make a cell in a JTable to be uneditable and also be able to handle events>Anyone who knows this please help.Thanx

    Hello Klaas2001
    You can add KeyListener ,MouseListener
    Suppose you have set the value of cell using setValueAt()
    table.addKeyListener(this);
    public void keyTyped(KeyEvent src)
    String val="";
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    val=table.getValueAt(r,c).toString();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor(r, c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt(val,r,c);
    public void keyReleased(KeyEvent src)
    public void keyPressed(KeyEvent src)
    table.addMouseListener(this);
    public void mouseClicked(MouseEvent e)
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    if(e.getClickCount()>=2)//Double Click
    table.clearSelection();
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor (
    r,c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt("",r,c);
    }//Mouse Released
    You can remove keyListener and Mouse Listener whenever You want to edit
    then add it later.
    Regarding handling events implement javax.swing.event.TableModelListener
    table.getModel().addTableModelListener(this);
    public void tableChanged(javax.swing.event.TableModelEvent source)
    TableModel tabMod = (TableModel)source.getSource();
         switch (source.getType())
    case TableModelEvent.UPDATE:
         break;
         }//Table Changed Method
    //This method gets fired after table cell value is changed.

  • How to load external swf and handle events of external swf by passing data .

    Hi all
    I have to laoad external swf (made in flash).On loading i have to pass data and hndle events which occurs on this swf.
    Can any one suggest me how can I achieve this.
    Regards
    Munira

    Here is one way:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
    HTH,

  • Subtype event not triggering and supertype event triggers twice!!!!!!

    Hi,
    We have created a subtype for object bus2030 and also an event created for that. My workflow should trigger whenever an inquiry is created.
    I've maintained this as triggering event in SWDD and done type linkage is SWE2 and everything looks fine.
    When i simulate or create event the WF is triggered but when create inquiry in VA11 WF does not triggers.
    I've checked SWEL for event trace but no event is triggered at all... Am i missing something... I've done almost everything that i used to do...
    Even synchronized buffer!!! nothing paid me a solution...
    Infact the same was working with 3.1i system but after migration to ECC6 we had to create new WF template for the same Process.
    Now I also see that the supertype bus2030-created event is triggered twice but, obviously no receiver type exists. But the zbus2030 event is not being triggered at all!!!!
    Kindly help me understanding my mistake...
    Regards,
    PB

    Hope you have already set the deletegation in SWO6.
    Now, event dont get triggered automatically, jus because they are defined in object. They have to be explicitly published in thesystem.
    Check for a suitable user exit in your transaction, which makes use of function module to create the event, from that you know how to proceed.
    If you dont find user exit, try other triggering techniques such as change documents, logistics, BTEs... etc.
    regards,
    Sandeep Josyula

  • Animations and handling events

    Hi,
    I want to display an animation on a JPanel. But when I draw on JPanel using a threads run method, the JPanel stops responding to other events such as mouse clicks on JButtons.
    Can u plz tell me what is wrong.
    Thanks a lot,
    Chamal.

    Hi,
    Thanks a lot for your reply.
    I am not that familiar with threads and GUI. What is UI thread. How can I avoid using it.
    Best Regards,
    Chamal.

  • Event creation  in oops abap

    cud u plz guide me how to create the events in oops abap .
    why we r using methods instead of perform statements in oops abap?

    Hi,
    Triggering and Handling Events
    In ABAP Objects, triggering and handling an event means that certain methods act as triggers and trigger events, to which other methods - the handlers - react. This means that the handler methods are executed when the event occurs.
    This section contains explains how to work with events in ABAP Objects. For precise details of the relevant ABAP statements, refer to the corresponding keyword documentation in the ABAP Editor.
    Triggering Events
    To trigger an event, a class must
    · Declare the event in its declaration part
    · Trigger the event in one of its methods
    Declaring Events
    You declare events in the declaration part of a class or in an interface. To declare instance events, use the following statement:
    EVENTS ) TYPE type ..
    To declare static events, use the following statement:
    CLASS-EVENTS ... ...
    It links a list of handler methods with corresponding trigger methods. There are four different types of event.
    It can be
    · An instance event declared in a class
    · An instance event declared in an interface
    · A static event declared in a class
    · A static event declared in an interface
    The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies.
    For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler. You can either specify a single instance as the trigger, using a reference variable ...
    The registration applies automatically to the whole class, or to all of the classes that implement the interface containing the static event. In the case of interfaces, the registration also applies to classes that are not loaded until after the handler has been registered.
    Timing of Event Handling
    After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling). If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
    Handler methods are executed in the order in which they were registered. Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
    "Example  :
    REPORT demo_class_counter_event.
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS increment_counter.
        EVENTS  critical_value EXPORTING value(excess) TYPE i.
      PRIVATE SECTION.
        DATA: count     TYPE i,
              threshold TYPE i VALUE 10.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD increment_counter.
        DATA diff TYPE i.
        ADD 1 TO count.
        IF count > threshold.
          diff = count - threshold.
          RAISE EVENT critical_value EXPORTING excess = diff.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    CLASS handler DEFINITION.
      PUBLIC SECTION.
        METHODS handle_excess
                FOR EVENT critical_value OF counter
                IMPORTING excess.
    ENDCLASS.
    CLASS handler IMPLEMENTATION.
      METHOD handle_excess.
        WRITE: / 'Excess is', excess.
      ENDMETHOD.
    ENDCLASS.
    DATA: r1 TYPE REF TO counter,
          h1 TYPE REF TO handler.
    START-OF-SELECTION.
      CREATE OBJECT: r1, h1.
      SET HANDLER h1->handle_excess FOR ALL INSTANCES.
      DO 20 TIMES.
        CALL METHOD r1->increment_counter.
      ENDDO.
    The class COUNTER implements a counter. It triggers the event CRITICAL_VALUE when a threshold value is exceeded, and displays the difference. HANDLER can handle the exception in COUNTER. At runtime, the handler is registered for all reference variables that point to the object.
    Regards,
    Omkar.

  • Event for ABAP Objects

    Dear All,
    Would you mind tell me the concept of the event in the ABAP objects.
    Regards,
    Luke

    hI
    Triggering and Handling Events
    In ABAP Objects, triggering and handling an event means that certain methods act as triggers and trigger events, to which other methods - the handlers - react. This means that the handler methods are executed when the event occurs.
    This section contains explains how to work with events in ABAP Objects.  For precise details of the relevant ABAP statements, refer to the corresponding keyword documentation in the ABAP Editor.
    Triggering Events
    To trigger an event, a class must
    ·        Declare the event in its declaration part
    ·        Trigger the event in one of its methods
    Declaring Events
    You declare events in the declaration part of a class or in an interface. To declare instance events, use the following statement:
    EVENTS ) TYPE type ..
    To declare static events, use the following statement:
    CLASS-EVENTS ... ...
    It links a list of handler methods with corresponding trigger methods.  There are four different types of event.
    It can be
    ·        An instance event declared in a class
    ·        An instance event declared in an interface
    ·        A static event declared in a class
    ·        A static event declared in an interface
    The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies. 
    For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler.  You can either specify a single instance as the trigger, using a reference variable ...
    The registration applies automatically to the whole class, or to all of the classes that implement the interface containing the static event.  In the case of interfaces, the registration also applies to classes that are not loaded until after the handler has been registered.
    Timing of Event Handling
    After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling).  If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
    Handler methods are executed in the order in which they were registered.  Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm

  • I want the Definitaion fo  Class and its Components  in ABAP . With Example

    Gowri

    <b>Classes</b>
    Classes are templates for objects. Conversely, you can say that the type of
    an object is the same as its class. A class is an abstract description of an object. You could say that it is a set of instructions for building an object. The attributes
    of objects are defined by the components of the class, which describe the
    state and behavior of objects.
    <b>
    Local and Global Classes</b>
    Classes in ABAP Objects can be declared either globally or locally. You define global classes and interfaces in the Class Builder (Transaction SE24) in the
    ABAP Workbench. They are stored centrally in class pools in the class library
    in the R/3 Repository. All of the ABAP programs in an R/3 System can access the global classes. Local classes are defined within an ABAP program. Local classes and interfaces can only be used in the program in which they are defined. When you use a class in an ABAP program, the system first searches for a local class with the specified name. If it does not find one, it then looks for a global class. Apart from the visibility question, there is no difference between using a global class and using a local class.
    There is, however, a significant difference in the way that local and global classes are designed. If you are defining a local class that is only used in a single program, it is usually sufficient to define the outwardly visible components so that it fits into that program. Global classes, on the other hand, must be able to be used anywhere. This means that certain restrictions apply when you define the interface of a global class, since the system must be able to guarantee that any program using an object of a global class can recognize the data type of each interface parameter.
    The following sections describe how to define local classes and interfaces in an ABAP program. For information about how to define local classes and interfaces, refer to the  Class Builder section of the ABAP Workbench Tools documentation.
    <b>Defining Local Classes</b>
    Local classes consist of ABAP source code, enclosed in the ABAP statements CLASS ... ENDCLASS. A complete class definition consists of a declaration part and, if required, an implementation part. The declaration part of a class <class> is a statement block:
    CLASS <class> DEFINITION.
    ENDCLASS.
    It contains the declaration for all components (attributes, methods, events) of the class. When you define local classes, the declaration part belongs to the global program data. You should therefore place it at the beginning of the program.
    If you declare methods in the declaration part of a class, you must also write an implementation part for it. This consists of a further statement block:
    CLASS <class> IMPLEMENTATION.
    ENDCLASS.
    The implementation part of a class contains the implementation of all methods of the class. The implementation part of a local class is a processing block. Subsequent coding that is not itself part of a processing block is therefore not accessible.
    <b>Structure of a Class</b>
    <u>The following statements define the structure of a class:</u>
    A class contains components
    Each component is assigned to a visibility section
    Classes implement methods
    The following sections describe the structure of classes in more detail.
    <b>Class Components</b>
    The components of a class make up its contents. All components are declared in the declaration part of the class. The components define the attributes of the objects in a class. When you define the class, each component is assigned to one of the three visibility sections, which define the external interface of the class. All of the components of a class are visible within the class. All components are in the same namespace. This means that all components of the class must have names that are unique within the class.
    There are two kinds of components in a class - those that exist separately for each object in the class, and those that exist only once for the whole class, regardless of the number of instances. Instance-specific components are known as instance components. Components that are not instance-specific are called static components.
    In ABAP Objects, classes can define the following components. Since all components that you can declare in classes can also be declared in interfaces, the following descriptions apply equally to interfaces.
    <b>Attributes</b>
    Attributes are internal data fields within a class that can have any ABAP data type. The state of an object is determined by the contents of its attributes. One kind of attribute is the reference variable. Reference variables allow you to create and address objects. Reference variables can be defined in classes, allowing you to access objects from within a class.
    <b>Instance Attributes</b>
    The contents of instance attributes define the instance-specific state of an object. You declare them using the DATA statement.
    <b>Static Attributes</b>
    The contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
    All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
    <b>Methods</b>
    Methods are internal procedures in a class that define the behavior of an object. They can access all of the attributes of a class. This allows them to change the data content of an object. They also have a parameter interface, with which users can supply them with values when calling them, and receive values back from them The private attributes of a class can only be changed by methods in the same class.
    The definition and parameter interface of a method is similar to that of function modules. You define a method <met> in the definition part of a class and implement it in the implementation part using the following processing block:
    METHOD <meth>.
    ENDMETHOD.
    You can declare local data types and objects in methods in the same way as in other ABAP procedures (subroutines and function modules). You call methods using the CALL METHOD statement.
    <b>Instance Methods</b>
    You declare instance methods using the METHODS statement. They can access all of the attributes of a class, and can trigger all of the events of the class.
    <b>Static Methods</b>
    You declare static methods using the CLASS-METHODS statement. They can only access static attributes and trigger static events.
    <b>Special Methods</b>
    As well as normal methods, which you call using CALL METHOD, there are two special methods called CONSTRUCTOR and CLASS_CONSTRUCTOR, which are automatically called when you create an object (CONSTRUCTOR) or when you first access the components of a class (CLASS_CONSTRUCTOR).
    <b>Events</b>
    Objects or classes can use events to trigger event handler methods in other objects or classes. In a normal method call, one method can be called by any number of users. When an event is triggered, any number of event handler methods can be called. The link between the trigger and the handler is not established until runtime. In a normal method call, the calling program determines the methods that it wants to call. These methods must exist. With events, the handler determines the events to which it wants to react. There does not have to be a handler method registered for every event.
    The events of a class can be triggered in the methods of the same class using the RAISE EVENT statement. You can declare a method of the same or a different class as an event handler method for the event <evt> of class <class> using the addition FOR EVENT <evt> OF <class>.
    Events have a similar parameter interface to methods, but only have output parameters. These parameters are passed by the trigger (RAISE EVENT statement) to the event handler method, which receives them as input parameters.
    The link between trigger and handler is established dynamically in a program using the SET HANDLER statement. The trigger and handlers can be objects or classes, depending on whether you have instance or static events and event handler methods. When an event is triggered, the corresponding event handler methods are executed in all registered handling classes.
    <b>Instance Events</b>
    You declare instance events using the EVENTS statement. An instance event can only be triggered in an instance method.
    <b>Static Events</b>
    You declare static events using the CLASS-EVENTS statement. All methods (instance and static methods) can trigger static events. Static events are the only type of event that can be triggered in a static method.
    <u>See also Triggering and Handling Events.</u>
    <b>Types</b>
    You can define your own ABAP data types within a class using the TYPES statement. Types are not instance-specific, and exist once only for all of the objects in a class.
    <b>Constants</b>
    Constants are special static attributes. You set their values when you declare them, and they can then no longer be changed. You declare them using the CONSTANTS statement. Constants are not instance-specific, and exist once only for all of the objects in a class.
    <b>Visibility Sections</b>
    You can divide the declaration part of a class into up to three visibility areas:
    CLASS <class> DEFINITION.
      PUBLIC SECTION.
      PROTECTED SECTION.
      PRIVATE SECTION.
    ENDCLASS.
    These areas define the external visibility of the class components, that is, the interface between the class and its users. Each component of a class must be assigned to one of the visibility sections.
    <b>Public Section</b>
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    <b>
    Protected Section</b>
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it. Protected components form a special interface between a class and its subclasses. Since inheritance is not active in Release 4.5B, the protected section currently has the same effect as the private section.
    <b>Private Section</b>
    Components that you declare in the private section are only visible in the methods of the same class. The private components are not part of the external interface of the class.
    <b>Encapsulation</b>
    The three visibility areas are the basis for one of the important features of object orientation - encapsulation. When you define a class, you should take great care in designing the public components, and try to declare as few public components as possible. The public components of global classes may not be changed once you have released the class.
    For example, public attributes are visible externally, and form a part of the interface between an object and its users. If you want to encapsulate the state of an object fully, you cannot declare any public attributes. As well as defining the visibility of an attribute, you can also protect it from changes using the READ-ONLY addition.
    "Example  :
    CLASS C_COUNTER DEFINITION.
      PUBLIC SECTION.
        METHODS: SET_COUNTER IMPORTING VALUE(SET_VALUE) TYPE I,
                 INCREMENT_COUNTER,
                 GET_COUNTER EXPORTING VALUE(GET_VALUE) TYPE I.
      PRIVATE SECTION.
        DATA COUNT TYPE I.
    ENDCLASS.
    CLASS C_COUNTER IMPLEMENTATION.
      METHOD SET_COUNTER.
        COUNT = SET_VALUE.
      ENDMETHOD.
      METHOD INCREMENT_COUNTER.
        ADD 1 TO COUNT.
      ENDMETHOD.
      METHOD GET_COUNTER.
        GET_VALUE = COUNT.
      ENDMETHOD.
    ENDCLASS.
    The class C_COUNTER contains three public methods - SET_COUNTER, INCREMENT_COUNTER, and GET_COUNTER. Each of these works with the private integer field COUNT. Two of the methods have input and output parameters. These form the data interface of the class. The field COUNT is not outwardly visible.
    Reward   points  if it is usefull...
    Girish

  • Trigerring and Terminating Events in Task

    Hi Friends,
    Acutallly i need to know whats the use of triggering and terminating events in Tasks and in what kind of scenerios they are required..
    THanks

    Hi Munish,
    Please check this thread
    Triggering Events and Terminating Event
    Please check this thread exclusively for Terminating events. Lots of information in this thread..
    Regarding terminating events in workflows
    Hope this would help you.
    Good luck
    Narin

  • WebDynpro iViews and Portal Eventing

    Hi All,
    I am planning to prepare a proof of concept with following requirements.Can you please give me hints and resources to prepare this in 2 days?
    1)Interaction between iViews using EP eventing.
    2)Exploring how and what kind of data can be passed from one iView to the another (String , Java Objects etc)
    3)Keeping track of various events of EP especially finding out if we can track when the user session is invalidated by the Portal so that we can free objects from memory.
    4)The sample code should have 2 to 3 iViews interacting with each other and passing data.With detailed description of each steps from coding till deployment to the EP.
    Thanks & Regards,

    Hi Noaman,
    You can use EPCM for eventing between iviews in portal. Also we can use the same for communication between Webdynpro and EP applications.
    You can pass parameters using client data bag. The code for sender ....
    var an='Hello';
    EPCM.storeClientData("urn:namesapce","key",an);
    EPCM.raiseEvent("urn:namesapce","eventname");
    Code at the reciver....
    function fn_selection()
    var info=EPCM.loadClientData("urn:namesapce","key");
    document.myform.name.value=info;
    EPCM.subscribeEvent("urn:namesapce","eventname",fn_selection);
    This is the javascript code for triggering and subscribing  events in between iviews.
    Hope this Helps
    gEorgE

  • EVENTS IN ALV OOPS

    HI GUYS,
           CAN ANYONE PLS HELP ME OUT HANDLING EVENTS IN ALV(OOPS)....iS THERE ANY CLASS TO BE DEFINED ?????? PLS HELP IF ANYONE HAS THE CODE FOR THAT...........

    Hi,
    Declare as below.
    CLASS LCL_EVENT_RECEIVER DEFINITION DEFERRED.
    DATA : O_ALVGRID TYPE REF TO CL_GUI_ALV_GRID ,
           O_DOCKINGCONTAINER TYPE REF TO CL_GUI_DOCKING_CONTAINER ,
           O_EVENTRECEIVER TYPE REF TO LCL_EVENT_RECEIVER.
    Then class definition should be as follows:
    CLASS LCL_EVENT_RECEIVER DEFINITION.
    Event receiver definitions for ALV actions
      PUBLIC SECTION.
        CLASS-METHODS:
    Row Double click for dirll down.
           HANDLE_DOUBLE_CLICK
             FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                IMPORTING E_ROW
                          E_COLUMN
                          ES_ROW_NO.
    ENDCLASS.
    Then implementation should be as follows:
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
    *&      Method handle_double_click
    This method is called when the user double clicks on a line to drill
    down.
    The following are exported from the ALV
    LVC_S_ROW
    LVC_S_COL
    LVC_S_ROID
      METHOD HANDLE_DOUBLE_CLICK.
    The double click drill down processing should be
    coded in the form below.
        PERFORM F9007_HANDLE_DOUBLE_CLICK USING E_ROW
                                                E_COLUMN
                                                ES_ROW_NO.
      ENDMETHOD.
    ENDCLASS.
    *&      Form  F9007_HANDLE_DOUBLE_CLICK
    This form is called when the user double clicks on a line to drill
    down.
         -->P_E_ROW_ID    - Row ID  text
         -->P_E_COLUMN_ID - Column ID
         -->P_ES_ROW_NO   - Row number
    FORM f9007_handle_double_click USING p_row
                                         p_column
                                         p_row_no.
      DATA: lw_output LIKE LINE OF i_output.
    Need to check that a subtotal or grand total line has *not been double-clicked, otherwise the report will *produce a short dump!
      check p_row+0(1) is initial.
      READ TABLE i_output INDEX p_row INTO lw_output.
      CASE p_column.
        WHEN 'KNUMA'.
          IF NOT lw_output-knuma IS INITIAL.
            SET PARAMETER ID 'VBO' FIELD lw_output-knuma.
            CALL TRANSACTION 'VBO3' AND SKIP FIRST SCREEN.
          ENDIF.
       ENDCASE.
    ENDFORM.                    " F9007_HANDLE_DOUBLE_CLICK
    In PBO of the screen,
    MODULE status_9001 OUTPUT.
      IF o_dockingcontainer IS INITIAL.
       SET HANDLER o_eventreceiver->handle_double_click  FOR o_alvgrid.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    In this I have mentioned double click event.
    Similarly you have to do for others.
    Regards,
    J.Jayanthi

  • What is the diffrence between sap events and application events

    Hi all,
    what is the diffrence between sap events and application events.Can any one tell me with examples.
    regards,

    Hi,
    Look at this,
    <b>System Events (Default)</b>
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    <b>Application Events</b>
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Hope u understood.
    Thanks&Regards,
    Ruthra.R

Maybe you are looking for

  • Prevent auto creation of service entry sheet

    Dear friends, I am using maint plan for creating service entry sheets automatically. I am using framework order where I give the validity period. Now when I try to generate service entry sheets through the plans after the end of validity period given

  • How to check a particular string in address

    hi, I need to check if my address has "freemans" or "foodstuffs or 'db.co.nz, then give a defautl email address. hence i coded like this zstmp_addr type ZCHAR60. IF ( ts_filerefs-zsmtp_addr CA 'foodstuffs' ) AND        ( ts_filerefs-zsmtp_addr CA 'fr

  • IPod Dock Won't Charge iPod Classic 3rd Gen

    Hi, I have an iPod Classic 3rd generation that is running Version 2.3 with the Capacity of 13.9 GB. Model: M946OCH It looks like this: http://profile.ultimate-guitar.com/profilemojo_data/5/8/5/1/585103/pics/_c297123_image0.png The problem: this iPod

  • Sending Alerts from PC

    Hello All, I am working on sending alerts from PC, I followed below steps. 1. Go to ALRTCATDEF 2. Select classification "Process Chains" 3. Click on display/change 4. Double-click on "error in a process of a process chain" 5. Click on "fixed recipien

  • Getting started with virualization with one pc

    How do I get started with virtualization? All the tutorials assume you have multiple servers on which you load the hypervisor client and then control with the hypervisor. I have one PC (Nice two xeon cpu, 12 GB, lots of storage, etc). I would like to