cancel
Showing results for 
Search instead for 
Did you mean: 

hiding a group..

Former Member
0 Kudos

hi all..

i have a two groups GP1 and GP2...

GP1 had input fileds and a button

GP2 has a standarad table...

i want to hide GP2 initially and when i click on the button the standard table should b visible i mean the group..

So in my node which is bound to the table i am creating an extra node called visible and binding it to the group....

and on button click im first filling my standard table and then

i say..lr_node->set_attribute( exporting name = 'visible' value =abap_true..

All is working fine..

The GP2 is hidden..when i click on the button i get the table..but when i select sm row...then GP2 is not visible..cant see the table then after selecting a row..

im missing on smthng..

or any idea how to achieve this...

jagruti..

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi Visiblity is of type data element WDUI_VISIBILITY .If you see its value table is have two values

01 In visible

02 Visible

Example to set it

data:

node_nd_sel_values TYPE REF TO if_wd_context_node,

elem_nd_sel_values TYPE REF TO if_wd_context_element,

stru_nd_sel_values TYPE wd_this->element_nd_sel_values ,

item_rel_no LIKE stru_nd_sel_values-rel_no.

  • navigate from <CONTEXT> to <ND_SEL_VALUES> via lead selection

node_nd_sel_values = wd_context->get_child_node( name = wd_this->wdctx_nd_sel_values ).

  • get element via lead selection

elem_nd_sel_values = node_nd_sel_values->get_element( ).

  • get single attribute

elem_nd_sel_values->get_attribute(

EXPORTING name = `VIBILITY_FLAG`

IMPORTING value = '02 ' ). /// make it visible

Cheers

Parry

Former Member
0 Kudos

This will work just fine even with a char01 context attribute set to X or space. The attribute needs to be bound to the visible property of the group in the properties tab. Just check if you have done it.

Former Member
0 Kudos

Hi Jagruti.

For visiblity you should not use wdy_boolean (abap_true) but

WDUI_VISIBILITY with the following values:

01 none

02 Visible

So your attribute shoukld be of type wdui_visiblity

and you should set it like this:

lr_node->set_attribute( exporting name = 'visible' value = '02' ).

Cheers,

Sascha

Message was edited by:

Sascha Dingeldey

former_member215843
Active Participant
0 Kudos

Hi Sascha, hi Jagruti,

It is quite OK to bind the visibility against a context attribute of type WDY_BOOLEAN. In many cases this is much easier than using WDUI_VISIBILITY.

Ciao, Regina

Former Member
0 Kudos

hi sascha...

even if i use wdui_visibility..

lr_node->set_attribute( exporting name = 'visible' value = '02' ).

still on lead selection the group disappers.....

jagruti..

Former Member
0 Kudos

Check if the "visible" property of the group is bound to the "visible" attribute in your lr_node at design time.

Former Member
0 Kudos

Hi,

you are setting the attribute on invisible by default,

only on action you will overwrite the value, in your code,

now when you go through wdmodifyview, the standard values are reset.

you should make an attribute visible, outside your table,eg node layout directly under yout root context node (i think that you bind now to

the selected element of the table, only in the default the attribute is set, not in the

lead selection) bind it at design time to the visible attribute of the group

grtz,

Koen

mohammed_anzys
Contributor
0 Kudos

Hi jagruti,

Are you doing anything on the lead selection.

Thanks

Anzy