Information
Alert is playing a very important role to notify the users about some critical changes or steps. On the other hand, actions are flexible functions that can be scheduled and processed automatically according to the user-definable conditions. This WIKI contains necessary customizing settings for triggering alert by using partner-dependent action.
Overview
To trigger alert by using partner-dependent action, you need to do the following settings to make it work.
- Define an alert.
- Create action profile and add action.
- Set the condition for the action.
Customizing
1. Define an alert.
IMG–>CRM–>BF–>Alert management–>define alert categories
1.1 Create an alert classification and an alert category (ZJAYALERT)
1.2 Tabs in alert customizing
There are four tabs in this page. And in the ‘container’ tab, you can define data that can be used in the alert text (For example: transaction ID).
Then in ‘Long and Short Text’ tab, you can define the alert text, which the receiver will view in the alert. And you can add the container element by pressing the highlighted button.
2. Create action profile and add action
IMG–>CRM–>BF–>actions–>actions in transaction–>Change actions and conditions–>define action profile and actions
2.1 Action profile (ZJTEST)
After you create an action profile, you need to determine in which object type the action profile is used. Since the test sample is for transaction type ZJTA (Copied from TA), I set it as BUS2000115.
2.2 Action definition (ZJAYCEALERT)
Create an action definition that would be scheduled automatically and be processed when saving documents. Assign the partner function ZJAY0012 to this action definition. The action definition will be scheduled when ZJAY0012 user is added in the ZJTA order. And finally, the alert is sent to this user.
2.3 Define the process type for the action definition
Select ‘TRIGGER_ALERT’ method and define the processing parameters for it. Technically, standard BADI EXEC_METHODCALL_PPF (Implementation Name: TRIGGER_ALERT) would be used.
Add the processing parameters ‘category’ and set alert category ‘ZJAYALERT’ (Step 1.1) as the initial value. This parameter will be transfer to the BADI, then alter ‘ZJAYALERT’ would be run.
3. Set the condition for the action
IMG–>CRM–>BF–>actions–>actions in transaction–>Change actions and conditions–>define conditions
You can add schedule conditions and start conditions here.
If you want the alert to be sent only when the system status is “released”, you can add a schedule condition by pressing ‘edit condition’ button in the schedule condition tab.
Go to schedule condition tab.
Enter a name and click on the highlighted area.
Select the object, operator and constant. After pressing the enter key, the condition will be added.
Save your change, then the action will be scheduled only when the system status contains “I1004”.
Test
1. Test environment and test data
System: CRT/800 (BBPCRM Version: SAPKU70206)
Transaction type: ZJTA
Partner determination profile: ZJ000001
Action profile: ZJTEST
Action definition: ZJAYCEALERT
Alert category: ZJAYALERT
Partner function triggering action: ZJAY0012
2. Test Result
Create a new ZJTA order, and the action tab is blank at this moment. After partner determination, the ZJAY0012 partner is determined. Change the system status to “released”, then action definition ZJAYCEALERT is added in the order.
Save the order, and the action will be processed.
Log on to WEBUI (salespro), then you can find the alert in the home.
Alternatively, you can open the ‘worklist’ work center.
Other information
1. Necessary settings for partner-dependent action.
Firstly, the selected partner function should be in category 0005 (KBA 1792264).
In addition, CRM_ACTION_BADI should be deactivated (KBA 1645931).
2. Fixed recipients.
You can set fixed recipients for the alert category.
Related SAP documents
1792264 – Partner dependent actions that trigger an alert send the alert to many partners in the document, and not just the partner whose partner function is maintained in the action customizing
1645931 – Partner Dependent actions are not scheduled when same partner is used in multiple partner functions
https://wiki.scn.sap.com/wiki/display/CRM/How+to+use+SAP+CRM+Alert+Framework+in+3+simple+Steps
Good document, thanks for share.
Kind regards,
Kevin
Hi Jayce,
Good article!!
I have a requirement to trigger an alert if an employee responsible is changed from A to B in transaction. Can it be handled by using above steps or some changes are required the method call (BAdi)?
Regards,
Nikhil
Hi Nikhil,
You can refer the steps above for a simple action.
And to trigger an alert when changing employee responsible, you need to redefine the schedule condition of the action.
So I recommend you using BADI EVAL_SCHEDCOND_PPF to do so. And you can find an similar example in Note 1007346 that schedules actions when changing status.
In addition, you can find more solutions in the following discussions.
email sending if to change of Message Processor in SMIN
Identifying transaction partner change in action
Hope the information above could help you.
Best regards,
Jayce.