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> < ...
随机推荐
- kubernetes 实战4_命令_Configure Pods and Containers
Configure Service Accounts for Pods A service account provides an identity for processes that run in ...
- 8、nginx和tengine简介
练习: 使用nginx反向代理(rr调度)用户请求至两个以上的后端LAMP(按标准路径部署的有pma,wd),不管用户请求是什么内容都反向代理至后端服务器去,但是如果用户请求的是图片或者是html,就 ...
- window下的Django入门
一.window下新建安装(参考书籍:<python编程:从入门到实践>) 新建一个文件夹 learning_log ,在终端中切换到该目录下,并创建一个虚拟工作环境,运行模块 venv ...
- 【Python】一些练习代码用的图片
- _itemmod_enchant_groups
随机附魔组 附魔组 `groupId` 分组编号,同一groupId的附魔效果被随机抽取 `enchantId` 附魔Id 对应SpellItemEnchantment.dbc `chance` 被抽 ...
- Addition Chains
题目描述: 一个与 n 有关的整数加成序列 < a0 , a1 , a2 ...am> 满足一下四个条件: 1.a0=1 2.am=n 3.a0<a1<a2<...< ...
- 解决UnicodeEncodeError: 'gbk' codec can't encode character u'\u25aa' in position 344 : illegal multiby
Python拿来做爬虫的确很不错,但是字符串的编码的确是稍不留神就是一个坑,GBK编码和Unicode编码的转化出现问题也是很多的,今天在解析网页数据的时候出现上述错误,解决方案如下: one_str ...
- CentOS6.X、7.X下Jenkins的安装及使用
一.相关概念 1.1 Jenkins概念: Jenkins是一个功能强大的应用程序,允许持续集成和持续交付项目,无论用的是什么平台.这是一个免费的源代码,可以处理任何类型的构建或持续集成.集成Jenk ...
- format格式化函数
注意:列表索引设置参数,‘0’是必须的.
- 学习笔记24—win10环境下python版libsvm的安装
1.前言 由于毕业设计需要用到libsvm,所以最近专心于配置libsvm,曾经尝试过在matlab中安装,但是没有成功.最终在Python环境中完成安装. 2.LIBSVM介绍 LIBSVM 是台湾 ...