10 Impl 12 CustomTools Alerts

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Customization Tools:

Alerts
SAP Business One
Version 10.0

PUBLIC

This topic introduces the alerts feature of SAP Business One.

1
Topic Objective

Objectives:
▪ Describe the business situations covered by predefined alerts
▪ Set up and run the two types of alerts in SAP Business One:
▪ Pre-defined alerts
▪ User-defined alerts

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2

▪ In this topic, we cover the alert mechanism provided in the SAP Business One application.
▪ You will be able to describe the business situations covered by predefined alerts, and set up and
run the two types of alerts – pre-defined alerts and user-defined alerts.

2
Alerts: Business Scenario

▪ The purchasing manager wants to be notified automatically as soon as an inventory item


falls below the minimum stock quantity. On receiving the notification, the manager can
decide whether to reorder stock.
Solution: Use the predefined alert Minimum Stock Deviation.
Optional solution: Create a user alert to send the manager a report of low inventory
items and schedule the report to run daily or weekly.

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3

▪ Let us look at a business example for an alert. In the example shown here, the
purchasing manager wants to be notified automatically as soon as an inventory
item falls below a the minimum stock quantity. On receiving the notification, the
manager can decide whether to reorder stock.
▪ This example is a fairly simple requirement and can easily be set up using a
predefined alert in the system.
▪ SAP Business One can also support more complex requirements with the addition
of user queries. A creative use of alerts is as a task list or work order for a person.
For example, if the purchasing manager in this scenario does not need to know
immediately about the low stock, then you can create a user alert based on a
query to provide a list of low-inventory items on a scheduled basis, such as once a
day or once a week.

3
Alerts

Administration > Alerts Management

▪ Alerts notify users instantly when a specific


business event or condition occurs
▪ Alerts do not prevent the event from occurring. The
alert notifies you that the event has happened.
▪ Internal, email, text and fax mechanisms are
supported
▪ To receive an alert, user must have a user account;
however the user can receive notifications even if
not logged in

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4

▪ The alert mechanism in SAP Business One informs one or more users instantly
when a certain event or condition occurs.
▪ It is important to realize that alerts do not prevent the event from occurring. The
alert notifies you after the event has happened.
▪ Four types of notification mechanisms are supported: internal, email, text and fax.
Internal notifications appear in the SAP Business One client.
▪ To receive an alert, a user must have a user account in SAP Business One.
However, the user does not have to be logged into SAP Business One to receive
email, text and fax notifications.

4
Setting Up Alerts
Administration > Alerts Management

To set up alerts, a user needs the general Predefined Alerts


authorization Alerts Management
▪ Predefined with SAP Business One
▪ Only need to activate and configure
the alert
▪ Instant notification to recipient

User-defined Alerts

▪ Write your own using a query


▪ The alert will trigger when the query
runs and if there are any results from
the query
▪ Query can be scheduled

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5

To set up alerts, you need the general authorization to Alerts Management.


There are two ways to set up an alert:
▪ You can use one of the predefined alerts supplied with SAP Business One. In this
case you simply need to configure and activate the alert The alert will provide
instant notification to users when an event occurs.
▪ Or, you can create your own alert based on a query. In this case the alert will
trigger when the query runs and will provide the results of a query to the users.
The query can be scheduled to run at a specific time and frequency.

5
Alert Service

▪ Alert service is managed in Job Service area of


the System Landscape Directory (SLD)
https://<server>:<port>/ControlCenter/
▪ Alert Settings are accessed from link in the Job
Service. In the Alert Settings, the alert service is
selectable by database
▪ Alert service must be RUNNING at all times for
alerts to work
▪ The AlertSvc user is a predefined technical user
and is used to connect to the company database
to execute alerts

Note: In a SAP HANA environment the alert


service is dependent on the Service Layer.
Service Layer must be installed in same
landscape and bound with the database server

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6

▪ The alert mechanism runs as a service and is managed in the Job Service area of
the System Landscape Directory (SLD). The SLD is installed with the server
components during the SAP Business One installation. To access the System
Landscape Directory, use the path shown in the slide, then login to the SLD using
the site user credentials and select the link for Job Service.
▪ The settings for alerts are accessed from the link provided in the Job Service.
▪ In the Alert Settings, the alert service is selectable by company database

▪ The alert service must be running at all times in order for alerts to work

▪ The AlertSvc user is a predefined user in SAP Business One and is


automatically defined in the alert settings and functions as a technical user for
connecting to the company database in order to execute alerts.

