SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的

i042416發表於2020-08-27

Standard behavior: I have maintained Organizational management data in Service Order Header:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


And if we add a product to this service order as line item, the header organization data will automatically be copied to item.


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


How this automatic data flow is achieved? Once the product IMU is maintained in item level, function module CRM_ORDER_MAINTAIN is triggered with following input:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的 SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


Within the callstack there is an event AFTER_CREATE raised against object ORDERADM_I:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


Which event listeners are registered for this object? Check registration table CRMC_EVENT_CALL, there we can find function module CRM_ORGMAN_PRODUCT_CHANGED_EC which actually is responsible to copy the organizational data from header to item.


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


This screenshot gives a hint that how the registered event callback function module is called:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


Reason why item level organization data is read-only

Check the source code of organizational management view, the layout of it in the runtime is generated by the configuration metadata:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


And when debugging the code where HTML native code for UI element is generated, I find all UI controls are marked as read only according to the code line line 225:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


The logic to determine whether a field should be rendered as read only or editable is again done in application code and the result is returned to UI framework.

The comment in line 13 clearly shows that the organizational management data in item level should always be read only.


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


Technical storage updated on 2017-05-09

When you maintain header level organization data, a link is created triggered by CRM_ORGMAN_CREATE_OW:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


This will lead to an insertion of one record in table CRMD_LINK:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的 SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


21 means ORGMAN:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


And when a new product is created, the corresponding link to item will be created by CRM_ORGMAN_PRODUCT_CHANGED_EC mentioned previously:


SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


Once item is also saved successfully, we will have two records in CRMD_LINK, one links header with its organizational data and the other links item.

要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

SAP CRM訂單抬頭級別的組織架構資料是如何自動拷貝到行專案的


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2715057/,如需轉載,請註明出處,否則將追究法律責任。

相關文章