cancel
Showing results for 
Search instead for 
Did you mean: 

Web DynPro - Navigation to Tabstrips

Former Member
0 Kudos

Hi All,

I have a view that has Tabstrips, around 6 tabstribs.

When I am in an Sales Order Tab all the sales orders are listed. I select one sales order and click display details button.

When I do this I need to move automatically to Search Tab and in the search tab the sales order number should be populated and results should be displayed.

I could populate the sales order number and display the results in the Search Tab, but don't know how to navigate automatically to Search Tab from Sales Order Tab.

I don't want to navigate to that tab manually.

Please let me know how to navigate from one Tab to another Tab automatically

Thanks.

Samekshaa

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for the replies

Former Member
0 Kudos

Hi,

Thanks for the replies.

I created a attribute SELECT_TAB of type string and binded it to the SlectedTab of the tabstrip.

and set the attribute of SELECT_TAB with the value of the Tab I need to navigate.

But it didn't work as it was suppose to.

Any other inputs please.

Thanks,

Former Member
0 Kudos

Hi,

Where are you setting the SELECT_TAB attribute value.

In the Display Details button of the Salesorder tab, you write the code setting the tab.

Create an action handler ONACTIONSELECT_TAB.

***Variables
  DATA
    lv_select_tab type string.         "Selected tab

  CALL METHOD WD_CONTEXT->SET_ATTRIBUTE
    EXPORTING
      VALUE = lv_select_tab                 "Give tab id for the Search Tab
      NAME  =  'SELECT_TAB'.

using the GET_ATTRIBUTE try to default the value in the SEARCH tab with the Saslesorder number.

and You need to write the code in the action handler also to set the tab.

method ONACTIONSELECT_TAB .

***Variables

DATA:
  lv_select_tab type string,          "Selected tab value
   lv_name type string.               "Name of the event.

***Structure and internal table for the Events
DATA:
  lt_events type WDR_EVENT_PARAMETER_LIST,
  ls_events type WDR_EVENT_PARAMETER.

***Field symbols
field-symbols: <fs_value> type any.   "Attribute value in events table

***Move the event name ie 'ON_SELECT' is the standard event
lv_name = wdevent->name.

***Move the event table to lt_events
lt_events = wdevent->parameters.

*"Set to 'TAB' in lt_events
read table  lt_events into ls_events with key name = 'TAB'.        
if sy-subrc eq 0.
assign ls_events-value->* to <fs_value>.
if sy-subrc eq 0.
lv_select_tab = <fs_value>.
endif.                 "IF sy-subrc eq 0.
endif.                 "IF sy-subrc eq 0.

***Set the selected tab value
CALL METHOD WD_CONTEXT->SET_ATTRIBUTE
  EXPORTING
    VALUE  =  lv_select_tab
    NAME   = 'SELECT_TAB'.  "Set the selected tab Id
endmethod.

The above code is working fine for me. Please test it as per your requirements.

Regards,

Lekha.

Former Member
0 Kudos

Hi Sameeksha,

Please follow the below code, i wrote this on the OnEnter of the input field, and it works for me.

Here my Tab ID to be navigated is TAB2.

I have used an attribute SEL_TAB in the context for changing the Selected TAB property.

data lo_el_context type ref to if_wd_context_element.

data ls_context type wd_this->element_context.

data lv_sel_tab like ls_context-sel_tab.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

lv_sel_tab = 'TAB2'.

  • set single attribute

lo_el_context->set_attribute(

exporting

name = `SEL_TAB`

value = lv_sel_tab ).

Hope it helps.

Regards,

Shashikanth. D

Edited by: Shashikanth Divakaruni on Jan 30, 2009 8:21 AM

Former Member
0 Kudos

Hi,

Please try this way.

Create a context attribute to have the selected tab value.

bind this to the selected tab property of the TABSTRIP.

now populate this attribute accordingly where ever required.

In your case, upon the details button, set the attribute to that TAB ID so that you can change to that Tab

by this way.

Try to code the things in the respective button handlers and action handlers of the tab and set the attribute.

I think this should work for you.

Please check the wdr_test_ui_elements for this SELECTED_TAB property.

Regards,

Lekha.