▪ Note: in a SAP HANA environment, the alert service additionally requires the
Service Layer to be installed in the landscape and bound with the database server.
For more details about the alert server and service layer requirement, see the SAP
Business One Administrator’s Guide, version for SAP HANA.

6
Predefined Alerts

7
Predefined Alerts
Administration > Alerts Management

▪ A fixed number of
predefined alerts cover
common business
situations

▪ To see the list of


predefined alerts, choose
Administration > Alerts
Management.
Predefined
Alerts

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8

▪ A fixed number of predefined alerts are provided for you. These cover common
business situations where alerts are typically used.
▪ To see the list of predefined alerts, open the Alerts Management window. You will
see the list of alerts, and whether any of them are active.
▪ You can view or edit details of an alert by choosing the arrow link next to the alert
name.

8
Predefined Alerts

▪ Predefined alerts for sales documents:

▪ Deviation from % of Gross Profit


▪ Deviation from Commitment Limit
▪ Deviation from Credit Limit
▪ Deviation from Discount (in %)
▪ Deviation from Budget
▪ Minimum Stock Deviation
▪ MRP Recommendation Due

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9

▪ The deviation from gross profit, deviation from commitment and credit limits, and
discount alerts can be applied to sales documents.
▪ The gross profit deviation is checked at the document level. The commitment and
credit limit are checked against the document total. The discount limit is also
checked against the document total.

9
Predefined Alerts

▪ Predefined alerts for purchasing documents,


payments and journal entries:
▪ Deviation from % of Gross Profit
▪ Deviation from Commitment Limit
▪ Deviation from Credit Limit
▪ Deviation from Discount (in %)
▪ Deviation from Budget
▪ Minimum Stock Deviation
▪ MRP Recommendation Due

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10

▪ The predefined alert for budget deviation can be applied to purchasing documents,
payments, and journal entries. This alert is independent of the budget warning set
in the General Settings.

10
Predefined Alerts

▪ Predefined alerts for inventory:

▪ Deviation from % of Gross Profit


▪ Deviation from Commitment Limit
▪ Deviation from Credit Limit
▪ Deviation from Discount (in %)
▪ Deviation from Budget
▪ Minimum Stock Deviation
▪ MRP Recommendation Due

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11

▪ The minimum stock deviation alert applies when a release document is added that
takes the stock level below the minimum defined in the item master data. This alert
is not issued if inventory blocking is enabled in the Document Settings.
▪ The MRP alert provides a reminder if you have not released MRP
recommendations into documents in time to fulfill the inventory demands. The alert
is issued if the current system date is the recommendation release date.

11
Configuring a Predefined Alert

▪ Open the alert from the arrow link.

▪ Set priority (default is normal)

▪ Select each recipient and one or Instead of


more notification methods selecting
(internal, email, text and fax) individual users
you have the
▪ Activate the alert option to select
a predefined
user group

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12

▪ To use a predefined alert, select the arrow link next to the alert name.
▪ You can optionally assign a priority to an alert (default is normal priority). When the
message is received in the recipient’s messages/alerts window or Microsoft
Outlook window, high priority messages are flagged in red.

▪ Then select each recipient and one or more preferred notification methods. You
can choose an internal message, email, text, and fax. Instead of selecting each
user individually you can switch to the Groups tab, and select a predefined user
group (group type must be Alerts or Cross All Types). For more information on user
groups, see the Users and User Defaults course.

▪ In addition, select the notification checkbox for the predefined user called AlertSvc.
This will ensure the alert is sent to a recipient even if the recipient is not logged
into the SAP Business One client.
▪ The email and fax mechanisms require the integration of these services with SAP
Business One. The SMS mechanism requires the SAP Business One integration
framework with the mobile scenario activated. The email addresses and phone
numbers must be set up in the user account.
▪ Finally, you must activate the alert for it to take effect, using the checkbox. You
can also use this checkbox to deactivate an alert at any time.

12
Predefined Alert Conditions

▪ You can set conditions for the


alert (exception is the minimum
stock deviation alert)
▪ The condition varies according to
the alert
▪ You can also select which
documents are covered by the
alert

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13

▪ For the predefined alerts, with the exception of minimum stock deviation, you can
select conditions for the alert situation.
▪ The conditions are different for each predefined alert. For example, the condition
for the gross profit deviation is the profit percentage, and the condition for the
budget deviation is the amount.
▪ For the predefined alerts, with the exception of minimum stock deviation, you can
also select the documents for the alert situation.
▪ The available documents depend on the chosen alert. The alert will trigger
immediately after the document is added to the system.

13
Alert Notifications

▪ Internal alerts appear in the


