Mobile Menu

1. Get Started

1.1     About This Document

This End User Guide Document is the starting point for the technical implementation of Simple Communication Add-on.

1.2     Introduction

Simple Communication Add-on is designed to provide universal emailing framework for business workflows and email-to-SAP type of communication. The Product’s key features are the following:

  • It provides inbound email processing to perform actions on workflow items and to create decision comments on business object.
  • Event-based and decision-based work items are both supported.
  • Inbound processing is fully configurable.
  • It also provides APIs to send emails, create email body from HTML template, convert data to email body content, generate action buttons to inject into email body, check work item status, perform work item action and other benefits.
  • Sample work item exit classes and basic email templates are also provided as part of the product.

In general, any SAP business workflow or SAP communication to business users process can be leveraged with Simple Communication Add-on’s functionality to:

  • Speed up approval process
  • Save costs wasted on not getting timely decisions
  • Leverage user experience of communication from and to SAP
  • Provide an easy option for offline decision making
  • Capture in SAP comments from business users without login to SAP GUI, NWBC or SAP Fiori

1.3     Glossary

Workflow – consists of an orchestrated and repeatable pattern of business activity enabled by the systematic organization of resources into processes that transform materials, provide services, or process information.

Work Item – a business activity, a separate step of workflow.

Business User – a person that has authority to use an application, process or system.

Approver – a person responsible for taking a decision on the offered action

Business Object/GOS Object – an entity within a multitiered software application that works in conjunction with the data access and business logic layers.

Skybuffer Add-On – Simple Communication Add-On developed by Skybuffer.

BADI – SAP Business Add-In that allows to insert a custom code and manage data processing.

1.4     Simple Communication Add-On

1.4.1     Main Functionalities

Add-On ID: /SKYBFR/YCA1

This Product is designed to provide universal emailing API for business workflows.

  • It provides inbound email processing to perform actions on workflow items and to create decision comments on business object.
  • Event-based and decision-based work items are both supported.
  • Inbound processing is fully configurable.
  • It also provides APIs to send emails, create email body from HTML template, convert data to email body content, generate action buttons to inject into email body and some other useful stuff.
  • Sample work item exit classes and basic email templates are also provided as part of the product.

For example, a flowchart with the integrated Skybuffer Add-On can be like this:

13

Please find all the features description in Feature List Documentation.

1.4.2     Skybuffer Add-On

Skybuffer Add-On consists of following packages:

  • /SKYBFR/YLM1 – Skybuffer License Management component. Licensing is made via license string definition through SAP Implementation Guide node for Skybuffer Add-On. License is SAP Installation number and date dependable.
  • /SKYBFR/YCA1 – Skybuffer Simple Communication Add-On. Core
  • /SKYBFR/YCA1_ERP – Skybuffer Simple Communication Add-On. ERP API
  • /SKYBFR/YCA1_ERP_RIK – Skybuffer Simple Communication Add-On. ERP RIK Classes
  • /SKYBFR/YCA1_WF – Skybuffer Simple Communication Add-On. Workflow API
  • /SKYBFR/YCA1_WF_RIK – Skybuffer Simple Communication Add-On. WF RIK Classes

It can be installed, upgraded and uninstalled in accordance with provided Installation and Uninstallation Guides.

All program and dictionary objects are in /SKYBFR/ namespace, so they are provided “as it is”, do not need to be customized and cannot be changed by the Customer.

1.4.3     Skybuffer Add-On API

Skybuffer Add-On provides API that consists of ABAP Classes and dictionary objects. The most important of them are:

  • /SKYBFR/CL_YCA1_CORE_UTILS – Simple Communication: Framework Utilities. Provides Core Methods for processing emails (working with email content, attachments, recipients);
  • /SKYBFR/CL_YCA1_CORE_VERSION Simple Communication: Version Information. Contains version number and name, Add-On ID, Add-On name and description;
  • /SKYBFR/CL_YCA1_WF_MAIL_INBND Simple Communication Add-On: Workflow Inbound Processing. Carries out inbound email processing. Fully automated and configurable. Does not need customizing;
  • /SKYBFR/CL_YCA1_ERP_UTILS Simple Communication Add-On: ECC and S/4 Utilities. Utility class serves to BUS-objects attachments processing, logs generation.

1.4.3.1       Decision Work Item in Workflow

There is a need to initiate Actions on Work Items in Workflows via Email.

For example, when the Business Object is saved, the Workflow starts, and the SAP system sends an Email with Approve and Reject buttons to the Actor. When the Actor clicks the Approve or Reject button, automatically generated Action Email goes to the SAP system and an appropriate Action is performed to the Work Item. Then the Workflow performs the action to the Business Object.

A flowchart with the integrated Skybuffer Add-On can look like this:

14

1.4.3.2       Notification in Workflow and Comments Catch on GOS Object

It is necessary just to inform Business Users and get comments from them via email.

For example, when the Business Object is changed, the Workflow starts, and the SAP system sends an Email with document data and Send a Comment button to recipients. When one of recipients clicks Send a Comment button, there is an email automatically generated which goes to the SAP system and a comment is attached to the Business Object.

A flowchart with integrated Skybuffer Add-On can look like this:

15

1.4.3.3       Custom Development on Emails or Workflows

It can be useful to send notification emails not only in workflows but also in some other cases.

Skybuffer Add-On provides useful API for such occasion.

A flowchart with the integrated Skybuffer Add-On can look like this:

16

Also, Skybuffer Add-On can be useful in workflow managing development tasks because it provides API to check Work Item status, to set Workflow or Work Item container element, to perform Work Item action.

A flowchart with integrated Skybuffer Add-On can look like this, too:

17

2. Design Considerations

2.1     Solution Alternative

Solution alternative for Skybuffer Add-On is custom development for every business case, either workflow or other communication with SAP cases.

2.2     IT Governance and Strategy

Skybuffer Add-on allows using unified methodology of inbound communication from business users to SAP via asynchronous, occasionally connected interface that is based on any email client used by business users.

The solution is neutral to email clients software, and works with:

  • Online web email clients.
  • Desktop email clients.
  • Mobile email clients.
  • Lotus Notes.

The solution allows reusing of program objects and speeding up custom development of SAP use cases.

Skybuffer Add-on can also be used as a framework to model any kind of communication from/to SAP use case.

2.3     Architectural Fit and Technical Debt

The solution contains new technical component that can be reused for the future custom developments in simple communication scenarios from and to SAP NetWeaver system.

2.4     Total Cost of Ownership

Because of its ability to reuse extensive technologies and competence, this solution is cost-effective compared to custom development for each business case connected with workflows and emails.

Major inbound and outbound processing tasks are solved out-of-the-box.

Solution is delivered based on subscription model with or without SAP consulting/development hours included into the annual subscription.

All updates and incident management are included into Skybuffer subscription fee with no additional costs.

If the Client would like to buy additional SAP implementation hours from Skybuffer, that is made possible via standard SAP services contract.

3. Solution Architecture

3.1     System Context

The scheme below represents system landscape for Skybuffer Add-On typical use case.

Skybuffer Add-On is integrated into SAP system and uses SAP Connect to receive and send emails via Customer’s existing corporate mail exchange server. So, all corporate security policies dealing with emails segment are fully compatible with Skybuffer Add-On.

