cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro Tab strips

Former Member
0 Kudos

Hi all,

I am working on Tab strips.I have 4 tabs in it.

Each tab have a table with 4 to 5 fields.And a common button to save the data.

I need to find which tab has been choosen currently.How to find the tab which was currently there in screen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There is an OnSelect event on the Tab Strip. The TAB parameter of the event handler for this event gives you the current selected tab id.

The OLD_TAB parameter gives you the previously selected tab id.

Former Member
0 Kudos

Thanks for your timely Reply.

Can you help with a sample code

RicardoRomero_1
Active Contributor
0 Kudos

Hi,

As Romit said you can read the parameter TAB from wd_event, here you have a sample code:

FIELD-SYMBOLS: <ls_parameters> TYPE WDR_EVENT_PARAMETER,
                   <value> TYPE ANY.
    READ TABLE wdevent->PARAMETERS ASSIGNING <ls_parameters> WITH KEY name = 'TAB'.
    ASSIGN <ls_parameters>-value->* TO <value>.
    IF <value> EQ 'YOUR_TAB_NAME'. 
        "put the code you want...
    ENDIF.

Or you can create an attribute in the context and bind it with the property "SelectedTab" of the TabStrip.

Regards,

Ricardo.

former_member184578
Active Contributor
0 Kudos

Hi Ramya,

Create an action(let say get tab) for OnSelect Event of Tab Strip. Now in get_tab action create and importing parameter TAB of type string as shown [here|http://kiran4sap.blogspot.com/2012/01/tab-strip-in-wda.html]

Now TAB contains the selected tab ID. Create one attribute selected_tab in the context and set the selected tab in your on action of get_tab method.

method get_tab.

* Instantiate node using wizard. 

lo_el_node->set_attribute(
attribute_name = 'SELECTED_TAB'   " Your attribute name in context for storing selected tab.
value   = TAB                " this you have to create in your method as importing parameter as shown in above link
). 

end_method.

Now in your OnActionSave method,

get the value of selected tab using get_attribute method. and based on the selected tab do processing accordingly.

Hope this helps u.,

Thanks & Regards,

Kiran.

Answers (0)