zoukankan      html  css  js  c++  java
  • SAP CRM One Order header extension的缓存机制设计原理

    In one of my previous blog A small tip to analyze code by code and export to markdown format it is introduced that the following header extension are supported in One order read function module CRM_ORDER_READ.

    When the given header extension is read via CRM_ORDER_READ, take OPPORT_H for example:

    DATA: lt_header_guid TYPE  crmt_object_guid_tab,
          lv_guid        TYPE crmt_object_guid,
          lv_object_id   TYPE CRMT_OBJECT_ID_DB value '21',
          lt_oppt        TYPE CRMT_OPPORT_H_WRKT,
          lt_partner     TYPE crmt_partner_external_wrkt.
    
    START-OF-SELECTION.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
       EXPORTING
          input = lv_object_id
       IMPORTING
          output = lv_object_id.
    
      SELECT SINGLE guid INTO lv_guid FROM crmd_orderadm_h
          WHERE object_id = lv_object_id AND process_type = 'CXOP'.
    
      CHECK sy-subrc = 0.
    
      APPEND lv_guid TO lt_header_guid.
    
      CALL FUNCTION 'CRM_ORDER_READ'
        EXPORTING
          it_header_guid = lt_header_guid
        IMPORTING
    *      et_partner     = lt_partner
          et_opport_h   = lt_oppt.
    

    The calling hierarchy could be found from below:

    Every header extension has one corresponding read function module acting as entry point for read which will be called by CRM_ORDER_READ_OW with naming convention CRM_READ_OB. In OB ( object buffer ) read function module, the corresponding object buffer is evaluated. If object buffer is not hit for current read, another DB read function module ( CRM_READ_DB is called. Within this DB read function module, another internal table which represents Database buffer is evaluated again. The real read access on database table is only performed when this second fold buffer check fails.

    Take OPPORT_H read for example, I draw a picture to demonstrate this two-fold buffer evaluation logic:

    In the runtime, OPPORT_H object buffer could be monitored in the context of CRM_OPPORT_H_READ_OB,

    and database buffer in CRM_OPPORT_H_READ_DB accordingly.

    The object buffer is declared in function group CRM_OPPORT_H_OB:

    and database buffer is defined in function group CRM_OPPORT_H_DB:

    Further reading

    I have written a series of blogs to explain how One Order API works. The blogs are written based on a simple scenario: read, change and save field “Closing Date” in Opportunity header level.

    Buffer logic in One Order header extension Read

    Change Scenario

    CRM_ORDER_MAINTAIN

    |- CRM_ORDER_MAINTAIN_MULTI_OW

    |- CRM_ORDER_MAINTAIN_SINGLE_OW

    |- CRM_ORDER_H_MAINTAIN_OW

    |- CRM_OPPORT_H_MAINTAIN_OW

    |- CRM_OPPORT_H_CHANGE_OW

    |- CRM_OPPORT_H_READ_OB

    |- CRM_OPPORT_H_FILL_OW

    |- CRM_OPPORT_H_CHECK_OW

    |- CRM_OPPORT_H_PUT_OB

    |- CRM_OPPORT_H_PUBLISH_OW

    Save Scenario

    CRM_ORDER_SAVE

    |- CRM_ORDER_SAVE_OW

    |- CRM_EVENT_SET_EXETIME_MULTI_OW

    |- CRM_OPPORT_H_SAVE_EC

    |- CRM_ORDER_TABLE_SAVE

    |- CRM_OBJECT_NAMES_DETERMINE

    |- CRM_ORDER_UPDATE_TABLES_DETERM

    |- CRM_ORDER_SET_OBJECTS_TO_SAVE

    CRM_OPPORT_H_UPDATE_DU

    Create Scenario

    CRM_ORDER_MAINTAIN

    |- CRM_ORDER_MAINTAIN_MULTI_OW

    |- CRM_ORDER_MAINTAIN_SINGLE_OW

    |- CRM_ORDER_H_MAINTAIN_OW

    |- CRM_ORDERADM_H_MAINTAIN_OW

    |- CRM_ORDERADM_H_CREATE_OW

    |- CRM_OPPORT_H_MAINTAIN_OW

    |- CRM_OPPORT_H_READ_OB

    |- CRM_OPPORT_H_CREATE_OW

    |- CRM_OPPORT_H_CHANGE_OW

    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    我们用的信息系统安全吗?
    硬件代理服务器的日志分析方法
    Solarwinds Orion NPM实战视频演示
    网络资源管理系统LANsurveyor实战体验
    2013年,我的推荐博客汇总
    如何精准高效的实现视觉稿?------前端开发辅助工具AlloyDesigner使用介绍
    SVG如何做圆形图片
    canvas绘制一定数目的圆(均分)
    如何禁止火狐onblur时alert()产生类似选中的拖蓝效果
    ABCD多选正则表达式
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/13554705.html
Copyright © 2011-2022 走看看