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> < ...
随机推荐
- Java基础 【Arrays 类的使用】
package com.zuoyan.sort; import java.util.Arrays; public class ArraysClassDemo { public static void ...
- 写前端页面步骤----vue+iview
1:用iview构建基本HTML页面 2:在export default{ }中写一个data(){return:{变量:值}}全局对象,用于传递与绑定HTML参数. 3:在export defaul ...
- Linux命令3——c
cal:calender,显示月历 -j:用凯撒历(dates of julius caesar)的形式来显示月历,不分月份.1-365/366 -m:显示月历时,把星期一定为一周的开始.默认星期日为 ...
- ie 支持字体大小继承
今天需要实现字体大小继承这个效果.是这样的,在公用类里 .box 中的 .box1 的字体进行了修改.但是我的页面里不需要修改.我需要让他和 .box 一样.所以想到使用继承.但是想到继承这个属性兼容 ...
- SAP月结操作讲解
SAP月结操作讲解 https://wenku.baidu.com/view/ac6fe45d312b3169a451a4b9.html 步聚 操作内容 事务码 是否必须 操作时间 月/年结 1 ...
- python学习 day017打卡 类与类之间的关系
本节主要的内容: 1.依赖关系 2.关联关系,组合关系,聚合关系 3.继承关系,self到底是什么? 4.类中的特殊成员 一.类与类之间的依赖关系 在面向对象的世界中,类与类中存在以下关系: 1.依赖 ...
- Java LocalDateTime,DateTimeFomatter----JDK8新时间类的简单使用
JDK8中增加了一系列时间的类, (据说)是为了干掉过去的Date,Calendar类的, 过去的Date类(据说)有着线程不安全等诸多弊端, 至于我的个人感受就是用起来实在是很麻烦,我一般封装成几个 ...
- 6-1 建立客户端与zk服务端的连接
6-1 建立客户端与zk服务端的连接 zookeeper原生java api使用 会话连接与恢复; 节点的增删改查; watch与acl的相关操作; 导入jar包;
- Qt5.QString传参数
1.函数传参,如果是 QString&类型 的话,不能直接 传入 char* 类型的参数,若是声明成 const QString&类型 的话,就可以 解释:应该是 函数调用的时候 编译 ...
- 力扣(LeetCode) 9.回文数
判断一个整数是否是回文数.回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数. 示例 1: 输入: 121 输出: true 示例 2: 输入: -121 输出: false 解释: 从左向 ...