Skip to Content

Get Parent View Component name "Webdynpro"

Hi Gurus,

My current component is called from multiple component and I have to do validation based on the calling component.But how to read the calling component(Not application)

Below is my finding

lo_cmp_apix TYPE REF TO if_wd_component,

lo_window_managerx TYPE REF TO if_wd_window_manager,

lo_cmp_apix = wd_comp_controller->wd_get_api( ).

lo_window_managerx = lo_cmp_apix->get_window_manager( ).

In the object Lo_window_manger there is a parent details but how to read it???

Kindly help me to rectify this issue.

Thanks in advance.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 05, 2017 at 10:37 AM

    There is not really a concept as "called from" in the same way as with ABAP, there is no call hierarchy.

    A safer alternative would be to pass in a 'mode' parameter or send any needed data across. This means you're not creating as many dependencies.

    Add comment
    10|10000 characters needed characters exceeded

    • OK, it's important to make this clear. "Call" can be a plug-navigation, FPM GAF, Usage, iView, or other setup.

      Navigating via visual elements (View -> Window -> ?) is not the WDA way, for components usages you should use interfaces. These are in part created automatically for you, you just need to expose any additional elements (methods etc.) that other controllers can use.

      From the info you have given, a few option are available:

      - Create a standalone component that is common to both using and used components
      - Pass a reference to the using controller in during instantiation of the used controller
      - Create a reverse component usage and expose the using controller's methods

      The third option is the most robust, ideally via a standalone interface controller to ensure that all using controllers implement the same interface.