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 an email from the SAP system for Maintenance Order approval using our SAP certified solution.
Let us consider an example of implementing email communication interfaces for SAP workflow
The Purchasing Department of some company has created a Maintenance Order. As soon as it is saved, the department manager is sent a mail with an invitation of either approving this document or rejecting it.
So, you are going to see now how easy, fast and convenient it is to create such a mail for SAP workflow using Skybuffer Action Cards (Intelligent Decision Dimensions).
ABAP Classes Development Simplicity
The process of ABAP classes development for workflow scenario consists of 3 main blocks.
1) First, you are to inherit the class with the main functionality on mails creating into your own class
2) Then, you are to copy the demonstrational class for mails creating according to a particular document type
3) Finally, you are to copy the demonstrational class in order to bind the notification to the workflow.
Now let us follow all the implementation steps in detail.
- ABAP class of /SKYBFR/CL_YCA1_ERP_MAIL_BONE
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 on taking decisions on workflow. 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’s 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 documents types in the system.
- ABAP class of /SKYBFR/CL_YCA1_ERP_MAIL_PM_MO
In order to create a mail on a particular kind of document, we are to copy a demonstrational class of /SKYBFR/CL_YCA1_ERP_MAIL_PM_MO delivered with Action Cards (Intelligent Decision Dimensions), specify a core class created in the previous step as a parent class and redetermine the methods of filling in the mail 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 such as workflow container’s elements for making change, button templates, etc.
This is going to be enough for simple notifications to be emailed according to documents without binding to workflow.
- ABAP class of /SKYBFR/CL_YCA1_WF_EXIT_PM_MO
In order to bind the notification to the workflow, we need to copy the demonstrational class of /SKYBFR/CL_YCA1_WF_EXIT_PM_MO delivered with Action Cards (Intelligent Decision Dimensions), and redetermine the following methods.
- Work item defining (get_flow) – This method defines which work item refers to sending email for approval, and which one to the approved/declined notification:
- Calling the class from the previous step (prepare_mail) – this method defines calling the mail creating:
- If necessary, we can redetermine the methods of reading the Object from the workflow (get_objects) – from the workflow operation container or the work item:
- And getting agents – mail receivers (get_actors) – our Add-On can determine the agents either by rule, or by initiator. Other algorithms can be implemented in this method as well.
All these classes use text elements. Also, our Add-On has an implemented method of switching to the language of a particular receiver. This method 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 a mail and the workflow exit class.
All you have to do in order to boost the implementation is to copy or inherit supplementary classes.
If 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 Maintenance Order for which our mail has been created. To make it easier and more convenient for a person responsible for the document 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 Maintenance Order as those shown in the previous step.
So, implementation of the Action Cards (Intelligent Decision Dimensions) can significantly speed up the development of SAP applications and utilities necessary to form, send and process incoming emails.