This how-to guide is meant to make you acquainted with main peculiarities of Skybuffer Action Cards (Intelligent Decision Dimensions) implementation and show how simple it is to send a notification email from the SAP system for Sales Order using our SAP certified solution.
Let us consider an example of using background service of notifications when detecting a focus situation in the process of Sales Orders background monitoring.
The Purchasing Department of some company has created a Sales Order. As soon as the document is saved, the department manager is sent a mail with a notification about creating such a document.
So, you are going to see now how easy, fast and convenient it is to create such an email for SAP notifications using Skybuffer Action Cards (Intelligent Decision Dimensions).
ABAP Classes Development Simplicity
The process of ABAP class development for notifications scenario consists of 2 main blocks.
1) Reading the document data (business objects).
2) Creating an HTML mail.
Here sending an HTML mail is a standardized algorithm step. It is referred either to custom implementation or implemented just once in the class of Mail_Bone
Now let us follow all the implementation steps in detail.
- ABAP class of /SKYBFR/CL_YCA1_ERP_MAIL_BONE
First, you are to inherit the class of /SKYBFR/CL_YCA1_ERP_MAIL_BONE into your own class – this is going to be the common core for all tasks on creating mails for simple notifications emailing on documents. In this class you are to redefine 4 separate methods on creating common corporate mail style.
- Let’s choose the email template (get_template) and determine the template name. Alternatively, you can organize reading this template from any source
- Header (get_header) – here we determine the mail subject and the company’s letterhead, that is, the name and the information string
- Addressing the receiver (get_sections) – here we create the salutation and the text addressed to the receiver.
- Signature (get_footer). Here we create any template phrase for the footer
This class is created just once for all the document types in the system.
- ABAP class of /SKYBFR/CL_YCA1_ERP_MAIL_SD_SO
In order to create a mail on a particular kind of document (Sales Order in our case), we are to copy a demonstrational class of /SKYBFR/CL_YCA1_ERP_MAIL_SD_SO delivered with Skybuffer Action Cards (Intelligent Decision Dimensions), specify the core class created in the previous step as its parent class and redetermine the following methods.
- The method of filling the mail with the contents (get_sections) It effects reading the document and filling the mail with the data.
- Creating buttons (get_buttons). This method stipulates each button’s actions, words written, other additional information. In this article we have a sample mail without buttons.
This is going to be enough for simple notifications to be emailed according to documents without binding to the workflow.
All these classes use text elements. Also, our Add-On has an implemented method of switching to the language of a particular receiver which provides multilingual support when creating mails directly out-of-the-box.
As we can see from this example, this programming code is not too big, it can take from 1 to 3 hrs to program a code to create such a mail.
All you have to do in order to boost the implementation is to copy or inherit supplementary classes.
In case you need to implement a separate option, you are to redetermine the respected class method.
I would like to emphasize that the volume of a developed code is not too big as the main part of the functionality is already implemented in the Add-On.
SAP GUI example
Now we are going to open some backend system. Here we are opening the Sales Order for which our notification mail has been created. To make it easier and more convenient for a person responsible for the Sales Order approval, to spare him from the necessity to log in to the SAP system, our mail has the main elements of the document
- Basic Data
- Positions Details
As the result of calling the class method delivered in the Action Cards (Intelligent Decision Dimensions), we see the following mail created
As we can see, this mail contains exactly the same details of the Sales Order document as those shown in the previous step.
So, implementation of Skybuffer Action Cards (Intelligent Decision Dimensions) can significantly speed up development of SAP applications and utilities necessary to form, send and process incoming emails.