on 01-13-2012 8:04 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.