SAP APO

16
Test Data for Volume Testing – SAP SCM Demand Planning Best Practice for Solution Management Version Date: November 2006 The newest version of this Best Practice can always be obtained through the SAP Solution Manager or the SAP Service Marketplace. 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 Applicability, Goals, and Requirements To ensure that this Best Practice is the one you need, consider the following goals and requirements: Goal of Using this Service The goal of volume testing is to run a realistic simulation of expected workload during the implementation period of an IT solution. This simulation tests the solution's performance, sizing and scalability. Specifically, it focuses on runtimes and data throughput for critical business process paths and interacting components. One of the key requirements for a successful volume test is the availability of suitable test data. This Best Practice describes how you may generate test data for SCM Demand Planning scenarios. The methodology is a straight-forward procedure and is explained step by step, providing you with the necessary technical background to set up a set of test data for demand planning on SCM 4.1 / SCM 5.0.

Transcript of SAP APO

Page 1: SAP APO

Test Data for Volume Testing –SAP SCM Demand Planning

Best Practice for Solution Management

Version Date: November 2006The newest version of this Best Practice can always be obtained through

the SAP Solution Manager or the SAP Service Marketplace.

ContentsApplicability, 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

Applicability, Goals, and RequirementsTo ensure that this Best Practice is the one you need, consider the following goals and requirements:

Goal of Using this ServiceThe goal of volume testing is to run a realistic simulation of expected workload during theimplementation period of an IT solution. This simulation tests the solution's performance, sizing andscalability. Specifically, it focuses on runtimes and data throughput for critical business process pathsand interacting components.

One of the key requirements for a successful volume test is the availability of suitable test data.

This Best Practice describes how you may generate test data for SCM Demand Planning scenarios.

The methodology is a straight-forward procedure and is explained step by step, providing you with thenecessary technical background to set up a set of test data for demand planning on SCM 4.1 / SCM5.0.

Page 2: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 2

For further information on volume testing and related Best Practices, we refer you to SAP ServiceMarketplace http://service.sap.com/VTO. Therein, refer to the Best Practice Volume Testing for SAPSolutions – Generic Procedure.

Staff and Skills Requirements

This Best Practice describes a subset of tasks to be performed for the setup of a Demand Planningvolume test scenario. For the volume test itself, you have to setup a designated project (as asubproject of your Demand Planning implementation / update project).A designated project team with appropriate knowledge regarding technology and applications in thisfield is required for the volume test project,

To apply this Best Practice, you should be familiar with the key functionalities of SCM DemandPlanning and APO BW. Nevertheless, this Best Practice can also be used to gain familiarity with thefunctionalities described herein and can provide you with links to more detailed information.

System RequirementsThe test environment must have comparable hardware to the productive hardware solution. Ideally thetest should either be performed directly with the planned productive system configuration or with asuitable 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 beenconfirmed by a sizing estimation. This measure is also applied for the data volume. The data load (atleast for the data that are directly used for the test scenario) should be brought close enough to theestimate data load on productive environment to replicate realistic conditions.

For further details, refer to the Best Practice Volume Testing for SAP Solutions – Generic Procedure.

Duration and TimingThe preparation of test data for Demand Planning is a straight forward procedure and depends mainlyon the available computational capacities and the complexity of your planning scenario (basicallyspeaking, the number of characteristic value combinations (CVCs) and key figures).

