An example how to configure outbound plug delegation mapping
| * delegated
- delegation# Created by Jerry Wang on Feb 17, 2015create an outbound plug DEFAULT in window below:
Implementation:
Define the outbound plug also in runtime repository:
in component usage tab, delegate the outbound plug DEFAULT to its window via context menu:
Ensure this mapping information could be parsed successfully via metadata check tool:
In the runtime, with the help of mapped outbound plug, the parent window's outbound plug will be executed instead of the current window itself.
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

Owner Author
# An example why we need to configure outbound plug mapping## Created by Jerry Wang, last modified on Feb 25, 2015Starting point: Technical information: CRMCMP_IBSEARCH/HeaderResultList requirement: click button "Create Service Contract", and this will lead to navigation to service contract creation ui. View hierarchy information Why do we need outbound plug mapping? In order to answer it, we must first understand the case when the outbound plug mapping is not necessary. Result view call outbound plug, pay attention to lr_window. Method OP_CREATE is called dynamically. That method in window will call fire_outbound_plug ( don't mix it with CALL_OUTBOUND_PLUG !!) Inside the method, it will call the navigate method of its parent window's view manager: Just check the previous view hierarchy screenshot, the method navigate simply insert a new navigation entry to internal table mav_queue, which will be parsed later. Pay attention to which window reference the variable me points to. And now the navigation entry is handled. The ls_nav_step-owner_window just points to the outer window stored in "me" in previous screenshot: There is one navigation target found: So far it works perfectly, however all the logic are working based on static navigation, e.g all navigation information are maintained in design time: However in order to fulfill the requirement, cross component navigation is necessary - it is not possible to maintain navigation information in design time.Instead, we must delegate the outbound plug from view HeaderResultList to its wrapper window IB150M_IBASE, and the wrapper window will trigger cross component navigation. The main difference for outbound plug mapping in runtime Recall the scenario of normal view navigation, the method call_outbound_plug of its direct window ( CMP Window ) is called.In the mapping case, as its name shows,the method call_outbound_plug of the outer wrapper window is called: The outbound plug is delegated from: 1. view iteself -> 2. direct window ( CMP window ) ->3. outer wrapper window ( IB150M window ). The reason why we need the outer wrapper window here is to achieve the cross component navigation logic.In the outer wrapper window, it is wrong to use call_outbound_plug since it will lead to endless recursive call. Neither the view manager->navigate must be called, it still causes the wrapper window is inserted as a starting window in navigation entry.The correct way is to call fire_outbound_plug: In this way we gain access to wrapper window's parent view manager, since now we are inside the implementation of cl_bsp_wd_window and all private attributes are available.Now me points to standard ui window controller, which is just exactly what we want Only this standard window reference can have right to fire cross component navigation:  |
|---|