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> < ...
随机推荐
- 剥开比原看代码12:比原是如何通过/create-account-receiver创建地址的?
作者:freewind 比原项目仓库: Github地址:https://github.com/Bytom/bytom Gitee地址:https://gitee.com/BytomBlockchai ...
- Kubernetes命令
kubectl applykubectl getkubectl set image deployment/xxx -n ns echoservice=xxxkubectl deletekubectl ...
- Leetcode167-Two Sum II Input array is sorted-Easy
Given an array of integers that is already sorted in ascending order, find two numbers such that the ...
- CSS sprites
CSS Sprites在国内很多人叫css精灵,是一种网页图片应用处理方式. 优点: 它允许你将一个页面涉及到的所有零星图片都包含到一张大图中去,这样一来,当访问该页面时,载入的图片就不会像以前那样一 ...
- SqlParameter 多个参数动态拼接解决参数化问题
多个参数化是固定比较easy,多个动态的就有点...工作中遇到的问题整理下来分享 ,上代码 SqlParameter[] param = new SqlParameter[] { }; List< ...
- Mysql 函数使用记录(一)——DATEDIFF、CONCAT
当目前为止呢,个人对Mysql的函数没有进行过统一的学习使用,都是用到了再去学习.而近日开始学习Linux了,所以为了防止这段时期结束后,将此阶段期间遇到的Mysql函数遗忘,开始在此对其做一个简单的 ...
- Codeforces Round #135 (Div. 2) D. Choosing Capital for Treeland dfs
D. Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes i ...
- Educational Codeforces Round 23 C. Really Big Numbers 暴力
C. Really Big Numbers time limit per test 1 second memory limit per test 256 megabytes input standar ...
- Intellij idea注册码失效
从网上下载idea需要输入激活码,晚上用的激活码大多是同一个,但是上次使用的时候突然弹窗告诉我注册码失效了,在网上找到一个新的方法 在注册界面有几个选项,我们常用的是Activation Code,现 ...
- [osg]OSG相机添加动画路径
查看osg坐标系,camare默认姿态:http://www.cnblogs.com/lyggqm/p/8073688.html 首先搞清楚osg的坐标系以及osg::camare的默认姿态 下代码面 ...