Skip to Content
Former Member
Jul 05, 2011 at 08:31 AM

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' ).

    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?