Dynamically embed View into View Container UI Element

Hi all,
I'm searching for a possibility to embed a view into a dynamically created View container element.
I want to do this out of another view, where a tabstrip is contained. So I have a button on this view for generation of a new tab with an view container element in it. Now I got to the point where I have to set the view to this container within the tab strip.
I read several blogs and articles, where this is done via the window manager within an method of the window, but non how to do this within a view.
Any ideas?
Thanks
Olli

HI,
that's nit what I wanted. What I want to do is a kind of table maintenance. There is a button under the tabstrip for creating a new row. If the user klicks on that button a new tab should be created for the new row. Therefore the view on the tabs are always the same.
I have created the tabstrib. dynamically add a tab to this strip on button press is no problem. Also a ViewContainerElement is created. But now I have to set the statically created view for the row maintenance into the container.
Thanks
Ragards
Olli

Similar Messages

  • How to create a webdynpro view dynamically and embed into view container?

    Hi all,
    Anyone knows how to create a view dynamically and embed the view into an existing view container?
    My layout looks like this:
    I have an existing view named main_view.
    Inside main_view, I create a view ui container named vcu_view.
    I embed the main_view into my window.
    I need the codes to create a view dynamically and embed the view into the view container. Anyone have any idea?
    Thanks in advance.
    Rgds,
    Siong Chao

    hi Siong Chao   ,,
    empty view insence ..( create a view without any UI element in it  ) in design time ..
    >
    Siong Chao wrote:
    > Hi Chinnaiya,
    >
    > How do you create an empty view dynamically then? Thanks in advance.
    i think we cannot create a new view dynamically because it is a webdynpro restriction ..
    NOTE: experts correct me if i am wrong in this answer
    Regards
    Chinnaiya P

  • View Container UI element in a table popin dynamically

    Hello people,
    I create a WD Table dynamically using the runtime class. I also create the table popin and then I set it in the table using the method SET_POPIN from the runtime class.
    Now my requirement is that I should be able to add the 'View Container UI Element' into this popin so that I can embed any other views into this VC UI E. I cannot find a way in which I can achieve this. I am able to do it statically but not dynamically.
    Even though it is suggested that such a design would lead to performance issues, but I have to achieve this.
    Regards
    Rohan

    Hi Anita,
    you cannot set metadata at element level of a node. When you set the metadata ( example mime type or file name ) for a particular element in the node , it changes for all the element. So you are always getting the file for the last row. ( most recent set metadata ).
    Try using the inteface IWDCachedWebResource for file download.
    For each row add a button, and associate an action "DownloadFile" for it. Use the following "onAction" for the said action. 
    public void onActionDownloadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionDownloadFile(ServerEvent)
        int selectedIndex = wdContext.nodeFileTab().getLeadSelection();
        IPrivateView_pdfView.IFileTabElement file = wdContext.nodeFileTab().getFileTabElementAt(selectedIndex);
        try {
         IWDCachedWebResource webResource = WDWebResource.getWebResource(
              this.
              getByteArrayFromResourcePath("/sapmnt/PCD/global/config/cm/etc/pdf/"+
              wdContext.nodeFileTab().getFileTabElementAt().getFilename(selectedIndex),
              WDWebResourceType.PDF);
         wdComponentAPI.getWindowManager().createExternalWindow(webResource.getURL(),"Download File",true).open();
       catch(Exception e) {
         // take some action
         wdComponentAPI.getMessageManager().reportException(e.toString(),true);
        //@@end
    Hope you get a solution.
    Regards
    KK.

  • Embed view in view container dynamically

    Hello Experts,
      I have links in my web dynpro ABAP view, when user clicks on a link I need to show another view in view container.  For example I have two links in my view and when user clicks on link1 I need to show VIEW1 to the user in the view container UI element, if user clicks on link2 I need to show VIEW2.  I have written the below code in Link action method.  But it is not working.  Any one can help in this?
      DATA : lo_window_controller TYPE REF TO if_wd_window_controller.
      DATA : lo_view_controller TYPE REF TO if_wd_view_controller.
      DATA : lo_window_rr TYPE REF TO if_wd_rr_window.
      lo_view_controller   = wd_this->wd_get_api( ).
      lo_window_controller = lo_view_controller->get_embedding_window_ctlr( ).
      lo_window_rr         = lo_window_controller->get_window_info( ).
    Embedding view
      lo_window_rr->embed_view( used_view_name     = 'V_EMP_TERMINATION'
                                embedding_position = 'V_ACTION/VCU_CONTAINER'
                                used_component_name = 'ZHR_MSS_APPL' ).
    with best regards
    K. Mohan Reddy

    Hi mohan ,
    You written the code for embedding the view . then you have to creat the navigation link then only you can do navigation
    Look at the sample code for creating the navigation link dynamically
    DATA lo_navi_services TYPE REF TO if_wd_navigation_services_new.
    DATA lo_api_v_main_wf TYPE REF TO if_wd_view_controller.
    DATA lo_navi_services TYPE REF TO if_wd_navigation_services_new.
    DATA lo_view_usage TYPE REF TO if_wd_rr_view_usage.
    DATA lo_window TYPE REF TO if_wd_rr_window.
      lo_api_v_main_wf = wd_this->wd_get_api( ).
      lo_navi_services ?= lo_api_v_main_wf.
      lo_view_usage = lo_api_v_main_wf->get_view_usage( ).
      lo_window = lo_view_usage->get_window( ).
    CONSTANTS lc_target TYPE string VALUE 'VIEW_MAIN_WF/VC_WF'. "viewname /view vontainer name
    *Write the code for getting the view name here
    if view_name is not initial
       TRY.
         lv_window_name = lo_window->get_name( ).
         wd_comp_controller->fire_unactivate_all_pro_event( ).
            wd_this->m_navi_repository_handle = lo_navi_services->do_dynamic_navigation(
                source_window_name        = 'lv_window_name'
                source_vusage_name        = lo_view_usage->name
                source_plug_name          =  'source_out_plug'
             plug_parameters           = lv_plug_parameter
                target_view_name          = lv_view_name
                target_plug_name          = 'FROM_Plug'
             target_embedding_position = lc_target )."lv_target ).
          CATCH cx_wd_runtime_repository INTO lr_error.
        ENDTRY.
    hope thisl piece of code is help full
    regards
    chinnaiya

  • Dynamic create Component usage and embed it in view container

    There is a view_container_uielement VC_TEST  in view V_MAIN, in wd component ZTEST.
    I created a web dynpro component named ZWDR_TEST and add it into the wd component ZTEST.
        gr_comp_test = component->create_cmp_usage_group(
          name = 'TEST_GROUP'
          used_component = 'ZWDR_TEST' ).
        lr_comp_usage = me->gr_comp_test->add_component_usage(
          embedding_position = 'V_MAIN/VC_TEST'
          name = 'TEST'
          used_component = 'ZWDR_TEST' ).
        if lr_comp_usage->has_active_component( ) is initial.
          lr_comp_usage->create_component( component_name = 'ZWDR_TEST' ).
        endif.
        ifc_test ?= lr_comp_usage->get_interface_controller( ).
    I thought the wdr ZWDR_TEST was embeded in the view V_MAIN in the position VC_TEST by the embedding_position parameter.
    But in the result web page, there is no ZWDR_TEST in the position of VC_TEST.
    Could any one explain why?
    Thanks

    Hi,
    for dynamic comp usage.. check this..
    http://help.sap.com/saphelp_nw70/helpdata/en/bc/191a427ff6db2ce10000000a1550b0/frameset.htm
    Dynamic Component Usage
    embed view
    Dynamic View embed
    How to create a webdynpro view dynamically and embed into view container?
    Cheers,
    Kris.

  • Embeding ALV table in dynamically created view container UI element

    Hi ,
    I created a view container UI element dynamically .that is working fine . I am using standard ALV component . Now i want to embed ALV table in View container UI element dynamically > please help me in this .
    Thanks in advance ,
    Vijay vorsu

    Hi,
    I am not sure how to do add an ALV table dynamically but you can have a look at this blog which talks about creating and adding a TABLE ui element dynamically. And TABLE UI element may solve your problem.
    http://mamma1360.blog.163.com/blog/static/314740992008127115551165/
    Thanks,
    Abhishek

  • Dynamically changing attributes of a field in view container UI element

    In the layout of the web dynpro component I have added a view container UI element. I am populating the fields in the view container UI element in methods in component controller using the following code
    *--Adding a Checkbox
      lv_str = wd_assist->if_wd_component_assistance~get_text( '009' ).
      CALL METHOD wd_this->att_wd_handler->add_parameter_field
        EXPORTING
          i_id          = 'CHB_DOWNLOAD_CHECKBOX'
          i_description = lv_str
          i_value       = lv_chb_download_checkbox
          i_as_checkbox = abap_true.
    *--Adding a Parameter
        lv_str = wd_assist->if_wd_component_assistance~get_text( '010' ).
        CALL METHOD wd_this->att_wd_handler->add_parameter_field
          EXPORTING
            i_id          = 'CHB_DOWNLOAD_PATH'
            i_description = lv_str
            i_value       = lv_chb_download_path
            i_as_checkbox = abap_false.
    Now based on the checkbox selection I want to make the field CHB_DOWNLOAD_PATH mandatory and also on F4 for CHB_DOWNLOAD_PATH  I want a method to be called. Where must i write the coding for the above conditions and how? Please help.

    hi
    In your method there would be a parameter ie ON_TOGGLE where you can write the name of your event .
    Whenever your checkbox will be clicked that event wil be called.
    You can write your code in that event itself.
    Regards
    Kuldeep

  • Dynamically embed  View in ViewContainerUIElement

    Hi all,
    Iam trying to create a ViewContainerUI element at runtime and want to add an existing view to the ViewContainer dynamically.
    Please let me know how can I embed a view dynamically in a view container.
    Component Controller :
    //Dynamic view container
    final IWDWindowInfo myWindow = wdComponentAPI.getComponentInfo().findInWindows("DemoWin");
    final IWDViewUsageInfo vuiMain = myWindow.getViewUsageByID("DemoView");
    final IWDViewContainerAssignmentInfo vcaiMainArea = vuiMain.createViewContainerAssignment();
    final IWDViewInfo viMain= (IWDViewInfo)vuiMain.getView();
    final IWDViewContainerInfo vciViewContainer = viMain.createViewContainer();
    /* Transfer the name to view controller to setup UI element */
    wdContext.currentContextElement().setViewId( vciViewContainer.getName() );
    vcaiMainArea.setViewContainer( vciViewContainer );
    In the DemoView :
    IWDViewContainerUIElement theViewContainer = (IWDViewContainerUIElement) view.createElement(IWDViewContainerUIElement.class, fld.getFieldID());
    theViewContainer.createLayoutData(IWDMatrixHeadData.class);
    theViewContainer.setViewContainer(wdContext.currentContextElement().getViewId());
    theGroup.addChild(theViewContainer);
    This is working fine. I am not getting exceptions.
    But a empty container is added to the view. Instead I want to add a existing view into viewcontainer dynamically.
    Please help me......Thanks in advance.

    Try this..........
    //Dynamic view container
    final IWDWindowInfo myWindow  = wdComponentAPI.getComponentInfo().findInWindows("MyWin");
    final IWDViewUsageInfo vuiMain   = myWindow.getViewUsageByID("MainView");
    final IWDViewContainerAssignmentInfo vcaiMainArea = vuiMain.createViewContainerAssignment();
                final IWDViewInfo viMain= (IWDViewInfo)vuiMain.getView();
               final IWDViewContainerInfo vciViewContainer     = viMain.createViewContainer();
               /* Transfer the name to view controller to setup UI element */
                vcaiMainArea.setViewContainer( vciViewContainer );
    //EMbed View dynamically in the View Container //
    final IWDViewUsageInfo vuiInner = vcaiMainArea.createEmbeddedViewUsage();
          final IWDViewUsageInfo   myViewMain   = myWindow.getViewUsageByID("MyView");
          final IWDViewInfo myView= (IWDViewInfo)myViewMain .getView();
          myViewMain.setView( myView);
    /* Mark view usage as default */
    vcaiMainArea.setDefaultViewUsage( vuiInner );
    Let me know if it works.........

  • Dynamically Embed View in ViewContainer

    Hi all,
    Iam trying to create a ViewContainerUI element at runtime and want to add an existing view to the ViewContainer dynamically.
    Please let me know how can I embed a view dynamically in a view container.
    Component Controller :
    //Dynamic view container
    final IWDWindowInfo         myWindow  = wdComponentAPI.getComponentInfo().findInWindows("DemoWin");
    final IWDViewUsageInfo      vuiMain   = myWindow.getViewUsageByID("DemoView");
    final IWDViewContainerAssignmentInfo vcaiMainArea = vuiMain.createViewContainerAssignment();
    final IWDViewInfo viMain= (IWDViewInfo)vuiMain.getView();
    final IWDViewContainerInfo vciViewContainer     = viMain.createViewContainer();
    /* Transfer the name to view controller to setup UI element */
    wdContext.currentContextElement().setViewId( vciViewContainer.getName() );
    vcaiMainArea.setViewContainer( vciViewContainer );
    In the DemoView :
                             IWDViewContainerUIElement theViewContainer = (IWDViewContainerUIElement) view.createElement(IWDViewContainerUIElement.class, fld.getFieldID());
                             theViewContainer.setViewContainer("TableView");
                                       theViewContainer.createLayoutData(IWDMatrixHeadData.class);
                                       theViewContainer.setViewContainer(wdContext.currentContextElement().getViewId());
                                            theGroup.addChild(theViewContainer);
    This is working fine. I am not getting exceptions.
    But a empty container is added to the view. Instead I want to add a existing view into DEMOVIew view container.
    Please help me......Thanks in advance.

    Try this..........
    //Dynamic view container
    final IWDWindowInfo myWindow  = wdComponentAPI.getComponentInfo().findInWindows("MyWin");
    final IWDViewUsageInfo vuiMain   = myWindow.getViewUsageByID("MainView");
    final IWDViewContainerAssignmentInfo vcaiMainArea = vuiMain.createViewContainerAssignment();
                final IWDViewInfo viMain= (IWDViewInfo)vuiMain.getView();
               final IWDViewContainerInfo vciViewContainer     = viMain.createViewContainer();
               /* Transfer the name to view controller to setup UI element */
                vcaiMainArea.setViewContainer( vciViewContainer );
    //EMbed View dynamically in the View Container //
    final IWDViewUsageInfo vuiInner = vcaiMainArea.createEmbeddedViewUsage();
          final IWDViewUsageInfo   myViewMain   = myWindow.getViewUsageByID("MyView");
          final IWDViewInfo myView= (IWDViewInfo)myViewMain .getView();
          myViewMain.setView( myView);
    /* Mark view usage as default */
    vcaiMainArea.setDefaultViewUsage( vuiInner );
    Let me know if it works.........

  • Dynamically embed interface view in window

    Hi,
    I am reusing the same WD ALV component in different tabs on the same view
    of my application. The WD framework does not allow to embed the same interface view of the same component usage more than once on the same view -> error message '... is already embedded in your view...'
    So as I don't want to slow down the application and create 5 component usages of the ALV reuse component because of this, I would like to dynamically assign the same
    instance interface view to the currently viewed tab. In each tab, there would be a view
    container to embed the interface view. I tried calling the method below in both wdDoInit and on the plug handler of the default inbound plug, but no success so far
    I implemented the method as far as I understood the saphelp correctly:
    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?_CLASS=IWB_EXTHLP&TMP_IWB_TASK=DISPLAY&_LOIO=4C60154219FCE12CE10000000A1550B0&_SLOIO=7C3545415EA6F523E10000000A155106&RELEASE=700&LANGUAGE=EN&_SEQNUM=71&_SCLASS=IWB_STRUCT
    method EMBED_ALV_VIEW .
      data: L_VIEW_CONTROLLER_API type ref to IF_WD_VIEW_CONTROLLER,
      L_VIEW_CONTROLLER_API = WD_THIS->WD_GET_API( ).
    L_VIEW_CONTROLLER_API->PREPARE_DYNAMIC_NAVIGATION(
                  source_window_name          = 'RPM_DASHBOARD_WINDOW'  "embedding app window
                  source_vusage_name          = 'RPM_DASHBOARD_VIEW_USAGE_1' "own local view containing all those tabs
                  source_plug_name            = 'DEFAULT'  " inbound plug for the window above
                  target_component_name       = 'SALV_WD_TABLE' "alv reuse component
                  target_component_usage      = 'SALV_WD_TABLE' "usage name of this component
                  target_view_name            = 'TABLE'  "interface view name of embedded component
                  target_plug_name            = 'DEFAULT' "startup plug for this interface view
                  target_embedding_position   = 'CNT1' ). "own view container on view.
    Thank you for your help!
    CHeers, Robert

    Hi Robert,
    Check out the following:
    In the Wiki they have added a feature about inputfields/dropdownboxes.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdabap/dynamicuseof+Dictionary&
    you can also check the weblogs by Thomas:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    /people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
    /people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements
    You could use MultiPane or RowRepeater. WDR_TEST_EVENTS contains an example for both.
    Hope this will help you.
    Cheers,
    Darshna.

  • Embed an external view into a tabbed menu

    Hi All,
    I'm a beginner in WebDynpro Java.
    Could you please help me to embed an external view into a tabbed menu in WebDynpro Java?
    Please help with your solutions.
    Thank you.
    Regards,
    Sari

    hi sari,
         Inside tabbed menu you can't use external view.
         For your problem you can do .
         1. copy your external view ui element from root elements..
         2. paste into seprate tabs.
    Another Solution
         1. Inside window controller you can create view set in two division..
         2. First Devision for your navigation menu .
         3. Second Devision For your External views
    Thanks & Best Regards
    Aasif Shah

  • Embedding view in view container UI element

    Hello,
       I have a requirement which is given below:
      I have a MAIN view where there is a view container UI element. This container holds one of 3 views(VIEW1,VIEW2 and VIEW3) depending on user input. Initially VIEW1 is displayed (this is set as the default view). Then the user navigates to VIEW2 and enters some selection criteria and confirms. Then VIEW3 is displayed with the entered selection criteria. Then the user clicks on search on the MAIN view and the RESULT view is displayed. When the user clicks on back functionality in the RESULT view,MAIN view is again displayed but the view container has VIEW1. The user wants to see VIEW3 in the viewcontainer in MAIN view.
    Please let me know if there is anyway to achieve this.
    Regards
    Nilanjan

    Hi Nilanjan,
    Create three context attributes V1,V2,V3 of type char1.
    Default value for V1 is 'X'. 
    Bind the visible property of each view container to the above attributes like
    View1-V1
    View2-V2
    View3-V3
    When you run the application, defaul View1 displays, coz its default values set as 'X'.
    Now depends up on the logic, change the value of each attribute as 'X' or SPACE .
    Eg:
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->Element_context.
        DATA lv_v1 TYPE wd_this->Element_context-v1.
        DATA lv_v2 TYPE wd_this->Element_context-v2.
        DATA lv_v3 TYPE wd_this->Element_context-v3.
    *   get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V1`
          value = 'X' ).
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V2`
          value = '' ).
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V3`
          value = '' ).
    or
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V1`
          value = '' ).
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V2`
          value = 'X' ).
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V3`
          value = '' ).
    or
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V1`
          value = '' ).
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V2`
          value = '' ).
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `V3`
          value = 'X' ).
    Regards,
    Amarnath S

  • I try to create an html for IPad. The html page contains an element overlapping a video, now it works as for view but the focus is still with video. This denies the event of overlapping element from occuring. Can please anyone help to solve this issue?

    I try to create an html for IPad. The html page contains an element overlapping a video, now it works as for view but the focus is still with video. This denies the event of overlapping element from occuring. Can please anyone help to solve this issue?

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • Search view : Combine two search views into one serch view

    Hi ,
    We have a requirement for combining two search views into one and display single result view consisting of some fields from One search and few fields from other search.
    Ex. There are two seperate search views for Oppotunity and Quotation. Now we want to combine search views of both into one search view with selected fields and then display a single result view with combined fields from both result views .
    Kindly suggest me the steps I can follow to achieve the same.
    Thanks,
    Madhura

    Hi,
    This is possible by creating dynamic views in a window.
    1)create views you required.
    2)create a tray in the view 1 and a link and set the properties.
    3)create an outbound plug for the view1 and save the application.
    4)create one more link in the tray for view1 and set the properties and create one more outbound plug.
    5)go the main view view and create 2nd tray and create a UI container element in it.
    6) now embed view1 and view2 in the container .........................
    <removed_by_moderator>
    regards,
    Muralidhar .C
    Edited by: Stephen Johannes on Jan 26, 2010 7:53 AM

  • Dynamic tabstrip with embedded view

    Hi,
    my task is to create a tabstrip dynamically and assign a view to a dynamically created tab. I created a tabstrip dynamically:
    METHOD wddomodifyview .
      DATA: lr_container TYPE REF TO cl_wd_uielement_container.
      DATA: lr_tabstrip TYPE REF TO cl_wd_tabstrip.
      DATA: lr_tab TYPE REF TO cl_wd_tab.
      DATA: lr_caption TYPE REF TO cl_wd_caption.
      DATA: lr_view_container TYPE REF TO cl_wd_view_container_uielement.
      IF first_time = abap_true.
        lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_tabstrip ?= lr_container->get_child(
             id        = 'TABSTRIP' ).
        lr_tab = cl_wd_tab=>new_tab(
                    id = 'TAB1'
                    view = view ).
        lr_tabstrip->add_tab(
            the_tab = lr_tab
        lr_caption = cl_wd_caption=>new_caption(
        id = 'CAPTION'
        view = view
        text = 'TAB1' ).
        lr_tab->set_header( the_header = lr_caption  ).
      ENDIF.
    ENDMETHOD.
    This works fine. In the next step I want to create a view container UI element and assign it to the TAB1.
    Does anyone know how to to this?
    The last step woud be that I embed a given view from another component to the created view container. I assume that this can be done as described in the following thread:
    Link: [Re: dynamic reusability of components]
    Is my assumption correct?
    Best Regards, Eddy

    Hi Pooja,
    thanks, I enhanced the coding with your mentioned method. Additinally I added the code for embedding the view , but now I get an dump, saying:
    View usage MAIN_VIEW_USAGE_1 does not exist in window W_MAIN of component Z_DYNAMIC_TAB
    Here the enhanced code:
        lr_view_container = cl_wd_view_container_uielement=>new_view_container_uielement(
    *    bind_enabled           =
    *    bind_tooltip           =
    *    bind_visible           =
    *    context_menu_behaviour = E_CONTEXT_MENU_BEHAVIOUR-INHERIT
    *    context_menu_id        =
    *    enabled                = 'X'
             id                     = 'VIEW1'
    *    tooltip                =
    *    view                   =
    *    visible                = E_VISIBLE-VISIBLE
        lr_tab->set_content( the_content =  lr_view_container ).
        lr_tabstrip->add_tab(
    *    index   =
            the_tab = lr_tab
        lr_api_main = wd_this->wd_get_api( ).
            try
    lr_api_main->do_dynamic_navigation(
      source_window_name        = 'W_MAIN'
      source_vusage_name        = 'MAIN_VIEW_USAGE_1'
      source_plug_name          = 'OUT_PLUG1'
      target_component_name     = 'ZEMTEST'
      target_view_name          = 'V_MAIN'
      target_plug_name           = 'DEFAULT'
      target_embedding_position = 'V_MAIN/VIEW1').
    I assume, that the view ussage 'MAIN_VIEW_USAGE_1 must be defined statically. But I like to defiine the usage at runtime. Is this possible?
    BR, Eddy
    Edited by: Edgar Meyer on Jul 16, 2009 8:31 AM

Maybe you are looking for