文本成果2015培训17.tabletree-recursive node_第1页
文本成果2015培训17.tabletree-recursive node_第2页
文本成果2015培训17.tabletree-recursive node_第3页
免费预览已结束,剩余4页可下载查看

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、案例十七: Table:Treetable(TreeByKeyTableColumn)-Recursive Node一:需求Table 中进行如下的显示:1Edison_tc Tang canMSN:edi二:实现1. Context其中,一个recursive node 重用Destination 这一个节点。2. UI只需要看 这个 master column2Edison_tc Tang canMSN:edi同 byKeyTableColumn,绑定好 children, expanded, isLeaf。同时,这里,的 T1 显示为Destination 的 text3Edison_t

2、c Tang canMSN:edi3. Init:初始状态,第一层4Edison_tc Tang canMSN:edimethod WDNIT .DATA lt_connectionsTYPEnet310_t_con. DATA ls_connectionsTYPEnet310_s_con.DATA lo_nd_destination TYPE REF TO if_wd_context_node. DATA lo_el_destination TYPE REF TO if_wd_context_element. DATA lo_nd_connection TYPE REF TO if_wd_c

3、ontext_node.DATA ls_destination TYPE wd_this-element_destination. DATA lt_connection TYPE wd_this-elements_connection. DATA ls_connection TYPE wd_this-element_connection.* read related connections clear:ls_connections. ls_connections-CITYFROM = FC-1. ls_connections-CITYTO = TC-1. ls_connections-CARR

4、ID = CAID-1. ls_connections-CONNID = COID-1.append ls_connections to lt_connections. clear:ls_connections.ls_connections-CITYFROM = FC-1. ls_connections-CITYTO = TC-1. ls_connections-CARRID = CAID-2. ls_connections-CONNID = COID-2. append ls_connections to lt_connections. clear:ls_connections.ls_con

5、nections-CITYFROM = FC-1.它的效果就是:3.第二层第三层,以及多层5Edison_tc Tang canMSN:edi参数CONTEXT_ELEMENTimportingIF_WD_CONTEXT_ELEMENT method ONACTIONLOAD_DESTINATIONS .ls_connections-CITYTO = TC-2. ls_connections-CARRID = CAID-1. ls_connections-CONNID = COID-1. append ls_connections to lt_connections. clear:ls_con

6、nections.ls_connections-CITYFROM = FC-1. ls_connections-CITYTO = TC-3. ls_connections-CARRID = CAID-1. ls_connections-CONNID = COID-1. append ls_connections to lt_connections.get reference to context node DESTINATIONlo_nd_destination=wd_context-get_child_node(wd_this-wdctx_destination ).define nodes

7、 and related itemsLOOPt_connectionsO ls_connections.IF ls_connections-cityto ls_destination-text. ls_destination-text = ls_connections-cityto.lo_el_destination=lo_nd_destination-bind_structure(new_item= ls_destinationset_initial_elements = abap_false ).lo_nd_connection=lo_el_destination-get_child_no

8、de(wd_this-wdctx_connection ).CLEAR lt_connection.ENDIF.CONCATENAs_connections-carrid ls_connections-connid O ls_connection-text SEPARATED BY space.lo_nd_connection-bind_structure( new_item= ls_connectionset_initial_elements = abap_false ).ENDLOOP.endmethod.6Edison_tc Tang canMSN:ediDATA lt_connecti

9、onsTYPEnet310_t_con. DATA ls_connectionsTYPEnet310_s_con.DATA lo_nd_destination_next TYPE REF TO if_wd_context_node. DATA lo_el_destination_next TYPE REF TO if_wd_context_element. DATA lo_nd_connectionTYPE REF TO if_wd_context_node.DATAls_destination_nextTYPEwd_this-element_destination_next.DATA lv_

10、cityfromTYPEs_city.DATA lt_connectionTYPEwd_this-elements_connection. DATA ls_connectionTYPEwd_this-element_connection.get selected destination city. This will be the departure city for the next connectioncontext_element-get_attribute( EXPORTING name = TEXTIMPORTING value = lv_cityfrom ).read relate

11、d connections for this departure city case lv_cityfrom.* 2nd levelWHEN TC-1.clear:ls_connections. ls_connections-CITYFROM = TC-1.ls_connections-CITYTO = TC-1-SUB1. ls_connections-CARRID = TC-1-SUB1-CAID-1. ls_connections-CONNID = TC-1-SUB1-COID-1. append ls_connections to lt_connections. clear:ls_co

12、nnections.ls_connections-CITYFROM = TC-1. ls_connections-CITYTO = TC-1-SUB1. ls_connections-CARRID = TC-1-SUB1-CAID-2. ls_connections-CONNID = TC-1-SUB1-COID-2. append ls_connections to lt_connections. clear:ls_connections.ls_connections-CITYFROM = TC-1. ls_connections-CITYTO = TC-1-SUB2. ls_connect

13、ions-CARRID = CAID-1. ls_connections-CONNID = COID-1. append ls_connections to lt_connections.WHEN TC-2.clear:ls_connections. ls_connections-CITYFROM = TC-2.ls_connections-CITYTO = TC-2-SUB1. ls_connections-CARRID = CAID-1. ls_connections-CONNID = COID-1. append ls_connections to lt_connections. cle

14、ar:ls_connections.ls_connections-CITYFROM = TC-2. ls_connections-CITYTO = TC-2-SUB2. ls_connections-CARRID = CAID-1. ls_connections-CONNID = COID-1. append ls_connections to lt_connections.WHEN TC-3.clear:ls_connections. ls_connections-CITYFROM = TC-3.ls_connections-CITYTO = TC-3-SUB1. ls_connection

15、s-CARRID = CAID-1. ls_connections-CONNID = COID-1. append ls_connections to lt_connections. clear:ls_connections.ls_connections-CITYFROM = TC-3. ls_connections-CITYTO = TC-3-SUB2. ls_connections-CARRID = CAID-1. ls_connections-CONNID = COID-1.7Edison_tc Tang canMSN:ediappend ls_connections to lt_con

16、nections.* 3rd levelWHEN TC-3-SUB2.clear:ls_connections.ls_connections-CITYFROM = TC-3-SUB2. ls_connections-CITYTO = TC-3-SUB2-sub1. ls_connections-CARRID = CAID-1. ls_connections-CONNID = COID-1.append ls_connections to lt_connections. clear:ls_connections.ls_connections-CITYFROM = TC-3-SUB2. ls_co

17、nnections-CITYTO = TC-3-SUB2-sub2. ls_connections-CARRID = CAID-2. ls_connections-CONNID = COID-2.append ls_connections to lt_connections. endcase.*get reference to context node DESTINATION_NEXTsince this is a recurnode, it can be created multiple times in multiple levelsif this node has not been cr

18、eated yet, it will be created automatically by the frameworkthe componenterface does not contain a constant with the nodes name!lo_nd_destination_next=context_element-get_child_node( DESTINATION_NEXT ).*define nodes and related itemsLOOPt_connectionsO ls_connections.IF ls_connections-cityto ls_destination_next-text. ls_dest

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论