Code: Alles auswählen.
REPORT zss_test3 .
TYPE-POOLS: slis.
DATA: itab TYPE STANDARD TABLE OF t000 WITH NON-UNIQUE DEFAULT KEY,
repid TYPE syrepid.
END-OF-SELECTION.
repid = sy-repid.
SELECT *
INTO TABLE itab
FROM t000.
PERFORM display.
*&---------------------------------------------------------------------*
*& Form display
*&---------------------------------------------------------------------*
FORM display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
i_callback_user_command = 'ALV_USER_COMMAND'
i_structure_name = 'T000'
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " display
*---------------------------------------------------------------------*
* FORM alv_user_command *
*---------------------------------------------------------------------*
FORM alv_user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* ... Blätterfunktionen
PERFORM display.
rs_selfield-exit = 'X'.
ENDFORM.
Code: Alles auswählen.
REPORT zss_test3 .
TYPE-POOLS: slis.
DATA: itab TYPE STANDARD TABLE OF t000
WITH NON-UNIQUE DEFAULT KEY,
repid TYPE syrepid,
g_blaettern(1) TYPE c.
END-OF-SELECTION.
repid = sy-repid.
SELECT *
INTO TABLE itab
FROM t000.
DO.
CLEAR g_blaettern.
PERFORM display.
IF g_blaettern IS INITIAL.
* Exit ausgelöst nicht durch Blättern sondern "normal" durch ALV
EXIT.
ENDIF.
ENDDO.
*&---------------------------------------------------------------------*
*& Form display
*&---------------------------------------------------------------------*
FORM display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
i_callback_user_command = 'ALV_USER_COMMAND'
i_structure_name = 'T000'
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " display
*---------------------------------------------------------------------*
* FORM alv_user_command *
*---------------------------------------------------------------------*
FORM alv_user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Blättern soll zum Neuaufbau führen
* Dazu erstmal den aktuellen Grid abschließen
rs_selfield-exit = 'X'.
* Und der DO-Schleife mitteilen, dass nochmal prozessiert werden soll
g_blaettern = 'X'.
ENDFORM.