TREE三:RS_TREE_LIST_DISPLAY

TREE三:RS_TREE_LIST_DISPLAY


这种效果

主要参数:
       wa_node - type         "类型
        wa_node - tlevel       "层次
        wa_node - name  
        wa_node - text  

REPORT  zlm_tree4 .

*Data declaration for additional node information
DATA t_node  TYPE snodetext .
*Internal table and wa decl for nodes
DATA it_node  LIKE  TABLE  OF t_node  INITIAL  SIZE  0 ,
              wa_node  LIKE t_node .

CLEAR it_node[] , wa_node .
wa_node - type  'T' .                    "第一个
wa_node - id    'T1' .
wa_node -name  '天朝' .
wa_node -tlevel  1 .                    "层次一
wa_node -nlength  '15' .
wa_node - color  '4' .
wa_node - text  '天朝' .
wa_node -tlength  = '20' .
wa_node -tcolor  3 .
APPEND wa_node  TO it_node .

CLEAR wa_node .
wa_node - type  'P' .
wa_node - id    'T2' .
wa_node -name  '北京' .
wa_node -tlevel  2 .                   "层次二
wa_node -nlength  '8' .
wa_node - color  '1' .
wa_node - text  '北京' .
wa_node -tlength  = '20' .
wa_node -tcolor  4 .
APPEND wa_node  TO it_node .
CLEAR wa_node .

CLEAR wa_node .
wa_node - type  'P' .
wa_node - id    'T32' .
wa_node -name  '京温' .
wa_node -tlevel  3 .                   "层次三
wa_node -nlength  '8' .
wa_node - color  '1' .
wa_node - text  ' 上坟烧报纸 --你糊弄鬼啊!  ' .
wa_node -tlength  = '20' .
wa_node -tcolor  4 .
APPEND wa_node  TO it_node .
CLEAR wa_node .


*Fm for constructing the tree
CALL  FUNCTION  'RS_TREE_CONSTRUCT'
    TABLES
        nodetab  it_node .

*FM for displaying the tree
CALL  FUNCTION  'RS_TREE_LIST_DISPLAY'
    EXPORTING
        callback_program          sy -repid
        check_duplicate_name  '1'
        color_of_node                '4'
        color_of_mark                '3'
        color_of_link                '1'
        color_of_match              '5'
        node_length                    30
        text_length                    75
        use_control                    'L' .
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值