SAP CRM 事务码CRMV_EVENT的用法

how can I know the business scenario about CRM_PRODUCT_I_A_CHANGE_ORGM_EC an

Question

I would like to know the design about when CRM_PRODUCT_I_A_CHANGE_ORGM_EC will be called.

Answer

tcode CRMV_EVENT, type CRM_PRODUCT_I_A_CHANGE_ORGM_EC and press F8:

SAP CRM 事务码CRMV_EVENT的用法

We get result below.

SAP CRM 事务码CRMV_EVENT的用法

It means whenever the sales area data is created or changed by Organization model determination or manual change by end user, these two FMs will be called by one order framework.

SAP CRM 事务码CRMV_EVENT的用法

Why CRM_PRODUCT_I_A_CHANGE_ORGM_EC should be registered for organization model change? This could be analyzed from business point of view.
Inside CRM_PRODUCT_I_A_CHANGE_ORGM_EC, you can find attributes from settype CRMM_PR_SALESG are read by the function module in line 102 and then filled in internal buffer.

SAP CRM 事务码CRMV_EVENT的用法

We know this settype is organization unit dependent settype, which means its value could only be determined by a specific sales organization + distribution channel.
As a result the purpose of registering CRM_PRODUCT_I_A_CHANGE_ORGM_EC on AFTER_CREATE & AFTER_CHANGE event on organization model is: once there is new change on organization model data, the corresponding value for settype CRMM_PR_SALESG must be reread accordingly. With the help of one order framework, here the design pattern “Observer” is achieved: CRM_PRODUCT_I_A_CHANGE_ORGM_EC is one of the many listeners for Organization model change, it subscribes the change via tcode CRMV_EVENT. Whenever Organization model changes, it publishes the change event by function module below. Al listeners will catch up this event and do tasks accordingly. CRM_PRODUCT_I_A_CHANGE_ORGM_EC, as one of the listeners, will fetch latest data based on the new organization model data accordingly.

SAP CRM 事务码CRMV_EVENT的用法

要获取更多Jerry的原创文章,请关注公众号"汪子熙":
SAP CRM 事务码CRMV_EVENT的用法