Skip to Content
0

How to hide the tabstrips in webdynpro abap

Mar 07, 2017 at 01:01 PM

87

avatar image

Hi

I have to hide(none) / unhide (visible) tabstrips dynamically based on data availability.

I wrote the below code to hide.

lo_el_context_b->set_attribute(
name = `BOOLEAN`
value = cl_wd_tab=>set_focus( ' ' ). got error only used with static methods.

data : BOOLEAN type WDUI_VISIBILITY.

How can i achieve this kindly help me.

Regards,

Kiran

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Ricardo Romero Mata Mar 08, 2017 at 09:06 AM
0

Hi,

You can create an atribute in the context for each tab and bind them with the property visible. You only need to change the value of this atribute dynamically.

You can also try with this code (Within the WDDOMODIFYVIEW);

DATA:
lo_tab TYPE REF TO cl_wd_tab.

lo_tab ?= view->get_element( 'TAB_1' ).

CALL METHOD lo_tab->set_visible
EXPORTING
value = abap_true. "abap_false

Share
10 |10000 characters needed characters left characters exceeded
kiran jagana Mar 09, 2017 at 12:03 PM
0

Hi Ricardo,

I have created attribute(data : BOOLEAN type WDUI_VISIBILITY.) in the context and bind it in all tabs with property visible.and wrote the code as below.but it is not hidden.

lo_el_context_b->set_attribute(
name = `BOOLEAN`
value = cl_wd_tab=>e_visible-none ).

but still ,it won't work.

Regards,

Kiran Jagana.

Share
10 |10000 characters needed characters left characters exceeded
Ricardo Romero Mata Mar 13, 2017 at 12:50 PM
0

Hi, Kiran,

If you want to hide the entire tabstrip you only need to bind the attribute BOOLEAN once with the property visible of the tabstrip, not to all the tabs.

Use the type WDY_BOOLEAN for the attribute and abap_false instead of cl_wd_tab=>e_visible-none.

Share
10 |10000 characters needed characters left characters exceeded
kiran jagana Mar 14, 2017 at 10:42 AM
0

Hi Ricardo,

I want to hide the tabs under tabstrip dynamically.based on the data availability.not entire tabstrip.

Share
10 |10000 characters needed characters left characters exceeded