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: 

TabStrip ALV Using OO

Former Member
0 Kudos

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'
CONTROLSTAB1 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>

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Dimitris.

  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.

What is Inside PERFORM DISPLAY_ALV_101? , are these routines specific for each subscreen?, then this might be the issue, you might be iniialzing containers in screen1 , when you are displaying screen2 . Also your source code does not contain the complete details of the sub routine calls,so its hard to tell where the issue might be ( possible missing refresh.. )

Thanks,

Venkat.

1 REPLY 1

Former Member
0 Kudos

Hello Dimitris.

  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.

What is Inside PERFORM DISPLAY_ALV_101? , are these routines specific for each subscreen?, then this might be the issue, you might be iniialzing containers in screen1 , when you are displaying screen2 . Also your source code does not contain the complete details of the sub routine calls,so its hard to tell where the issue might be ( possible missing refresh.. )

Thanks,

Venkat.