SAP CRM One Order函数CHANGE_OW的设计原理

简介: SAP CRM One Order函数CHANGE_OW的设计原理

Use the naming convention CRM*CHANGE_OW to search in SE37 and there are totally 92 function modules found in my system.

image.png

Still use the same scenario ( change Closing Date in Opportunity header ) to research how this CHANGE_OW function works:

image.png

Use the following report to trigger the corresponding CHANGE_OW function module for Opportunity header, CRM_OPPORT_H_CHANGE_OW.

image.png

Execute the report under transaction code SAT and you can easily find this function module consists of five major steps:

image.png

(1) CRM_OPPORT_H_READ_OB

The logic is explained in blog Buffer logic in One Order header extension Read.

The input for this object buffer read function module only contains opportunity guid and latest closing date specified by consumer:


image.png

The data read from CRM_OPPORT_H_READ_OB:

image.png

(2) CRM_OPPORT_H_FILL_OW

This function module fills the latest order data specified by consumer into object work area. Details could be found from this blog: Logic of FILL_OW function module in One Order.


(3) CRM_OPPORT_H_CHECK_OW


Please kindly notice that there are also check logic performed in function module CRM_OPPORT_H_FILL_OW, Let’s recall what kinds of checks are done there:


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:


image.png

And back to CRM_OPPORT_H_CHECK_OW in this blog, the consistency of each field in Opportunity header are checked there.

image.png

(4) CRM_OPPORT_H_PUT_OB


Once the object work area passes validation successfully, it will be put to Opportunity header object buffer via function module CRM_OPPORT_H_PUT_OB.


image.png

(5) CRM_OPPORT_H_PUBLISH_OW

This function module raises event via generic function module CRM_EVENT_PUBLISH_OW:

image.png

In this example why CRM_OPPORT_H_SET_PRICE_DATE_EC is called?

image.png

Check via tcode CRMV_EVENT,

image.png

And the callback is registered here:

image.png

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


相关文章
|
6月前
|
API
在阿里云RPA中,你可以使用"SetForegroundWindow"函数来将SAP控件置顶
【2月更文挑战第28天】 在阿里云RPA中,你可以使用"SetForegroundWindow"函数来将SAP控件置顶
101 1
|
3月前
|
Linux C++ Windows
【Azure 应用服务】Azure App Service(Windows)环境中如何让.NET应用调用SAP NetWeaver RFC函数
【Azure 应用服务】Azure App Service(Windows)环境中如何让.NET应用调用SAP NetWeaver RFC函数
【Azure 应用服务】Azure App Service(Windows)环境中如何让.NET应用调用SAP NetWeaver RFC函数
|
Java Serverless
在函数计算中调用 SAP 的 RFC 函数
在函数计算中调用 SAP 的 RFC 函数
95 0
|
SQL
SAP ABAP-OPENSQL-数值函数简介
S4中针对OPENSQL新提供一些函数
139 0
|
SQL
SAP ABAP-OPENSQL-日期/时间戳函数
S4提供针对OPENSQL一些新的SQL函数调用,本文展示相关函数的使用
623 0
SAP 金额转中文大写自开发函数
关于凭证打印时需将金额转换成中文大写
114 0
SAP ABAP——简单函数编写及调用
本文是一个ABAP简单函数编写以及调用的demo,废话不多说直接看demo场景
669 2
SAP ABAP——简单函数编写及调用
|
XML JSON 数据格式
SAP UI5 应用元数据文件 manifest.json 的加载和解析原理讲解试读版
SAP UI5 应用元数据文件 manifest.json 的加载和解析原理讲解试读版
113 0
如何使用 Java 程序通过 SAP Java Connector 调用 ABAP 系统的函数试读版
如何使用 Java 程序通过 SAP Java Connector 调用 ABAP 系统的函数试读版
258 0
|
XML 数据格式 开发者
SAP UI5 应用 SimpleForm 控件 ResponsiveGridLayout 布局的工作原理深入剖析试读版
SAP UI5 应用 SimpleForm 控件 ResponsiveGridLayout 布局的工作原理深入剖析试读版
114 0