Ansicht
Dokumentation

JSM_EMAIL_MSAG_BODY - BAdI: Message Body of Email Notification

JSM_EMAIL_MSAG_BODY - BAdI: Message Body of Email Notification

CL_GUI_FRONTEND_SERVICES - Frontend Services   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) JSM_EAMIL_MESSAGE_BODY is used in the Process Scheduling Management (SV_SMG_PSM) component, in the job documentation of job scheduling management. You can use this BAdI to freely define the body of the email reminder for managing expired job documents. For example, in the email, the job owner can click a URL to create a job request, which either updates or cancels the job schedule.

When you implement this BAdI, you overwrite the default implementation of the fallback class CL_AGS_JSM_EMAIL_MESSAGE_FB.

If all the BAdI implementations are inactive or no BAdI implementation exists, the implementation of the fallback class CL_AGS_JSM_EMAIL_MESSAGE_FB is called.

BAdI Methods

You can use the following BAdI methods to define the bodies of different emails with relevant content for each case, depending on the email recipient and how often the email reminder has been sent:

  • CREATE_MESSAGE_BODY_NOR: You can use this BAdI method to define the body of the reminder email when the email addresses of the job owners are available.
  • CREATE_MESSAGE_BODY_ESC: You can use this BAdI method to define the body of the reminder email when the job owners have already received three or more email reminders and have not responded; the matter must therefore be escalated to the escalation recipient.
  • CREATE_MESSAGE_BODY_NO_ADDRESS: You can use this method to define the body of the reminder email when the job owner email address is not available.
  • CREATE_MESSAGE_BODY_ESC_NOADDR: You can use this method to define the body of the reminder mail when the email address of the job owner is not available, and the escalation recipient has not responded at least three times.
  • SEND_MAIL: You can use this method to send email reminders automatically. The emails are sent to the email addresses of the contact persons or job owners, which are maintained in the respective job documents with review dates earlier than the date you have entered.

For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).

You can implement the BAdI definition to freely define the bodies of email reminders, for example, so that they have different texts or formats other than plain text.

You can find an example implementation in the BAdI Builder on the Enhancement Spot Element Definitions tab in the Implementation Example Classessection.

The following example implementation is available:

  • CL_AGS_JSM_EMAIL_MESSAGE_FB

Example Implementation

Depending on the email recipient and how often the email reminder has been sent, different default templates (in plain text format) are defined in the fallback class implementation:

  • CREATE_MESSAGE_BODY_NOR
  • CREATE_MESSAGE_BODY_ESC
  • CREATE_MESSAGE_BODY_NO_ADDRESS
  • CREATE_MESSAGE_BODY_ESC_NOADDR
  • SEND_MAIL

In the reminder email, the job owner can click a URL to create a job request. The email body also contains details about the identified job document, which include the job name, the job document number, the version number, the end date of validity (the review date), the notification counter (how may reminders have already been sent), and the URL to the job document.






BAL_S_LOG - Application Log: Log header data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 3904 Date: 20240523 Time: 164846     sap01-206 ( 73 ms )