Messages/Alerts Overview popup
window
▪ This window can also be opened
from the cockpit widget
▪ Select the alert to access the
document details
▪ Options to Forward, Reply or Delete
the alert
▪ Option to set out-of-office and
forward alert to email, SMS or fax

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14

▪ Internal alerts appear in the Messages/Alerts popup window in the SAP Business One client, and
you can also access this window from the cockpit widget.
▪ Select the alert row to access the document details.
▪ The recipient of the alert has options to:
▪ Forward the alert to another user
▪ Send a reply to the user who caused the alert
▪ Delete the alert row from the popup window
▪ Set an out-of-office and optionally forward the alert to your email, SMS or fax

14
User Settings for Alerts

In General Settings and User – Setup:


▪ Send Alert for Activities Scheduled for Today
▪ Display Inbox When New Message Arrives
▪ Update Messages (interval)

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15

In the setup for a user, there are settings that affect alerts.
• Send Alert for Activities Scheduled for Today. If set, when the user logs on they
will receive an alert listing all activities scheduled for today. This is not a
predefined alert, but if checked the activities will appear in the Messages/Alerts
window, and the user can process activities directly from the alert message.
• Display Inbox When New Message Arrives. This is set by default for a new user
and automatically opens the Messages/Alerts window whenever a new alert is
generated for the user.
• Update Messages (Min.). This defines in minutes how often the system checks
for updates to the alert inbox. The default value for a new user is 5 minutes. If
you set this value to 0 the user will receive the alert notification immediately.
If not defined in the user setup screen, the settings are taken from the General
Settings: Service tab.

15
User-Defined Alerts

If the predefined alerts do not meet business requirements, you can add user alerts.

16
Use Cases for User-Defined Alerts

User alerts are based on a saved user query and the query can check for multiple
or unique business conditions
The alert can provide worklists to a user on a daily, weekly or monthly basis, for
example:
▪ Purchase orders over a specific limit issued for the day or week
▪ Overdue sales quotations
Another use is to check the consistency and quality of master data or documents,
for example:
▪ Missing fields in new business partner master data, such as tax id, credit limit,
contact person, or sales employee
▪ Sales orders with missing or incorrect tax codes

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17

User alerts are based on a saved user query and the query can check for multiple or
unique business conditions.

As such, they can provide worklists to a user on a daily, weekly or monthly basis, for
example:
▪ Purchase orders over a specific limit issues for the day or week
▪ Overdue sales quotations

Another use for alerts based on queries is to check the consistency and quality of
new master data or documents, for example:
▪ Missing fields in new business partner master data, such as tax id, credit limit,
contact person, or sales employee
▪ Sales orders with missing or incorrect tax codes

Before you create a user alert, check to see if there is a system report that produces
similar results, as you can copy the query as the basis for your alert query. Choose
Tools > Queries > System Queries.

17
User-defined Alerts

To add a user alert:


▪ Use the provided query tools to
create and save the query
▪ In Alerts Management window,
choose Actions - -> Create User
Alert.
▪ Provide a name for the alert
▪ Open the saved user query
▪ Select recipients, notification
mechanisms and priority, in the
same way as for a predefined
alert
▪ Set the frequency for running the
query: minutes, hours, days,
weeks or months

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18

▪ You can use the provided query tools Query Wizard and Query Generator to
create and save the query. Using the query you can check multiple conditions or
unique conditions specific to a business. For example, you can send the budget
manager a daily list of Sales orders for today.
▪ To create a new alert, choose the Actions button and then Create User Alert, in the
Alerts Management window.
▪ Provide a name for the new alert. Then select the saved user query. See the
Queries topic for information on creating and saving queries.
▪ In the Alerts Management window, select the recipients and the notification
mechanisms, as well as the notification priority, in the same way as for predefined
alerts.
▪ You need to set the frequency for running the query (in minutes, hours, days,
weeks or months). Unlike a predefined alert, a user-defined alert is not triggered
when a document is added to the system. A user-defined alert is triggered when
the query runs and if there are results from the query. If there are no results from
the query, a notification is not sent.
▪ If the frequency is days, weeks, or months you can additionally set a time of day.

18
Accessing the Query Results

▪ User alerts pop up in the


Messages/Alerts Overview window
▪ To see the query results, double-click
the alert row
▪ You can also copy the results to
Microsoft Excel by choosing Copy
Table from the context menu

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19

User alerts display in the user’s Messages / Alerts Overview window. The query
results will show directly in this window, or you can double-click the alert row to see
the results in a new window.
You can copy the results to Microsoft Excel if desired, by selecting Copy Table from
the window’s context menu.

19
User-defined Alerts – Save History Checkbox

