on 2014 Feb 14 8:53 AM
Hi Experts,
I'm building an application for flat file Uploads into alv. The view contains one TabStrip with two Tabs, one with the Content of flat file in an ALV grid, the other tab with Messages. Depending on Content of flat file, I like to show tab with messages (in case of errors), or tab with flat file Content (successful load).
Has anyone an idea regarding coding?
Best regards, Thomas
Hi Thomas,
You can achieve your requirement as below
Create an attribute GV_CURRENT_TAB_ID of type string ... in attributes tab of view.
Set the tab id in your action as below
wd_this->gv_current_tab_id = 'TAB_ID1'.
Write the code in method WDDOMODIFYVIEW( )
data: lo_tabstrip type ref to cl_wd_tabstrip.
lo_tabstrip ?= view->get_element( 'MY_TABSTRIP' ). "replace by tab strip id
now you have the reference and you can call set_selected_Tab method
lo_tabstrip->set_selected_Tab( WD_THIS->GV_CURRENT_TAB_ID ). " pass the TAB id to be shown
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
view reference is not available in your event handler method 'Do_upload'.
you need to get the view reference and then use that as below
data lo_view TYPE REF TO if_wd_view.
data: lo_tabstrip type ref to cl_wd_tabstrip.
"get view reference
lo_view ?= wd_this->wd_get_api( ).
lo_tabstrip ?= lo_view->get_element( 'TS_01' ). "replace by tab strip id
lo_tabstrip->set_selected_Tab('TAB_3'). " pass the TAB id to be shown
Regards,
Rama
Hi Thomas,
lo_view ?= wd_this->wd_get_api( ).
That statement works for nw7.3 and above. Hope your system is not meeting that requirement.
Any way ... please follow the below steps
If first_time = abap_true.
Wd_this-> GO_VIEW = view.
Endif.
Hope this should work for u.
Regards,
Rama
User | Count |
---|---|
63 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.