The integration between Skybuffer Add-On and other SAP standard and custom components is described in more detail in the following sections.

18
19

3.2     Integration View

Skybuffer Add-On is integrated into SAP system as program objects set and necessary dictionary objects. It cannot work independently, it is fully controlled. It works as program exit for inbound email processing or workflow, or its methods are called from custom development.

All calls from Skybuffer Add-On are initiated by control program objects.

3.3     Functional View

As it can be seen from the functional diagram, Skybuffer Add-On consists of several classes. The dictionary objects given below are not shown as they do not work as functional blocks. And HTML templates are not shown as they can be customized, created, deleted, changed or even not used.

Utilities Class provides several useful methods to manipulate Workflows or Work Items, to format and send emails and other services concerning Workflows and emails.

The version Information can be used to check the installed version of Skybuffer Add-On.

Exit Class is provided as an implementation sample and can be used as a best practice for the Customer to create their specific class.

Inbound Email Class provides the interface for inbound email processing.

20

4. Security

4.1     Security Architecture

Skybuffer Add-on uses the functionality of the following SAP NetWeaver blocks without any adjustments and modifications:

  • SAP Connect (Inbound and Outgoing Emails) plus External Email Exchange integrated with SAP Connect via standard SAP electronic communication approaches
  • SAP Standard Texts
  • SAP Business Workflow
  • SAP ArchiveLink

Authorization of both business user and emails processing background user (technical user) is supposed to grant access to the SAP functionality mentioned above.

No additional RFC connection is required for Skybuffer Add-on, no special Emails Accounts configuration inside Skybuffer Add-on, no web services are used, no external web services are delivered as a part of Skybuffer Add-on.

Skybuffer Add-on can be configured via SAP Implementation Guide to send back Inbound Email processing status to the Sender as many times as it is stipulated in customizing. It means that it is possible to configure that for a particular unique action ID, Skybuffer Add-on will process only the first email arriving into SAP and then consider that the unique action ID has already been used.

Such kind of SAP Security Architecture absolutely relies on SAP Security Architecture of standard SAP functions and Exchange Email Server Security Model (currently mostly on Office 365 internal security model) and helps to avoid the risk of bringing security violation blocks into SAP Environment.

4.2     Infrastructure Security

Skybuffer Add-On uses customer’s corporate email infrastructure with all existing security tools. It works on the basis of the SAP system and all SAP security facilities take care of this safety.

Please see section 3.1 from Solution Architecture.

4.3     Application Security

4.3.1     Application Deployment

Currently, Skybuffer Add-On can be deployed via SAP transport requests from Skybuffer internal development system.

Usually, transport requests are installed into the Client’s SAP sandbox system and then re-packed to be moved from SAP Development to SAP Production system.

As a roll back plan, currently Skybuffer uses cleaning up transport requests from Skybuffer internal development system to delete Skybuffer Add-on. The reason for such kind of approach is that SAP development of Skybuffer Add-On is done in Skybuffer custom namespace /SKYBFR/, that is non-modifiable in the Clients’ SAP systems.

4.3.2     Versions

Skybuffer Add-On contains captured version attributes inside /SKYBFR/YCA1 ABAP package. The installed version, ID, name and its description can be checked anytime.

Skybuffer publishes Skybuffer Add-On roadmap on its official web site and regularly updates it.

Skybuffer accepts the Client’s specific requests to be considered for new releases of Skybuffer Add-On.

4.3.3     Information Managed by the Application

Skybuffer Add-On works with the following kinds of data in the create/update mode:

  • SAP Business Workflow work item data (containers, statuses).
  • ArchiveLink texts for SAP transactional (business) objects.
  • Additional data that can be updated by Skybuffer Add-On according to the BADI implementation for Skybuffer Add-On (BADI is included into the solution in /SKYBFR/ namespace, implementation could be done in the Client’s specific Z- or Y- namespace).

Additionally, Skybuffer Add-On is capable of reading data from:

  • User Master Record (email address).
  • Personnel master data (infotype 0105 subtype 010 and infotype 0105 subtype 001) to get User ID to Personnel Number mapping, and email address information.
  • Personnel Number assignment to Position via SAP standard ABAP rules.

4.4     End User Authentication

Skybuffer Add-On uses SAP standard authentication model out of SAP NetWeaver system box to control access of business users to the data managed by Skybuffer Add-On.

Additionally, with incoming emails processing Skybuffer Add-On uses SAP Master Data objects according to configuration of Evaluation Path in SAP Implementation Guide node for Skybuffer Add-On:

  • US (user ID).
  • P (Personnel Master).

In this case, when SAP Connect inbound email arrives, Skybuffer Add-On gets the sender’s email address and searches for SAP Master Data object (User ID or Personnel Number) using the sender’s email address, in case User ID is allocated, the email is accepted by Skybuffer Add-On. In case it is switched on in the Client’s SAP system and needs analyzing, it is possible to analyze MIME data for Inbound emails via BADI implementation for Skybuffer Add-On. Skybuffer might provide sample BADI implementation for emails MIME data processing in the next releases.

Additionally, there is a standard mechanism used to assign the agent to the SAP business workflow. It controls whether the determined out of Inbound Email User ID can process a work item (in case Skybuffer Add-On is used to process the workflow via email).

4.5     Roles and Authorizations

Skybuffer Add-On works in Workflow and in inbound email processing, so it uses roles and authorizations defined for workflow and inbound email processing by Clients (WF-BATCH user ID, Inbound emails processing user ID for SAP Connect).

For outbound emails generation SAP access of the current SAP user is considered.

No additional custom authorization objects are developed for Skybuffer Add-On as it is not required technically, and SAP authorization framework can be fully used, as for usual SAP development.

5. Realization

5.1     Skybuffer Add-On

5.1.1     Technical Highlights

Skybuffer Add-On is developed in packages:

  • /SKYBFR/YCA1
  • /SKYBFR/YCA1_ERP
  • /SKYBFR/YCA1_ERP_RIK
  • /SKYBFR/YCA1_WF
  • /SKYBFR/YCA1_WF_RIK

Also, Skybuffer Add-On uses /SKYBFR/YLM1 package that contains Skybuffer License Management components.

There are several HTML templates included in SO10 standard texts as parts of Skybuffer Add-On.

21

5.1.2     Core Framework Classes

All the core classes are included into the package of /SKYBFR/YCA1.

Basic functionalities of the Skybuffer YCA1 Add-On are included in core classes:

5.1.2.1       /SKYBFR/CL_YCA1_CORE_UTILS

Skybuffer Simple Communication: Outbound Email Utilities

Core functionality serves the email, GOS objects, SAP Workflow handling on the basis level.

5.1.2.2       /SKYBFR/CL_YCA1_CORE_VERSION

Skybuffer Simple Communication: Version Information

5.1.3     ERP API Classes

ERP API Classes are included into the package of /SKYBFR/YCA1_ERP.

The functionality is included into the utility class:

5.1.3.1       /SKYBFR/CL_YCA1_ERP_UTILS

Simple Communication Add-On: ECC and S/4 Utilities

Utility class serves to BUS-objects and their attachments processing, logs generation.

5.1.4     Workflow API Classes