The Save History checkbox


controls the display of alerts in the
Messages/Alerts Overview
window

▪ If checked, a new alert is added


on a separate row each time
query triggers alert

▪ If not checked, new alert


overwrites previous alert on
same row and shows in bold

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20

▪ For user alerts, there is a Save History checkbox in the setup window. This
checkbox controls how user alerts are displayed to the user in the Messages/Alerts
window.
▪ If you select the Save History checkbox, a new alert message is added on a
separate row each time the query runs and triggers an alert. This can quickly fill up
the alerts window if the frequency of the alert is set to minutes. This is shown in
the sample screenshot.
▪ If you do not check Save History checkbox, each new alert will overwrite the
previous alert on the same row in the Messages / Alerts Overview window, so you
will only see one row for the alert. The alert will change to bold to inform the user
that a new alert has occurred.

20
Writing Queries for User-defined Alerts

▪ When you develop queries for alerts, you may need to match the query to the frequency you
select
▪ Example: For a report of new orders that runs daily, the query should only select documents
added on that day

Query Frequency Results


SELECT T0."DocNum", T0."CardCode", Once a day at 23:30 List of Purchase Orders >
T0."CardName" hours 5000 posted on the
current day
FROM OPOR T0

WHERE T0."DocTotal" > 5000 and (T0."DocDate" =


CURRENT_DATE)

Query shows HANA SQL syntax

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 21

▪ When you develop queries for alerts, you may need to consider matching the
query to the frequency you select for running the query.
▪ For example, if you want a report of new orders added for today, the query should
only select documents added on the current day. Otherwise the report will include
all documents in the database that meet the query criteria.
▪ In such a case, the document posting date is compared to the current date.

21
Troubleshooting User Alerts
▪ Check the query to make
sure it produces results
▪ Make sure the alert
service is running in the
System Landscape
Directory. Or, enable the
service in the General
Settings window in SAP
Business One – under
the Service tab
▪ Make sure the Service
Layer is active for SAP
HANA
▪ Run a query on table
OALT to see the overall
configuration of active
alerts
© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 22

If the alert does not trigger:


• Run the query independently to make sure it produces results
• Make sure the SAP Business One alert service is running in the System
Landscape Directory and the correct database is selected in the alert settings.
Alternatively, make sure that in SAP Business One, in the General Settings
window, under the Service tab, the Enable Alert Service box is checked.
• For SAP HANA environments, make sure the Service Layer is active on the SAP
HANA server. To check the Service Layer, use the url https://<server>:50000. If
the service layer is installed you will see a link to documentation.
• Run a query on the OALT table to see all the configured alerts on your system,
including predefined alerts.

22
Key Points

Key points from this topic:


▪ There are two ways to use alerts: configure one of the predefined alerts or define a user alert based
on a query
▪ All predefined alerts (with the exception of Minimum Stock Deviation) are triggered after an applicable
document is added, so do not prevent documents being added to the system. In contrast, an approval
process will prevent a document being added until it is approved.
▪ Alerts can be sent internally, by e-mail, text and fax.
▪ The alert job service must run all the time so that alerts can be triggered. For SAP HANA, there is a
dependency on the Service Layer being installed and bound to the database server.
▪ User-defined alerts are based on saved user queries. User alerts provide a way to create routine task
lists for users, or to check the consistency of data.
▪ User-defined alerts are triggered when the base query is run. You must set the frequency for running
the query. An alert triggers only if the query produces results. The query results appear in the alert
window.

© 2020 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 23

▪ Please take a minute to review these key points:


▪ There are two ways to use alerts: configure one of the predefined alerts or
define a user alert based on a query.
▪ All predefined alerts (with the exception of the Minimum Stock Deviation alert)
have conditions and are triggered when an applicable document is added to the
system. So alerts do not prevent documents being added to the system. In
contrast, an approval process will prevent a document being added until it is
approved.
▪ Alerts can be sent internally to a user in SAP Business One, or can be sent by
e-mail, text and/or fax.
▪ The alert job service must run all the time so that alerts can be triggered. For
SAP HANA, there is a dependency on the Service Layer being installed and
bound to the database server.
▪ User-defined alerts are based on saved user queries. User alerts provide a way
to create routine task lists for users, or to check the consistency of data.
▪ User-defined alerts are triggered when the base query is run, so you must set
the frequency. An alert triggers only if the query runs produces results. The
query results appear with the alert in the Alerts/Messages window.

23
© 2020 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components
of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated
companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are
set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release
any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products,
and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The
information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various
risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements,
and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company)
in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.
See http://global.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

25

You might also like