Although SAP delivers many workflows with the HCM P&F processes, it is often imperative to not only develop the custom Workflow (WF), but also add custom emails. SAP provides a relatively easy method to develop the custom “simple” emails. More complex emails can be developed and added to the WF. These more ‘complex’ emails might include, as an example, a list of items (i.e. Employee Names), which is normally not possible using the SAP provided ‘simple’ method.
This article will demonstrate how to develop not only a ‘simple’ email, but also the requirements to develop a more complex email. Simple Email: As part of standard WF for HCM P&F, the workflow builder includes several types of ‘steps’ that added to a WF.
- Step 1. Importing the required values from Process and adding to WF Container. The Configuration for this step includes three parts:
- Defining the WF container fields that will be used. There will be four container fields that need to be defined: form_standard, NOM_MGR_NAME, NOM_MGR_EMAIL, and NOM_NAME. (See below for configuring “form_standard”.)
The remaining three container fields will be as follows:
- NOM_MGR_NAME as dictionary type EMNAM (as shown below)
- NOM_MGR_EMAIL as dictionary type COMM_ID_LONG.
- NOM_MGR_NAME as dictionary type EMNAM.
- Entering the Task (as shown below). Add an ‘Activity’ step to the WF as SAP standard task TS1700110 as shown below.
The configuration includes the Task and the Binding
- The final part is to add the email task and the configuration.
As shown in the image above, the ‘Send Mail’ WF step has been added to the WF. The configuration includes the Recipients, Subject, and Email Body, as shown below:
Complex E-mailThe HCM P&F process that is the basis for this complex email is described in the article HCM Processes and Forms: How to Use Floor Plan Manager Effectively written by this author, which can be found in the HR Expert publication. It can be viewed in the following link (with appropriate subscription) http://sapexperts.wispubs.com/HR/Articles/HCM-Processes-and-Forms-How-to-Use-Floor-Plan-Manager-Effectively?id=0EFE83C3632E4BD48E275F9B8099CA97#.VcytemMsJiM/ The first step in developing a complex email is to create an ABAP class with the IF_WORKFLOW interface. Here are the steps to create the required ABAP class.
- Use transaction SE24, enter the Object type and click the Create button
In the Popup below, enter the Description and click the Save button and save into your transport.
In the ‘Interface’ tab, enter IF_WORKFLOW.
As soon as the interface is added, the results will be that additional Interfaces are added.
Also added are the Methods shown below:
Then add the Attributes as show below:
In the Method ‘BI_PERSISTENT~FIND_BY_LPOR’, add the following code:
The two custom dictionary items are defined as follows:
In Method BI_PERSISTENT~LPOR, add the following code:
- result = me->por.
Add four new Methods as shown below.
The parameters and code are shown below:
When the process is executed and submitted from MSS, the result is the email shown below (from transaction SOST):
From the screen shot above, note that there are two names that are displayed. With the code in method EMAIL_WITH_LIST, the number of names that will appear depends on the input of the form. Refer to the article in HR Expert.
ABOUT HR FOCAL POINT
- When time, accuracy and high-quality support are essential, HR Focal Point's precision approach to SAP HCM solutions is the clear choice.
- HR Focal Point has been the SAP HCM expert since 2004 with hundreds of years of combined consulting experience its team.
- HR Focal Point has the SAP HCM experts that will allow you to achieve your goals on time, on point and on budget, thus maximizing your ROI.
- HR Focal Point offers a flexible engagement model so you only pay for the services you require, when you require them.
- As an SAP Services Partner, HR Focal Point is known for delivering high-quality solutions, in support of SAP HCM, that are completed accurately and on schedule.
- HR Focal Point has partnered with SuccessFactors to develop and deliver innovative Cloud solutions, including Employee Central Payroll, for their clients.
FOR MORE INFORMATION
HR Focal Point
Telephone: +1 855.464.4737