Skip to Content
0
Former Member
Sep 15, 2007 at 01:41 PM

How to delete view(view_A) from a VIEW_CONTAINER_UIELEMENT?

20 Views

Hi experts,

ACTION:

1. Create a view(view_A) and a view(view_B) in the WDA for abap.

2. Create a view(view_C) with two button(open_view_A and open_view_B), a VIEW_CONTAINER_UIELEMENT(view_container_ui) in the WDA for abap . Implement the function of two button for opening view_A and opening view_B in the same window.

3. Embed the view_A and the view_B to the view_C in the window.

4. Run the WDA for abap.

5. I hope: clicking the button(open_view_A), the view_A is opened and view_B is deleted from the machine memory(if view_B has been created). clicking the button(open_view_B), the view_B is opened and view_A is deleted(if view_A has been created in the memory).

But now, when I first click the button open_view_A, and view_A is displayed in the view_C, and I click the button open_view_B. The view_A is not been deleted from the mechine memory.

The following is my code:

method wddomodifyview .

DATA view_container_uielement TYPE REF TO cl_wd_view_container_uielement.

view_container_uielement ?= IF_CONTAINER_VIEW->get_element( `VIEW_CONTAINER_UI` ).

view_container_uielement->set_visible(

EXPORTING

value =

if_wdl_core=>visibility_visible ).

endmethod.

Do you give me some hints for this problem?

Thanks a million.

Best regards,

tao