付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年上海立达学院单招职业倾向性考试题库附答案详解(b卷)
- 2026年云南水利水电职业学院单招职业适应性测试题库附参考答案详解(基础题)
- 2026年中国计量大学单招综合素质考试题库附参考答案详解(研优卷)
- 2026年三亚航空旅游职业学院单招职业倾向性测试题库带答案详解(轻巧夺冠)
- 2026年上海海事大学单招综合素质考试题库附答案详解(预热题)
- 2026年仙桃职业学院单招职业技能测试题库附答案详解(b卷)
- 2026年上海兴伟学院单招综合素质考试题库附答案详解(黄金题型)
- 2026年上海中侨职业技术大学单招职业技能测试题库附答案详解(基础题)
- 2026年上饶卫生健康职业学院单招职业倾向性测试题库附答案详解(达标题)
- 2026年上海应用技术大学单招职业技能测试题库附答案详解(黄金题型)
- 2026年江西信息应用职业技术学院单招职业技能考试题库附答案详解
- 护苗.网络安全系列课件
- 皮肤瘙痒症状病因诊断筛查
- 多智能体深度强化学习通信机制综述
- 《康养政策法规与标准》健康与养老服务管理专业全套教学课件
- 2025年中国移动咪咕公司招聘考试试题及解析集
- 2025年山西省教师职称考试(理论知识)复习题及答案(新课标)-山西教师
- 管晏列传教学课件
- 动态排程算法研究-洞察阐释
- 销售流程管理制度模板
- 2025年高考英语复习知识清单(全国)专题45 应用文写作11组34个满分句式68个真题例句 (讲案)解析版
评论
0/150
提交评论