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组件的更多相关文章

  1. react typescript 子组件调用父组件

    //父组件 import * as React from 'react'import { Input } from 'antd'const Search = Input.Searchimport &q ...

  2. Titanium中调用ios组件时语言不是本地化的解决方法

    用Titanium开发的ios应用中,当调用系统组件时,尽管手机已经设置了系统语言为中文,但那些组件的界面却仍为英文.比如调用iphone中的相册组件,其界面为: 那么怎么让它跟系统语言保持一致呢? ...

  3. VS2010调用Com组件

    Com组件开发过程中用的不多,资料也不多,故记录开发Com组件中的部分问题. 在这一篇文章里,讲解了如何使用VS2010创建Com组件.现在基于该文章创建的Com组件接口,创建VC++项目来调用该接口 ...

  4. VC中调用COM组件的方法(转载)

    原文参考:http://hi.baidu.com/mingyueye/item/53ebecd44da76917d80e4449 总结一下在VC中调用COM组件的方法 准备及条件: COM服务器为进程 ...

  5. .NET通过调用Office组件导出Word文档

    .NET通过调用Office组件导出Word文档 最近做项目需要实现一个客户端下载word表格的功能,该功能是用户点击"下载表格",服务端将该用户的数据查询出来并生成数据到Word ...

  6. 服务器端调用Word组件读取Word权限、未将对象引用到对象实例终极解决方案

    最近因为业务需要,需要在服务器上调用Word组件,结果遇到各种问题,比如检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件失败 ...

  7. vc中调用Com组件的方法详解

    vc中调用Com组件的方法详解 转载自:网络,来源未知,如有知晓者请告知我.需求:1.创建myCom.dll,该COM只有一个组件,两个接口:   IGetRes--方法Hello(),   IGet ...

  8. Asp.Net调用Office组件操作时的DCOM配置 (转)

    Asp.Net调用Office组件操作时的DCOM配置 http://blog.csdn.net/gz775/article/details/6447758 在项目中将数据导出为Excel格式时出现“ ...

  9. vue组件之间的通信以及如何在父组件中调用子组件的方法和属性

    在Vue中组件实例之间的作用域是孤立的,以为不能直接在子组件上引用父组件的数据,同时父组件也不能直接使用子组件的数据 一.父组件利用props往子组件传输数据 父组件: <div> < ...

随机推荐

  1. Docker:Stacks

    Prerequisites Install Docker version 1.13 or higher. Get Docker Compose as described in Part 3 prere ...

  2. JS代码排版工具

    有时候从网页上下载的js文件删除了空格,看起来就是一整段,还是蛮影响开发效率的,在CSDN上找到一个排版工具,用掉了我最后一个积分,所以在这儿分享一下: 百度云:链接:http://pan.baidu ...

  3. 阿里云CentOS Linux服务器上搭建邮件服务器遇到的问题

    参考文章: 阿里云CentOS Linux服务器上用postfix搭建邮件服务器 Linux系统下邮件服务器的搭建(Postfix+Dovecot) 本来想自己搭建邮件服务器,但是看到一篇资料表示阿里 ...

  4. [html]自定义滚动条风格

    webkit: <style type="text/css"> *{ margin: 0; padding: 0; } ::-webkit-scrollbar { wi ...

  5. 学习笔记49—matlab FDR校正

    matlab自带函数mafdr,当ttest数较多时,可直接用[FDR, Q]=mafdr(P):但是Storey procedure在p值少于1000个时会崩溃,此时应改用BH FDR方法:mafd ...

  6. CentOS7.6 如何设置静态ip

    [root@localhost network-scripts]# cd /etc/sysconfig/network-scripts/[root@localhost network-scripts] ...

  7. python logging日志输出个文件中

    # -*- coding:utf-8 -*- import logging # 引入logging模块 import os.path import time # 第一步,创建一个logger logg ...

  8. learn python the hard way习题31~40总结以及列表的扩展知识

    Python 中的列表: 形式:[ 表示打开一个列表,中间的项目用 , 隔开,然后列表以 ] 结束. for循环 两种形式: for i in ArrayName: for i in range(0, ...

  9. change color

    关于DataGridView行和列的背景色-前景色设置 1.设定DataGridView全部单元格的Style   DataGridView内所有单元格的Style变更,可以使用DataGridVie ...

  10. (转) 6 ways of mean-centering data in R

    6 ways of mean-centering data in R 怎么scale我们的数据? 还是要看我们自己数据的特征. 如何找到我们数据的中心? Cluster analysis with K ...