All the workflow API classes are included into the package /SKYBFR/YCA1_WF.

Workflow API classes are divided into the following two groups.

5.1.4.1       API Classes

5.1.4.1.1       /SKYBFR/CL_YCA1_WF_EXIT

Simple Communication Add-On: Workflow Exit Super Class

Implement the /SKYBFR/CL_YCA1_WF_EXIT class by creating inherited custom EXIT class with redefined methods.

Class methods interacts with the container of the SAP Workflow and contains the logic of the compilation email content and sends to the recipients.

Custom EXIT class should be assigned to the User Decision work item of the SAP Workflow as Program Exit.

5.1.4.1.2       /SKYBFR/CL_YCA1_WF_MAIL_INBND

Skybuffer Simple Communication Add-On. WF Inbound Class

/SKYBFR/CL_YCA1_WF_MAIL_INBND class is responsible for consumption and handling of the incoming emails.

5.1.4.1.3       /SKYBFR/CL_YCA1_WF_REMINDER

WF Reminder

/SKYBFR/CL_YCA1_WF_REMINDER is a core functionality of the Reminder.

5.1.4.1.4       /SKYBFR/CL_YCA1_WF_UTILS

Skybuffer Simple Communication Add-On. Workflow Utilities

SKYBFR/CL_YCA1_WF_UTILS contains workflow and work item serving logic.

5.1.4.1.5       /SKYBFR/CL_YCA1_WF_ERROR_NOTIF

WF Error Notification

/SKYBFR/CL_YCA1_WF_ERROR_NOTIF contains the logic of the error notification functionality. It provides the notification possibilities for IT administrator in case of work items ending with error statuses.

5.1.4.2       Sample Classes

Sample classes are SKYBUFFER BEST PRACTICES, they show how to use the add-on. They can be inherited into a custom class. A sample class is a class that needs just one method to be redefined and customized to suit a specific business case.

For test purposes, you can just inherit a sample class and change just workflow task numbers and inbound processing email address. It works with both event-based and decision-based work items and sends an email to the workflow initiator to take an “approve” or “reject” decision. It uses the default email template.

5.1.4.2.1       /SKYBFR/CL_YCA1_WF_COMCAP_SMPL

SKYBFR/CL_YCA1_WF_SUBOBJ_SMPL is a sample work item exit class. It is used for the /SKYBFR/YCA1_WF_COMM_CAPT_SMPL BADI implementation.

The main purpose for the class is user decision comment capturing in an email for any other custom purpose.

5.1.4.2.2       /SKYBFR/CL_YCA1_WF_SUBOBJ_SMPL

SKYBFR/CL_YCA1_WF_SUBOBJ_SMPL is a sample work item exit class. It is used for the /SKYBFR/YCA1_WF_SUBJ_TO_O_SMPL BADI implementation.

The main purpose for the class is to get a BUS object from the email subject.

Simple Communication Add-on for SAP ECC and S/4HANA provides the following security conception for external email addresses:

  • CHECK_SENDER_ALLOW_ANY Check Sender Address – Allow Any One;
  • CHECK_SENDER_BY_SO10_LIST Check Sender Address – Check By SO10 List

In CHECK_SENDER_BY_SO10_LIST method SO10 the text /SKYBFR/CHECK_SENDER_DEFAULT_LIST is used by default to determine rules for incoming emails.

5.1.4.2.3       /SKYBFR/CL_YCA1_WF_PR_FIN_SMPL

SKYBFR/CL_YCA1_WF_PR_FIN_SMPL is a sample work item exit class. It is used for /SKYBFR/YCA1_WF_PREP_FIN_RECIP BADI implementation.

The main purpose for the class is final recipient preparation override to create a custom logic instead of the standard substitutes logic realized in the Add-On.

5.1.5     ERP RIK Classes

ERP Rapid Implementation Kit is a collection of Sample Classes which is designed for fast and easy implementation of Notification Sending logic.

5.1.5.1       /SKYBFR/CL_YCA1_ERP_MAIL_BONE

/SKYBFR/CL_YCA1_ERP_MAIL_BONE contains the logic of the compilation email contents and sending it to the recipient.

5.1.5.2       /SKYBFR/CL_YCA1_ERP_MAIL_<OBJECT>

List of sample classes for email generation:

  • /SKYBFR/CL_YCA1_ERP_MAIL_DMS Simple Communication Add-On: ECC and S/4 RIK. Document
  • /SKYBFR/CL_YCA1_ERP_MAIL_EQUI Simple Communication Add-On: ECC and S/4 RIK. Equipment
  • /SKYBFR/CL_YCA1_ERP_MAIL_FI_FA Simple Communication Add-On: ECC and S/4 RIK. Fixed Asset
  • /SKYBFR/CL_YCA1_ERP_MAIL_MMMAT Simple Communication Add-On: ECC and S/4 RIK. Material
  • /SKYBFR/CL_YCA1_ERP_MAIL_MMRFQ Simple Communication Add-On: ECC and S/4 RIK. Req.for Quotat
  • /SKYBFR/CL_YCA1_ERP_MAIL_MM_CO Simple Communication Add-On: ECC and S/4 RIK. Purch.Contract
  • /SKYBFR/CL_YCA1_ERP_MAIL_MM_GR Simple Communication Add-On: ECC and S/4 RIK. Goods Reciept
  • /SKYBFR/CL_YCA1_ERP_MAIL_MM_IV Simple Communication Add-On: ECC and S/4 RIK. Invoice
  • /SKYBFR/CL_YCA1_ERP_MAIL_MM_PO Simple Communication Add-On: ECC and S/4 RIK. Purchase Order
  • /SKYBFR/CL_YCA1_ERP_MAIL_MM_PR Simple Communication Add-On: ECC and S/4 RIK. Purch.Requisit
  • /SKYBFR/CL_YCA1_ERP_MAIL_PM_GN Simple Communication Add-On: ECC and S/4 RIK. General Notif.
  • /SKYBFR/CL_YCA1_ERP_MAIL_PM_MN Simple Communication Add-On: ECC and S/4 RIK. Maint.Notif.
  • /SKYBFR/CL_YCA1_ERP_MAIL_PM_MO Simple Communication Add-On: ECC and S/4 RIK. Maint.Order
  • /SKYBFR/CL_YCA1_ERP_MAIL_QM_QN Simple Communication Add-On: ECC and S/4 RIK. Quality Notif.
  • /SKYBFR/CL_YCA1_ERP_MAIL_SD_SO Simple Communication Add-On: ECC and S/4 RIK. Sales Order

5.1.6     WF RIK Classes

Workflow Rapid Implementation Kit is a collection of Sample Classes which is designed for fast and easy implementation of the logic for Workflow Exit Class.

5.1.6.1       /SKYBFR/CL_YCA1_WF_EXIT_BONE

Implementation of the /SKYBFR/CL_YCA1_WF_EXIT_BONE class is to create an inherited custom EXIT class with redefined AFTER_CREATE (or others in special cases) method.

AFTER_CREATE method interacts with the container of the SAP Workflow

5.1.6.2       /SKYBFR/CL_YCA1_WF_EXIT_<OBJECT>