If you are experienced with SCM Demand Planning and APO BW, the setup of data objects andstructures should be manageable in one or two days (depending on the complexity of your testscenario and the variety of planning scenarios you want to test.

The computational time required for this procedure is mainly determined by the number of backgroundwork processes, which handle the various data upload and generation tasks described below.

As an order of magnitude for executing this procedure we estimate about one week.

How to Use this Best PracticeRead the whole document prior to the project start. Then, use it to guide you through the differentsteps of the project. This Best Practice document is divided into three parts:

Preliminary activities: This section describes key requirements, which have to be fulfilledbefore the volume tests can be started.

Procedure for test data preparation: This section describes in detail how to prepare a set oftest data required for Demand Planning load tests.

Page 3: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 3

Best Practice Procedure and Verification

Introduction to Demand PlanningIn this section, we give a brief introduction into Demand Planning, primarily to define the keyexpressions used throughout the description of the best practice procedure.

Background Information

The various strategies for using SAP APO, SAP R/3, SAP Business Information Warehouse (BW),and possibly other data processing systems in combination are called integration scenarios. Usually,an APO system is connected to one or more systems that provide historical and actual data, such assales figures, for your demand planning business process. These systems can be SAP R/3, SAP BW,and / or third party and legacy systems or a combination of these. Since SAP APO comprises acomplete SAP BW, the tools for extracting data from other systems and transferring them to APO fordemand planning purposes are the same as SAP BW uses. The APO BW reads the data usingremote function call (RFC) techniques, IDocs, or OS file access.

The planning results that come out of the demand planning process are fed into other data processingsystems for further planning or execution purposes. The system types that can be used here are SAPAPO itself (in particular, its modules SNP and / or PP/DS), SAP R/3, or again third-party (legacy)systems.

The SAP Advanced Planner and Optimizer (APO) is the planning component of mySAP SCM, theSupply Chain Management solution provided by SAP. SAP APO is used to make strategic, tactical,and operational decisions.In APO, Demand Planning is used for long and midterm planning (typical time horizon: 2 years intopast, 12 months into future).

Characteristic Value Combinations (CVC): A characteristics combination that can be used forplanning in Demand Planning.

New characteristic value combinations need to be generated, for example if new products are plannedor if new materials appear in customer’s purchase orders.

Planning Object Structure (POS): An APO Structure that contains characteristic combinations, whichare 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 infostructure) 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 productfamily) - in three ways:

o by using the proportional factor for each branch in the treeo distributing it according to another key figureo equal distribution, if no other procedure applies

In DP, planning areas are initialized, i.e., memory is allocated although no values may have beendefined yet. (In contrast to DP, in SNP no pre-allocation of memory is performed.)

Page 4: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 4

Typical number of planning areas in APO systems is about 10 (but, up to 100 and more arepossible).

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 yourown ones.

Backup of planning areas: Usually, most data in the liveCache is DP data for back-up or reportingpurposes, these data can be downloaded to a BW InfoCube.

Planning Book

The planning book defines the content and layout of the interactive planning screen. You use planningbooks in Demand Planning and Supply Network Planning. They allow you to design the screen to suitindividual planning tasks. A planning book is based on a planning area. There is no limit on thenumber 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 whichdata 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 havewithin one planning book)

You can configure these and further elements of the interactive planning screen (such as the positionof columns and rows, the use of colors and icons in rows, the visibility or non-visibility of rows, theappearance 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 followinginformation for example:

Pieces sold per month

Page 5: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 5

Preliminary Tasks

For the setup of test data for Demand Planning, you need to ensure the availability of a SAP SCMsystem 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 definiteknowledge about the planning scenarios you want to simulate. In particular, the following informationregarding 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 planninghorizon for demand planning

ProcedureIn comparison with other planning scenarios, which are based on transactional or master data, thepreparation 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 inputrequired 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 (forreleases 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 intoAPO

In APO:o Create a planning object structure (POS)o Upload the file with CVCs to create CVCs in the POSo Create Storage Bucket Profile required for planning areao Create a planning areao Create time series objects for key figures from planning areao Create a planning boo.o Create a macro for population of historical values for key figureso 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.

Preparation of Data for Characteristic Value Combinations

Create a Microsoft EXCEL file containing characteristic value combinations (CVCs)Since the limitation of an EXCEL worksheet is 65,536 rows by 256 columns, you have to restrictyourself to a maximum size of ~ 60,000 CVCs (per line one CVC).

In accordance with the actual number of CVCs expected for your demand planning process (typicalorder of magnitude is some hundred thousand CVCs) you will have to make an according number ofcopies of this EXCEL sheet to end up with a total number of CVCs, which correspond to the expectedfuture data volume in your realistic demand planning scenario.

Page 6: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 6

Your business may imply following characteristics:

No of locations: 10No of products in each location: 10No of suppliers for each product: 100No of CVCs: 10000 For one sales organization

Sales Organizations/Brands: SO10SO20SO30SO40SO50SO60

No of CVCs: 60000 One EXCEL sheet corresponding to one brand

Brand Name: SS small smallMS medium smallLS large smallSM small mediumMM medium mediumLM large mediumSL small largeML medium largeLL large largeXL x-large10 brands

Total No of CVCs (typical orderof magnitude): 600000 corresponds to 10 EXCEL sheets (each with 60000 lines)

The first entries in the EXCEL sheet then look like (columns: brand name, location, product, supplier,sales organization):

SS LOC1 PR1 SUPP1 SO10SS LOC1 PR1 SUPP2 SO10SS LOC1 PR1 SUPP3 SO10SS LOC1 PR1 SUPP4 SO10SS LOC1 PR1 SUPP5 SO10

Note: To ensure that the appropriate data volume is generated in DP, the CVCs defined in this wayhave 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) FileThese 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 largeif you have a large number of planning hierarchies and if you assume that for example, at eachlocation each product is available. In practice, you will have deviations and will have to adapt theEXCEL sheets accordingly. The procedure described here is more of a pedagogical nature. Mostprobably, you will have your CVCs available via legacy systems or in a BW InfoCube. In this case, thenatural 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.

Page 7: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 7

Creation of Data Structures in APO DPNOTE: The steps described in this section are valid for both SCM 4.1 and SCM 5.0. In case that thereis a difference between the procedures for the two different releases, it is explicitly mentionedhereafter.

Step 1: Create a Planning Object Structure (POS)Call transaction /N/SAPAPO/MSDP_ADMIN (S&DP Administration) in the upper menu bar, changeview from Planning areas to Planning Object Structures go to Edit Create Planning ObjectStructure

In the pop-up, define a name for the Master Planning Object (example: POS_VT).1

In field Text, enter a description for the POS Do not mark any of the other fields In accordance with your CVCs (as defined via the ASCII file), add the appropriate

characteristics to your POS. Do this via marking the appropriate entries in the bottom-righttable and copying by clicking the left-hand directed arrow-button.

For our example (locations, products, suppliers, sales organization, brand name) we caneither use the delivered standard characteristics with prefix “9A*” (9ALOCNO, 9AMATNR,9ASPSUPL, 9AVKORG, 9ABRAND) or create new ones which are more suitable for yourbusiness needs.2

With the buttons Check and Activate (upper menu bar) check and activate your POS.

Step 2: Create Characteristic Combinations in your POS based on data from the Excel fileCall transaction /N/SAPAPO/MC62 (Maintain planning-relevant characteristic combinations) in fieldMaster Planning Object Structure enter the POS name (POS_VT) go to Create CharacteristicCombinations:

For immediate creation, mark the radio-button Generate immediately (for execution inbackground, select the radio-button Generate in background).

Go to section Data Source Load Data From choose File Go to Local PC browse to the text file containing the CVC. Set the flag for Results Log and Check Char. Value Execute via the Execute button.

Step 3: Display created characteristic combinationsCall transaction /N/SAPAPO/MC62 click Display Characteristic Combinations enter the name ofyour POS (POS_VT):

Click No. of combinations to check the number of just created CVCs Click Execute to display the single values (to limit the amount of displayed data, you can also

specify selection criteria)Alternatively, you may call transaction /N/SAPAPO/MSDP_ADMIN (S & DP Administration) changeview to Planning Object Structures mark the text entry for your POS and click the right-hand mousebutton Details Expand Performance check the number of created CVCs.

Step 4: Create Storage Bucket Profile for your Planning Area

Call transaction /N/SAPAPO/TR32 (Maintain Periodicity) In the entry field Stor.Bckts Prfl, enter aname for the storage bucket profile (example: SBP_VT)

Flag the appropriate bucket granularity (for DP, we recommended to use weeks as thesmallest 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 memoryallocation); for our example:

o Start date: e.g., 01.01.2001 mostly chosen: at least ~5 years in past

1 For the sake of simplicity, we extend the naming for our example objects / structures with _VT (volume test).2 In case that you transfer the demand planning results to APO SNP, it is necessary to define the characteristicsproduct and location in the POS.

Page 8: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 8

o End Date: e.g., 01.01.2030 mostly chosen: at least ~30 years in future 3

Save by clicking the diskette (SAVE) icon.

Step 5: Create Planning Area

Call transaction /N/SAPAPO/MSDP_ADMIN choose view Planning Area click Edit CreatePlanning Area:

Enter a name (example: PLA_VT) Specify the POS (POS_VT) Specify the storage bucket profile (SBP_VT) Specify the unit of measure (for example, pieces pc) Click Confirm Go to the tab Key Figs: From the right-hand screen, choose key figures you wish to plan for in

your Planning Area, for example:o 9AHISTB History (Basis)o 9AHISTP History (Promo)o 9AHISTT History (Total)o 9AMANFCST Manual Forecasto 9AMANUP Manual Correctiono 9ADMDTOT Total Demand Plano 9ADMDP1 Sales Ordero 9ADMDSE Dependent Demando 9AFPROD Production (Conf.)

Check the Planning Area (by clicking the Check button) and save by clicking the diskette(SAVE) icon.

Step 6: Create Time Series Objects for Your Planning Area

Call transaction /N/SAPAPO/MSDP_ADMIN view: Planning Areas choose your planning areawith click right-hand mouse button choose Create Time Series Objects a dialog box isdisplayed:

Enter Planning Version 000 specify start and end date for which time series objects should be created:

o Start date <01.01.2004> (typically, about 2 years in the past)o End Date <01.01.2008> (typically, about 3 years in the future)

Click the Execute button (to execute in background, set the corresponding flag in the dialogbox)

After successful initialization (status: green), you can display the created time series objectsvia right mouse click the planning Area Created Time Series Objects.

Check the allocated memory in liveCache (for details, see step 10).

Step 7: Create Planning Book

Call transaction /N/SAPAPO/SDP8B (SDP Interactive Planning – Initial Screen) in Planning BookSelection, field Planning Book enter a name for the planning book (example: PB_VT) and click theCreate button.

In the Planning Book Wizard, assign your planning area on the bottom, click Continue In tab Key Figures, via drag and drop from the list Planning Area, assign your key figures to

the planning book continue In tab Characteristics, assign the characteristics via drag and drop continue. In tab Data View

o Enter a name for the data view (example: DATAVIEW_VT)

3 Because your planning horizon is continuously rolling into future it should be ensured to have enough of a timebuffer in the storage bucket profile. Otherwise it can happen that you will have to re-initialize used DP objects inorder to extend the validity of the bucket profile.

Page 9: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 9

o Specify time buckets profile ID for future and past periods (for example, 12MONTHS and24MONTHS)

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 byclicking the Complete icon in the bottom of the planning book wizard.

Step 8: Create Macro for background job to populate values of some of the key figures in thePlanning 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 figuresyou need for your demand planning.

Note: Since the runtime of the macro scales with the number of CVCs, it may become quite large. Tolimit the macro runtime, you have to restrict the number of CVCs for which you populate the full set ofrequired key figures.4This macro could consist of for example, two steps, the first to define thehistorical values and the second to define the future values. The appearance of your macro could beas follows:

Note: Since a detailed description of advanced macro maintenance is beyond the scope of this BestPractice, we refer you to SAP Help Portal Demand Planning Process Planning Book DesignAdvanced 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 manycases for a given CVC the value assigned to a key figure depends on the values of one or several other keyfigures for this CVC. Therefore, to limit the runtime of the macro it does not make sense to reduce the number ofkey figures which are populated by the macro.

Page 10: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 10

o In field Activity, enter a name (example: MACRO_VT) and add a description(example: Run macro for volume test) and click Create

o Enter a description, the name of your Planning Book (PB_VT), and the name of theData View (DATAVIEW_VT)

o In tab Macro, enter the name of the recently created macro (Macro for VolumeTesting)

o Save by clicking the SAVE (diskette) icon on the top.

The next step is to create a selection ID for a subset of CVCs, which will be processed later-on 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 PlanningVersion = 000, and APO Product = <APO product>.

o Save by clicking the SAVE (diskette) icon. In the dialog box, enter an appropriatename for the selection (example: SELECTION_VT)

o On the left-hand menu bar, click Selection Profile. A dialog box Maintain selectionprofiles for users is displayed. In the dialog box, assign the selection ID(SELECTION_VT) via drag and drop to your user.

o Click SAVE.

Call transaction /N/SAPAPO/MC8D (Create Planning Job) to define a planning jobo Enter a job number (example: JOBNO_1) and a job Name (example:

EXECUTE_MACRO) and click Executeo In the displayed dialog box, specify the names for your Planning Book, Data View,

and Version. Click Execute.o In the screen Create Planning Job, under Control Parameters for background

planning, assign the activity you have created before (JOBNO_1).o In Planning Job Information, set the flag for Generate Log.o In Chars (characteristics), you may restrict the execution of the macro to available

selection IDs. To specify a particular selection, set the radio button One and select theselection ID you have created before (SELECTION_VT).

o To assign an appropriate aggregation level, click button Aggregation Level. Select allthe characteristic combinations in the dialog box, as automatically proposed.

o In addition to this, you may check the number of planning objects (it depends on thenumber of CVCs specified by the selection you have assigned to the planning job).

o Click SAVE.

Step 10: Check liveCache Size and Used Area

Call transaction /NLC10 (liveCache – Initial Screen) In field Name of Database Connection specifythe name of the liveCache Click the button liveCache Monitoring go to Memory Areas selectData Area (all values in KB).

In our example:

Page 11: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 11

Step 11: Execute the Background Job

Call transaction /N/SAPAPO/MC8G (Schedule Mass Processing): select the job number and job name number (JOBNO_1, EXECUTE_MACRO) schedule the job

You can check status of your job via transaction /NSM37.To have a look on the job results, call transaction /N/SAPAPO/PERFMON Demand PlanningStatistics: Mass Processing.For each entry, you can control the number of processed and saved CVCs in the respective columns.

Recommendation: In case that processing a macro, which populates the key figures for all CVCs atonce leads to performance issues (for instance, long runtime and / or too much memory required), werecommend you to schedule in parallel several planning jobs for disjoint sets of CVCs.For optimum job scheduling, to make automatic use of temporary available hardware resources, werecommend you to employ Redwood Chronacle.

Step 12: Check Usage of LiveCache (Used Area): To check the usage of liveCache after successfulcreation of data via the background job, proceed as described before.

ALTERNATIVE: Upload of Historical Data from BW

An alternative to populating historical values for key figures via a macro would be to upload this datafrom a BW InfoCube. In the following section, we describe how to create an InfoCube in BW. In thesame way, you may create an InfoCube in BW to store your historical data to upload them to APOlater-on.

Create a Back-up InfoCube in SAP BWOnce we have finished the necessary activities in SCM APO to obtain a set of test data for demandplanning, we have to back-up these data in an InfoCube in SAP BW.

The purpose of this InfoCube is to have this test data available for the repeated initial setup of testruns.

To create a back-up InfoCube and upload the data, the following steps are necessary: Create an Info Area (~Folder for InfoCube): Create a backup InfoCube for Planning Area Generate DataSource Replicate DataSource Create Application Component Create Info Source Assign Source System Maintain Transfer Rules Create Update Rules for Info Cube Create Info Package Schedule Info Package Control data uploaded to InfoCube

Page 12: SAP APO

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 thefollowing, 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 theright 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. PressContinue (Enter).

Step 2: Create a backup InfoCube for Planning Area

Call transaction /N/SAPAPO/SDP_EXTR (DP/SNP Data Extraction) in field Planning Area, selectthe name of your planning area click Data backup execute Generate InfoCube from planningarea 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 theInfoCube).

