Customize Email Subject in Solman 7.1 using BADI
Goto transaction SE19
Enter ALERT_REACTION which is the enhancement spot for the BADI BADI_DYN_INCI_NOTIF.
Click on Create Impl.
Enter a name for the Enhancement Implementation – ZALERT_REACTION_BADI
Enter the Short Text – BADI Implementation for Custom Email Subject in Technical Monitoring
Specifiy the package name
Press Enter or click on Save to create a transport request
Press Enter to save the object in the Request
Press Save again to save another object in the package
Press Enter again to save the object in the Request
Enter a Custom (Z) name in the space for BAdI Implementation & Implementation Class.
Select BADI_DYN_INCI_NOTIF from the dropdown in BAdI Definition.
Click on Copy Sample Class
Enter the package details and Save
Save the object in the Transport Request
You’ll now see the main Enhancement screen.
Double-click on Filter Val to specify the filter used by the enhancement.
Click on Combination to create an empty entry. Then click on the ???? entry and press the Filt. Val.
Select EXTERNAL in the Value 1 field (this is the only available value) and press enter.
You can now see the Filter Value with EXTERNAL.
Now double-click on Implementing Class
On the right window, double-click on the Method – IF_ALERT_DYN_CONFIGURATION~GET_NOTIF_CONF_FOR_ALERT (usually the first entry in the list)
Copy the code below, between the method and endmethod.
DATA lv_mon TYPE string.
lv_alert = io_alert_object->if_alert_consm_object~get_name( ).
IF io_alert_object->IF_ALERT_CONSM_OBJECT~GET_RATING( ) = ‘2’.
CONCATENATE lv_rating ‘ : ‘ lv_mon ‘ : ‘ lv_alert INTO e_email_subject.
Save the code and activate
Go back one screen to the main Enhancement screen and activate the Enhancement.
The emails will be adapted to the new format immediately.
The above code displays the following –
Alert Rating – RED/YELLOW
Managed Object Name – SID~ABAP etc
Alert subject text – This is the standard alert header
- E.g Email