List of exit classes to be used as Program Exits in work items of the SAP Workflow:

  • /SKYBFR/CL_YCA1_WF_EXIT_DMS Simple Communication Add-On: Workflow RIK. Document
  • /SKYBFR/CL_YCA1_WF_EXIT_EQUI Simple Communication Add-On: Workflow RIK. Equipment
  • /SKYBFR/CL_YCA1_WF_EXIT_FI_FA Simple Communication Add-On: Workflow RIK. Fixed Asset
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_CO Simple Communication Add-On: Workflow RIK. Contract
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_GR Simple Communication Add-On: Workflow RIK. Goods Receipt
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_IV Simple Communication Add-On: Workflow RIK. Invoice
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_MAT Simple Communication Add-On: Workflow RIK. Material
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_PO Simple Communication Add-On: Workflow RIK. Purchase Order
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_PR Simple Communication Add-On: Workflow RIK. Purchase Requisition
  • /SKYBFR/CL_YCA1_WF_EXIT_MM_RFQ Simple Communication Add-On: Workflow RIK. Request for Quotation
  • /SKYBFR/CL_YCA1_WF_EXIT_PM_GN Simple Communication Add-On: Workflow RIK. General Notification
  • /SKYBFR/CL_YCA1_WF_EXIT_PM_MN Simple Communication Add-On: Workflow RIK. Maintenance Notification
  • /SKYBFR/CL_YCA1_WF_EXIT_PM_MO Simple Communication Add-On: Workflow RIK. Maintenance Order
  • /SKYBFR/CL_YCA1_WF_EXIT_QM_QN Simple Communication Add-On: Workflow RIK. Quality Notification
  • /SKYBFR/CL_YCA1_WF_EXIT_SD_SO Simple Communication Add-On: Workflow RIK. Sales Order

Custom EXIT class should be assigned to the User Decision work item of the SAP Workflow as Program Exit.

 

5.1.7     Main Methods

5.1.7.1       GET_HTML_BUTTONS

Creates action buttons, saves them to the system and returns an HTML-fragment with buttons code in it.

get_html_buttons( 
*    iv_email               =
*    iv_wiid                =
*    is_gosobject           =
*    iv_decikey1            =
*    iv_decikey2            =
*    iv_event1              =
*    iv_event2              =
*    iv_action1             =
*    iv_action2             =
*    iv_text1               =
*    iv_text2               =
*    iv_templatename        =
*    iv_template            =
*    it_buttonactions       =
*    iv_container_via_email =
*    iv_container_comment   =
).

This method is quite flexible. So, you can obtain Object, Action, Template and Container parameters of this method in different combinations for different cases.

Inbound Email

Here you can give email address of your inbound processing to process emails generated by pressing that button in iv_email parameter. If you don’t, the Add-On will use setting or SO50 configuration to find out inbound address.

Object

If you want to create action buttons for Workflow Item (case of decision-based task), you should give Work Item ID into iv_wiid value, also it is recommended to fill is_gosobject as your Business Object type and key (if not, the Add-On will try to recognize it from the Work Item ID). That will create Action Buttons. And after the user clicks these buttons and sends a generated action email, the system will automatically proceed to it and perform a proper action on the Work Item.

If you only need to catch the user’s comment or any attachments from the user’s email with the help of a button, you can fill only is_gosobject, that will do.

Note: is_gosobject is mandatory parameter in get_html_buttons method for event-based tasks

Action

For Action Buttons you should obtain actions parameters, they have some variations.

If there is one or two action buttons at a time you can use iv_decikey*, iv_event*, iv_action*, iv_text* parameters. If it is necessary to have more buttons, fill and pass it_buttonactions table to it.

If your Work Item is User Decision, give Decision keys to iv_decikey* (commonly it is ‘0001’, ‘0002’,… values in order you create outcomes for Work Item).

If your Work Item is Event-based, give Events’ names to iv_event* (they can be found in Work Item outcomes, they are technical names of Events).

In both cases you are to fill in iv_action* parameter. This value will be used as the Action name in the system while the Action will be processed.

The text to be shown to the user on Buttons is to be put into iv_text* parameter. If it is not, iv_action* value will be used.

Template

You can pass the custom HTML template name to use for Buttons fragment generation, otherwise SO10 text name from general Add-On configuration will be used; if there is none, Skybuffer sample named /SKYBFR/BUTTONS_EMAIL_TEMPLATE will be used.

That template should contain tags to fill with values (n – is button number, 1,2,…, any number):

%URLn% or <!–%URLn%–> — for “mailto” link, that will contain the unique ID of the button

%ACTIONn% on <!–%ACTIONn%–> — for the text to be shown to the user.

Container

For Action buttons you can set Workflow or Work Item level Container Element to fill with user decision comment (iv_container_comment method parameter, Container Element should be of SOLI type and multiline) and “decision via email” flag (iv_container_via_email method parameter, Container Element should be of CHAR1 type).

You should pass value as a string with Container Element name, Container place (WI for Work Item level, it is by default, or WF for Workflow level) and Container Element value (for “via email” flag, X by default) separated by spaces.

Sample Code

Here are sample codes that show how to use this method.

This one will create HTML fragment with two Decision buttons for User-decision Work Item with Decision keys 0001 and 0002. The Buttons’ Actions and Texts are Approve and Reject. Furthermore, Container Elements for “via email” flag and user comment are set as EV_DECISION_BY_EMAIL and EV_COMMENT places on Workflow level. “Via email” flag will be set as X if Action is performed from Action email. The template is a default one:

lv_buttons = get_html_buttons(
  iv_wiid                = ls_wi_header-wi_id
  is_gosobject           = ls_gosobject
  iv_decikey1            = '0001'
  iv_decikey2            = '0002'
  iv_action1             = 'Approve'
  iv_action2             = 'Reject'
  iv_container_via_email = 'EV_DECISION_BY_EMAIL WF X'
  iv_container_comment   = 'EV_COMMENT WF' ).

This one is quite similar to the previous one but is meant for Action-based Work Item. It uses RELEASED and SIGNIFICANTLYCHANGED events. And it uses the default Container Elements level, they will be saved on Work Item level:

lv_buttons = get_html_buttons(
  iv_wiid                = ls_wi_header-wi_id
  is_gosobject           = ls_gosobject
  iv_event1              = 'RELEASED'
  iv_event2              = 'SIGNIFICANTLYCHANGED' 
  iv_action1             = 'Approve'
  iv_action2             = 'Reject'
  iv_container_via_email = 'EV_DECISION_BY_EMAIL' 
  iv_container_comment   = 'EV_COMMENT' ).

This one creates just one button to catch the user’s comment or attachments (depending on the Add-On’s settings). The Action name is Sign. Text on the button is Sign On Document. And the HTML fragment template is /SKYBFR/BTNSIGN_EMAIL_TEMPLATE instead of the default one:

lv_buttons = get_html_buttons(
  is_gosobject           = ls_gosobject
  iv_action1             = 'Sign'
  iv_text1               = 'Sign On Document'
  iv_templatename        = '/SKYBFR/BTNSIGN_EMAIL_TEMPLATE' ).

5.1.7.2       CONVERT_VALUES_TO_HTML

It is a very powerful method to prepare email body content in a readable form. It converts a set of different values to HTML fragment. Can be fully customized via templates. It returns string value with HTML fragment in it.

