博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
动态BT跳转
阅读量:5320 次
发布时间:2019-06-14

本文共 5395 字,大约阅读时间需要 17 分钟。

METHOD eh_onzobject_id_link.***定义    DATA :      lv_crmt_object_guid TYPE crmt_object_guid,      lv_index            TYPE        i,      lr_property_access  TYPE REF TO if_bol_bo_property_access,      lv_object_id        TYPE        crmt_object_id_db.***获取对象*==获取选中行INDEX    cl_thtmlb_util=>get_event_info( EXPORTING iv_event = htmlb_event_ex  IMPORTING ev_index = lv_index ).    CHECK lv_index IS NOT INITIAL .*==获取选中行context    lr_property_access  ?= me->typed_context->searchresultnode->collection_wrapper->find( iv_index = lv_index ).    CHECK lr_property_access IS BOUND .*==生成订单BOL    CLEAR :lv_crmt_object_guid .    lv_crmt_object_guid = lr_property_access->get_property_as_string( iv_attr_name = 'OBJECT_GUID' ).    CHECK lv_crmt_object_guid IS NOT INITIAL .    CALL FUNCTION 'ZCRM_NAVIGATE_BT'      EXPORTING        iv_guid = lv_crmt_object_guid.  ENDMETHOD.
FUNCTION zcrm_navigate_bt.*"----------------------------------------------------------------------*"*"Local Interface:*"  IMPORTING*"     VALUE(IV_GUID) TYPE  CRMT_OBJECT_GUID OPTIONAL*"----------------------------------------------------------------------  gr_bol_core = cl_crm_bol_core=>get_instance( ).  gr_bol_core->load_component_set('ONEORDER' ).  TRY.      CALL METHOD gr_bol_core->get_root_entity        EXPORTING          iv_object_name = 'BTOrder'               "#EC NOTEXT  BTOrder          iv_object_guid = iv_guid        RECEIVING          rv_result      = gr_btorder.    CATCH cx_crm_genil_model_error .      RETURN .  ENDTRY .***对象跳转*==导航组件  gv_bsp_dlc_object_type = cl_crm_uiu_ibase_tool=>get_bt_ui_object_type( gr_btorder )."设计对象类型  CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_entity_based    EXPORTING      ir_entity           = gr_btorder      iv_ui_object_type   = gv_bsp_dlc_object_type      iv_ui_object_action = 'B'    RECEIVING      rr_result           = gr_if_bol_bo_property_access.*==动态导航collection  CREATE OBJECT gr_if_bol_bo_col TYPE cl_crm_bol_bo_col .  gr_if_bol_bo_col->add( iv_entity = gr_btorder  iv_set_focus = abap_true ).  gr_if_bol_bo_col->insert(  iv_bo = gr_if_bol_bo_property_access iv_index = 1 ).*==动态导航  gr_crm_ui_navigation_service = cl_crm_ui_navigation_service=>get_instance( ).  IF gr_crm_ui_navigation_service IS BOUND .    gr_crm_ui_navigation_service->navigate_dynamically( gr_if_bol_bo_col  ).  ENDIF .ENDFUNCTION.

 

 

2.

