您的位置:首页 > 数据库 > MySQL

Mysql――数据定义

2015-10-09 19:56 405 查看
BCALV_GRID_DND_TREE ALV Grid: Drag and Drop with ALV Tree
BCALV_GRID_DND_TREE_SIMPLE ALV GRID: Drag and drop with ALV tree (simple)
BCALV_TEST_COLUMN_TREE Program BCALV_TEST_COLUMN_TREE
BCALV_TEST_SIMPLE_TREE Program BCALV_TEST_SIMPLE_TREE
BCALV_TREE_01 ALV Tree Control: Build Up the Hierarchy Tree
BCALV_TREE_02 ALV Tree Control: Event Handling
BCALV_TREE_03 ALV Tree Control: Use an Own Context Menu
BCALV_TREE_04 ALV Tree Control: Add a Button to the Toolbar
BCALV_TREE_05 ALV Tree Control: Add a Menu to the Toolbar
BCALV_TREE_06 ALV tree control: Icon column and icon for nodes/items
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_DND ALV tree control: Drag & Drop within a hierarchy tree
BCALV_TREE_DND_MULTIPLE ALV tree control: Drag & Drop within a hierarchy tree
BCALV_TREE_EVENT_RECEIVER Include BCALV_TREE_EVENT_RECEIVER
BCALV_TREE_EVENT_RECEIVER01
BCALV_TREE_ITEMLAYOUT ALV Tree: Change Item Layouts at Runtime
BCALV_TREE_MOVE_NODE_TEST Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO Program BCALV_TREE_SIMPLE_DEMO
BCALV_TREE_VERIFY Verifier for ALV Tree and Simple ALV Tree
BCALV_GRID_DND_TREE ALV Grid: Drag and Drop with ALV Tree
BCALV_GRID_DND_TREE_SIMPLE ALV GRID: Drag and drop with ALV tree (simple)

 

Example Steps.

FORM create_and_init_tree .
  DATA: lr_container TYPE REF TO cl_gui_container.
  DATA: l_hierarchy_header TYPE treev_hhdr,
        ls_variant TYPE disvariant.

*$1. Get container for ALV tree control
  lr_container = cl_gui_container=>screen0.

*$2. Create ALV tree control
  CREATE OBJECT gr_tree
    EXPORTING
      parent              = lr_container
      node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
      item_selection      = 'X'
      no_html_header      = 'X'
      no_toolbar          = ' '
    EXCEPTIONS
      cntl_system_error   = 1
      create_error        = 2
      failed              = 3
      illegal_column_name = 4
      lifetime_error      = 5.

  IF sy-subrc EQ 0.
*§3. Create Hierarchy-header
    PERFORM build_hierarchy_header CHANGING l_hierarchy_header.
*$4. Build field catelog
    PERFORM build_fieldcat.
*   report id for saving variants
    ls_variant-report = sy-repid.
*§5. Create empty Tree Control
    CALL METHOD gr_tree->set_table_for_first_display
      EXPORTING
        is_hierarchy_header = l_hierarchy_header
        i_save              = 'A'
        is_variant          = ls_variant
      CHANGING
        it_outtab           = gt_data_empty "table must be empty !
        it_fieldcatalog     = gt_fldcat.
*§6. Create hierarchy (nodes and leaves)
    PERFORM create_hierarchy.
*$7. register events
*    PERFORM register_events.
*§8. Send data to frontend.
    CALL METHOD gr_tree->frontend_update.
  ENDIF.
  CALL METHOD cl_gui_cfw=>flush.
ENDFORM.                    " CREATE_AND_INIT_TREE
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: