cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding View Container UI element

Former Member
0 Kudos

Hi,

I have a window in wed dynpro application. I have one view. In the same view, i have my selection screen and output. Output is being displayed by ALV. To show the output, i have used VIEW CONTAINER UI ELEMENT. Now i would like to hide this view container UI element when the selection screen is being filled. Kindly tell me how to do it.

Thanks & Regards,

Ravi Varma

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

This message was moderated.

vivekananthan_sellavel
Active Participant
0 Kudos

hi ravi,

Create a attribute with type wdui_visibility with name visibility_att.

bind the attribute to ther view container .

In the Action where u want to set visibility .

writre following code.

01,00 none

02 Visible

node->set_attribute( EXPORTING name = `visibility_att` value = '01' ).

Regards

vivekananthan.s

arjun_thakur
Active Contributor
0 Kudos

Hi Ravi,

Create an attribute of WDUI_VISIBILITY type and bind it with the visible property of the view container.

I assume that you must be having a search button which will search the data and display in the alv table.

In that ONACTION method of that method, set the value of that attribute to cl_wd_uielement=>e_visible-visible with the help of code wizard (ctrl+F7). This will make the view container visible.

Refer the following code:


DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
 
* get element via lead selection
lo_el_context = wd_context->get_element( ).
 
lo_el_context->set_attribute(
EXPORTING
name = `VISIBILITY_1` " pass the attribute name here.
value = cl_wd_uielement=>e_visible-visible). 
 

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Hi,

Create a context attribute for visibility WDUI_VISIBILITY.

Bind the visible property of the VCU to this attribute. Based on the condition set this attribute value to

01 or 02 for visibility.

Please check the thread to acheive the same

For Ex:

if the selection screen has a variable for start_date.

In the modify view,

if lv_begda is initial.

set the visibility of the VCU to false(01).

else.

set the visibility of the VCU to true(02)

endif.

Regards,

Lekha.