Raising events based on change document (Workflow)
By Kartik Tarla, Infosys from Link
T-Code: SWEC, SWETYPV.
Table: TCDOB, SWECDVALUE, CDPOS
Introduction:
Many business objects are changed frequently. Often we are required to trace the changes made. We do this by tracking the change documents.
To be able to log changes to a business object in a change document, an appropriate change document object must be defined in the system. In its definition, a change document object has tables, which represent a business object in the system. Changes to table fields designated as change document-relevant are logged by writing a change document.
We assign a change document object to an object type/event pairing and determine the action (create, change or delete) on the application object for which the event is to be created. We can classify the event in order to create three different events for a change document i.e. create, change & delete.
The change document is written only when change is updated, this ensures that the event is not created until the change has actually been made.
The Assignment between a change document and event is maintained through transaction SWEC.
When the particular event is triggered, then we can carry out the further processing by assignment of a receiver function module and a receiver type to a particular combination of object type and event, this is done through the transaction SWETYPV.
In the receiver function module we can do the custom coding to achieve the functionality which is needed whenever the business requirement demands that certain work needs to be done when a change is made. Our processing may stop at the receiver function module itself or we may proceed to trigger a workflow.
This procedure can also be considered as an alternate way of achieving functionality that at present is fulfilled using Exits, BADIs and BTEs.
Suppose the requirement needs certain action to be performed when the changes to any transaction are saved. The first approach that generally is followed is to look for exits or BADIs, but mostly the problem faced is, that all tables may not be updated at the point where the exit is being called, or the changes may be cancelled after the exit call which may then require to take back our actions which we performed inside the exit. So in such cases a much better and cleaner approach is to make use of events, which trigger on change document.
This association we do in SWEC, where we assign the business object type, event and the change type to a change document.
SWEC:
We can also put field restrictions to put conditions on triggering of the event.
Now when the event is triggered, to carry out the further processing we assign a receiver function module to the event in transaction SWETYPV.
SWETYPV:
The receiver function module must have the interface as this fm SWW_WI_CREATE_VIA_EVENT.
Now we can perform the required action inside the receiver function.
Scenario:
Consider the following scenario where we can use the concept of triggering events based on changes made to business objects.
Business Requirement:
To trigger a mail to be sent to the Sales Order creator whenever any changes are done to the schedule lines and the indicator “Fixed date and Qty” is checked.
Technical Solution:
The change document for sales order related changes is VERKBELEG, and the business object is BUS2032.
So we create an event SCH_CHANGED and assign it the change document VERKBELEG in transaction SWEC.
Now assign a receiver fm to the bus/event - BUS2032/SCH_CHANGED in transaction SWETYPV.
Inside this function module we write the code to trigger the mail.
相关推荐
Study on the Influence of Bank Raising Interest to the Amount of Chinese Private Cars,马丹,周圣武,Through the establishment of the Logistic regression model, and application circuit theory, ...
在"Agile模型驱动开发BorCon China- Raising the level"这个主题中,我们探讨的是如何在中国的IT环境中提升Agile MDD的实践水平。 Agile开发,源自2001年的敏捷宣言,强调快速响应变化、团队协作和客户满意度。它的...
Unite Europe 2017 - Squeezing Unity: Tips for raising performance 就是关于如何提升性能的 YouTube 对应的 https://www.youtube.com/watch?v=_wxitgdx-UI&index=7&list=PLX2vGYjWbI0Rzo8D-vUCFVb_hHGxXWd9j
Events play a critical role in FPM, enabling developers to trigger actions based on user interactions or changes in the application state. ###### 2.4.1 Raising Standard Events Standard events are ...
【标题】:“Trace Online Hand Raising Utility - 开源” 在线会议已经成为现代工作和学习环境中的常见部分,然而,有效的互动仍然是一个挑战。"Trace Online Hand Raising Utility"(TOHRU)是一个开源项目,旨在...
Bug with raising 'Argument out of range' error on TCRDBGrid creating in RAD Studio Berlin with Update 1 is fixed Bug with QueryRecCount when ORDER clause contains CASE..END is fixed Bug with ...
In this inspiring book, Ash Maurya takes you through an exacting strategy for achieving a "product/market fit" for your fledgling venture, based on his own experience in building a wide array of ...
信息安全_数据安全_Raising the Bar for the Attacker 安全架构 区块链 安全对抗 安全人才 数据分析
These single lane performance levels are very similar to those of the PCI Express-based storage cards emerging today, while x8 12Gb/s SAS host bus adapters (HBAs) based on this technology are ...
《通过地平线2020及其未来提升卓越》的主题主要关注的是如何通过欧盟的研究与创新计划——地平线2020项目以及未来的结构基金,来提高全欧盟的科学和技术卓越性。这个主题旨在强化区域创新能力,促进欧洲2020战略的...
2. "A good decision is **based** on one's knowledge and experience." 好的决策基于一个人的知识和经验。 "be based on"表示“基于……”。 3. "Ellen is **fluent** in both English and French, which gives ...
He is an M.tech in Computer Sciences and a thought leader who has contributed to raising the bar of understanding on cyber safety and ethical hacking among students of many colleges and universities ...
make predictions on ICO failure, and discuss the implications on rm operational decisions and prots. We show that in the current unregulated environment, ICOs lead to risk-shifting incentives ...
推特欢迎您的新关注者 :person_raising_hand: 如果您想通过一条简短的消息与刚获得的关注者握手,则此bot是适合您的完美解决方案!要求帐户机器人的(Twitter)应用程序。任何类型的24/7运行的服务器。 查看我的合作...
- **Populating and Raising Events from Code**:在代码中动态生成和触发事件,通过`Trace`类发送日志消息,然后由`Trace Listeners`接收并处理。 - **Populating a log message with additional context ...
Consciousness_studies
"ubiquitous-adventure:我自己的网站:raising_hands:" 这个标题可能代表一个个人项目,旨在创建一个名为 "raising_hands" 的网站,这个网站可能是关于鼓励参与、互动或者社区建设的。项目可能使用了SCSS来优雅地设计...
Student achievement and differential reinforcement of incompatible behavior: Hand raising Psychology in the Schools Volume 24, July 1987 STUDENT ACHIEVEMENT AND DIFFERENTIAL REINFORCEMENT OF ...
■Chapter 16: Handling Activity Life Cycle Events Schroedinger’s Activity Life, Death, and Your Activity onCreate() and onDestroy() onStart(), onRestart(), and onStop() onPause() and onResume() ...