How to maintain BPF email notification template
This article is to clarify the understanding of the program “RSBPCB_MAINTAIN_EMAIL_TMPL”(or UJB_MAINTAIN_EMAIL_TMPL) and explain how to use it to maintain BPF email template.
1,Execute the program and check BPF templates.
1) Logon to SAPGUI
2) Go to ABAP Editor (using “se80”) ->select “Program” and type “RSBPCB_MAINTAIN_EMAIL_TMPL” as you can see below.
3) Click on F8 or hit the icon in the toolbar. It opens “BPC: BPF Email template table” overview like below.
4) You can see the detail of each template by double clicking on a template.
You can also execute T-code 'SE38' ->Execute the program 'UJB_MAINTAIN_EMAIL_TMPL' ->You will see the BPF template table as below:
There are 2 ways to set body of email template, either using Smart Form Body or Email Body.
If you set both of them, the Smart Form Body will be used. If there is not Smart Form Body,then, the Email Body will be used.
Email Body is just plain single line text that you can easily create.
For Smart Form Body,please refer to a section Manage Smart Form
2,Activate email notification.
This is how to activate and deactivate email notification. Each email notification can be
activated or deactivated.
1) Click on the 'edit' button, then, the email template list becomes Edit mode.
2) You can select to activate or deselect to deactivate in the column “Is Active”.
3,Manage smart form body.
Using Smart Form editor, user can change the Smart Form Body.
1)Open Smart Form editor using transaction “SMARTFORMS”.
2) Create a new email template by copying an existing template.
First,select an existing email template from the Form list.
And, copy it by clicking on the copy icon in the toolbar.
3) Enter the name of the new Smart Form Body. And, create it.
Note: Name of custom email template should start with “Z” or “Y”.
Note: You can create this new template only as a Local object. Or you
can transport it by choosing a package.
4) You can either view by clicking on “Display” button. Or, you can change by clicking on the “Change” button. Or you can create new one using “Create” button from scratch.
Below screen shot shows the SAP Form Builder in which the newly created Smart Form Body is open in edit mode.
Note: By default, the Form Painter will be displayed as shown below. If
you want turn of, you can hit F9 key or go to Utilitiesand select a menu item Form Painter on/off
5) Open the email template body by expanding “Pages and Windows” until you see the leaf node
which is “NOTIF_BODY”. This node actually has the notification text body that you can edit.
6) Double click the “NOTIF_BODY” to open the notification text body as shown below.
7) The variables used in the email template are like below.
-&I_PROCESS_NAME&: Process instance name.
-&I_INST_CTX_STR&: Process instance context.
-&I_RGN_NAME&: Activity name.
-&I_RGN_CTX_STR&: Activity context.
-&GV_URL&: URL to either Activities list or Process Monitor in user friendly name.
-&URL&: Full URL to either Activities list or Process Monitor.
Please see the example email here.
Note:you can Maintain parameter EMAIL_NOTIFICATION_URL_PREFIX to replace the http link with the relevant
server name.Refer to SAP note 1717100.
4,Create custom email templates.
BPF provides 15 system email notification templates. Customer can use these templates as is. But, it
is also possible for customer to create their own email notification template.
1) Click on New Entries button in the toolbar.
2) Choose “C”(Customizing email template) for the Email Type.
3) ChooseE-mail Template ID which you want to replace with the custom email template.
4) Type email template title using these 2 variables.
-%PROCESS_NAME%: Process instance name.
-%STEP_REGION_NAME%: Activity name
5) Choose “Yes”if you want to activate this custom email template.
Note: If both custom and system email templates are active, the custom
email template will be used.
6) Select Smart Form Body which you have created above.
7) Just enter “RSBPCB_SF_XSF_URL_CALLBACK” for the URLCallback. This is used later to call
the proper URL.
8) You can leave the Email Body blank as you already set the Smartform Body.
9) Choose a appropriate BPF Operation from the operation.
10) Just save your changes. Then, you can receive email notifications which will be generated
based on the custom template.