标题:SAP CRM One Order函数CRM_FILL_OW的设计原理
There are totally 60 function modules in One order with naming convention CRM
_FILL_OW:

They are NOT used in read scenario but in modify scenario. For example once you change the Closing Date of a given opportunity in WebUI ( from 2017-02-15 to 2017-02-16 )

The function module for Opportunity header extension, CRM_ORDERADM_H_FILL_OW, is called with the following callstack:

As its name FILL_OW indicates, it is responsible to FILL the latest input by consumer into so called object work area( OW ) for later use.
In order to make the research life easier I write the following report to trigger this FILL_OW function module call from backend:

REPORT zoneorder_modify.CONSTANTS: gv_guid TYPE crmt_object_guid VALUE '6C0B84B759DF1ED6BDF05763B3DC8841'.DATA: lt_opport_h TYPE crmt_opport_h_comt,ls_opport_h LIKE LINE OF lt_opport_h,lt_change   TYPE crmt_input_field_tab,ls_change   LIKE LINE OF lt_change.ls_opport_h-ref_guid = gv_guid.
ls_opport_h-expect_end = '20170216'.ls_change = VALUE #( ref_guid = gv_guid ref_kind = 'A' objectname = 'OPPORT_H' ).
APPEND 'EXPECT_END' TO ls_change-field_names.
APPEND ls_change TO lt_change.
APPEND ls_opport_h TO lt_opport_h.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'EXPORTINGit_opport_h       = lt_opport_hCHANGINGct_input_fields   = lt_changeEXCEPTIONSerror_occurred    = 1document_locked   = 2no_change_allowed = 3no_authority      = 4.WRITE: / sy-subrc.

It’s very clear now the logic of this FILL_OW consists of four main parts:

(1) field check done in FM CRM_OPPORT_H_FIELDCHECK_FC

This check function module further calls two function modules:
a. CRM_ORDER_GENERAL_CHECKS_FC
This check could be switched off by function module CRM_ORDER_SET_ACTIVE_OW.
A customer exit if_ex_crm_order_fieldcheck and a new BAdI definition crm_order_fieldcheck_new is allowed for customer to implement their own check logic and called within this check function module.
b. CRM_FIELDCHECK_CALL
This FM will call dedicated check function module for a given field registered in system table CRMC_FIELDCHECK:

(2) CRM_OPPORT_H_READ_OB
The logic of this FM is already explained in blog: Buffer logic in One Order header extension Read.

(3) CRM_ORDER_INPUT_DATA

This FM is responsible to move the latest value entered by consumer ( is_opport_h_com in line 65 ) to object work area ( postfix WRK in variable ls_opport_h_wrk in line 68 ). You can observe in the debugger that before this FM is executed, object work area still contains the old value 2017-02-15 read from FM CRM_OPPORT_H_READ_OB in step 2.

Inside this FM there is a check to avoid the field is being changed unnecessarily ( specified new value = old value ) or by mistake ( the field validation fails ).
This is a screenshot how ls_opport_h_wrk looks like after this third step is executed:

(4) CRM_OPPORT_H_MERGE_OW

Opportunity header extension specific fields are filled in this FM.
The following fields are populated in this FM with related business logic.

  • probability
  • phase_since
  • assistant_phase
  • exp_weighted_revenue
  • salescycle

Once all these four steps are done successfully, CRM_OPPORT_H_FILL_OW has now generated a consistent object work area and stored in ls_opport_h_wrk.

This object work area will be put to object buffer for later save usage via FM CRM_OPPORT_H_PUT_OB.

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的原创文章,请关注公众号"汪子熙":

SAP CRM One Order函数CRM_Object_FILL_OW的设计原理相关推荐

  1. SAP CRM One Order框架里旧式的索引表设计原理

    本文介绍SAP CRM One Order框架里旧式的索引表设计原理. Created by Wang, Jerry on May 17, 2017 要获取更多Jerry的原创文章,请关注公众号&qu ...

  2. 基于若依框架的二次开发_SAP Commerce(原Hybris)的订单处理框架和SAP CRM One Order框架...

    最近工作重点转移到了SAP Commerce上来,正好有机会把该产品里由Java实现的订单处理框架和我之前长期工作过的,ABAP实现的SAP CRM One Order框架做个比较:基于Spring的 ...

  3. SAP Commerce(原Hybris)的订单处理框架和SAP CRM One Order框架

    最近工作重点转移到了SAP Commerce上来,正好有机会把该产品里由Java实现的订单处理框架和我之前长期工作过的,ABAP实现的SAP CRM One Order框架做个比较:基于Spring的 ...

  4. SAP CRM One Order里item quantity和CUMULAT_H的联动

    本文介绍SAP CRM One Order里item quantity和CUMULAT_H的联动机制. Created by Wang, Jerry, last modified on Apr 26, ...

  5. SAP CRM One Order scheduline buffer handling

    本文介绍SAP CRM One Order scheduline的缓存处理. 要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  6. SAP CRM One order appointment duration table

    本文介绍SAP CRM One order appointment duration的存储表. 要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  7. SAP CRM One Order 根据联系人姓名搜索的实现原理

    本文介绍SAP CRM One Order 根据联系人姓名搜索的实现原理 要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  8. SAP CRM One Order框架搜索条件里,posting date下拉菜单的渲染逻辑

    where does one order posting date search drop down list come from 本文介绍:SAP CRM One Order框架搜索条件里,post ...

  9. 如何找到SAP CRM One Order节点ID对应的描述信息(名称)

    in our offline initial downloader, you see hard code for object type: 在SAP CRM One Order代码里,到处可以看到这种 ...

最新文章

  1. 很简单却很实用的强拉脚本
  2. Spring Job?Quartz?XXL-Job?年轻人才做选择,艿艿全莽~
  3. 运行iDT算法代码及后续特征编码
  4. access后台链接mysql_ASP.NET连接 Access数据库的几种方法
  5. Spring 配置解析之Properties
  6. HTTP1.1/2.0与QUIC协议
  7. FSK软件鉴频,输出串行基带数据信号
  8. 红米旗舰机命名Redmi X?卢伟冰:会有更好的名字
  9. python 数学期望_数学期望(离散型和连续型)
  10. 数组中大于等于左侧所有数,小于等于右侧所有数的数
  11. python 数据分析与挖局书籍
  12. 银行计算机知识,银行考试计算机知识试题及答案
  13. c语言直线和圆的方程结论,直线与圆常见公式结论.doc
  14. 腾讯电脑管家卸载后的残留信息有哪些
  15. 【生信分析】基于TCGA肿瘤数据进行基因共表达网络分析
  16. PTA 1072 开学寄语
  17. java_异常_练习题:处理输入非数字异常和除数为0的异常。
  18. 2021算法阿里腾讯快手上岸,菜鸟小硕经验分享
  19. Hadoop安装教程_单机/伪分布式配置_CentOS6.4/Hadoop2.6.0
  20. 第四课 程小奔之避障

热门文章

  1. hdu 5265 pog loves szh II STL
  2. asp.net ajax1.0基础回顾(六):调用ASPX页面方法
  3. 数据库视频(三)——总结篇
  4. 质因数的个数 (分解质因数)
  5. python2和python3的一些区别
  6. SpringBoot学习(二)探究Springboot启动机制
  7. 8.var目录下的文件和目录详解
  8. 【硬盘整理】使用UltimateDefrag将常用文件放置在磁盘最外圈
  9. css3加载ing动画
  10. CSS——Position定位