Skip to Content

1.        General Information

Based on our ITSM and Change Management project, we sometimes get requirement from customer to send email to specific recipient when status changes, e.g. to send email to processor when Incident status is changed from NEW to IN PROCESS, and also when status is changed from CUSTOMER ACTION back to IN PROCESS, email also has to be triggered to processor or other partner functions. For this situation, if as what we always defined, to set schedule condition “user status = in process(E0002)”, when status is set to IN PROCESS, both emails will be triggered which is not what we expect. So what we need is to trigger different emails when status is changed from different old statuses.

2.        Design

Refer to Note 1275036 – Linking action execution and status change, we can take use of BADI implementation AGS_SDK_SCHED_ST_CHD and define old status value and new status value in action condition (e.g. in schedule condition).

/wp-content/uploads/2014/07/1_498690.jpg

3.        Configuration Steps

Out example is send email to Message Processor when status is changed from CUSTOMER ACTION to IN PROCESS, and send email to REPORTED BY when status is changed from PROPOSED SOLUTION to IN PROCESS.

To achieve this we have to define two PPF Actions and off course two action conditions accordingly.

3.1 Action Definition

According to the Note, when define actions, we choose “Conditions Using Business AddIn (BAdI)” for the Rule Type.

/wp-content/uploads/2014/07/2_498691.jpg

3.2 Action Condition

In the Table Schedule Condition, use F4 to choose BAdI implementation AGS_SDK_SCHED_ST_CHD for schedule condition.

/wp-content/uploads/2014/07/3_498701.jpg

Then click button “Define Parameters” to define the old status and new status parameters.

/wp-content/uploads/2014/07/4_498703.jpg

Pay attention to the pop up dialog when clicking the button, it tells that “If you change the parameter definition, this affects existing conditions in other action definitions If values have already been maintained, they are initialized after the change Do you want to change the definition?”, meaning that all actions which are using this BAdI implementation, they share same parameter definition.

/wp-content/uploads/2014/07/5_498704.jpg

Follow below instrunctions in the note to set the new user status parameter:

  • Element: USER_STATUS
  • Description: New user status
  • Short Descript.: New user status for which the action is executed (with status change)
  • Enter the data type ABAP Dictionary Reference Structure: TJ30, Field: ESTAT
  • Properties: Select the “Multiline” indicator.
  • Initial value: Enter the status values (after the status change) for which the action is to be executed, for example E0003 (the action is then executed when there is a status change to one of these status values).

/wp-content/uploads/2014/07/6_498705.jpg

For Old User Statuses, if you have similar situation as my example, to trigger more emails from different old status, you have to leave the initial value empty for parameter Old User Statuses.

/wp-content/uploads/2014/07/7_498710.jpg

Then you can maintain the value of the parameter. For exmaple if you want to send email when status is changed from E0005(proposed solution) to E0002, set the USER_STATUS to E0002, and the USER_STATUS_OLD to E0005.

/wp-content/uploads/2014/07/8_498711.jpg

/wp-content/uploads/2014/07/9_498712.jpg

For the other one (E0003->E0002) maintain the value as below:

/wp-content/uploads/2014/07/10_498725.jpg

3.3 Result

After above configuration, when you process incident ticket, from CUSTOMER ACTION to IN PROCESS, email action will be triggered, and when PROPOSED SOLUTION to IN PROCESS, different email action is triggered.

Tested with expected result in internal system.

4.        Reference Information

1275036 – Linking action execution and status change (The reason why I write this document is because we have some misunderstanding when using this Note).

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply