In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to apply the Observer pattern in the One Order callback function". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The requirement, for example, is to figure out in what scenarios function module CRM_PRODUCT_I_A_CHANGE_ORGM_EC will be called. Of course, the most time-consuming thing to do is to set a breakpoint, and then run the corresponding scene to see when the breakpoint is triggered. There is another method of analysis that does not pass debugging:
Using the transaction code CRMV_EVENT, enter the function name CRM_PRODUCT_I_A_CHANGE_ORGM_EC:
The results are obtained:
The business implication of the above result is that whenever the Sales area is created or updated, the function module we query will be automatically called by the One Order framework.
Observe the call stack as follows:
So why do you need to call this callback function whenever the Organization Model organizational structure data for an order changes? Open the source code of this function and see one of the settype of CRM Product, CRMM_PR_SALESG (Set type allowing you to group products for various purposes. As this set type is dependent on distribution chains, a distribution chain has to be selected before data can be maintained) data is read.
For more information about this settype, please refer to SAP Help.
This settype is a Distribution Chain-related settype, and it makes no sense to leave a specific Sales area.
Therefore, whenever the Organization model data of the order changes, the CRMM_PR_SALESG data must be re-read according to the latest Organization model data after the change. With the One Order framework, this Organization model change and CRMM_PR_SALESG reading dependency is actually accomplished through the "observer pattern" in the design pattern. CRM_PRODUCT_I_A_CHANGE_ORGM_EC is one of the many observers of Organization model data changes, subscribing to the event of Organization model data changes through the transaction code CRMV_EVENT. Whenever there is a change in Organization model data, the change is posted through the CRM_EVENT_PUBLISH_OW in the figure below, and other observers can deal with it based on the events published by this publisher. In this example of my article, CRM_PRODUCT_I_A_CHANGE_ORGM_EC is called to read settype CRMM_PR_SALESG data according to the latest Organization model.
This is the end of the content of "how to apply the Observer pattern in the One Order callback function". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.