Skip to Content
0
Former Member
Oct 02, 2012 at 06:35 AM

TabStrip ALV Using OO

693 Views

Dear Guys ,

I have made an ALV using OO .

My ALV has to grids .The main Grid (up) and the second Grid (down) which has 2 tab strips.

The functionality is like this : When i press a button to the first ALV some data appears to the grids in the tabs.

My report works OK if when i run it for first time i press the button to the first Grid.All the data are refreshed OK.

If i run the report and the first move is to change tab the i cannot refresh the data !!!!

Look my code

Main Screen 0100

<code>

*&---------------------------------------------------------------------*
*& Include YDP_DLV_VIEWS_TEST_TABS
*&---------------------------------------------------------------------*

*&SPWIZARD: FUNCTION CODES FOR TABSTRIP 'TAB1'
CONSTANTS: BEGIN OF C_TAB1,
TAB1 LIKE SY-UCOMM VALUE 'TAB1_FC1',
TAB2 LIKE SY-UCOMM VALUE 'TAB1_FC2',
END OF C_TAB1.
*&SPWIZARD: DATA FOR TABSTRIP 'TAB1'
CONTROLS: TAB1 TYPE TABSTRIP.
DATA: BEGIN OF G_TAB1,
SUBSCREEN LIKE SY-DYNNR,
PROG LIKE SY-REPID VALUE 'YDP_DLV_VIEWS_TEST',
PRESSED_TAB LIKE SY-UCOMM VALUE C_TAB1-TAB1,
END OF G_TAB1.

*&SPWIZARD: OUTPUT MODULE FOR TS 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: SETS ACTIVE TAB
MODULE TAB1_ACTIVE_TAB_SET OUTPUT.
TAB1-ACTIVETAB = G_TAB1-PRESSED_TAB.
CASE G_TAB1-PRESSED_TAB.
WHEN C_TAB1-TAB1.
G_TAB1-SUBSCREEN = '0101'.
PERFORM DISPLAY_ALV_101. " ALV of First tab
WHEN C_TAB1-TAB2.
G_TAB1-SUBSCREEN = '0102'.
PERFORM DISPLAY_ALV_101.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE. "TAB1_ACTIVE_TAB_SET OUTPUT

*&SPWIZARD: INPUT MODULE FOR TS 'TAB1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GETS ACTIVE TAB
MODULE TAB1_ACTIVE_TAB_GET INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN C_TAB1-TAB1.
G_TAB1-PRESSED_TAB = C_TAB1-TAB1.
WHEN C_TAB1-TAB2.
G_TAB1-PRESSED_TAB = C_TAB1-TAB2.
WHEN OTHERS.
*&SPWIZARD: DO NOTHING
ENDCASE.
ENDMODULE. "TAB1_ACTIVE_TAB_GET INPUT


</code>

Attachments

new 3.txt.zip (1.5 kB)