To check that the InfoCube was automatically assigned to the InfoArea, call transaction /NRSA1 goto InfoProvider expand the entry for InfoArea INFOAREA_VT.

Step 3: Generate DataSource

Call transaction /N/SAPAPO/SDP_EXTR enter name of your Planning Area (PLA_VT) and define aname for the DataSource (example: DS_VT) Generate DataSource in the dialog box, in fieldwith prefix “9A” enter the DataSource name confirm in the next screen, you have the possibilityto hide / select some fields (by setting the corresponding flag) Click SAVE.

Step 4: Replicate DataSource

To replicate the data source from APO to BW:

Call transaction /N/SAPAPO/SDP_EXTR enter the names of your planning area (PA_VT) andyour DataSource (9ADS_VT) click Replicate DataSource.

For SCM 5.0, in the displayed popup, specify how you want to create the objects: as DataSourceor as 3.x DataSource; we recommend using 3.x) <In SCM 4.1, this dialog box is not displayed.>

Step 5: Create Application Component

Call transaction /nrsa1 go to Modeling click InfoSources on the right-hand side, the listInfoSources is displayed. On the top of this list, click with the right mouse button on InfoSources andclick Create Application Component for the application component to be created, insert a name(example: APPLICATION_COMPONENT_VT) and a description Click Continue (Enter) (Possibly,you have to create a workbench request by yourself.)

