*&---------------------------------------------------------------------*
*& Report Z_TEMP_DEMO5
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT z_temp_demo5.
DATA: ok_code LIKE sy-ucomm,
save_ok LIKE ok_code,
container_bar TYPE REF TO cl_gui_container_bar,
dock_container TYPE REF TO cl_gui_docking_container,
text_edit TYPE REF TO cl_gui_textedit,
cell_container TYPE REF TO cl_gui_container,
grid TYPE REF TO cl_gui_alv_grid.
DATA: captions TYPE sbptcaptns,
captions2 LIKE captions,
caption LIKE LINE OF captions.
DATA: itab TYPE TABLE OF zstudent.
START-OF-SELECTION.
SELECT * FROM zstudent INTO TABLE itab.
caption-caption = ' Singel'.
caption-icon = .
APPEND caption TO captions.
caption-caption = ' Lee'.
caption-icon = .
APPEND caption TO captions.
caption-caption = ' Eason'.
caption-icon = .
APPEND caption TO captions.
caption-caption = ' Course'.
caption-icon = .
APPEND caption TO captions2.
caption-caption = ' Score'.
caption-icon = .
APPEND caption TO captions2.
CALL SCREEN 9000.
*&---------------------------------------------------------------------*
*& Module STATUS_9000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_9000 OUTPUT.
SET PF-STATUS 'STATUS_9000'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_9000 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
*& Module init_container OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE init_container OUTPUT.
IF dock_container IS INITIAL.
CREATE OBJECT dock_container
EXPORTING
extension = 300
.
CREATE OBJECT container_bar
EXPORTING
active_id = 2
captions = captions
parent = dock_container .
CALL METHOD container_bar->get_container
EXPORTING
id = 1
RECEIVING
container = cell_container.
CREATE OBJECT text_edit
EXPORTING
parent = cell_container .
CALL METHOD container_bar->get_container
EXPORTING
id = 2
RECEIVING
container = cell_container.
CREATE OBJECT grid
EXPORTING
i_parent = cell_container .
CALL METHOD grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'ZSTUDENT'
CHANGING
it_outtab = itab
.
ENDIF.
ENDMODULE. " init_container OUTPUT
阅读(982) | 评论(0) | 转发(0) |