ALV

来源:互联网 发布:中学生网络方式挣钱 编辑:程序博客网 时间:2024/04/30 10:21

 The detail website: http://help.sap.com/saphelp_470/helpdata/en/0a/b552f7d30911d2b467006094192fe3/frameset.htm

The basic design flow as below:

--> declare some variable: (DATA: grid TYPE REF TO cl_gui_alv_grid,
      g_custom_container TYPE REF TO cl_gui_custom_container
      gt_sflight TYPE TABLE OF sflight.)

-->create  ascreen and name it with Z_custom

--> in the PBO module code: (

IF g_custom_container IS INITIAL.

    CREATE OBJECT g_custom_container
       EXPORTING
          CONTAINER_NAME = 'CCCONTAINER'.

    CREATE OBJECT GRID1
       EXPORTING
         I_PARENT = g_custom_container.

ENDIF

-->Fill the internal table with data:

CALL METHOD grid->set_table_for_first_display
             EXPORTING I_STRUCTURE_NAME = 'SFLIGHT'
             CHANGING IT_OUTTAB = gt_sflight.


SELECT * FROM sflight INTO TABLE gt_sflight.

Pass the output table and the structure data to the ALV Grid Control. Again, ensure to call this method only once after the ALV Grid Control is created:

原创粉丝点击