convert_values_to_html(
*  EXPORTING
*    iv_sectiontemplate       =
*    iv_sectiontemplatename   =
*    iv_header                =
*    iv_headertemplate        =
*    iv_headertemplatename    =
*    iv_string                =
*    iv_stringtemplate        =
*    iv_stringtemplatename    =
*    it_values                =
*    iv_valuestemplate        =
*    iv_valuestemplatename    =
*    iv_valuesrowtemplate     =
*    iv_valuesrowtemplatename =
*    it_data                  =
*    iv_datatemplateisfull    = ABAP_FALSE
*    iv_datatemplate          =
*    iv_datatemplatename      =
*    iv_datarowtemplate       =
*    iv_datarowtemplatename   =
*    iv_dataheadtemplate      =
*    iv_dataheadtemplatename  =
*    iv_datacelltemplate      =
*    iv_datacelltemplatename  =
).

As you can see, all parameters are optional. This method can get them in any combinations and prepare an HTML fragment containing Header, Text String, Name-Value Pairs and Data Table altogether or some of them in this order. It can also use customized Templates if you do not want to use default ones for the Section (whole fragment) and all its elements. Also, you can find default templates at the very beginning of this method’s code to understand their logic. Each template can be provided as a text string with an HTML code in it or as SO10 text name, in this case the method will read that text itself and use it as a template. If some or all templates are not provided, the method will use default ones.

Section

Section is an HTML fragment itself.

You can customize its template by giving it as a template string value in iv_sectiontemplate or as SO10 text name of template in iv_sectiontemplatename. It is quite similar to one of HTML page parts that can be put between <BODY> </BODY> tags. You can concatenate any number of Sections and put them into the main email template as the email body. It should contain %CONTENT% or <!–%CONTENT%–> tag where all other elements of the Section (Header, Text String, Name-Value Pairs and Data Table)  will be put.

Header

It is a text string at the very beginning of that HTML fragment. Commonly, it is a name or a title of a fragment, or just a text with a larger font to attract attention. Pass the value in iv_header parameter.

You can customize this template by giving it as a template string value in iv_headertemplate or as SO10 text name of template in iv_headertemplatename. If you use the default template for the Section, it should be <TR><TD>…</TD><TR> fragment of HTML. It should contain %CONTENT% or <!–%CONTENT%–> tag where your string value will be put.

Text String

It is just a text string that can be used to provide some information to the user in the form of a plain text. You can use, for example, </BR> tags in your string value to divide it into paragraphs. Pass the value in iv_string parameter.

You can customize its template by giving it as a template string value in iv_stringtemplate or as SO10 text name of template in iv_stringtemplatename. If you use the default template for the Section, it should be <TR><TD>…</TD><TR> fragment of HTML. It should contain %CONTENT% or <!–%CONTENT%–> tag where your string value is to be put.

Name-Value Pairs

It represents multiple lines with Name and Value in each string. It is useful to provide multiple items in readable form. Pass names and values in it_values table.

You can customize the template by giving them as a template string value or as SO10 text name of template for the whole Name-Values block in iv_valuestemplate or iv_valuestemplatename and one row of that block in iv_valuesrowtemplate or iv_valuesrowtemplatename. If you use the default template for the Section, the block template should be <TR><TD>…</TD><TR> fragment of HTML. It should contain %CONTENT% or <!–%CONTENT%–> tag where Name-Value rows are to be put. The row template represents one row of that block and commonly represents <TR>…</TR> fragment and should contain %NAME% or <!–%NAME–> tag for Name and %CONTENT% or <!–%CONTENT%–> tag for Value.

Data Table

Represents any table with data. That table is generally formed with a header. Pass data in it_data value.

This part has a broad functionality.

You can pass any table and this method can get columns headers as data elements’ descriptions from your data table. The default template has a header and fills it from data elements.

You can pass the header cell template in iv_dataheadtemplate or iv_dataheadtemplatename and the data cell template in iv_datacelltemplate or iv_datacelltemplatename and this method will form a table with your formats. They are <TH>..</TH> and <TD>..</TD> fragments and should contain %CONTENT% or <!–%CONTENT%–> tag where the value will be put.

Alternatively, you can pass the whole table template in iv_datatemplate or iv_datatemplatename with predefined column headers or even without them and the whole row template in iv_datarowtemplate or iv_datarowtemplatename. In this case you should pass iv_datatemplateisfull = ABAP_TRUE and the row template should contain %CONTENTn% or <!–%CONTENTn%–> tag for each column cell value (n = 1,2,…, its column number, table field number).

5.1.7.3       INJECT_HTML_CONTENT

Injects one text string into another using a specified tag as a place point.

inject_html_content(
*    iv_contname = ‘CONTENT’
iv_content  =
iv_template =

).

It is useful to fill HTML templates with fragments or values.

You should put Content Tag name into iv_contname. The default one is CONTENT. It means that it will search for %CONTENT% or <!–%CONTENT%–> tag in the HTML template.

Content value iv_content will be placed in the HTML template instead of that specified Tag.

The HTML template itself should be put into iv_template value.

The method returns the HTML template with the Content value inserted in the position of that specified Tag.

Sample Code

This sample code shows an example where %DETAILS% tag changes with lv_details value and %BUTTONS% tag changes with lv_buttons value in lt_template HTML The template string runs as follows:

lv_template = inject_html_content(
  iv_contname = 'DETAILS'
  iv_content  = lv_details
  iv_template = lv_template ).
lv_template = inject_html_content(
  iv_contname = 'BUTTONS'
  iv_content  = lv_buttons
  iv_template = lv_template ).

5.1.7.4       PREPARE_FINAL_RECIPIENTS

This method makes it possible to use substitutes in email processing. It converts the given actors (recipients) list using substitution settings. Based on the settings, that list can be added with substitutes or changed to substitutes of given actors.

prepare_final_recipients(
  EXPORTING
    iv_wfd_id  =
    iv_task_id =
  CHANGING
    ct_actors  =
    ct_return  =
).

You should give it Workflow ID in iv_wfd_id and Task ID in iv_task_id, the method will use them to find out proper settings and according to them it will change the given ct_actors table.

Additionally, it adds error messages to given ct_return table, if they occur.

Sample Code

This sample code will change or append lt_actors table with substitutes according to the settings for ls_wi_attributes-wi_rh_task Workflow and ls_wi_header-wi_rh_task Task ID. If errors occur, they will be collected in lt_return table:

prepare_final_recipients(
  EXPORTING
    iv_wfd_id  = ls_wi_attributes-wi_rh_task
    iv_task_id = ls_wi_header-wi_rh_task
  CHANGING
    ct_actors  = lt_actors
    ct_return  = lt_return ).

5.1.7.5     CONVERT_RECIPIENTS

This method converts Recipients list of User Names, and/or Personnel Numbers, and/or Organizational Structures to Email Addresses list with Full Names. The email search algorithm can be configured via settings, you can set an order to search an email in the user maintenance and/or in the personnel record.

convert_recipients(
  EXPORTING
    it_recipients =
*    iv_objorder   =
*  IMPORTING
*    et_recipients =
  CHANGING
    ct_emails     =
    ct_return     =
).

