cancel
Showing results for 
Search instead for 
Did you mean: 

Insert view into view container ui element dynamically (no plugs, just show view dynamically)

Former Member
0 Kudos

Hi,

I've been struggling already for some time with the problem that I want to show a view, that is known only in runtime on a different view (which is also dynamic - the UI is created in this case using:

      lr_viewcont_ui = cl_wd_view_container_uielement=>new_view_container_uielement(

*          bind_enabled =

*          bind_tooltip =

*          bind_visible =

           enabled      = abap_true

            id           = 'TEST'

*          tooltip      =

*          view         =

*          visible      =

              ).

I know the name of the view to be shown and it is belonging to the same component as the 1st view. I found many examples, all of them refer to some of the methods:

view_controller->prepare_dynamic_navigation()

I tried:

if_wd_rr_window->embed_view(

             used_view_name       = 'V_PA9002'

             used_component_name  = 'ZPD_DOCUMETATION' ).

This is probably ok, but just embedding a view to a window does not help me in placing it in the view container UI element.

..

In my case, there is no navigation needed (or in other words, it does not exist at all). I simply want to show a view inside a different view. Every example leads to some kind of navigation and I'm a little bit lost how to achieve my scenario:

1. the dynamic view is empty (meaning there are no UI elements and view container UI element has got to be created by code. So I can not embedd the view statically into the window on the respective place - as that place does not exist in design mode.

2. The view to be shown is however embedded to the window statically. I have a main view, that has got one view container UI element and at that place my dynamic view is shown (which in turn should show the destination view on it's own view container UI element).

3. I do not see any need for any navigation - as that is already handled by the main view (also some sort of dynamic - as it is a handler for a road-map).

4. I've read Dynamically Embedding an Interface View - Web Dynpro for ABAP - SAP Library a hundred times, but did not understand the sentence:

The name of the dynamically created view container element is passed to method PREPARE_DYNAMIC_NAVIGATION (see above) even though the element will be created only at a later point in time in the phase model.

What is the parameter to send in "prepare_dynamic_navigation"? Is it 'CNT1'? Where to place it - to which argument? I do not have any navigation, so can I use this at all?

5. The perfect scenario would be if new_view_container_uielement( ) method accepted the name of the view to be shown by name or any "normal" identifier (it accepts a reference to the IF_WD_VIEW, which I do not have of course).

Any help is appreciated, I believe there is a simple solution for this .

J.

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Jozef,

Please refer the below document:

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi, thanks for your reply, I appreciate.

I needed to solve my problem quicker, so I made some workaround (not so much dynamic embedding). But I will get to your post later.

Answers (0)