Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6330
  • 博文数量: 7
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-21 19:15
文章分类

全部博文(7)

文章存档

2017年(7)

我的朋友

分类: 其他平台

2017-05-10 08:17:12

METHOD eh_ondone.
  DATA:
        lr_cn          TYPE REF TO cl_bsp_wd_context_node,
        lr_entity      TYPE REF TO cl_crm_bol_entity,
        lr_entity_header      TYPE REF TO cl_crm_bol_entity,
        lv_item_guid   TYPE crmt_object_guid,
        lv_header_guid   TYPE crmt_object_guid,
        lr_msg_srv     TYPE REF TO cl_bsp_wd_message_service.


  DATA :it_header_guid TYPE crmt_object_guid_tab,
        et_subject TYPE crmt_subject_wrkt,
        ls_subject TYPE crmt_subject_wrk,
        et_text TYPE crmt_text_wrkt,
        ls_text TYPE crmt_text_wrk,
        et_status TYPE crmt_status_wrkt,
        ls_status TYPE crmt_status_wrk,
        et_orderadm_h     TYPE crmt_orderadm_h_wrkt,
        ls_orderadm_h     TYPE crmt_orderadm_h_wrk,
        note_tab TYPE tline_tab,
        note_string TYPE string,
        lv_fix_flag TYPE c,
        lv_status TYPE j_estat,
        lv_process_type TYPE CRMT_PROCESS_TYPE_DB.


  lr_msg_srv = me->view_manager->get_message_service( ).
  lr_cn  = me->get_context_node( gc_cn_btadmini ).
  lr_entity ?= lr_cn->collection_wrapper->get_current( ).
  lr_entity->get_property_as_value( EXPORTING iv_attr_name = 'GUID' "#EC NOTEXT
                                    IMPORTING ev_result    = lv_item_guid ).
  lr_entity->get_property_as_value( EXPORTING iv_attr_name = 'HEADER' "#EC NOTEXT
                                  IMPORTING ev_result    = lv_header_guid ).


  REFRESH it_header_guid.
  APPEND lv_header_guid TO it_header_guid.
  CALL FUNCTION 'CRM_ORDER_READ'
    EXPORTING
      it_header_guid       = it_header_guid
      iv_no_auth_check     = 'X'
    IMPORTING
      et_orderadm_h        = et_orderadm_h
      et_status            = et_status
      et_subject           = et_subject
      et_text              = et_text
    EXCEPTIONS
      document_not_found   = 1
      error_occurred       = 2
      document_locked      = 3
      no_change_authority  = 4
      no_display_authority = 5
      no_change_allowed    = 6
      OTHERS               = 7.
  CHECK sy-subrc EQ 0.
  READ TABLE et_orderadm_h INTO ls_orderadm_h INDEX 1.
  lv_process_type = ls_orderadm_h-process_type.
*校验状态
  READ TABLE et_status INTO ls_status WITH KEY active = 'X' kind = 'A' user_stat_proc = 'ZSV00001'.
  lv_status =    ls_status-status."E0014 ,用户确认
*备注(故障现象描述)
  READ TABLE et_text INTO ls_text WITH KEY ref_kind = 'B'
                                           ref_guid = lv_item_guid
                                           stxh-tdobject = 'CRM_ORDERI'
                                           stxh-tdspras = '1'
                                           stxh-tdid = 'ZSV1'."实际故障现象及解决方案
  note_tab =  ls_text-lines.
  CLEAR note_string.
  CALL FUNCTION 'HRHAP_CONVERT_TABLE_TO_STR'
    EXPORTING
      note_tab    = note_tab
    IMPORTING
      note_string = note_string.
  CLEAR lv_fix_flag.
  READ TABLE et_subject INTO ls_subject WITH KEY ref_kind = 'B'
                                                 ref_guid = lv_item_guid
                                                 asp_id = 'ZSRV03'.
  IF sy-subrc EQ 0.
    lv_fix_flag = 'X'.
  ELSE.
    lv_fix_flag = ''.
  ENDIF.


  IF lv_process_type = 'ZSV1' AND lv_status = 'E0014' AND note_string IS not INITIAL AND lv_fix_flag IS INITIAL .
    IF lr_msg_srv IS BOUND.
      lr_msg_srv->add_message( iv_msg_type   = 'E'
      iv_msg_id     = 'ZORDER_MESSAGE'
      iv_msg_number = '058'
         ).


    ENDIF.
    RETURN.


  ENDIF.




  CALL METHOD super->eh_ondone
    EXPORTING
      htmlb_event    = htmlb_event
      htmlb_event_ex = htmlb_event_ex.




ENDMETHOD.
阅读(404) | 评论(0) | 转发(0) |
0

上一篇:找增强的思路

下一篇:Web UI常用语法

给主人留下些什么吧!~~