UI基础四:简单的assign block
经常会有需求让在标准的order加个assign block,那就来简单说一下:
1.创建assign block组件ZXXXXXX
2.添加BTORDER节点和GUID属性
3.创建表视图(可配置,根据情况是否按钮),在表的初始化中DO_INIT_CONTEXT或者DO_PREPARE_OUTPUT中根据GUID带出block信息
METHOD do_init_context.
DATA:gr_order TYPE REF TO if_bol_bo_property_access,
gw_order TYPE crmst_guid_btil,
lr_col TYPE REF TO if_bol_bo_col,
lr_valuenode TYPE REF TO cl_bsp_wd_value_node,
gt_log TYPE TABLE OF zcrm_proce_log,
gw_log LIKE LINE OF gt_log,
gt_text TYPE TABLE OF zdelay_reason,
gw_text LIKE LINE OF gt_text,
gw_struct TYPE zcrms0046,
lr_line TYPE REF TO zcrms0046.
REFRESH:gt_log.
CLEAR:gw_log.
super->do_init_context( ). gr_order = me->typed_context->btorder->collection_wrapper->get_current( ).
IF gr_order IS BOUND.
gr_order->get_properties(
IMPORTING
es_attributes = gw_order ).
SELECT * INTO TABLE gt_log FROM zcrm_proce_log WHERE guid = gw_order-crm_guid.
SELECT * INTO TABLE gt_text FROM zdelay_reason WHERE spras = sy-langu.
SORT gt_text BY estat.
ENDIF.
* SELECT * INTO TABLE gt_log FROM zcrm_proce_log WHERE guid = gw_order-crm_guid.
CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col.
LOOP AT gt_log INTO gw_log.
MOVE-CORRESPONDING gw_log TO gw_struct.
READ TABLE gt_text INTO gw_text WITH KEY estat = gw_log-zzdlyrsn BINARY SEARCH.
IF sy-subrc = .
gw_struct-in_pro_des = gw_text-text.
ENDIF.
CREATE DATA lr_line.
CREATE OBJECT lr_valuenode
EXPORTING
iv_data_ref = lr_line.
lr_valuenode->set_properties( gw_struct ).
lr_col->add( lr_valuenode ).
ENDLOOP. me->typed_context->proce->collection_wrapper->set_collection( lr_col ). ENDMETHOD.
将组件添加InterfaceView 并把BTorder节点添加。
将组件添加到BT116H_SRVO的ComponentUsage
在BT116H_SRVO的组件控制器的WD_USAGE_INITIALIZE的方法中添加GUID节点的映射:
METHOD wd_usage_initialize.
CONSTANTS:
lc_node_name_totals TYPE seocmpname VALUE 'ADDPARENTTOTALS',
lc_komp_name_rel TYPE name_komp VALUE 'PARENTTOTALREL1',
lc_komp_name_total TYPE name_komp VALUE 'PARENTTOTAL1',
lc_rel_name_cumulat TYPE string VALUE 'BTHeaderCumulatExt',
lc_komp_name_cost TYPE string VALUE 'COST_AMOUNT'. DATA:
lr_component_usage TYPE REF TO if_bsp_wd_component_usage,
lr_context_node TYPE REF TO cl_bsp_wd_context_node,
lr_property_access TYPE REF TO if_bol_bo_property_access. CHECK iv_usage IS BOUND. * late instantiation of CuCos for
* component usages CASE iv_usage->usage_name.
WHEN 'CUBTQualif'.
get_custom_controller( 'BT116H_SRVO/CUBTQualifCuCo' ).
WHEN 'CUBTRefObj'.
get_custom_controller( 'BT116H_SRVO/CUBTRefObjCuCo' ).
WHEN 'CUBTOrgSet'.
get_custom_controller( 'BT116H_SRVO/CUBTOrgSetCuCo' ).
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'PARENTNODE' ).
WHEN 'CUBTAmntAll'.
get_custom_controller( 'BT116H_SRVO/CUBTAmntAllCuCo' ).
WHEN 'CUBTDates'.
get_custom_controller( 'BT116H_SRVO/CUBTDatesCuCo' ).
WHEN 'CUGSActions'.
get_custom_controller( 'BT116H_SRVO/CUGSActionsCuCo' ).
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'PARENTNODE' ).
WHEN 'CUGSText'.
get_custom_controller( 'BT116H_SRVO/CUGSTextCuCo' ).
WHEN 'CUBTAcAssign'.
get_custom_controller( 'BT116H_SRVO/CUBTAcAssignCuCo' ).
WHEN 'CUBTStatusUS'.
get_custom_controller( 'BT116H_SRVO/CUBTStatusUSCuCo' ).
WHEN 'CUBTPartner'.
get_custom_controller( 'BT116H_SRVO/CUBTPartnerCuCo' ).
WHEN 'CUBTChangeHistory'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'BTADMINH' ).
WHEN 'CUBTShipping'.
* bind shipping usage
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTORDER' " name of component controller node
iv_node_2_bind = 'BTORDER' ). " name of usage interface node WHEN 'CUBTCounter'.
* bind counter usage
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH' " name of component controller node
iv_node_2_bind = 'BTADMIN' ). " name of usage interface node * custom controller needed for counter link proposal
get_custom_controller( 'BT116H_SRVO/CUBTCounterCuCo' ). iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_target_node_name = 'PROPOSALCOMP' " name of custom controller node
iv_name = 'BT116H_SRVO/CUBTCounterCuCo'
iv_node_2_bind = 'PROPOSALCOMP' ). " name of usage interface node iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_target_node_name = 'PROPOSALPROD' " name of custom controller node
iv_name = 'BT116H_SRVO/CUBTCounterCuCo'
iv_node_2_bind = 'PROPOSALPROD' ). " name of usage interface node WHEN 'CUBTServiceItem'
OR 'CUBTServicePartItem'
OR 'CUBTExpenseItem'
OR 'CUBTToolItem'
OR 'CUBTSalesItem'.
* bind single item component usages
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINI'
iv_node_2_bind = 'BTADMINI' ).
WHEN 'CUBTSalesQuotItem'.
* special binding for sales quotation item
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINI'
iv_node_2_bind = 'BTADMINI' ). iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTITEMS'
iv_node_2_bind = 'BTITEMS' ). WHEN 'CUItemTable' OR 'CUItemTableHeader'.
* bind item table component usages
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTITEMS'
iv_node_2_bind = 'BTITEMS' ). iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINI'
iv_node_2_bind = 'BTADMINI' ). WHEN 'CUGSCMOverview' OR 'CUGSCMEdit'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_name = 'BT116H_SRVO/CUGSCMCuCo'
iv_target_node_name = 'CMBO'
iv_node_2_bind = 'CMBUSOBJ' ). iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_name = 'BT116H_SRVO/CUGSCMCuCo'
iv_target_node_name = 'ATTRIBUTES'
iv_node_2_bind = 'ATTRIBUTES' ). * bind parent node for locking
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH' " name of component controller node
iv_node_2_bind = 'PARENTNODE' ). " name of usage interface node WHEN 'CUGSSurvey'. iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'ADMINH' ). iv_usage->bind_context_node(
iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_target_node_name = 'SURVEYVIEWTITLE'
iv_name = 'BT116H_SRVO/CUGSSurveyCuCo'
iv_node_2_bind = 'SURVEYVIEWTITLE' ). WHEN 'CUBTPayments'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTORDER'
iv_node_2_bind = 'BTORDER' ).
WHEN 'CUGSPrices'. get_custom_controller( 'BT116H_SRVO/CUGSPricesCuCo' ). * bind parent node
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_name = 'BT116H_SRVO/CUGSPricesCuCo'
iv_target_node_name = 'BTADMINH' " name of component controller node
iv_node_2_bind = 'PARENTNODE' ). " name of usage interface node * prepare for display of price totals of header
lr_component_usage = me->get_component_usage( iv_usage->usage_name ).
lr_context_node = lr_component_usage->get_context_node( lc_node_name_totals ).
lr_property_access = lr_context_node->collection_wrapper->get_first( ).
lr_property_access->set_property_as_string( iv_attr_name = lc_komp_name_rel
iv_value = lc_rel_name_cumulat ).
lr_property_access->set_property_as_string( iv_attr_name = lc_komp_name_total
iv_value = lc_komp_name_cost ). * Private Notes
WHEN 'CUPrivNote'.
CALL METHOD iv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_name = 'BT116H_SRVO/CUPrivNoteCuCo' "#EC NOTEXT
iv_target_node_name = 'BOROBJECT' "#EC NOTEXT
iv_node_2_bind = 'BOROBJECT'. "#EC NOTEXT WHEN 'CUBTDocFlow'.
get_custom_controller( 'BT116H_SRVO/CUBTDocFlowCuCo' ).
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'PARENTNODE' ).
WHEN 'CUBTSolution' OR 'CUBTEMail'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'BTADMINH' ). WHEN 'CUGSKnowArtDocFlow'.
get_custom_controller( 'BT116H_SRVO/CUGSDocFlowCuCo' ).
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'PARENTNODE' ).
WHEN 'CUBTCategories'.
get_custom_controller( 'BT116H_SRVO/CUBTCategoriesCuCo' ).
* bind payment cards
WHEN 'CUBTPaycards'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTORDER'
iv_node_2_bind = 'BTORDER' ).
WHEN 'CUBTFollowUp'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'BTADMINH' ). WHEN 'CUCaseLink'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTORDER'
iv_node_2_bind = 'EXTLINKOBJ' ). WHEN 'CUCustomer_H'.
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH'
iv_node_2_bind = 'BTADMINH' ). WHEN 'CUGSProductCatalog'. "#EC NOTEXT
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTITEMS' "#EC NOTEXT
iv_node_2_bind = 'ITEMS' ). "#EC NOTEXT
"ADD BY LY 20170927 肖宇,增加in process 接口日志block
WHEN 'CUZHSI_PROCE'. "#EC NOTEXT
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTORDER' "#EC NOTEXT
iv_node_2_bind = 'BTORDER' ). "#EC NOTEXT
"ADD BY LY 20170927 肖宇,增加in process 接口日志block
WHEN 'ZATTATCH'. "#EC NOTEXT
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTORDER' "#EC NOTEXT
iv_node_2_bind = 'BTORDER' ). "#EC NOTEXT WHEN 'BTSubject'.
get_custom_controller( 'BT116H_SRVO/CuCoSubjectSet' ).
**********************************************************************20161117-Begin
*开发顾问:陈国光
*业务顾问:龚慧文
*1,传数据列表中增加一列字段,当点完Upload按钮后,
*如果上传信息model NO\serial NO\product ID与原有信息不一致,给予黄色警告提示。
*由操作者决定是否继续上传,不上传则修改上传模板
*2、 物流信息日志做成一个assignment block,服务工单、退机订单上可以显示每次物流状态等信息的更新记录;
WHEN 'ZCUZSA_LOGI_INFO'. "#EC NOTEXT
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH' "#EC NOTEXT
iv_node_2_bind = 'BTADMINH' ). "#EC NOTEXT
**********************************************************************20161117-End
**********************************************************************20170117-Begin
*开发顾问:陈国光
*业务顾问:张弛
*FS《HOS_CRM_JP_06_周转机管理增强_V1.0_20170113》
WHEN 'ZCUZSRV_JA_002'. "#EC NOTEXT
iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTADMINH' "#EC NOTEXT
iv_node_2_bind = 'BTADMINH' ). "#EC NOTEXT
********************************************************************** 20170117 -End WHEN OTHERS.
"Detect extension binding
DATA: lv_binding_source TYPE string.
lv_binding_source =
cl_axt_assignment_block_binder=>get_binding_source_4_usage(
iv_usage->usage_name ). IF lv_binding_source IS NOT INITIAL.
CASE lv_binding_source.
WHEN 'HEADER'.
"Bind Extension block
CALL METHOD iv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BTAdminH' " Your node
iv_node_2_bind = 'PARENT'. " Always PARENT ENDCASE.
ELSE.
"No extension table
ENDIF.
ENDCASE.
ENDMETHOD.
在OverView Page中将组件视图添加进来,然后在配置中将组件放出,即可显示。
UI基础四:简单的assign block的更多相关文章
- amaze ui各个模块简单说明
amaze ui各个模块简单说明 导航添加依据 http://amazeui.org/css/ 下面内容属学习笔记,如有理解偏差和错误请留言相告,感谢!* =(官网这块写的很详细) 一.基本样式 1 ...
- iOS开发UI篇—Kvc简单介绍
ios开发UI篇—Kvc简单介绍 一.KVC简单介绍 KVC key valued coding 键值编码 KVC通过键值间接编码 补充: 与KVC相对的时KVO,即key valued observ ...
- Android UI基础之五大布局
Android UI基础之五大布局 Android的界面是有布局和组件协同完成的,布局好比是建筑里的框架,而组件则相当于建筑里的砖瓦.组件按照布局的要求依次排列,就组成了用户所看见的界面.Andro ...
- iOS开发UI基础—手写控件,frame,center和bounds属性
iOS开发UI基础—手写控件,frame,center和bounds属性 一.手写控件 1.手写控件的步骤 (1)使用相应的控件类创建控件对象 (2)设置该控件的各种属性 (3)添加控件到视图中 (4 ...
- day 68 Django基础四之模板系统
Django基础四之模板系统 本节目录 一 语法 二 变量 三 过滤器 四 标签Tags 五 模板继承 六 组件 七 自定义标签和过滤器 八 静态文件相关 一 语法 模板渲染的官方文档 关 ...
- day 54 Django基础四之模板系统
Django基础四之模板系统 本节目录 一 语法 二 变量 三 过滤器 四 标签Tags 五 模板继承 六 组件 七 自定义标签和过滤器 八 静态文件相关 一 语法 模板渲染的官方文档 关于模 ...
- Python全栈开发【基础四】
Python全栈开发[基础四] 本节内容: 匿名函数(lambda) 函数式编程(map,filter,reduce) 文件处理 迭代器 三元表达式 列表解析与生成器表达式 生成器 匿名函数 lamb ...
- 转发-UI基础教程 – 原生App切图的那些事儿
UI基础教程 – 原生App切图的那些事儿 转发:http://www.shejidaren.com/app-ui-cut-and-slice.html 移动APP切图是UI设计必须学会的一项技能,切 ...
- iOS开发UI篇—Modal简单介绍
iOS开发UI篇—Modal简单介绍 一.简单介绍 除了push之外,还有另外一种控制器的切换方式,那就是Modal 任何控制器都能通过Modal的形式展⽰出来 Modal的默认效果:新控制器从屏幕的 ...
随机推荐
- NLog汇总
相关文章 NLog文章系列——系列文章目录以及简要介绍 Elasticsearch,Kibana,Logstash,NLog实现ASP.NET Core 分布式日志系统 ElasticSearch+N ...
- ngnix简介以及如何实现负载均衡原理
1 负载均衡 先来简单了解一下什么是负载均衡,单从字面上的意思来理解就可以解释N台服务器平均分担负载,不会因为某台服务器负载高宕机而某台服务器闲置的情况.那么负载均衡的前提就是要有多台服务器才能实现, ...
- Linux命令之du命令
du命令 显示文件或目录所占用的磁盘空间. 命令格式: du [option] 文件/目录 -h 输出文件系统分区使用的情况,例如:10KB,10MB,10GB等 -s 显示文件或整个目录的大小,默认 ...
- Jmeter工具
开源,纯java,用于HTTP协议性能测试,接口协议测试工具,自动化测试工具 功能测试角度: 1.支持多种不同类型的协议.接口协议有多种 2.可以全面支持HTTP协议(后台交互) 3.其他非直接支持的 ...
- VS 编译后 install报错(error MSB3073)
vs编译出现如下错误: 错误 1 error MSB3073: 命令"setlocal H:\PCL_BACKUP\PCL\CMake\bin\cmake.exe -DBUILD_TYPE= ...
- 小程序之map地图上不能在覆盖层
问题:页面上有一个地图功能,地图上面有两个按钮,是需要覆盖在地图上的,在小程序编辑器中显示是没问题的,但是扫码测试后发现在手机上不显示这两个按钮 解决方法:使用cover-viwe标签包裹一下就可以了
- P1262 间谍网络
传送门 思路: ①在 Tarjan 的基础上加一个 belong 记录每个点属于哪个强连通分量. ②存图完成后,暴力地遍历全图,查找是否要间谍不愿受贿. inline void dfs(int u) ...
- java进程占用系统内存高,排查解决
转自:http://blog.51cto.com/chengxiaobai/2052530?cid=695076 故障:最近收到生产服务器的报警短信以及邮件,报警内容为:内存使用率高于70%. 使用t ...
- CentOS7下搭建LAMP+FreeRadius+Daloradius Web管理
注意:本文所有命令均在root命令下执行. freeradius服务官网:http://freeradius.org/ daloradius Web管理页面官网:https://sourceforge ...
- PHP里获取一维数组里的最大值和最小值
<?php $arr = ['10','100','50','90','2','5']; $min = min($arr); $max = max($arr); echo $min.PHP_EO ...