Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

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

Press Enter

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.

Press Enter

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)

Click Yes

Copy the code below, between the method and endmethod.

  DATA lv_mon TYPE string.
DATA lv_alert TYPE string.
DATA lv_status TYPE string.
DATA lv_rating TYPE string.

lv_alert
= io_alert_object->if_alert_consm_object~get_name( ).
lv_mon
= io_alert_object->if_alert_consm_object~get_managed_object_name( ).

IF io_alert_object->IF_ALERT_CONSM_OBJECT~GET_RATING( ) = '2'.
lv_rating
= 'YELLOW '.
ELSEIF io_alert_object->IF_ALERT_CONSM_OBJECT~GET_RATING( ) = '3'.
lv_rating
= 'RED '.
ENDIF.

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

  1. E.g Email

24 Comments
Labels in this area