cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide the tabstrips in webdynpro abap

former_member223446
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member223446
Active Participant
0 Kudos

Hi Ricardo,

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

RicardoRomero_1
Active Contributor
0 Kudos

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.

former_member223446
Active Participant
0 Kudos

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.

RicardoRomero_1
Active Contributor
0 Kudos

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