You should put the Recipient list in it_recipients table as a list of actors, which is a list of User Names, and/or Personnel Numbers, and/or Organizational Structures.

You can set a search order by giving a value to iv_objorder parameter. If not, the value from the Add-On’s settings will be used; and if it is not configured, the default value will be used. There are some variations of that value: ‘US P’ (default one), ‘P US’, ‘US’ or ‘P’, where US means User maintenance record (SU01 t-code) and P means personnel record (0105 infotype 10 subtype).

If you need a Recipient list where Email Addresses are to be found, you can get it as et_recipients table. For example, if the email for User Name is found via personnel record there will be Personnel Number instead of User Name.

Email Addresses list with Full Names will be collected in ct_emails table. Duplicates will be deleted from there.

Moreover, any errors occurring during emails and names search process will be collected in ct_return table.

Sample Code

In this sample Recipient list lt_actors will be converted to Emails list lt_emails using the Add-On’s settings for search order (or default value). Errors will be collected in lr_return table, if they occur.

convert_recipients(
  EXPORTING it_recipients = lt_actors
  CHANGING  ct_emails     = lt_emails
            ct_return     = lt_return ).

5.1.7.6       SEND_EMAIL

This method forms email Send Request and puts it into SAPconnect for outbound processing. It has a useful functionality to simplify emails send process. It can use different parameters to provide Recipients. Also, this method can get an email template and put the email content in there by itself, if needed.

send_email(
  EXPORTING
*    it_recipients   =
*    it_emails       =
*    iv_email        =
    iv_content      =
    iv_subject      =
*    iv_templatename =
*  IMPORTING
*    et_return       =
).

You can pass the Recipients list in it_recipients table, and/or Email Addresses list in it_emails table, and/or single Email Address in iv_email value. If provided, the Recipients list will be converted to Email Addresses. All those Email Addresses will be combined into one list and the email will be sent to all of them.

Email content should be passed in iv_content value as HTML formatted text string.

You should give Email Subject in iv_subject string value.

Also, you can provide the HTML template name in iv_templatename value, which is SO10 text name. In this case iv_content should not be the full HTML email body, but just a fragment that will be injected into the template on %CONTENT% or <!–%CONTENT%–> tag place.

Should any errors occur during Send Request preparation, they will be collected in et_return table.

Sample Code

This sample code will send an Email to <fs_email>-email address with lv_content as the email body and lv_suject value as the email subject. Errors, if any, will be collected in lt_return table.

send_email(
  EXPORTING iv_email        = <fs_email>-email
            iv_content      = lv_content 
            iv_subject      = lv_subject
  IMPORTING et_return       = lt_return ).

 

5.1.8     Class Structure

22

As it could be seen from the diagram, the main class is /SKYBFR/CL_YCA1_CORE_UTILS, this class is inherited by /SKYBFR/CL_YCA1_ERP_UTILS which in its turn is inherited by /SKYBFR/CL_YCA1_WF_UTILS and /SKYBFR/CL_YCA1_MAIL_BONE.

/SKYBFR/CL_YCA1_WF_UTILS is inherited by /SKYBFR/CL_YCA1_WF_EXIT_BONE, /SKYBFR/CL_YCA1_WF_MAIL_INBND, /SKYBFR/CL_YCA1_WF_REMINDER and /SKYBFR/CL_YCA1_WF_ERROR_NOTIF.

Both /SKYBFR/CL_YCA1_MAIL_BONE and /SKYBFR/CL_YCA1_WF_EXIT_BONE have own subclasses in the scope of Rapid Implementation Kit (RIK).
RIK is a pack of provided Out-of-the-Box sample classes for the objects listed below:

  • /SKYBFR/CL_YCA1_…_DMS Simple Communication Add-On: Document
  • /SKYBFR/CL_YCA1_…_EQUI Simple Communication Add-On: Equipment
  • /SKYBFR/CL_YCA1_…_FI_FA Simple Communication Add-On: Fixed Asset
  • /SKYBFR/CL_YCA1_…_MM_CO Simple Communication Add-On: Contract
  • /SKYBFR/CL_YCA1_…_MM_GR Simple Communication Add-On: RIK. Goods Receipt
  • /SKYBFR/CL_YCA1_…_MM_IV Simple Communication Add-On: RIK. Invoice
  • /SKYBFR/CL_YCA1_…_MM_MAT Simple Communication Add-On: RIK. Material
  • /SKYBFR/CL_YCA1_…_MM_PO Simple Communication Add-On: RIK. Purchase Order
  • /SKYBFR/CL_YCA1_…_MM_PR Simple Communication Add-On: RIK. Purchase Requisition
  • /SKYBFR/CL_YCA1_…_MM_RFQ Simple Communication Add-On: RIK. Request for Quotation
  • /SKYBFR/CL_YCA1_…_PM_GN Simple Communication Add-On: RIK. General Notification
  • /SKYBFR/CL_YCA1_…_PM_MN Simple Communication Add-On: RIK. Maintenance Notification
  • /SKYBFR/CL_YCA1_…_PM_MO Simple Communication Add-On: RIK. Maintenance Order
  • /SKYBFR/CL_YCA1_…_QM_QN Simple Communication Add-On: RIK. Quality Notification
  • /SKYBFR/CL_YCA1_…_SD_SO Simple Communication Add-On: RIK. Sales Order

In case work item events should entail email sending to the participants of the Workflow, the program exit class should be assigned to it.

According to the process, the following WI events can be implemented:

  • AFTER_CREATE
  • AFTER_EXECUTION
  • AFTER_ASYNC_INVOKE
  • AFTER_RULE_EXEC
  • BEFORE_CREATE
  • BEFORE_EXECUTION
  • BEFORE_REMOVE
  • STATE_CHANGED
  • AFTER_ACTION
  • BEFORE_ACTION

In Custom Workflow EXIT Class an appropriate method should be redefined.

In Workflow EXIT Classes macros section contains Workflow Specific Include <CNTN02>, for some cases Custom Class macros section should contain additional include <CNTN03>

5.1.9     Implementation

5.1.9.1       General Prerequisites

  • YCA1 Add-On is installed and adjusted according to Maintenance Guide;
  • License Key is valid;
  • Inbound e-mail is configured (t-code: SO50). (YCA1 inbound class /SKYBFR/CL_YCA1_WF_MAIL_INBND should be assigned as default);

5.1.9.2       Custom Email Notification Generation Class Implementation (PO Release Process as example)

5.1.9.2.1       BONE Class Redefinition

Inherit Class /SKYBFR/CL_YCA1_ERP_MAIL_BONE to your new Custom class (for instance ZCL_YCA1_ERP_MAIL_BONE). /SKYBFR/CL_YCA1_ERP_MAIL_BONE should be defined as Superclass. It will be your main email generation class to make all your emails in the same style.

5.1.9.2.2       Make a Copy of RIK Notification Class

Make a copy of ERP RIK class. For example, copy /SKYBFR/CL_YCA1_ERP_MAIL_MM_PO to ZCL_YCA1_ERP_MAIL_MM_PO.

Set Custom BONE class as Superclass (in this example ZCL_YCA1_ERP_MAIL_BONE)

If the object is not in the list of classes provided Out-of-the-Box, select the most appropriate class to be used as a template.

