cancel
Showing results for 
Search instead for 
Did you mean: 

Tab information dynamically on select

Former Member
0 Kudos

Hi,

How do we get the information regarding the SelectedTab dynamically .I have refer some blogs but i am unable to get my information .When we have 2 Tabs(tab1,tab2).if in default i am in Tab1 then when i click on tab2 i created an action but i donot know how to fetch the value of current tab.

Regards,

Amit

Accepted Solutions (1)

Accepted Solutions (1)

venkateswaran_k
Active Contributor
0 Kudos

Hi Amit,

You can get the value (ID) of the current tab in focus by using the method. getSelectedTab()

This will return a string value that Contains the ID of the currently selected tab.

Regards,

Venkat

Former Member
0 Kudos

Hi ,

Thanks for teh info Does any body know how to call this in Webdynpro any sample code helps me.

Regards,

Amit

Former Member
0 Kudos

Hi AMITTEJA VUTPALA

Write this piece of code in the onselect event of tabstrip UI element

For getting the selected tab .

data : ls_parameter TYPE  wdr_event_parameter_list,
         ls_tab TYPE wdr_event_parameter,
          lv_value TYPE string .
   ls_parameter = wdevent->parameters .

 LOOP AT  ls_parameter INTO ls_tab WHERE  name = 'TAB'.
   CALL METHOD wdevent->get_string
      EXPORTING
        name  = 'TAB'
      RECEIVING
        value = lv_value.  " here you will get the selected Tab ID name .
  endloop.

For getting the Previous tab ID

data : ls_parameter TYPE  wdr_event_parameter_list,
         ls_tab TYPE wdr_event_parameter,
          lv_value TYPE string .
   ls_parameter = wdevent->parameters .

 LOOP AT  ls_parameter INTO ls_tab WHERE  name = 'OLD_TAB'.
   CALL METHOD wdevent->get_string
      EXPORTING
        name  = 'OLD_TAB'
      RECEIVING
        value = lv_value.  " here you will get the selected PreviousTab ID name .
  endloop.

Hope it will help you

Regards

Chinnaiya P

Former Member
0 Kudos

Hi Chinnaiya,

Thanks for the info. You make it simpel for me .10/10.

Regards,

Amit

Former Member
0 Kudos

Hi Chinnaiya,

Thanks for the info. You make it simpel for me .10/10.

Regards,

Amit

Former Member
0 Kudos

HI AMITTEJA VUTPALA

Hope you get the desire result . if yes you can close this thread by selecting solved Problem.

If you like to provide points choose Radio button below the userid rather than providing in sentence .

>

> Hi Chinnaiya,

>

> Thanks for the info. You make it simpel for me .10/10.

>

>

> Regards,

> Amit

Regards

Chinnaiya P

Former Member
0 Kudos

Hi,

Done, closed the same.

Regards,

Amit

Answers (2)

Answers (2)

Madhu2004
Active Contributor
0 Kudos

In the action handler method you will have a importing parameter WDEVENT.

This parameter has the new tab selected and it svalue in TAB field and previous tab value in OLD_TAB field

Former Member
0 Kudos

Amit,

You can associate a context attribute to selectedtab proerty of tabstrip and set and get the selected tab value

Thanks

Bala Duvvuri