Step 6: Create Info Source

Call transaction /NRSA1 In the list for InfoSources, click with the right mouse button on entry for thenewly created application component (APPLICATION_COMPONENT_VT) and select AdditionalFunctions Create Info Source3.x (for SCM 5.0) / Create Info Source (for SCM 4.1) ChooseFlexible Update in any Data Target (Except Hierarchies) insert a name (example: INFS_VT) and adescription for the InfoSource to be created Confirm and save

Step 7: Assign Source System

In the list of InfoSources, click with the right mouse button on the newly created InfoSource INFS_VTand

for SCM 5.0: select Additional Functions Assign Source System select the appropriatesource system (system on which SCM DP is operated) in the displayed dialog box, select theappropriate DataSource (9ADS_VT) click SAVE to save changes On the right-hand sight ofthe screen, maintenance screen for transfer rules and communication structure appears.

Page 13: SAP APO

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 missingentries in the column InfoObject by copying them from the left part of the screen) Save andactivate 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-handmouse button on your InfoCube for SCM 5.0 only: select Additional Functions Create UpdateRules in the displayed dialog box, specify the InfoSource (INFS_VT) click Continue (Enter)When all status are green (respectively, no red status lights are displayed), activate the update rules.5

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 systemclick with the right-hand mouse button and select Create Info Package enter a description clickSAVE. 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 dataexists 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 fieldo In the Schedule tab: select Start Data Load Immediately and click Starto Press Monitor to check the upload results via SM37.