5.1.9.2.3       Prepare Email

The main method for email generation is PREPARE_MAIL (/SKYBFR/CL_YCA1_ERP_MAIL_BONE), which could be redefined in the custom method.

Email preparing method is combined from several simple parts.

In the general case this method returns standard templates according to the current object’s process flow.

If a standard template provided in GET_TEMPLATES method does not suit, it can be determined in GET_HTML_TEMPLATE method. If the template design suits, no additional development is required.

Next steps are going to be adding elements of Template:

 

 

23
24

You can redefine next methods to use your corporative style for all emails in one place:

  • GET_FOOTER – Get Footer
  • GET_HEADER – Get Header and Subheader Strings
  • GET_SECTIONS – Get Email Content Sections. Here you can fill the beginning of all your emails.
  • GET_TEMPLATE – Get Email Template Name or Whole Template

PREPARE_EMAIL method allows to create email which is configured according to any business requirements.

5.1.9.3       Custom Workflow Exit Class Implementation (PO Release Process as example)

5.1.9.3.1       Prerequisites:
  • There is Workflow for PO release;
  • There is at least one decision task in the workflow;
5.1.9.3.2       Custom Workflow Exit Bone Class Creation

Custom Workflow Exit Classes should be copied from /SKYBFR/CL_YCA1_WF_BONE, in this example /SKYBFR/CL_YCA1_WF_EXIT_BONE should be copied to ZCL_YCA1_WF_EXIT_BONE with redefinition of some methods mentioned above.

5.1.9.3.3       Custom Workflow Exit Class Creation

Custom Workflow Exit Classes should be copied from /SKYBFR/CL_YCA1_WF_<OBJ>, in this example /SKYBFR/CL_YCA1_WF_EXIT_MM_PO should be copied to ZCL_YCA1_WF_EXIT_MM_PO. Custom Bone Class should be set as Superclass for ZCL_YCA1_WF_EXIT_MM_PO with correction of GET_BUTTONS and GET_SECTIONS methods if needed.

5.1.9.3.4       Set Program Exit for Task

For all tasks requiring event processing by YCA1, a custom class is set being created in the previous step as a program exit for the work item:

25
5.1.9.3.5       Redefine Events Methods

In /SKYBFR/CL_YCA1_WF_EXIT_BONE Redefine inherited from /SKYBFR/CL_YCA1_WF_EXIT methods and implement the logic for notification email generation and sending it to appropriate participants of the process.

Event methods should be implemented in accordance with the requirements described below:

The structure of the Event Method should run as follows:

  1. Check WI number to identify that the method is running for the required WI and split the logic for different tasks
26

2. Read WI/WF container and GOS objects to get all the required data which should be used for emails generation

27

3. Read the process participants that should be included into the email and be set as actors:

28

4. Call Method PREPARE_MAIL to get generated email using a previously created class (in this example ZCL_YCA1_ERP_MAIL_MM_PO). Then send the generated email by calling the method of SEND_EMAIL

29

NOTE: All the methods available in super classes are also available directly in the inherited classes: in any …WF_EXIT_<CUSTOM_N> class methods from /SKYBFR/CL_YCA1_CORE_UTILS, /SKYBFR/CL_YCA1_ERP_UTILS, /SKYBFR/CL_YCA1_WF_UTILS can be called directly.

5.1.9.3.6      Create Custom HTML Template in MJML Framework

As an alternative to HTML template direct creation, MJML framework can be used and then the code should be converted to HTML (available in MJML framework).

For instance, an initial template created in MJML framework code can look as shown below:

30

Preview is available:

31

MJML code conversion to HTML tool:

32

HTML is to be saved in Reach Text Format file (*.rtf) and uploaded as Standard Text (t-code: SO10)

NOTE: There is Out-of-the-Box solution for HTML templates. It is adjustable in Customization Node: SAP Customizing Implementation Guide ® Skybuffer Simple Communication Add-On for Business Workflow ® Configuration Settings ® Global Configuration Settings. Templates available are the following:

  • Decision Buttons HTML Templates
  • Decision Declined Email Template
  • General Email Template
  • Decision Accepted Email Template
  • Reminder Email General Template

Predefined templates can be changed to custom, according to the requirements of the business.

5.1.9.4       Inbound Email Processing

5.1.9.4.1       Prerequisites:
  • Inbound e-mail is configured in SO50 T-code. (YCA1 inbound class /SKYBFR/CL_YCA1_WF_MAIL_INBND should be assigned as default);
5.1.9.4.2       Decision Mail (with UUID) for Workflow

Inbound class /SKYBFR/CL_YCA1_WF_MAIL_INBND is used for incoming emails processing.

It supports Event-based and Decision-based work items.

Inbound processing can be customized in accordance with the Master Guide in IMG Node:

SAP Customizing Implementation Guide ® Skybuffer Simple Communication Add-On for Business Workflow ® Configuration Settings ® Global Configuration Settings

Comment Capture BADI Implementation is available via customizing Node:

SAP Customizing Implementation Guide ® Skybuffer Simple Communication Add-On for Business Workflow ® Inbound Processing BADIs ® Comments Capture ® BADI: Components Capture Implementations

BAdI available in Out-of-the-Box solution: /SKYBFR/YCA1_WF_COMM_CAPT_SMPL

By default, /SKYBFR/CL_YCA1_WF_COMCAP_SMPL is provided by YCA1 Add-On. You can copy BAdI implementation and use it for customization. The BADI makes comments capturing flexible for the Customer. In allows using comments different from standard logic of handling and saving them to any place or using for any other purpose.

Input parameters:

  • Object Relationship Service: BOR object identifier;
  • Decision Action;
  • Comment text.

NOTE: Security strategy can be applied

5.1.9.4.3       Info Mail (Non-Workflow)

The incoming email subject can be captured and processed according to the requirements of the business.

The logic is to be implemented via customization Node:

SAP Customizing Implementation Guide ® Skybuffer Simple Communication Add-On for Business Workflow ® Inbound Processing BADIs ® Subject to BUS Object Conversion ® BADI: Subject to BUS Object Conversion OutOfTheBox Sample Configuration

There is a predefined logic implemented Out-of-the-Box:

Sample BAdI implementation: /SKYBFR/YCA1_WF_SUBJ_TO_O_SMPL

NOTE: Security strategy can be applied

5.1.9.4.4       Security Strategy

Security strategy is to be adjusted in the configuration node:

SAP Customizing Implementation Guide ® Skybuffer Simple Communication Add-On for Business Workflow ® Configuration Settings ® Business Object and Workflow/Task Individual Settings

Class and Method for security concept applying should be set for each Business Object

2 strategies are available Out-of-the-Box:

  • Class /SKYBFR/CL_YCA1_WF_SUBOBJ_SMPL Method CHECK_SENDER_ALLOW_ANY
  • Class /SKYBFR/CL_YCA1_WF_SUBOBJ_SMPL Method CHECK_SENDER_BY_SO10_LIST

CHECK_SENDER_ALLOW_ANY – Sender’s address is checked, and any sender’s address is allowed. You can use this method as a sample for your needs.

