Professional Documents
Culture Documents
Best Practices of DP by SDN Site
Best Practices of DP by SDN Site
Contents
Applicability, Goals, and Requirements................................................................................................1
Best Practice Procedure and Verification.............................................................................................3
Introduction to Demand Planning ..................................................................................................3
Preliminary Tasks..........................................................................................................................5
Procedure .....................................................................................................................................5
Preparation of Data for Characteristic Value Combinations ......................................................5
Creation of Data Structures in APO DP....................................................................................7
Create a Back-up InfoCube in SAP BW ................................................................................. 11
Repetitive Tests.....................................................................................................................14
Further Information ...........................................................................................................................16
Feedback and Questions ............................................................................................................16
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
For further information on volume testing and related Best Practices, we refer you to SAP Service
Marketplace http://service.sap.com/VTO. Therein, refer to the Best Practice Volume Testing for SAP
Solutions Generic Procedure.
System Requirements
The test environment must have comparable hardware to the productive hardware solution. Ideally the
test should either be performed directly with the planned productive system configuration or with a
suitable copy.
If you are unable to use the system configuration that will be used in your production landscape,
ensure that the application parameters are set similarly and that the hardware size has at least been
confirmed by a sizing estimation. This measure is also applied for the data volume. The data load (at
least for the data that are directly used for the test scenario) should be brought close enough to the
estimate data load on productive environment to replicate realistic conditions.
For further details, refer to the Best Practice Volume Testing for SAP Solutions Generic Procedure.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
Characteristic Value Combinations (CVC): A characteristics combination that can be used for
planning in Demand Planning.
New characteristic value combinations need to be generated, for example if new products are planned
or if new materials appear in customers purchase orders.
Planning Object Structure (POS): An APO Structure that contains characteristic combinations, which
are linked to time-series objects (time streams of key figure values within liveCache).
Important question for volume tests: How stable is the initially defined POS? In case of many changes,
it may be a time-consuming issue since the realignment process blocks the DP planning processes.
Planning Area: The central data structure (data container which is analog to R/3 table or LSI info
structure) of DP / SNP, which is held in liveCache
DP, is executed in liveCache memory.
Created as part of the Demand Planning/Supply Network Planning setup and determines key
figures to be accessed from database (InfoCube) or from liveCache (via POS).
The planning area controls also how a Demand Plan created on high-level (such as product
family) is disaggregated to a lower level (for example, to the different products in the product
family) - in three ways:
o by using the proportional factor for each branch in the tree
o distributing it according to another key figure
o equal distribution, if no other procedure applies
In DP, planning areas are initialized, i.e., memory is allocated although no values may have been
defined yet. (In contrast to DP, in SNP no pre-allocation of memory is performed.)
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
Typical number of planning areas in APO systems is about 10 (but, up to 100 and more are
possible).
The data container planning area has entries of following structure:
o [POS = planning hierarchy (user-defined combination of characteristics, like products,
countries, areas...); typically for 4 to 20 characteristics are used for a POS.
o [Key figures
actually sold, planned sales, simulated sales]
o [Time dimensions
a number used in forecast creation to describe a period of time,
e.g., March 03, April 03]
The planning areas are linked to the APO Data Mart. The Data Mart contains historical data
loaded up from flat file (EXCEL), R/3, BW
The planning area specifies the following:
One unit of measure in which data is planned [for example, pcs]
Currency in which data is planned (optional)
Currency conversion type for viewing planning data in other currencies (optional)
Storage buckets profile that determines the buckets in which data is stored in this planning area
Aggregate levels on which data can be stored in addition to the lowest level of detail to enhance
performance
Key figures that are used in this planning area
Settings that determine how each key figure is disaggregated, aggregated, and saved
The assignment of key figures to aggregates
Supply Network Planning (SNP) offers already predefined planning areas. You can also define your
own ones.
Planning Book
The planning book defines the content and layout of the interactive planning screen. You use planning
books in Demand Planning and Supply Network Planning. They allow you to design the screen to suit
individual planning tasks. A planning book is based on a planning area. There is no limit on the
number of planning books you can have for a planning area.
The end users work in the planning book, not in the planning area. The liveCache objects on which
data is actually saved are based on the planning area, not the planning book.
In the planning book you define the following elements:
Key figures and other rows
Characteristics
Functions and applications that can be accessed directly from this planning book
User-specific planning horizons
User-specific views on the planning book including initial column, number of grids, and
accessibility of the view for other users (there is no limit on the number of views you can have
within one planning book)
You can configure these and further elements of the interactive planning screen (such as the position
of columns and rows, the use of colors and icons in rows, the visibility or non-visibility of rows, the
appearance of the graphic, and macros) by using the context menus in interactive design mode.
Example for data view:
Key figure = sold pieces
Characteristics = car model, location (city), sales office
Time bucket = monthly
For the set of data chosen, a planning book is generated. In the planning book, we maintain following
information for example:
Pieces sold per month
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
Preliminary Tasks
For the setup of test data for Demand Planning, you need to ensure the availability of a SAP SCM
system where you can follow the procedure described in this document.
Generally, before you start the setup of test data as described in this document, you need a definite
knowledge about the planning scenarios you want to simulate. In particular, the following information
regarding your business and requirements for demand planning has to be available:
characteristic value combinations
key figures required for the demand planning
knowledge of time period ( = planning periodicity) for which you need historical data and planning
horizon for demand planning
Procedure
In comparison with other planning scenarios, which are based on transactional or master data, the
preparation of test data for Demand Planning can be realized quite easily.
For demand planning, no master data is required. To generate a set of test data, the only input
required is characteristic value combination and key figures.
Example: Characteristics of
product (color, size, model, quality, location)
the company (sales organization, country, and so on)
Key figures, such as historical sales volume, corrected history, price, and future demand.
The procedure to set up test data for Demand Planning consists of the following basic steps (for
releases SCM 4.1 and SCM 5.0):
Error! Objects cannot be created from editing field codes.
Create a file with characteristic value combinations (CVC) or define source for data input into
APO
In APO:
o Create a planning object structure (POS)
o Upload the file with CVCs to create CVCs in the POS
o Create Storage Bucket Profile required for planning area
o Create a planning area
o Create time series objects for key figures from planning area
o Create a planning boo.
o Create a macro for population of historical values for key figures
o Populate key figure values via the macro
In BW or APO BW: Store the demand planning data in a BW InfoCube.
In the following, we describe these steps in detail.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
10
10
100
No of CVCs:
10000
Sales Organizations/Brands:
SO10
SO20
SO30
SO40
SO50
SO60
No of CVCs:
60000
Brand Name:
SS
MS
LS
SM
MM
LM
SL
ML
LL
XL
small small
medium small
large small
small medium
medium medium
large medium
small large
medium large
large large
x-large
10 brands
Total No of CVCs (typical order
of magnitude):
600000
The first entries in the EXCEL sheet then look like (columns: brand name, location, product, supplier,
sales organization):
SS
SS
SS
SS
SS
LOC1
LOC1
LOC1
LOC1
LOC1
PR1
PR1
PR1
PR1
PR1
SUPP1
SUPP2
SUPP3
SUPP4
SUPP5
SO10
SO10
SO10
SO10
SO10
Note: To ensure that the appropriate data volume is generated in DP, the CVCs defined in this way
have to be unique. When you perform in APO the upload of the CVCs to the planning object structure,
in APO identical CVCs are deleted.
Save the EXCEL Files as ASCII (*.txt) File
These text files are required for the upload to a planning object structure.
NOTE: As it becomes obvious from the above example, the number of CVCs may become very large
if you have a large number of planning hierarchies and if you assume that for example, at each
location each product is available. In practice, you will have deviations and will have to adapt the
EXCEL sheets accordingly. The procedure described here is more of a pedagogical nature. Most
probably, you will have your CVCs available via legacy systems or in a BW InfoCube. In this case, the
natural way to upload the CVCs to APO Demand Planning would be to do it via these data sources.
Further below, we describe how to do the upload from BW to APO.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
Flag the appropriate bucket granularity (for DP, we recommended to use weeks as the
smallest bucket for the data storage; for our example, we set the flags for Week and
Month)
Define the Start and End Date for storage of the Time Series Objects (not relevant for memory
allocation); for our example:
o Start date: e.g., 01.01.2001
mostly chosen: at least ~5 years in past
1
2
For the sake of simplicity, we extend the naming for our example objects / structures with _VT (volume test).
In case that you transfer the demand planning results to APO SNP, it is necessary to define the characteristics
product and location in the POS.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
click Edit
Create
Because your planning horizon is continuously rolling into future it should be ensured to have enough of a time
buffer in the storage bucket profile. Otherwise it can happen that you will have to re-initialize used DP objects in
order to extend the validity of the bucket profile.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
Specify time buckets profile ID for future and past periods (for example, 12MONTHS and
24MONTHS)
o Define the date from when they should be visible and open for manual input (for example,
01.11.2004).
In tab Key Figures assign the key figures to the Data View and complete the planning book by
clicking the Complete icon in the bottom of the planning book wizard.
o
Step 8: Create Macro for background job to populate values of some of the key figures in the
Planning Book.
Call transaction /N/SAPAPO/ADVM (Macro Workbench):
In column Macro Book Description, double-click the name of your planning book (PB_VT)
Inside the macro book for your planning book, create a new macro (example: Macro for
Volume Testing).
Maintain the macro according to your business requirements that is with reference to the key figures
you need for your demand planning.
Note: Since the runtime of the macro scales with the number of CVCs, it may become quite large. To
limit the macro runtime, you have to restrict the number of CVCs for which you populate the full set of
required key figures.4This macro could consist of for example, two steps, the first to define the
historical values and the second to define the future values. The appearance of your macro could be
as follows:
Note: Since a detailed description of advanced macro maintenance is beyond the scope of this Best
Practice, we refer you to SAP Help Portal
Demand Planning Process
Planning Book Design
Advanced Macros
Step 9: Define background job to execute the Macro
Call transaction /N/SAPAPO/MC8T (Define Activity for Mass Processing) to define an activity:
4
Usually, demand planning for future values of key figures depends on the key figures itself, that is, in many
cases for a given CVC the value assigned to a key figure depends on the values of one or several other key
figures for this CVC. Therefore, to limit the runtime of the macro it does not make sense to reduce the number of
key figures which are populated by the macro.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
o
o
o
o
10
The next step is to create a selection ID for a subset of CVCs, which will be processed lateron in case that this selection has been assigned to the corresponding job.
Call transaction /N/SAPAPO/SDP94 (Interactive Demand Planning)
o Navigate to your Planning Book/Data View (PB_VT/DATAVIEW_VT) and open it.
o Click button Selection Window (left-hand side of the screen, selector menu bar at the
top)
o To restrict the selection to a subset of CVCs, select, for example, Show = Sales
Organization and under that meet following conditions the values APO Planning
Version = 000, and APO Product = <APO product>.
o
o
Save by clicking the SAVE (diskette) icon. In the dialog box, enter an appropriate
name for the selection (example: SELECTION_VT)
On the left-hand menu bar, click Selection Profile. A dialog box Maintain selection
profiles for users is displayed. In the dialog box, assign the selection ID
(SELECTION_VT) via drag and drop to your user.
Click SAVE.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
11
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
12
You may create this InfoCube either in your separate BW (if available) or in the APO BW. In the
following, we use the transactions in the APO BW.
Step 1: Create an Info Area (corresponds to a folder for InfoCube)
Call transaction /NRSA1 (Data Warehousing workbench: Modeling)
InfoProvider
click with the
right mouse button on the node Info Provider and choose Create InfoArea. A dialog box appears.
Enter a name (example: INFOAREA_VT) and a description for the Info Area to be created. Press
Continue (Enter).
Step 2: Create a backup InfoCube for Planning Area
Call transaction /N/SAPAPO/SDP_EXTR (DP/SNP Data Extraction)
in field Planning Area, select
the name of your planning area
click Data backup execute Generate InfoCube from planning
area and enter
name of the InfoCube (example: IC_VT)
description
name of InfoArea (INFOAREA_VT)
Execute (confirm the dialog box asking if you want to add the key figure for proportional factors to the
InfoCube).
To check that the InfoCube was automatically assigned to the InfoArea, call transaction /NRSA1
to InfoProvider
expand the entry for InfoArea INFOAREA_VT.
go
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
13
For SCM 4.1, select Assign Data Source and continue in analogy to the description for SCM 5.0.
You are also led to the maintenance screen for transfer rules from here.
Step 8: Maintain Transfer Rules
Ensure that Transfer method = PSA ( Persistent Staging Area) is selected
In tab Transfer Rules, click the icon Propose Transfer Rules (if necessary, fill manually missing
entries in the column InfoObject by copying them from the left part of the screen)
Save and
activate the InfoSource (by clicking the icons on top of the screen).
Step 9: Create Update Rules for Info Cube
Call transaction /NRSA1
go to menu bar Modeling
click InfoProvider
click with the right-hand
mouse button on your InfoCube
for SCM 5.0 only: select Additional Functions
Create Update
Rules
in the displayed dialog box, specify the InfoSource (INFS_VT)
click Continue (Enter)
5
When all status are green (respectively, no red status lights are displayed), activate the update rules.
Step 10: Create and schedule Info Package
Still in the InfoSource area, for SCM 5.0 mark your DataSource / for SCM 4.1 your source system
click with the right-hand mouse button and select Create Info Package
enter a description
click
SAVE.
If necessary, restrict the ranges for which data is uploaded on the Data Selection tab. The
InfoObjects for which you can specify a range depending on which ones you selected.
In the Processing tab, select the radio-button PSA and then into data targets.
In the Data Targets tab, set the radio-button Select Data Targets and select the recently created
InfoCube. In the Update tab select Full Update and Always update data, even if no master data
exists for the data
To upload the data into the InfoCube, continue as follows:
o Enter a value (<000>) in field /BI0/9AVERSION(APO Planning Version) since it is a
mandatory input field
o In the Schedule tab: select Start Data Load Immediately and click Start
o Press Monitor to check the upload results via SM37.
Step 11: Check Results of Data Load into Info Cube
Call transaction /NRSA1: Modeling
Select the name of the InfoCube and check its content (you see the
If the status of a key figure is red, double-click on it. In the Update rule: Detail screen you specify one of the following update
options:
1. If you are not uploading data for this key figure, select the update type No update. Otherwise choose Addition. Then choose
Transfer.
2. If you are uploading data for this key figure and the update is straightforward (that is, you do not wish the data to be modified
in this process), choose the update method Source key figure. Then choose Transfer.
3. If you are uploading data for this key figure and you do want the data to be modified in this process, select the update method
Routine and create a routine by clicking on the Create icon. Once you have created the routine, choose Transfer.
4. If you are uploading data for this key figure and you do want the data to be modified in this process, you can also choose
Formula und press Create. Formulas are a simplified version of routines if you are not able to write an ABAProutine. Once
you have created the formula, choose Transfer.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
14
Repetitive Tests
In case that you experience performance bottlenecks during the volume test runs, you have to
optimize your scenario. Either you have to optimize the technical performance or to reconsider and
adapt your planning activities to the technically feasible time windows.
Once you are finished with your optimization measures, you have to retest the planning scenarios,
which are affected by the changes. For that purpose, following steps are necessary:
Delete any logs written during the planning runs
Delete the key figures containing the planning result from macro calculation
Upload back-up data from BW InfoCube to the planning area
Note: The runtime for the upload of the InfoCube may significantly exceed the runtime of the
macros for populating the key figures. Therefore, you possibly will prefer to execute the
macros instead of loading up the data from the InfoCube.
Once you have executed this macro, the key figures in the corresponding planning book are reinitialized.
(2) Alternatively, you may reinitialize the planning area. This is equivalent to a deletion of all time
series objects (that is, the data) in the planning area.
Call transaction /SAPAPO/MSDP_ADMIN
select the planning area
click the right-hand mouse
button
select Delete Time Series Objects (this activity can also be run in background).
Once the time series objects have been deleted, one again has to initialize the planning area as
described above in step Create Time Series Objects for your Planning Area.
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
15
Best Practice: Test Data for Volume Testing SAP SCM Demand Planning
16
Further Information
Feedback and Questions
Send any feedback by formulating in the SAP Service Marketplace http://service.sap.com/message a
customer message on component SV-SMG-SER with title Best Practice for Volume Testing.