Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Subscreen not getting refreshed on press of a tab

Former Member
0 Kudos

Hi all,

I got a Main screen with fields A and B and a tabstrip on it.

The tabstrip contains 4 tabs (subscreens).

Each subscreen displays alv tree display on press of a tab.

Now when I open the main screen the data is properly populated for all the four alv tree reports on the subscreens with the criteria being the default values on the fields A and B. Also now when I press any of the tabs the respective report is displayed.

Now suppose I select and change the field A or B and press enter.

The alv for which the tab is active is shown on all the four tabs when i press any of them. No event is triggered.The subscreens are not getting refreshed. I dont know what the problem is.

Please guide me.

Regards,

Mozila

7 REPLIES 7

Former Member
0 Kudos

Hi,

Check this:

[http://www.sap-img.com/abap/how-to-refresh-alv-list-grid-once-it-is-displayed.htm]

Regards,

Harsh.

0 Kudos

Hi

Thanks for the reply.

But on what event should I write this; as no event is getting triggred when i press any of the tabs.

How do i do it?

Regards,

Mozila

0 Kudos

Hi,

Get a refresh button on the screen, it will be easy for the enduser also.

Regards,

Harsh.

Former Member
0 Kudos

Hi Mozila,

There are two things you need to check:

- First when user press Enter the PAI event of the main screen get triggered, you need to call corresponding event of subscreen as well in the main screen:

PROCESS BEFORE OUTPUT.

...

CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.

...

PROCESS AFTER INPUT.

...

CALL SUBSCREEN <area>.

...

Refer to this [Subscreen|http://help.sap.com/saphelp_4.70/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm]

- Second, after getting values from fields A & B, you need to select data again into the internal table which bounded to the ALV and call method REFRESH or SET_DATA to refresh the ALV display. Check this: [ALV Content and Structure Change|http://help.sap.com/saphelp_nw04/helpdata/en/37/d0ee406b657e7fe10000000a1550b0/content.htm]

Thanks,

Duy

Clemenss
Active Contributor
0 Kudos

Hi mozila,

if you use (editable) alvs you should always register events

* register change
      CALL METHOD mo_alvgrid_2->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter.

      CALL METHOD mo_alvgrid_2->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_modified.

You may need an own handler FOR EVENT data_changed OF cl_gui_alv_grid that needs to be activated with SET HANDLER.

Always, in subscreen PAI, call CL_GUI_ALV_GRID method check_changed_data as shown here:

go_bilcont->mo_alvgrid_2->check_changed_data( ).
ENDMODULE.                 " USER_COMMAND_0300  INPUT

Regards,

Clemens

0 Kudos

hi..was this resolved ? I am facing the same issue.

I have a tabstrip within a tab. It works just fine when I navigate to the main tab the first time. However, if I view other tabs and then come back to this tab, it is displaying the  same subscreen in all the tabs of the tabstrip...

0 Kudos

Hi Veena,

I thought this might help. So posting this -

U have to first declare the control in your top include as -

CONTROLS: table_control_name TYPE TABLEVIEW USING SCREEN 'subscreen_number'.

Then in PBO, if you have a module for initializing write inside that or else create one.

REFRESH CONTROL 'table_control_name' FROM SCREEN 'subscreen_number'.


Remember to give the table_control_name and subscreen_number within quotes.


Hope it helps someone since it worked for me



Thanks,

Priyanka