SAP Forecasting
SAP Forecasting
Forecasting 4.1 for SAP APO: User’s Guide. Cary, NC: SAS Institute Inc.
SAS® Forecasting 4.1 for SAP APO: User’s Guide
Copyright © 2012, SAS Institute Inc., Cary, NC, USA
All rights reserved. Produced in the United States of America.
For a hard-copy book: No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without
the prior written permission of the publisher, SAS Institute Inc.
For a Web download or e-book: Your use of this publication shall be governed by the terms
established by the vendor at the time you acquire this publication.
The scanning, uploading, and distribution of this book via the Internet or any other means without the
permission of the publisher is illegal and punishable by law. Please purchase only authorized electronic
editions and do not participate in or encourage electronic piracy of copyrighted materials. Your support
of others’ rights is appreciated.
U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related
documentation by the U.S. government is subject to the Agreement with SAS Institute and the
restrictions set forth in FAR 52.227-19, Commercial Computer Software-Restricted Rights (June 1987).
SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513.
1st electronic book, April 2012
SAS® Publishing provides a complete selection of books and electronic products to help customers use
SAS software to its fullest potential. For more information about our e-books, e-learning products, CDs,
and hard-copy books, visit the SAS Publishing Web site at support.sas.com/publishing or call 1-800-
727-3228.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks
®
of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.
Other brand and product names are registered trademarks or trademarks of their respective companies.
iii
Contents
Chapter 1 Introduction 1
Utilizing the SAS “add-in” menu 2
Chapter 2 SAS Forecast Options 5
Base Forecasting Options 6
Advanced Forecasting Parameters 13
APO Planning Book Parameters 20
SAS Server Options 21
Chapter 3 Working with Forecast Profiles 23
View Existing Forecast Profiles 24
Change/Display an Existing Forecast Profile 28
Copy a Forecast Profile 29
Delete a Forecast Profile 34
Create a New Forecast Profile 34
Activate a Forecast Profile 36
Cancel a Forecast Profile Session 37
Chapter 4 Run Forecast 39
Chapter 5 Reports 43
Diagnosis and Forecast Reports 43
Chapter 6 Utilities 45
Features available for SAS Forecast Studio 45
FS_Read_from APO 47
FS_Write_to_APOliveCache 48
Chapter 7 Administrator’s Workbench 51
Batch Process 52
Time Period Options 56
Chapter 8 User Administration 63
Appendix 1 SAP Forecasting Profile 67
Appendix 2 SAP Authorizations 71
Appendix 3 Run SAS Forecast in Batch Mode 77
Appendix 4 Alternate Add-in Menu 83
iv
1
C H A P T E R
1 Introduction
The SAS Forecasting for SAP APO solution integrates SAS forecasting capabilities
into the SAP APO Demand Planning (DP) application through a SAS “add-in” menu as
illustrated in Figure 1-1.
Figure 1-1.
The SAS “add-in” menu provides users with four primary capabilities:
1 Run SAS Forecast: Allows users to initiate creation of a statistical forecast.
History values are read from SAP APO and the forecast results generated on the
SAS Server are written back to SAP APO so they are visible by the user in the
appropriate SAP Planning Book. The “active forecast profile” which is described
below under “SAS Forecast Options” contains the parameters that are used to
generate the forecast when this option is selected.
2 Reports: Allows users to view reports generated during the creation of the
statistical forecast (HTML format). Two sets of reports are available for viewing:
a) Diagnostic Reports (describing the results of the SAS DIAGNOSTIC step b)
Forecast Reports (describing the results of the FORECAST step. The range of
reports generated and viewable is specified in the SAS Forecast Profile which can
be created or edited using the SAS Forecast Options (described below).
3 Utilities: Gives a user the options to launches either SAS Forecast Studio or SAS
Web Report Studio applications. Users need a valid SAS userid and password to
logon to these SAS user interfaces. These applications will be opened in a
separate window.
4 SAS Forecast Options: Allows a user to create or modify a forecasting profile
with parameters that are utilized by SAS when generating the statistical forecast
and to select the “active” profile that will be utilized when “Run SAS Forecast” is
selected from add-in menu.
2 Utilizing the SAS “add-in” menu Chapter 1
Notes:
1 Based on the authorization granted a specific user, some options on the add-in
menu may be disabled (grayed out). For more information on user authorizations
see Chapter 7 of the User’s Guide.
2 Some implementations may choose to not install the SAS add-in menu as a
separate menu item on the menu bar of the SAP APO (DP) Planning Book. See
Appendix 4 - for an alternate way of accessing SAS “add-in” functions from within
SAP.
Figure 1-2.
Introduction Utilizing the SAS “add-in” menu 3
Before utilizing the SAS “add-in” menu, a user must next select:
1 A SAP Planning Book /Data View
2 A valid Selection Profile for that Planning Book
3 The data for the Selection Profile should be loaded into the Planning Book and
visible to the end user. Figure 1-3 shows a planning book called
DMO_PLANNING BOOK selected along with a Selection Profile called
DMO_BRAND. Loaded values are visible in the table. In the example shown in
Figure 1-3, Actual Sales and Base History sales are visible for each month
displayed. (If data is not loaded automatically after the Selection Profile is
selected, press the “Load Data” icon which has been circled in Figure 1-3.)
Figure 1-3.
4 Utilizing the SAS “add-in” menu Chapter 1
If the user attempts to select an item from the SAS “add-in” menu before selecting a
Planning Book and Selection Profile or before data is loaded data into the Planning
Book, the user will receive a message to “Make a selection” as illustrated in Figure 1-4.
Users may initiate creation of a statistical forecast (Run Forecast) only against the SAP
Planning Book and Selection Profile that has been loaded. This will be discussed in
more detail in Chapter 4: Run Forecast.
Figure 1-4.
5
C H A P T E R
The Forecasting Options allows uses to create a forecast profile that stores a set of
options that are utilized when a forecast is created (or run) by SAS. It defines options
about the data read from SAP APO and where forecast results will be written back into
the SAP APO Planning Book, defines various parameters about what models and model
parameters will be utilized during the creation of the statistical forecast and it contains
information about what reports will be generated and where these reports will be stored.
Multiple Forecast Profiles can be created and saved by business planners using SAP
APO Demand Planning (DP) with the SAS add-in menus.
To access or create a Forecasting Profile the user must first select “SAS Forecast
Options” from the menu pull-down as shown in Figure 2-1.
Figure 2-1.
Once, “Options …” has been selected. The Forecast Profile options window appears as
illustrated in Figure 2-2. The options window is divided into 4 sections:
1 Base Forecasting Options:
Profile Name, Description and Status of Profile
Parameters used in Data Selection
This chapter will explore the various parameter options available in each of these
sections in more detail.
Figure 2-2.
Figure 2-3 provides an example of a Forecasting Profile named DMO1. This profile
was created with a description of “DMO BOOK-FORECASTING AT BRAND LEVEL”.
DMO1 has a status of “Active”.
Figure 2-3.
Figure 2-4 shows an example of Forecasting Profile named TEST02. This profile was
created with a description of “TEST02 DESCRIPTION”. TEST02 has a status of “Not
Active”.
Figure 2-4.
When SAS is requested to generate the forecast using the SAS Forecasting for SAP
APO add-in menu, the parameters from the Active Forecasting Profile will be utilized.
As previously mentioned, forecast profiles other than the “active” profile can be created
and saved. To view a list of previous created “Forecast Profiles”, select the Help –
Search button (F4) available for the Forecasting Profile field. (Hint: When a user selects
or clicks on a field like Forecasting Profile, SAP will highlight the field and display a
Help-Search button as shown below in Figure 2-5.)
Figure 2-5
8 Base Forecasting Options Chapter 2
Once the Help-Search button (or F4) is selected, the user is presented with a screen
containing the names of previously created and saved Forecasting Profiles. Figure 2-6
shows an example of this screen.
Figure 2-6.
The list of saved profiles not only contains the profile name, but also lists the specific
SAP APO Planning Book, Data View, Planning Version and Selection Profile that is
associated with the profile. Also contained in the list is the SAP userid that created the
profile (Author) and an “X” is displayed next to the profile that is currently active.
The following “Forecasting Parameters”, shown in Figure 2-7, are mainly used to
handle and prepare the data used or created by the SAS forecasting engine.
History Start Date: (Required field) history data is extracted from the SAP APO
Planning Area beginning with this date.
History End Date: (Required field) history data is extracted from the SAP APO
Planning Area from the History Start Date through this History End Date.
Forecast Horizon: (Required field) this indicates the number of forecast periods
that SAS will generate (12 months, 52 weeks, etc.) Users should enter a number
into this field. The increment (month, week, etc.) is based on the value set in the
Advanced Forecasting Parameters which will be discussed in that section of this
chapter.
SAS Forecast Options Base Forecasting Options 9
Figure 2-7.
Values for History Start Date, History End Date, and Forecast Horizon are all
required values as indicated by the check mark .
A user may enter values directly in the date fields using the format DD.MM.YYYY or
by selecting a date from a calendar that can be surfaced by the Search-Help button (or
F4) as highlighted in Figure 2-8.
Figure 2-8.
10 Base Forecasting Options Chapter 2
Once the Search-Help button (F4) has been selected; the user is presented with a
calendar as illustrated in Figure 2-9. The user can scroll the calendar backwards and
forwards to select the date desired.
Figure 2-9.
Once the user has selected the desired date, the check button on the calendar
screen should be pressed to confirm the choice. In Figure 2-10, the user has selected a
History Start Date of December 1, 2005 and a History End Date of November 30, 2008.
The user has manually keyed a Forecast Horizon of 12.
Figure 2-10.
SAS Forecast Options Base Forecasting Options 11
In some installations History Start Date, History End Date and Forecast Horizon may
already be filled in when a user creates a “new” Forecast Profile. This happens if a “SAP
Forecasting Profile” is active for the SAP Planning Book and Selection Profile. For more
information regarding the SAP Forecasting Profile refer to Appendix 1 of this guide.
Returning to the SAS Forecasting Profile we will focus on the remaining Base
Forecasting Parameters that specify the SAP Key Figures and Characteristics that will
be utilized by SAS.
History Key Figure: (Required field) this indicates the row from the SAP
Planning Book that history data will be read and used when creating the
Statistical Forecast.
Forecasting Key Figure: (Required field): this indicates the row in the planning
book where the SAS Statistical Forecast values will be written and will be visible
to the user.
Forecasting Level(s): (Level 1 Required field) allows users to select the
hierarchy values. Data will be extracted at this level of the hierarchy from SAP
and SAS will generate the Statistical Forecast at the level designated. Up to
twelve (12) levels can be selected using the “add-in” options menu. To select each
level, including the first level, the user presses the Add Forecasting Level button
shown in Figure 2-10.
Create Forecast Project: (Optional) when checked this creates a forecasting
project that can be launched in SAS Forecast Studio or in Microsoft Excel using
the SAS Add-in for Microsoft Office
Each of the Key Figures and Characteristics just described are values that have been
configured as part of the creation of the SAP Planning Book. Users can see valid options
by selecting on the option and then selecting the Search-Help (F4) button available.
Figures 2-11 and 2-12 show expanding on the History Key Figure option and how the
user is presented with valid SAP Key Figures to choose from.
Figure 2-11.
12 Advanced Forecasting Parameters Chapter 2
Figure 2-12.
In Figure 2-12 the user has highlighted (selected) DMO_BHIST (Base History). The
choice is confirmed when the user presses the green check icon . The selected value is
now displayed in the SAS Forecasting Profile (Figure 2-13.)
Figure 2-13.
SAS Forecast Options Advanced Forecasting Parameters 13
Figure 2-14.
Default values are initially filled in for each of these options but may be changed by
the user. The Forecast Profile displayed in Figure 2-14 is currently using the default
values.
Forecasting Date Interval: (Default value MONTH) specifies the frequency of
the time series or forecast created. The most common intervals are presented in
14 Advanced Forecasting Parameters Chapter 2
the selection window provided. These are shown in Figure 2-15. Refer to
SAS/ETS User’s Guide chapter on Date Interval, Formats, and Functions for a
complete list of intervals that can be specified.
Figure 2-15.
Criterion: (Default value MAPE) specifies the model selection criterion to pick
the best model. A list of valid criterion available for selection is presented in the
selection window provided. A partial list is shown in Figure 2-16. A complete list
follows.
SAS Forecast Options Advanced Forecasting Parameters 15
Figure 2-16.
Figure 2-17.
ARIMAX: (Default Yes) turns on/off whether SAS will consider utilizing ARIMAX
models in generating the statistical forecast.
Intermittency Sensitivity: (Default 2) specifies the intermittency test threshold.
Run Diagnosis (Yes or No): (Default Yes) determines whether HPFDIAGNOSIS
will be used to create a candidate list of models.
If No enter Repository: (Default DEFAULTREP) if a list of models is
preselected the name of the repository should be entered here.
HPFDIAG Print Options: (Default NONE) a list of valid options is available in
the selection window provided (Figure 2-18). Valid options include ALL, LONG,
NONE, SHORT. Users may specify 1 of the valid options.
18 Advanced Forecasting Parameters Chapter 2
Figure 2-18.
Figure 2-19.
Figure 2-20.
This option is used to create a flag in the Forecast Profile that will allow consultants
to modify the SAS program to run alternate code that may extract additional data from
SAP or utilize additional forecasting parameters allowed by HPFDIAG and
HPFENGINE. The name of the file containing the alternate code should be added to the
line asking for the SAS MACRO Name. These options can be seen in Figure 2-20.
Additional Key Figures: (Optional field) these allow the user to select
additional rows from the planning book that can be extracted and used by SAS.
Typically these additional key figures would be utilized as casual variables but
could potentially be used for other analytical purposes. Figure 2-21 illustrates the
dialog box presented with a list of available key figures that can be extracted from
the planning book.
Figure 2-21.
20 APO Planning Book Parameters Chapter 2
Addl Key Figures as Stochastic Vars: (Optional field) this option allows the
users to select (Yes or No) whether the Additional Key Figures (if selected) will be
evaluated by the SAS Forecasting engine as independent, stochastic variables.
The dialog box presented for this parameter is illustrated in Figure 2.22.
Figure 2-22.
Figure 2-23.
Figure 2-24.
23
C H A P T E R
To create a new Forecasting Profile or work with an existing Forecasting Profile the
user must first select “SAS Forecast Options” from the menu pull-down as shown in
Figure 3-1.
Figure 3-1.
The details of the “active” profile for the user logged on are displayed, as shown in
Figure 3-2.
24 View Existing Forecast Profiles Chapter 3
Figure 3-2.
Figure 3-3.
The Search-Help button (F4) will open a window that displays a list of all the previous
created profiles. An example of the Forecast Profile List window is illustrated in Figure
3-4.
Working with Forecast Profiles View Existing Forecast Profiles 25
Figure 3-4.
The list displayed shows the name of the profile and key attributes associated with
the profile. The Profile that is currently active has an X displayed in the last column.
In Figure 3-4 we can see that the Forecast Profile called DMO1 is currently active.
To view all the attributes of a Forecast Profile, the user should select that profile from
the list and then press the check button as illustrated in Figure 3-5.
Figure 3-5.
The selected profile (DMO2 in Figure 3-5) will appear in the options window as
illustrated in Figure 3-6, but the user must then press the enter key to refresh
the Options screen with the values for DMO2.
26 View Existing Forecast Profiles Chapter 3
Figure 3-6.
Figure 3-7 shows the refreshed screen after the enter key was pressed. Now the user
can see the values saved in Forecasting Profile DMO2. Notice that when the selected
profile is displayed that it has a status of Not Active. See Active the Forecast Profile
section later in this chapter for information about making the selected forecast Active.
Working with Forecast Profiles View Existing Forecast Profiles 27
Figure 3-7.
To leave the list of Forecast Profiles without selecting a profile, press the X in the
upper right hand corner of the screen (Figure 3-8).
Figure 3-8.
28 Copy a Forecast Profile Chapter 3
Figure 3-9.
When in “Change” mode the fields are no longer grayed out and the values can be
changed (Figure 3-10).
Figure 3-10.
Once the changes have been made the user must press the save button (Figure 3-11)
to keep the changes made to the Forecast Profile.
Figure 3-11.
Working with Forecast Profiles Copy a Forecast Profile 29
Figure 3-12
Figure 3-13.
The user is presented with a window (Figure 3-13) to enter or select the “From
Profile” and to key in the name of the “To Profile” (a new profile name).
30 Copy a Forecast Profile Chapter 3
Figure 3-14.
Figure 3-14 shows the “To Profile” name filled in with the value DEMOCOPY1.
When the user finishes selecting or entering values, the user presses the Copy Profile
button. The user is then presented with a screen that confirms the Profile has been
copied (Figure 3-15) and asks if the user would like make this copied profile “active”.
The user can press either the Yes, No or Cancel buttons.
Working with Forecast Profiles Copy a Forecast Profile 31
Figure 3-15.
The newly copied profile will now be displayed in the option window. If the user asks
for the newly copied profile to be active, it will show as “Active” as illustrated in Figure
3-16.
Figure 3-16.
If the user does not ask for the newly copied profile to be active, the user will be
informed that the profile has been copied but not activated as shown in Figure 3-17.
32 Copy a Forecast Profile Chapter 3
Figure 3-17.
Also, it will show as “Not active” when viewing the profile details as shown in Figure
3-18.
Working with Forecast Profiles Delete a Forecast Profile 33
Figure 3-18.
If a user attempts to create a copy using a Profile Name that already exists, an error
message will be displayed (Figure 3-19.). The user should press the check button to
return to the copy screen and enter a unique Forecast Profile name.
Figure 3-19.
34 Create a New Forecast Profile Chapter 3
Figure 3-20
Once the delete button is selected the user is prompted to confirm the delete as
illustrated in Figure 3-21.
Figure 3-21.
Figure 3-22.
The user is presented with an expanded Forecasting Profile screen with only the
“default” values filled in as illustrated in Figure 3-23.
Working with Forecast Profiles Activate a Forecast Profile 35
Figure 3-23.
The users must enter a Forecasting Profile name for the new profile and provide a
valid value for any parameter option that contains a (check mark) as shown in Figure 3-
24.
Figure 3-24.
Once all the values have been entered or selected (see chapter 2 for a description of all
the various profile options and values), the user must press the “save” button (Figure 3-
25) to store the new profile. Saving a new profile does not automatically make this
profile active. See the section for Activate a Forecast Profile for more information.
Figure 3-25.
36 Activate a Forecast Profile Chapter 3
Figure 3-26.
The user should first display the profile to be activated in the option window. This
could be by selecting in from the current list of available profiles (see View Existing
Forecast Profiles for more information). In Figure 3-27, the Forecasting Profile DEMO3
is displayed but Not Active.
Figure 3-27.
Working with Forecast Profiles Cancel a Forecast Profile Session 37
When the user presses the Activate button, the profile is immediately made Active.
The option window is closed, but the user will see a message confirming the activation at
the bottom of the SAP APO Demand Planning (DP) screen as illustrated in Figure 3-28.
Figure 3-28.
Figure 3-29.
38 Cancel a Forecast Profile Session Chapter 3
39
C H A P T E R
4 Run Forecast
To run a forecast with SAS from within SAP APO Demand Planning (DP), select “Run
Forecast” from the menu pull down as illustrated in Figure 4-1.
Figure 4-1.
If the planning book is in “Change Mode”, the underlining database (SAP liveCache)
will be locked and not allow the new forecast to be written from SAS to SAP. The SAS
“add-in” informs the user if the Planning Book is in “Change Mode” as illustrated in
Figure 4-2 and allows the user to toggle it to “Display Mode” by selecting “Yes”.
40 Chapter 4
Figure 4-2.
Selecting No or Cancel will cancel the request to run a forecast with SAS.
Once the forecast has been completed, the user will receive an information window
informing them the SAS Forecast has been run successfully. When the user presses the
check button as displayed in Figure 4-3., the forecast results will be displayed in the
Planning Book.
Figure 4-3.
Limitations:
1 A user may only create a forecast against a planning book that is displayed. If
the active forecast profile is not assigned to the planning book displayed the user
will receive the information window in Figure 4-4 and the request to create the
forecast will be canceled.
Run Forecast 41
Figure 4-4.
2 Users also may not run a forecast against a planning book they are
unauthorized to access. If the user attempts to run a forecast against a planning
book they are unauthorized for they will receive the message in Figure 4-5. For
further details on the authorization, please refer to Appendix 2.
Figure 4-5.
42 Chapter 4
43
C H A P T E R
5 Reports
The add-in menu provides access to 3 types of reports as illustrated in Figure 5-1.
Figure 5-1.
The options selected for HPFDIAG PRINT will appear when the Diagnosis menu
option is selected. The options for HPFENGINE PRINT and PLOT will appear when
the Forecast menu option is selected.
The Diagnosis and Forecast reports will appear in separate windows. An example of
the Forecast Reports are illustrated in Figure 5-2.
44 Diagnosis and Forecast Reports Chapter 5
Figure 5-2.
The Diagnosis and Forecast report screens provide links under Table of Contents and
Table of Pages (on the left) that allow the user to quickly navigate to a particular item.
Table of Contents links will navigate to a particular report or chart for a specific time
series item. Table of Pages will navigate the user to data about a specific item that was
forecasted.
45
C H A P T E R
6 Utilities
The Utilities menu items (shown in Figure 6-1) allows users to launch in a separate
window either of the following:
SAS Web Report Studio
SAS Forecast Studio
Figure 6-1
Users need a valid SAS userid and password to logon to these SAS user interfaces.
These applications will be opened in a separate window.
Before attempting to utilize the stored processes from SAS Forecast Studio, check
with your SAS administrator to validate the stored processes were installed. The
default location for accessing the stored processes is illustrated below.
From within SAS Forecast Studio, select “Tools” from the menu bar, then “Reports
and Stored Processes…” as shown in Figure 6-2.
Figure 6-2.
The user will be presented with a screen similar to the one shown in Figure 6-3 with
available stored process.
Utilities 47
Figure 6-3
FS_Read_from APO
When FS_Read_from_APO is selected and the Run button is pressed, the user is
prompted to provide a valid SAS Forecast Profile (as shown in Figure 6-4).
48 Chapter 6
Figure 6-4
After entering a valid profile name, press OK button. When the data has been
extracted from SAP APO and the project created, the user will receive a message that
the project was successfully created (as shown in Figure 6-5). The user can now open
the newly created project in SAS Forecast Studio.
Figure 6-5
FS_Write_to_APOliveCache
When FS_Write to_APOliveCache is selected and the Run button is pressed, the user
is prompted to provide a valid SAS Forecast Profile (as shown in Figure 6-6).
Utilities 49
Figure 6-6
After entering a valid profile name, press OK button. When the statistical forecast a
has been written to SAP APO from the SAS Forecast Studio project, the user will receive
a message that: SAS Forecast data from the Forecast Studio Project has been
successfully written to APO LiveCache (as shown in Figure 6-7). The user should now
be able to see the updated values in the appropriate SAP APO Planning Book.
Figure 6-7
50 Chapter 6
51
C H A P T E R
7 Administrator’s Workbench
The Add-in Administrator’s Workbench provide options that can be used directly by the
Administrator to set up Background Jobs for SAS forecasting, to generate SAS Forecasting
Reports and to create SAS Forecast Studio Projects for SAP APO data.
Some implementations may choose to not install the SAS add-in menu as a separate menu
item on the menu bar of the SAP APO (DP) Planning Book. This Add-in Workbench provides
an alternate way of accessing SAS “add-in” functions from within SAP.
The main purpose of Add-in Workbench is to provide the Add-in functionalities to the users
who does not have access to the Interactive Demand Planning (Eg: Statistical Forecaster or
Administrator and not a Demand Planner) .
To access the Add-in Workbench, go to the transaction /SAS/ADDIN, the initial screen is as
shown in Figure 7-1.
Figure 7-1.
Utilities: Allows a user to create a SAS Forecast Studio Project, to write back SAS results
from SAS Forecast Studio Project into SAP APO Livecache and to launch SAS Forecast
Studio.
Batch Process
To run a forecast with SAS from SAP APO in Batch Mode, schedule the program
“/SAS/SASFORECAST_BATCH” in the SAP Background Job Scheduler. The following steps
to be followed to run the forecast with SAS in background or batch mode.
Prerequisite: SAS Forecasting Profile need to be created in the SAP APO Interactive
Demand Planning transactions using the “Options” under SAS pull-down menu. Refer to the
Chapter 2 for more details on how to create forecasting profile.
Step 1 - Creating Variant: Create a variant for the program
“/SAS/SASFORECAST_BATCH” with the Forecasting profile which you want to use it for
batch mode as illustrated in Figure 7-2.
Figure 7-2.
Figure 7-3.
In the next screen, press the button “Continue” as shown in the Figure 7-4.
Figure 7-4.
54 Chapter 7
In the next screen, enter the Job name and press “Continue” button as shown in the Figure
7-5.
Figure 7-5.
On the Job Step screen of the Wizard, Select the Option “ABAP Program step” and press
“Continue” button as shown in the Figure 7-6.
Figure 7-6.
Administrator’s Workbench 55
Figure 7-7
In the next screen, select the checkbox if you are defining multiple steps in a single
background job. To skip this step, uncheck the checkbox and press “Continue” button as
shown in Figure 7-8.
Figure 7-8
56 Chapter 7
SAP has provided many time period options for scheduling the back ground job as shown in
the Figure 7-9.
Figure 7-9
Figure 7-10.
Date/Time: Select this option, if you wish to run the background job on a particular date at
a particular time. Enter the date and time at which you wish to run the background job and
press Continue button as shown in Figure 7-11. You can also select the date and time after
which you do not want to run the back ground job.
58 Chapter 7
If you wish to run the job periodically, select the checkbox “Period” and press the button
“Continue” then set the periodic values as shown in Figure 7-12.
Figure 7-11
Figure 7-12
Figure 7-13.
SAP Background Job Monitor initial screen will be displayed. Press F8 or Execute button
to display the status of the Job scheduled as shown in Figure 7-14.
Figure 7-14.
SAP Job Overview screen is displayed, which shows the status of the background job
scheduled. Status “Active” denotes that the Background job is running and not yet completed.
60 Chapter 7
Figure 7-15.
The status of the background job will change to “Finished” as soon as the job execution is
complete as shown in the Figure 7-16.
Figure 7-16.
Please note that the status “Finished” does not mean that the background job has been ran
successfully, it just denotes that the Job has finished the execution irrespective of the result
of the run. For example, a background job has been scheduled to run SAS Forecast; the job
status will be “Finished” irrespective of the output of the SAS Forecasting process. The job
status will show “Finished” even if the SAS Forecasting process has given some exception.
To know the output of the Job, press the “Job log” button . Success message
would be displayed if the SAS Forecast has run successfully as shown in the Figure 7-17.
Administrator’s Workbench 61
Figure 7-17.
NOTE: Repeat the above 3 steps for creating the background jobs which create SAS
Forecast Studio Project and write SAS Results into APO LiveCache. The details of different
ABAP programs are as below.
1. ABAP Program to create SAS Forecast Studio project from SAP APO Planning Data-
/SAS/CREATE_PROJ_BATCH
2. ABAP Program to write SAS Forecasting results from SAS Forecast Studio into SAP APO
LiveCache - /SAS/WRITE_BACK_TO_APO_BATCH.
62 Chapter 7
63
C H A P T E R
8 User Administration
The Add-in User Administration transaction provides options to control the access to
the Add-in functions for a given user both in the Workbench and in the Add-in menu.
Some implementations may choose to limit the SAS add-in functions to a specific user.
This transaction provides the flexibility to switch on and off the required functions and
this transaction should be used only by the SAP Administrator who is authorized for
User Administration.
To access the Add-in Workbench, go to the transaction /n/SAS/ADDIN_USER, the
initial screen is as shown in Figure 8-1.
Figure 8-1.
As part of standard installation, default roles have been provided to activate the
preset options based on the role assigned. For example, if the role ADMIN is selected
then all the functions will be activated for the given user as shown in Figure 8-2.
64 Chapter 8
Figure 8-2.
Figure 8-3.
Once the required role is selected, press enter and then “Save” button to save the user
settings. The Administrator can modify the options as and when required depending on
the customer specific needs.
The functions of the Add-in Workbench as well as in Menu are set as per the options
selected in this transaction. Here, if the role selected is BATCHUSER then the
checkboxes will be automatically preset and accordingly the functions are
activated/deactivated in Workbench and Add-in Menu as shown in Figure 8-4, Figure 8-
5, and Figure 8-6
User Administration 65
Figure 8-4
As per the settings shown in Figure 8-4, there is no option selected under “Utilities”
for the Workbench and hence there is no “Utilities” tab in the Add-in Workbench as
shown in Figure 8-5.
Figure 8-5
66 Chapter 8
As per the settings shown in Figure 8-4, the options “Run Forecast” and “SAS
Forecast Options” have been deactivated for the Add-in Menu and hence those functions
have been deactivated in the Add-in Menu.
Figure 8-6
67
A P P E N D I X
A SAP Forecasting Profile is visible by choosing Forecast Profile from the Settings
pull-down menu illustrated in Figure A1-1.
Figure A1-1.
68 Appendix 1
The active Master SAP Forecasting Profile is visible from the Maintain Settings for
Forecast Profiles window illustrated in Figure A1-2.
Figure A1-2.
SAP Forecasting Profile 69
Selecting the edit button (Pencil) on this screen will allow the user to see the History
dates established in the SAP Forecast Profile. In the example illustrated in Figure A1-
3, the History Start Date is 01.06.2005 and History End Date is 30.11.2008. The
number of Forecast Periods (Forecast Horizon in the SAS Forecast Profile) will be 15.
Figure A1-3.
70 Appendix 1
71
A P P E N D I X
2 SAP Authorizations
Figure A2-1.
Planning Planning
Planning Book Book Book
SAS Forecasting add-in strictly follows all the authorizations provided at the SAP
user level.
Scenario 1: User does not have authorization to the Demand Planning Transaction.
In this case, the user cannot enter into the transaction and hence there is no chance of
running the SAS Forecasting Add-in as illustrated in Figure A2-2.
Figure A2-2.
SAP Authorizations 73
Figure A2-3.
Figure A2-4.
74 Appendix 2
When the user selects the “Run Forecast” menu option, the message shown in Figure
A2-5. is displayed.
Figure A2-5.
Scenario 3: User is authorized to access both the Demand Planning Transaction and
the specific Planning book but the user is not authorized for a specific data view. In this
case, the user will be able to access the planning the book but he/she would not be able
to access the data in the planning book as he/she is not authorized for the specific data
view.
Figure A2-6.
If the user selects the “Run Forecast” menu option, then the information message is
displayed that the user needs to select the Selection view for the given planning book.
Figure A2-7.
SAP Authorizations 75
Figure A2-8.
If the user selects the “Run Forecast” menu option, then the information message is
displayed that the user needs to select the Selection view for the given planning book as
shown in Figure A2-9.
Figure A2-9.
To run a forecast with SAS from SAP APO in Batch Mode, schedule the program
“/SAS/SASFORECAST_BATCH” in the SAP Background Job Scheduler. The following
steps to be followed to run the forecast with SAS in background or batch mode.
Prerequisite: SAS Forecasting Profile need to be created in the SAP APO
Interactive Demand Planning transactions using the “Options” under SAS pull-down
menu. Refer to the Chapter 2 for more details on how to create forecasting profile.
Step 1 - Creating Variant: Create a variant for the program
“/SAS/SASFORECAST_BATCH” with the Forecasting profile which you want to use it
for batch mode as illustrated in Figure A3-1.
Figure A3-1.
Figure A3-2.
78 Appendix 3
Figure A3-3.
An overview screen will appear as shown in Figure A3-4; no action is required on this
screen. Press back button to navigate to the initial screen.
Figure A3-4.
Run SAS Forecast in Batch Mode 79
Figure A3-5.
SAP has provided many time period options for scheduling the back ground job as
shown in the Figure A3-6.
Figure A3-6.
Time Period Options: SAP Background Scheduler provides many other options
other than the options explained below. The below explained options are the most
appropriate options for SAS Forecasting Add-in. Refer to the SAP help documentation
for further details.
Immediate: Select this option, if you wish to run the background job immediately. To
trigger the job immediately, press the save button as shown in Figure A3-7.
Figure A3-7.
Date/Time: Select this option, if you wish to run the background job on a particular
date at a particular time. Enter the date and time at which you wish to run the
background job and press Save button as shown in Figure A3-8. You can also select the
date and time after which you do not want to run the back ground job.
80 Appendix 3
If you wish to run the job periodically, select the checkbox “Periodic Job” and press the
button “Period Values” at the bottom of the screen to set the periodic values as shown in
Figure A3-9.
Figure A3-9
Figure A3-10.
As soon as the Save button is pressed, a background Job is scheduled as per the
options selected above.
Step 3 – Monitoring the Background Job: SAP Scheduler Initial screen is shown
once save button is pressed in the previous step. To monitor the job created in the
previous step, select the “Job selection” button as shown in the
Figure A3-11.
Figure A3-11.
Run SAS Forecast in Batch Mode 81
SAP Background Job Monitor initial screen will be displayed. Press F8 or Execute
button to display the status of the Job scheduled as shown in Figure A3-12.
Figure A3-12.
SAP Job Overview screen is displayed, which shows the status of the background job
scheduled. Status “Active” denotes that the Background job is running and not yet
completed.
Figure A3-13.
82 Appendix 3
The status of the background job will change to “Finished” as soon as the job
execution is complete as shown in the Figure A3-14.
Figure A3-14.
Please note that the status “Finished” does not mean that the background job has
been ran successfully, it just denotes that the Job has finished the execution irrespective
of the result of the run. For example, a background job has been scheduled to run SAS
Forecast; the job status will be “Finished” irrespective of the output of the SAS
Forecasting process. The job status will show “Finished” even if the SAS Forecasting
process has given some exception.
To know the output of the Job, press the “Job log” button . Success
message would be displayed if the SAS Forecast has run successfully as shown in the
Figure A3-15.
Figure A3-15.
83
A P P E N D I X
Some installations may choose to not implement the SAS add-in menu to the main
menu bar in the SAP APO (DP) interactive planning book as illustrated in Chapter 1 of
this manual. SAS “add-in” menu options can optionally be accessed from the EDIT
Additional Function menu’s as illustrated in Figure A4-1.
Figure A4-1.
The Additional Functions menu under EDIT does not group the SAS functions in the
same way as the “add-in” menu. All the options are available, but presented in one list.
84 Appendix 4