Chinaunix首页 | 论坛 | 博客
  • 博客访问: 202897
  • 博文数量: 49
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 520
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-24 09:35
文章分类

全部博文(49)

文章存档

2008年(49)

我的朋友

分类:

2008-05-07 18:12:53

*&---------------------------------------------------------------------*
*& 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) |
给主人留下些什么吧!~~