BP搜索帮助,调用BP_HEAD_SEARCH组件
1.BP类字段,GET V方法:
METHOD get_v_zhsi0cnn.
CREATE OBJECT rv_valuehelp_descriptor
TYPE
cl_bsp_wd_valuehelp_navdescr
EXPORTING
iv_outbound_plug = 'OP_ZHSI0CNN'.
ENDMETHOD.
2.外向插件OP_ZHSI0CNN
METHOD op_zhsi0cnn.
* Added by wizard: Outbound plug 'ZHSI0CNN'
bp_account_search( iv_role = 'ZHSI0CNN' ).
ENDMETHOD.
3.SEARCH PARAMETER SET & OPEN search certi
METHOD bp_account_search.
* only used for account search - Employee and Contact have separate search DATA : lv_title TYPE string,
lv_eventname TYPE string,
lr_qs TYPE REF TO cl_crm_bol_dquery_service,
lr_current TYPE REF TO cl_crm_bol_entity,
lr_col TYPE REF TO if_bol_bo_col,
lr_context TYPE REF TO cl_bsp_wd_context_node,
lv_empresp TYPE string,
lv_collection TYPE REF TO if_bol_bo_col,
lr_btpartnerset TYPE REF TO cl_crm_bol_entity,
lr_btpartner TYPE REF TO cl_crm_bol_entity,
lr_partnerset_ctxt TYPE REF TO cl_crm_uiu_btpartnerset_cn.
DATA: lv_low TYPE string.
DATA: ls_selection TYPE genilt_selection_parameter,
lr_valuenode TYPE REF TO cl_bsp_wd_value_node,
lr_ref_any TYPE REF TO data. FIELD-SYMBOLS: <lv_context_node> TYPE any,
<lv_partnerset_context_node> TYPE any.
DATA: lr_param TYPE REF TO if_bol_bo_property_access,
lr_iterator TYPE REF TO if_bol_bo_col_iterator,
lt_params TYPE genilt_selection_parameter_tab.
DATA: ls_general TYPE zcorder_general. DATA lv_sales_org TYPE crmt_sales_org.
DATA lv_land TYPE land1."当前账号所属国家
CALL FUNCTION 'Z_GET_SALESORG_BY_USER'
EXPORTING
iv_user = sy-uname
IMPORTING
ev_country = lv_land. lr_current ?= me->typed_context->zcorder->collection_wrapper->get_current( ).
lr_current->get_properties( IMPORTING es_attributes = ls_general ). CASE iv_role.
WHEN 'SOLDTO'.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/PARTNER_SEARCH' ).
IF bpsearch_account_popup IS NOT BOUND.
bpsearch_account_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'SearchHelpWindow' "#EC NOTEXT
iv_usage_name = 'CUBPSearchAccount'
iv_title = lv_title ).
ENDIF. * set display mode
bpsearch_account_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
* Open the Popup
bpsearch_account_popup->open( iv_inbound_plug = 'CLEAR_ALL' ). * Role dependand Event
CONCATENATE 'SEL' iv_role INTO lv_eventname.
bpsearch_account_popup->set_on_close_event( iv_view = me iv_event_name = lv_eventname ).
* Get Query Context node
lr_context = bpsearch_account_popup->get_context_node( 'SEARCH' ).
CHECK lr_context IS BOUND.
* Get DQuery object to add search parameter
lr_qs ?= lr_context->collection_wrapper->get_current( ).
CHECK lr_qs IS BOUND.
lr_col = lr_qs->get_selection_params( ).
IF iv_role = 'SERPR' OR iv_role = 'RELAIER' OR iv_role = 'SOLDTO'.
CASE iv_role.
WHEN 'SERPR'.
lv_low = 'Z003'.
ls_selection-attr_name = 'ZBP_GROUP'.
ls_selection-sign = 'I'.
ls_selection-option = 'EQ'.
ls_selection-low = lv_low .
GET REFERENCE OF ls_selection INTO lr_ref_any.
CREATE OBJECT lr_valuenode
TYPE
cl_bsp_wd_value_node
EXPORTING
iv_data_ref = lr_ref_any.
lr_col->add( lr_valuenode ).
WHEN 'RELAIER'.
lv_low = 'Z005'.
ls_selection-attr_name = 'ZBP_GROUP'.
ls_selection-sign = 'I'.
ls_selection-option = 'EQ'.
ls_selection-low = lv_low .
GET REFERENCE OF ls_selection INTO lr_ref_any.
CREATE OBJECT lr_valuenode
TYPE
cl_bsp_wd_value_node
EXPORTING
iv_data_ref = lr_ref_any.
lr_col->add( lr_valuenode ).
WHEN 'SOLDTO'.
IF sy-langu = 'J'."ADD BY LY 20170328
lr_qs->add_selection_param( iv_attr_name = 'COUNTRY'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'JP' ).
ENDIF. ENDCASE.
ENDIF. bpsearch_account_popup->open( iv_inbound_plug = 'CLEAR_ALL'
iv_collection = lr_col ).
WHEN 'SERPR'. lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/PARTNER_SEARCH' ).
IF bpsearch_account_popup1 IS NOT BOUND.
bpsearch_account_popup1 = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'SearchHelpWindow' "#EC NOTEXT
iv_usage_name = 'CUBPSearchAccount'
iv_title = lv_title ).
ENDIF. * set display mode
bpsearch_account_popup1->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
* Open the Popup
bpsearch_account_popup1->open( iv_inbound_plug = 'CLEAR_ALL' ). * Role dependand Event
CONCATENATE 'SEL' iv_role INTO lv_eventname.
bpsearch_account_popup1->set_on_close_event( iv_view = me iv_event_name = lv_eventname ).
* Get Query Context node
lr_context = bpsearch_account_popup1->get_context_node( 'SEARCH' ).
CHECK lr_context IS BOUND.
* Get DQuery object to add search parameter
lr_qs ?= lr_context->collection_wrapper->get_current( ).
CHECK lr_qs IS BOUND.
lr_current ?= me->typed_context->zcorder->collection_wrapper->get_current( ).
lr_current->get_properties( IMPORTING es_attributes = ls_general ).
lv_low = ls_general-sales_org.
lr_qs->add_selection_param( iv_attr_name = 'ZSALES_ORG'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lv_low ). lr_qs->add_selection_param( iv_attr_name = 'ZBP_GROUP'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z003' ).
lr_col = lr_qs->get_selection_params( ).
lr_iterator = lr_col->get_iterator( ).
lr_param = lr_iterator->get_first( ).
WHILE lr_param IS BOUND.
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'ZBP_GROUP' AND ls_selection-low IS INITIAL.
lr_col->remove( lr_param ).
EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE.
lr_param = lr_iterator->get_first( ).
WHILE lr_param IS BOUND.
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'ZSALES_ORG' AND ls_selection-low IS INITIAL.
lr_col->remove( lr_param ).
EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE.
bpsearch_account_popup1->open( iv_inbound_plug = 'CLEAR_ALL'
iv_collection = lr_col ).
WHEN 'RELAIER' OR 'CONSIGNOR'.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/PARTNER_SEARCH' ).
IF bpsearch_account_popup2 IS NOT BOUND.
bpsearch_account_popup2 = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'SearchHelpWindow' "#EC NOTEXT
iv_usage_name = 'CUBPSearchAccount'
iv_title = lv_title ).
ENDIF. * set display mode
bpsearch_account_popup2->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
* Open the Popup
bpsearch_account_popup2->open( iv_inbound_plug = 'CLEAR_ALL' ).
* Role dependand Event
CONCATENATE 'SEL' iv_role INTO lv_eventname.
bpsearch_account_popup2->set_on_close_event( iv_view = me iv_event_name = lv_eventname ).
* Get Query Context node
lr_context = bpsearch_account_popup2->get_context_node( 'SEARCH' ).
CHECK lr_context IS BOUND.
* Get DQuery object to add search parameter
lr_qs ?= lr_context->collection_wrapper->get_current( ).
CHECK lr_qs IS BOUND. *********add by dq-yuw 南非retailer 分组为z006
IF lv_land EQ 'ZA' OR ls_general-country EQ 'ZA'.. lr_qs->add_selection_param( iv_attr_name = 'PARTNER'
iv_sign = 'I'
iv_option = 'SW'
iv_low = '' ).
ELSE.
lr_qs->add_selection_param( iv_attr_name = 'ZBP_GROUP'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z005' ).
IF iv_role = 'CONSIGNOR'.
lr_qs->add_selection_param( iv_attr_name = 'ZBP_GROUP'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z006' ).
ENDIF.
ENDIF.
****************end add
IF sy-langu = 'J'."ADD BY LY 20170328
lr_qs->add_selection_param( iv_attr_name = 'COUNTRY'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'JP' ).
ENDIF. lr_current ?= me->typed_context->zcorder->collection_wrapper->get_current( ).
lr_current->get_properties( IMPORTING es_attributes = ls_general ).
lv_low = ls_general-sales_org.
lr_qs->add_selection_param( iv_attr_name = 'ZSALES_ORG'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lv_low ).
lr_col = lr_qs->get_selection_params( ).
lr_iterator = lr_col->get_iterator( ).
lr_param = lr_iterator->get_first( ).
WHILE lr_param IS BOUND.
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'ZBP_GROUP' AND ls_selection-low IS INITIAL.
lr_col->remove( lr_param ).
EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE.
lr_param = lr_iterator->get_first( ).
WHILE lr_param IS BOUND.
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'ZSALES_ORG' AND ls_selection-low IS INITIAL.
lr_col->remove( lr_param ).
EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE.
WHILE lr_param IS BOUND.
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'COUNTRY' AND ls_selection-low IS INITIAL.
lr_col->remove( lr_param ).
* EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE.
bpsearch_account_popup2->open( iv_inbound_plug = 'CLEAR_ALL'
iv_collection = lr_col ). WHEN 'NETWORK' OR 'ZHSI0CNN'.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/PARTNER_SEARCH' ).
IF bpsearch_account_popup2 IS NOT BOUND.
bpsearch_account_popup2 = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'SearchHelpWindow' "#EC NOTEXT
iv_usage_name = 'CUBPSearchAccount'
iv_title = lv_title ).
ENDIF. * set display mode
bpsearch_account_popup2->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
* Open the Popup
bpsearch_account_popup2->open( iv_inbound_plug = 'CLEAR_ALL' ).
* Role dependand Event
CONCATENATE 'SEL' iv_role INTO lv_eventname.
bpsearch_account_popup2->set_on_close_event( iv_view = me iv_event_name = lv_eventname ).
* Get Query Context node
lr_context = bpsearch_account_popup2->get_context_node( 'SEARCH' ).
CHECK lr_context IS BOUND.
* Get DQuery object to add search parameter
lr_qs ?= lr_context->collection_wrapper->get_current( ).
CHECK lr_qs IS BOUND.
IF sy-langu = 'J'."ADD BY LY 20170328
lr_qs->add_selection_param( iv_attr_name = 'COUNTRY'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'JP' ).
ENDIF. lr_qs->add_selection_param( iv_attr_name = 'ZBP_GROUP'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z010' ). lr_col = lr_qs->get_selection_params( ).
lr_iterator = lr_col->get_iterator( ).
lr_param = lr_iterator->get_first( ).
WHILE lr_param IS BOUND.
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'ZBP_GROUP' AND ls_selection-low IS INITIAL.
lr_col->remove( lr_param ).
EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE. bpsearch_account_popup2->open( iv_inbound_plug = 'CLEAR_ALL'
iv_collection = lr_col ).
WHEN 'LOGICAL'.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/PARTNER_SEARCH' ).
IF bpsearch_account_popup IS NOT BOUND.
bpsearch_account_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = 'SearchHelpWindow' "#EC NOTEXT
iv_usage_name = 'CUBPSearchAccount'
iv_title = lv_title ).
ENDIF. * set display mode
bpsearch_account_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
* Open the Popup
bpsearch_account_popup->open( iv_inbound_plug = 'CLEAR_ALL' ).
* Role dependand Event
CONCATENATE 'SEL' iv_role INTO lv_eventname.
bpsearch_account_popup->set_on_close_event( iv_view = me iv_event_name = lv_eventname ).
* Get Query Context node
lr_context = bpsearch_account_popup->get_context_node( 'SEARCH' ).
CHECK lr_context IS BOUND.
* Get DQuery object to add search parameter
lr_qs ?= lr_context->collection_wrapper->get_current( ).
CHECK lr_qs IS BOUND. lr_qs->add_selection_param( iv_attr_name = 'ZBP_GROUP'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = 'Z003' ).
lr_current ?= me->typed_context->zcorder->collection_wrapper->get_current( ).
lr_current->get_properties( IMPORTING es_attributes = ls_general ).
lv_low = ls_general-sales_org.
IF lv_low IS NOT INITIAL.
lr_qs->add_selection_param( iv_attr_name = 'ZSALES_ORG'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lv_low ).
ENDIF. lv_low = ls_general-country.
IF lv_low IS NOT INITIAL.
lr_qs->add_selection_param( iv_attr_name = 'COUNTRY'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lv_low ).
ENDIF.
bpsearch_account_popup->open( iv_inbound_plug = 'CLEAR_ALL'
iv_collection = lr_col ).
ENDCASE. ENDMETHOD.
4.ComponentUsages导入
BP搜索帮助,调用BP_HEAD_SEARCH组件的更多相关文章
- react typescript 子组件调用父组件
//父组件 import * as React from 'react'import { Input } from 'antd'const Search = Input.Searchimport &q ...
- Titanium中调用ios组件时语言不是本地化的解决方法
用Titanium开发的ios应用中,当调用系统组件时,尽管手机已经设置了系统语言为中文,但那些组件的界面却仍为英文.比如调用iphone中的相册组件,其界面为: 那么怎么让它跟系统语言保持一致呢? ...
- VS2010调用Com组件
Com组件开发过程中用的不多,资料也不多,故记录开发Com组件中的部分问题. 在这一篇文章里,讲解了如何使用VS2010创建Com组件.现在基于该文章创建的Com组件接口,创建VC++项目来调用该接口 ...
- VC中调用COM组件的方法(转载)
原文参考:http://hi.baidu.com/mingyueye/item/53ebecd44da76917d80e4449 总结一下在VC中调用COM组件的方法 准备及条件: COM服务器为进程 ...
- .NET通过调用Office组件导出Word文档
.NET通过调用Office组件导出Word文档 最近做项目需要实现一个客户端下载word表格的功能,该功能是用户点击"下载表格",服务端将该用户的数据查询出来并生成数据到Word ...
- 服务器端调用Word组件读取Word权限、未将对象引用到对象实例终极解决方案
最近因为业务需要,需要在服务器上调用Word组件,结果遇到各种问题,比如检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败 ...
- vc中调用Com组件的方法详解
vc中调用Com组件的方法详解 转载自:网络,来源未知,如有知晓者请告知我.需求:1.创建myCom.dll,该COM只有一个组件,两个接口: IGetRes--方法Hello(), IGet ...
- Asp.Net调用Office组件操作时的DCOM配置 (转)
Asp.Net调用Office组件操作时的DCOM配置 http://blog.csdn.net/gz775/article/details/6447758 在项目中将数据导出为Excel格式时出现“ ...
- vue组件之间的通信以及如何在父组件中调用子组件的方法和属性
在Vue中组件实例之间的作用域是孤立的,以为不能直接在子组件上引用父组件的数据,同时父组件也不能直接使用子组件的数据 一.父组件利用props往子组件传输数据 父组件: <div> < ...
随机推荐
- Bytom国密网说明和指南
比原项目仓库: Github地址:https://github.com/Bytom/bytom Gitee地址:https://gitee.com/BytomBlockchain/bytom 国密算法 ...
- windows 上让文件类型和程序关联的批处理程序。
文件关联工具 地址: https://github.com/wll8/assoc-tool 本工具可以用来为你的便携程序添加文件关联,比如 nodepad2.exe . vscode 或其他图片处理程 ...
- Codeforces 785 D. Anton and School - 2
题目链接:http://codeforces.com/contest/785/problem/D 我们可以枚举分界点,易知分界点左边和右边分别有多少个左括号和右括号,为了不计算重复我们强制要求选择分界 ...
- 在JAVA中返回类型使用泛型T和Object有什么区别?
最近在读jackson源码的时候发现有段代码返回类型写的是<T> T,而我自己一般写的是Object.上网搜了下这个语法糖,在stackoverflow上找到一个比较简单易懂的解释,搬运过 ...
- python web.py实现简单的get和post请求
使用web.py框架,实现简单的get和post请求: py文件名:mytest.py import web urls = ( '/', 'hello' ) app = web.application ...
- StringBuilderWriter 这个类需要commons.io.2.6这个包才可以使用, 在maven仓库中搜
- vuex 源码:深入 vuex 之辅助函数 mapState
前言 当一个组件要获取多个 state 的时候,声明计算属性就会变得重复和冗余了.我们可以使用到辅助函数 mapState 来更快更简洁地生成计算属性. 所以我们得清楚,mapState 的作用就是帮 ...
- mint18.3 升级linux-libc-dev_4.4.0-102.132 导致外接显示屏无法旋转,设置分辨率
—————————————————— 补记: 虽然修改之后能旋转,重启还是不行,而且修改显示,经常卡死.还是在第二天早上重装了. 吸取教训,尽量不apt dist-upgrade,不升级内核. 这只是 ...
- 牛客国庆集训派对Day3 I Metropolis
Metropolis 思路: 多源点最短路 只要两个不同源点的最短路相遇,我们就更新两个源点的答案 代码: #pragma GCC optimize(2) #pragma GCC optimize(3 ...
- Codeforces 939E - Maximize!
939E - Maximize! 思路: 贪心:最后的集合是最大值+前k小个 因为平均值时关于k的凹形函数,所以可以用三分求最小值 又因为后面的k肯定比前面的k大,所以又可以双指针 三分: #incl ...