CHECK_SENDER_BY_SO10_LIST – Sender’s address is checked and allowed only if it is included into the white list. The white list should be created as a standard text and uploaded to SO10. The white list should be set as an additional parameter for Business Object customization settings in Business Object and Workflow/Task Individual Settings. Options to set white list entries are the following:

Out-of-the-Box list: /SKYBFR/CHECK_SENDER_DEFAULT_LIST

5.1.9.5       Reminder

It is a reminder with line management escalation feature.

Notification email contains all the necessary for actions objects in the accordion form with a possibility to take an action for each object.

Report name /SKYBFR/YCA1_WF_REMINDER. It can be scheduled in accordance with the Master Guide.

For different Workflows and Different Tasks in the same Workflow, a specific logic for reminder processing or applied template can be defined.

You can find Out-of-the-Box samples:

Class /SKYBFR/CL_YCA1_WF_REMINDER:

  • Method FILL_ACCORDION (for Decision Makers emails)
  • Method FILL_ACCORDION_MANAGER (for Escalation Emails that are sent to Managers)

Both Methods can be used as templates for custom implementation.

The Structure of the Methods is the following:

  1. Get accordion template using method GET_HTML_TEMPLATE (Standard Text /SKYBFR/DEFAULT_ACCORDION_TEMPLATE is defined in the method as default;
  2. Fill the template with the following parameters:

NAME (accordion caption in a sample case is Work Item ID, but please use something related to your business case, for example, “Purchase Requisition # 500019″

CONTENT (accordion body). Here it is possible to have some header and data table for a particular business object that is processed by the work item

The reminder escalation rule should be set in the customizing Node:

SAP Customizing Implementation Guide ® Skybuffer Simple Communication Add-On for Business Workflow ® Configuration Settings ® Global Configuration Settings

Parameter: Reminder Escalation Rule.

You can specify a rule for escalation purpose in the Reminder process. The container of the rule should be the same as for rule 168.

5.1.9.6       Error Notification

Notification reporting to IT department

The Add-On solution covers processing of the crashed work items. It allows defining the required workflow ID and task ID and the required work item status for which the notification should be triggered. It allows IT department to be informed in time and perform appropriate repairing actions.

Report /SKYBFR/YCA1_WF_ERRORS_NOTIFY. It can be scheduled in accordance with the Master Guide.

You can find Out-of-the-Box sample:

Class /SKYBFR/CL_YCA1_WF_ERROR_NOTIF:

  • Method FILL_ACCORDION

The Structure of Methods is the following:

  1. Get accordion template using method GET_HTML_TEMPLATE (Standard Text /SKYBFR/DEFAULT_ACCORDION_TEMPLATE is defined in the method as default;
  2. Fill the template with the following parameters:

NAME (accordion caption in a sample case is Work Item ID, but please use something related to your business case, for example, “Purchase Requisition # 500019″

CONTENT (accordion body). Here it is possible to have some header and data table for a particular business object that is processed by the work item

Distribution List (t-code: SO15/SO23) will be used to send Error notifications. Usually the IT or Support departments members are included in the distribution list.

For different Workflows and Different Tasks in the same Workflow, a specific distribution list for error notifications can be defined in the Customization Node:

SAP Customizing Implementation ® Skybuffer Simple Communication Add-On for Business Workflow ® Workflow Utilities Settings ® Workflow Errors Notification Settings

 5.2     SAP Translation Hub. ABAP Integration

Multilingual functionality of Simple Communication Add-On allows to run any language which is required.

5.2.1     Prerequisites

Comply with some prerequisites in Translation Hub Service on SAP Cloud Platform, ABAP system and Cloud Connector.

5.2.2     Cloud Connector

Configure a subaccount in SAP Cloud Connector for our S-user to make it possible to connect directly SAP Cloud and our ABAP system

33

Configure Cloud To On-Premise system mapping for RFC connection. There grant access to function modules with LXE_ prefix as shown below.

34

5.2.3     SAP Cloud Platform Cockpit

Create Destination in the service of Translation Hub. Its name shall look like STH_<S-user> as shown below (to be considered obsolete from 23.03.2018)

35

For a newer Translation Hub version, that name shall be as STH_<S-user>_<System ID>_<Client Number> to have an ability to use multiple ABAP systems for translation.

36

Check if our ABAP system is accessible from Cloud.

37

5.2.4     ABAP Back-End System

The ABAP system is to be a Unicode system. We can check it in SAP Logon GUI in System -> Status menu item

38

Functional Modules necessary for RFC calls are to be there (if not, implement SAP Note 2349776).

39

Create a technical user (its name is specified in the Translation Hub Destination) of Communications Data type and assign Required Authorization to this role. Check that authorization with Translation Hub Documentation.

40
41
42

Use LXE_MASTER t-code to create an Object list for translation.

43

Put the Object List description and add Objects to translate into it. Use LIMU REPT object type for ABAP Text Elements. For Classes names you should add “=” symbols so that the name is 30 symbols long and then add “CP” in the end. You can include any other objects like Data Elements, for example, to translate them, too.

44

Save and generate the Object List.

45

Wait until Status turns into X – Generation Complete

46

Now you can use that Object List in Translation Hub to translate all the included objects.

5.2.5     Create ABAP project in SAP Translation Hub

Run Translation Hub Service and create an ABAP project

47

Starting from 23 March 2018, there is a field to choose Destination to our ABAP system as described:

40
49

Try to choose Object List, but there is no one found

50

So, now we can choose Object List from our ABAP system, translate it, postprocess if needed and send it back to our system translated into the chosen languages.

 

5.2.6     Best-practices for multilingual ABAP development

Always use English as the default language for all your ABAP development.

Avoid using text constants in your code. Use text elements instead.

51

If possible, output screen fields or print fields shall not be fixed in width to fit any length of the text as it can change from one language to another.

A Text Pool of Text Elements is initialized each time a program object is created (Report is started, or Class Instance is created). It is initialized in the current User Session language. So, if you need to use Text Elements in a language other than the current one (to prepare emails for different receivers, for example), use SET LANGUAGE statement to do it. If the Text Pool is not switched successfully, it returns SY-SUBRC non-zero value, use some default language value in such case.

52

You must use that statement in each report or class separately. As the statement switches only current Text pool and does not change any Pool in super class or called report, you must switch it inside each program object you use.

To reset Text Pool to current User Session language just use SET LANGUAGE SY-LANGU statement.

5.3     Namespace

Skybuffer Add-On is fully developed in /SKYBFR/ namespace.

5.4     Technical Prerequisites

To ensure normal decision workability on event-based Work Items, there is a need to implement several SAP OSS Notes on appropriate basis versions:

  • 1855577
  • 2265639
  • 2335111
  • 2398986

6. Error Handling

Most of Skybuffer Add-On methods return a table that contains all the system messages and errors.

Also, inbound processing provides an error list in tabular form in feedback email.

So, each error in email and workflow processing can be taken and analyzed.

Troubleshooting ABAP Report that restarts inbound processing for selected email is provided as a part of Skybuffer Add-on package. /SKYBFR/YCA1_WF_SOIN_RESTART report can be used to restart inbound processing of any email or set of emails. It is based on Send Request ID (GUID) that could be taken from transaction SOIN for a particular inbound email object. Additionally, it can use any inbound processing class in the system to proceed email.