METHOD eh_ontosrvord.* Added by wizard: Handler for event 'TOSRVORD'    DATA: lv_index        TYPE int4,*        lr_comp_controller    TYPE REF TO cl_bt111s_o_bspwdcomponen_impl,*        lr_cuco               TYPE REF TO cl_bt111s_o_cucosearch_impl,          lr_entity       TYPE REF TO if_bol_bo_property_access,          lv_event        TYPE REF TO cl_htmlb_event_tableview,          lr_msg_srv      TYPE REF TO cl_bsp_wd_message_service,          lv_subrc        TYPE sy-subrc,          lv_tableview_ex TYPE REF TO cl_thtmlb_table_view.*    CALL METHOD cl_thtmlb_util=>get_event_info*      EXPORTING*        iv_event = htmlb_event_ex*      IMPORTING*        ev_index = lv_index.*   set entity as current one    lr_entity ?= me->typed_context->btadminh->collection_wrapper->get_current( ).    CHECK lr_entity IS BOUND.    DATA l_guid TYPE crmd_orderadm_h-guid.    DATA l_srv_no TYPE crmd_orderadm_h-object_id.    CALL METHOD lr_entity->get_property_as_string      EXPORTING        iv_attr_name = 'OBJECT_ID'*       iv_use_iso_format = ABAP_FALSE      RECEIVING        rv_result    = l_srv_no.    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'      EXPORTING        input         = l_srv_no     IMPORTING       OUTPUT        = l_srv_no.    DATA: wa_zsrv_order_relat TYPE zsrv_order_relat.    SELECT SINGLE *      FROM zsrv_order_relat      INTO wa_zsrv_order_relat      WHERE zsrv_order = l_srv_no.    select SINGLE guid      FROM crmd_orderadm_h      INTO l_guid      WHERE object_id = wa_zsrv_order_relat-ZWORK_ORDER        AND process_type LIKE 'ZW%'.    DATA lr_core TYPE REF TO cl_crm_bol_core.    DATA lr_bt TYPE REF TO cl_crm_bol_entity.    lr_core = cl_crm_bol_core=>get_instance( ).*初始化 BT为组件集名称    lr_core->start_up( 'BT' ).    TRY.        CALL METHOD lr_core->get_root_entity          EXPORTING            iv_object_name = 'BTOrder'            iv_object_guid = l_guid   " 单句对应的GUID          RECEIVING            rv_result      = lr_bt.      CATCH cx_crm_genil_model_error .    ENDTRY.    CHECK lr_bt IS BOUND.    RAISE EVENT history_trigger.    DATA: lr_nav_descr   TYPE REF TO if_bol_bo_property_access.    DATA: lr_navigation  TYPE REF TO if_crm_ui_navigation_service.    DATA: lr_col         TYPE REF TO cl_crm_bol_bo_col.    DATA: rv_value_node  TYPE REF TO cl_bsp_wd_value_node.    cl_crm_ui_descriptor_obj_srv=>create_ui_object_based(      EXPORTING iv_ui_object_type   = 'BT116_SRVO'                iv_ui_object_action = 'B'      RECEIVING rr_result           = lr_nav_descr ).    CHECK lr_nav_descr IS BOUND.    lr_navigation = cl_crm_ui_navigation_service=>get_instance( me ).    CHECK lr_navigation IS BOUND.* Check whether navigation is supported    IF lr_navigation->is_dynamic_nav_supported( lr_nav_descr ) NE abap_true.      RETURN.    ELSE.      CREATE OBJECT lr_col.      lr_col->if_bol_bo_col~add( iv_entity = lr_nav_descr ).      lr_col->if_bol_bo_col~add( iv_entity = lr_bt iv_set_focus = abap_true ).      lr_navigation->navigate_dynamically( lr_col ).    ENDIF.  ENDMETHOD.

 

转载于:https://www.cnblogs.com/sapSB/p/6422626.html

你可能感兴趣的文章
GridView的控件说明[字典]-----方便查询
查看>>
cocos2d-x引擎高级特性-物理引擎_简单要素
查看>>
建立 Python 虚拟环境
查看>>
android---从eclipse换到studio,出的各种问题
查看>>
配置SELINUX
查看>>
经典最短路径问题hdu(2066)
查看>>
php 无限极递归分类
查看>>
springmvc注解
查看>>
【Linux】小米路由开启SSH访问权限
查看>>
错排问题
查看>>
安装 Ruby on Rails
查看>>
Java基础:三步学会Java Socket编程
查看>>
Sql server 2005 restore failed
查看>>
django 认证方式
查看>>
mongDb安装
查看>>
MYSQL进阶学习笔记十四:MySQL 应用程序优化!(视频序号:进阶_32)
查看>>
汇编检测OD代码
查看>>
在SQL中判断一个表是否存在
查看>>
HDU6037 Expectation Division 期望、高维前缀和
查看>>
Ruby学习之类
查看>>