cancel
Showing results for 
Search instead for 
Did you mean: 

Tabstrip - How to get the current tab name?

Former Member
0 Kudos

Hi,

My view has a tabstrip which has 2 tabs (tab1 & tab2) sharing the same push button. Depending on each tab, the button will trigger different views. How do I get the curremt tab name of a tabstrip so I can build the logic to trigger the corresponding next view? Please help!

Thanks.

Edited by: Abaper_09 on Jun 10, 2011 9:55 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Create one attribute and bind it to selected property of tab.

the tab strip UI element has an action called "Onselect".

everytime you change the tab it will be trigged.

and tabstrip has a property called slected tab

and in the action eventhandler of OnSelect check the value of this attribute.

it will have the selected tab's name or ID.

DATA:
    lv_select_tab type string.          "Selected tab value
 
  DATA:
    lt_events type WDR_EVENT_PARAMETER_LIST,
    ls_events type WDR_EVENT_PARAMETER.
 
  field-symbols: <fs_value> type any.   "Attribute value in events table
 
  lt_events = wdevent->parameters.
  read table  lt_events into ls_events with key name = 'TABSTRIPID'.
  if sy-subrc eq 0.
    assign ls_events-value->* to <fs_value>.         
    if sy-subrc eq 0.
      lv_select_tab = <fs_value>.                    "Tab selected
    endif.                
  endif.

Please go through this..

cheers,

Kris.