Skip to Content
avatar image
Former Member

TabStrip - set a Tab dynamically in an Action

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 14, 2014 at 09:08 AM

    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

    Add comment
    10|10000 characters needed characters exceeded