Step 11: Check Results of Data Load into Info Cube

Call transaction /NRSA1: Modeling click Info Provider

SCM 5.0: click the icon of the corresponding InfoCube (IC_VT) click right-hand mouse buttonto start the InfoCube browser transaction, click Display Data

SCM 4.1: Double-click the icon of the corresponding InfoCube (IC_VT) In the InfoCubemaintenance screen, go to Edit InfoCube data display in the displayed dialog box, set theflag if you want to display the contents with SID on the next screen, click Execute.

Call transaction LISTCUBE Select the name of the InfoCube and check its content (you see thesame screen as above).

5 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 updateoptions:1. If you are not uploading data for this key figure, select the update type No update. Otherwise choose Addition. Then chooseTransfer.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 modifiedin 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 methodRoutine 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 chooseFormula und press Create. Formulas are a “simplified” version of routines if you are not able to write an ABAP–routine. Onceyou have created the formula, choose Transfer.

Page 14: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 14

Repetitive TestsIn case that you experience performance bottlenecks during the volume test runs, you have tooptimize your scenario. Either you have to optimize the technical performance or to reconsider andadapt 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 themacros for populating the key figures. Therefore, you possibly will prefer to execute themacros instead of loading up the data from the InfoCube.

Reset planning area

To reset the planning area, you have to reinitialize the key figures in the planning area. There are twopossibilities:

(1) Overwrite the key figure entries by “0”. This can be easily done making a copy of the macro youhave used to populate some of the key figures. This copy has to be completed by the remaining keyfigures which have been populated during the planning run. Choose “0” as an operator value assignedto the rows of the macro.To overwrite the values for one single key figure (here, historical values for demand) the macro wouldlook as follows:

Once you have executed this macro, the key figures in the corresponding planning book are re-initialized.

(2) Alternatively, you may reinitialize the planning area. This is equivalent to a deletion of all timeseries objects (that is, the data) in the planning area.

Call transaction /SAPAPO/MSDP_ADMIN select the planning area click the right-hand mousebutton 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 asdescribed above in step Create Time Series Objects for your Planning Area.

Page 15: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 15

Upload Back-up Data from BW InfoCube to the Planning Area

Before starting the next test run, you have to upload the initial Demand Planning data from the BWInfoCube to liveCache as follows:

Call transaction /N/SAPAPO/TSCUBE (Load planning area version): For the source, define the InfoCube (IC_VT) and the planning version (000). For the target, define the planning area (PLA_VT) and the planning version (000). Define the horizon (period from - to). Include restrictions for data selection, if necessary. Assign the key figures between the Info Cube and the Planning Area. Assign the characteristics between the Info Cube and the Planning Area. Mark the flag Log to receive a log afterwards. Click EXECUTE.

Page 16: SAP APO

Best Practice: Test Data for Volume Testing – SAP SCM Demand Planning 16

Further Information

Feedback and QuestionsSend any feedback by formulating in the SAP Service Marketplace http://service.sap.com/message acustomer message on component SV-SMG-SER with title “Best Practice for Volume Testing”.

© Copyright 2006 SAP AG. All Rights ReservedNo part of this publication may be reproduced or transmitted in any form or for any purpose without the expresspermission of SAP AG. The information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of othersoftware vendors.Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries,pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks orregistered trademarks of IBM Corporation.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registeredtrademarks of Citrix Systems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium,Massachusetts Institute of Technology.Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented andimplemented by Netscape.MaxDB is a trademark of MySQL AB, Sweden.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned hereinas well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several othercountries all over the world. All other product and service names mentioned are the trademarks of their respectivecompanies. Data contained in this document serves informational purposes only. National product specifications mayvary.

The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, ortransmitted in any form or for any purpose without the express prior written permission of SAP AG.This document is a preliminary version and not subject to your license agreement or any other agreement with SAP.This document contains only intended strategies, developments, and functionalities of the SAP® product and is notintended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please notethat this document is subject to change and may be changed by SAP at any time without notice.SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy orcompleteness of the information, text, graphics, links, or other items contained within this material. This document isprovided without a warranty of any kind, either express or implied, including but not limited to the implied warranties ofmerchantability, fitness for a particular purpose, or non-infringement.SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, orconsequential damages that may result from the use of these materials. This limitation shall not apply in cases of intentor gross negligence.The statutory liability for personal injury and defective products is not affected. SAP has no control over the informationthat you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.