好男人就是我,我就是你兵哥
分类: Web开发
2018-01-10 16:01:15
在视图集的IMPL类里找到DETACH_STATIC_OVW_VIEWS和REATTACH_STATIC_OVW_VIEWS,
重定义这两个方法,要同时在这两个方法里写代码
DETACH_STATIC_OVW_VIEWS
DATA:
lt_viewslist TYPE bsp_dlc_ovw_dyn_views_list_t,
lt_viewid TYPE bsp_dlc_ovw_stat_view_attach_t,
ls_viewid TYPE bsp_dlc_ovw_stat_view_attach,
ls_static_view TYPE bsp_dlc_ovw_dyn_views_list,
ls_attach_view TYPE bsp_dlc_ovw_stat_view_attach.
DATA: lr_btactivity TYPE REF TO cl_crm_bol_entity.
DATA ls_btactivity TYPE crmst_activityh_btil.
DATA lv_length TYPE i.
DATA: lr_btadminh TYPE REF TO cl_crm_bol_entity.
DATA: ls_btadminh TYPE crmst_adminh_btil .
DATA: lr_relat06 TYPE REF TO cl_crm_bol_entity.
DATA ls_relat06 TYPE zcrmd_activity_h_bol_attr.
CALL METHOD me->get_list_of_static_views
RECEIVING
rt_result = lt_viewslist.
***读取节点值
lr_btadminh ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
CHECK lr_btadminh IS BOUND .
CLEAR ls_btadminh .
CALL METHOD lr_btadminh->if_bol_bo_property_access~get_properties
IMPORTING
es_attributes = ls_btadminh.
*取门店基本信息
lr_relat06 = lr_btadminh->get_related_entity( iv_relation_name = 'ZEXT_BOL_RELAT000006' ).
IF lr_relat06 IS BOUND.
CLEAR ls_relat06 .
CALL METHOD lr_relat06->if_bol_bo_property_access~get_properties
IMPORTING
es_attributes = ls_relat06.
ENDIF.
IF ls_btadminh-process_type = 'ZMD3' AND ls_relat06-zzfld000042 = '2'.
LOOP AT lt_viewslist INTO ls_static_view WHERE component = 'ZCRM_UPLOAD'. "EC NOTEXT
ls_attach_view-viewid = ls_static_view-viewid.
APPEND ls_attach_view TO rt_viewid.
ENDLOOP.
ENDIF.
REATTACH_STATIC_OVW_VIEWS
DATA:
lt_viewslist TYPE bsp_dlc_ovw_dyn_views_list_t,
lt_viewid TYPE bsp_dlc_ovw_stat_view_attach_t,
ls_viewid TYPE bsp_dlc_ovw_stat_view_attach,
ls_static_view TYPE bsp_dlc_ovw_dyn_views_list,
ls_attach_view TYPE bsp_dlc_ovw_stat_view_attach.
DATA: lr_btactivity TYPE REF TO cl_crm_bol_entity.
DATA ls_btactivity TYPE crmst_activityh_btil.
DATA lv_length TYPE i.
DATA: lr_btadminh TYPE REF TO cl_crm_bol_entity.
DATA: ls_btadminh TYPE crmst_adminh_btil .
DATA: lr_relat06 TYPE REF TO cl_crm_bol_entity.
DATA ls_relat06 TYPE zcrmd_activity_h_bol_attr.
***读取节点值
lr_btadminh ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
CHECK lr_btadminh IS BOUND .
CLEAR ls_btadminh .
CALL METHOD lr_btadminh->if_bol_bo_property_access~get_properties
IMPORTING
es_attributes = ls_btadminh.
*取门店基本信息
lr_relat06 = lr_btadminh->get_related_entity( iv_relation_name = 'ZEXT_BOL_RELAT000006' ).
IF lr_relat06 IS BOUND.
CLEAR ls_relat06 .
CALL METHOD lr_relat06->if_bol_bo_property_access~get_properties
IMPORTING
es_attributes = ls_relat06.
ENDIF.
IF ls_btadminh-process_type = 'ZMD3' AND ls_relat06-zzfld000042 = '2'.
DELETE rt_return WHERE viewid = 'CUUPLOAD.ZCRM_UPLOAD/MainWindow'.
ENDIF.