Skip to Content
avatar image
Former Member

Subscribe to other views apart from wd_this

Hi

How would I subscribe to another view to the one I'm currently coding in?

I wish to subscribe to an event in one view but have the action that is triggered in another event.

Is this possible and if so recommended?

Cheers

Ian

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 05, 2007 at 02:58 PM

    I found out how to.

    V_edit is the view I wish to use.

    DATA l_wd_view TYPE REF TO if_wd_view_controller.

    DATA: lr_v_edit TYPE REF TO if_v_edit.

    l_wd_view ?= lr_v_edit->wd_get_api( ).

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 05, 2007 at 02:58 PM

    Hi Ian,

    It's not advised. The better solution is to trigger an event on the component controller (by calling a method there), which can be catched by the other view. The component controller is always alive. Other places (views, windows, even outside world if set to public) could possibly use it in future.

    Best regards,

    Thomas

    Add comment
    10|10000 characters needed characters exceeded