Defining an Event for an Outport

Context

If your CHIP is to have an outport so that it can connect to another CHIP, in the component controller create an event that you can use to fire a wiring to the other CHIP.

Procedure

  1. Go to the component controller of your Web Dynpro component, open it with a double-click, and choose the Events tab.
  2. Create a new event, for example, with the name OUTPORT_EVEN, and set the Interface flag.
  3. Create a parameter for this event, for example, with the name PARAM_OUT that has a Dictionary structure as the reference type.
  4. Go to the action handler method from where the event is to be fired, for example, as a response to a button click, and open the Web Dynpro Code Wizard here.
  5. Choose the General tab, then Method Call in Used Controller, and select the event method of the COMPONENTCONTROLLER that you created in step 2.

    For event OUTPORT_EVENT this is method FIRE_OUTPORT_EVENT_EVT.

  6. Fill the parameter with an appropriate local variable. The code looks like this:

    lo_componentcontroller->fire_outport_event_evt( outparam = ls_search ).

  7. You can refererence this event when you create the outport for the CHIP.

    For more information: Creating Web Dynpro CHIPs.