R3 to dp

134
SAP SCM 4.0 March 2004 English Building Block Replication SAP AG Neurottstr. 16 69190 Walldorf Germany Building Block Configuration Guide

Transcript of R3 to dp

Page 1: R3 to dp

SAP SCM 4.0

March 2004

English

Building BlockReplication

SAP AGNeurottstr. 1669190 WalldorfGermany

Building Block Configuration Guide

Page 2: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Content1 Prerequisites ............................................................................................................................. 5

.1.1 SAP Notes Building Block Replication SCM ....................................................................... 5

.1.2 Uploading the Configuration Role ...................................................................................... 5

2 Preliminary Steps ...................................................................................................................... 6

.2.1 SAP R/3: Preliminary Steps ............................................................................................... 6

.2.2 SAP APO: Preliminary Steps ........................................................................................... 12

3 Data Replication ...................................................................................................................... 21

.3.1 Creating Integration Models (SAP R/3) ............................................................................ 21

.3.2 Saving Results and Creating Variants (SAP R/3) ............................................................. 24

.3.3 Activating Integration Models (SAP R/3) .......................................................................... 25

.3.4 Changing Integration Models (SAP R/3) .......................................................................... 26

.3.5 Maintaining Distribution Definition (SAP APO) ................................................................. 28

4 Additional Customizing for Replication .................................................................................... 29

.4.1 Deactivating the Customizing Import from SAP R/3 (SAP APO) ....................................... 29

5 Master Data Delta Transfer ..................................................................................................... 30

.5.1 Activating ALE Change Pointers ...................................................................................... 30

.5.2 Delta Transfer of Material Masters, Customers and Suppliers .......................................... 31

.5.3 Delta Transfer of PPMs .................................................................................................... 32

.5.4 Delta Transfer of Runtime Objects ................................................................................... 33

.5.5 Delta Transfer of Production Orders ................................................................................. 34

6 Monitoring ............................................................................................................................... 36

.6.1 Setting up the qRFC Alert (Optional) ................................................................................ 36

.6.2 Monitoring in R/3 ............................................................................................................. 37

.6.3 Monitoring in APO ............................................................................................................ 40

.6.4 Compare / Reconcile Function ......................................................................................... 43

7 Troubleshooting ...................................................................................................................... 45

© SAP AG Page 4 of 45

Page 3: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

1 PrerequisitesMake sure that the connectivity between the SAP R/3 system and the SAP SCM system has been successfully set up. This step should have already been completed as part of the scenario installation.

.1.1 SAP Notes Building Block Replication SCMCurrently no SAP Note is required for this building block.

.1.2 Uploading the Configuration Role

UseBefore you start with the configuration according to the manual procedures described in this configuration guide, upload the configuration role and assign it to your user.

SAP Best Practices provides a configuration role for each component involved in this configuration, that is, for SAP APO or SAP R/3. The configuration role is a special user menu that enables you to comfortably access all necessary transactions for the configuration from the relevant system. The following roles are available:

Technical name Description

B05_01CConfiguration role for Replication SCM (SAP R/3)

B05_02CConfiguration role for Replication SCM (SAP APO)

ProcedureFor details on how to upload configuration roles to the system and how to work with them, refer to the document Essential Information.

© SAP AG Page 5 of 45

Page 4: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

2 Preliminary Steps

.2.1 SAP R/3: Preliminary Steps

2.1.1 Activating the CIF Application Log (SAP R/3)

UseBy activating the CIF application log, you can analyze errors that occur during data transfer. The log will provide you with information such as who and when transferred what data from R/3 to the APO system.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Activating the CIF Application Log (SAP R/3)

Transaction Code CFC2

SAP Menu Integration with Other mySAP.com Components Advanced Planning and Optimization Basic Settings for the Data Transfer Set User Parameters

The Change View “Maintenance View for CIFGPARAMS”: Overview screen is displayed.

2. Choose New entries from the application toolbar.

3. In the Maintenance View for CIFGPARAMS table, make the following entries or select the given option from the list:

User RFC Mode Logging Debugging

* Q (Queued RFC) X (Normal) No entry (Debugging off)

4. Choose Save.

5. Enter a customizing request.

6. Go back.

To avoid any performance problems, it is recommended to set the user parameters for logging to "normal". To display a detailed error log, change the logging setting from "normal" to "detailed" for your user. Do not forget to change the settings back to "normal", after you finish.

© SAP AG Page 6 of 45

Page 5: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

2.1.2 Changing Material (MRP Type) (SAP R/3)

UseThis step is simple but very important. Here you define which of your materials are to be planned in the SAP APO system, i.e. they are excluded from planning in the SAP R/3 system. You achieve that by changing the MRP type of the materials you want to plan in SAP APO. The MRP type “X0” excludes materials from the MRP run in SAP R/3. It is also used as a selection criterion for the integration model and the data transfer.

Please consider carefully which materials to select.

If you want to use mass maintenance, implement the transaction MM17. Be careful when working with the mass maintenance transaction.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Changing Material (MRP Type) (SAP R/3)

Transaction Code MM02

SAP Menu Logistics Materials Management Material Master Material Change Immediately

2. On the initial screen, enter a material number and choose Enter.

3. On the Select View(s) dialog box, select the views: MRP 1 and choose Enter.

4. In the Organizational Levels dialog box, enter your plant or storage location and choose Enter.

5. On the MRP 1 tab page, in the MRP Procedure screen area, set MRP type X0.

6. Save and go back.

7. Repeat the procedure for all materials that are to be planned in the SAP APO system.

© SAP AG Page 7 of 45

Page 6: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

2.1.3 Changing Material (MRP Type) using Mass Maintenance (SAP R/3)

UseThis section describes how to change material master data using mass maintenance transaction.

Be careful when using the mass maintenance transaction. You might inadvertently change more materials than you intend to do if you specify an incorrect range.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Changing Material (MRP Type) using Mass Maintenance (SAP R/3)

Transaction Code MM17

SAP Menu Logistics → Materials Management → Material Master → Material → Mass Maintenance

2. On the Mass Maintenance: Materials (industry) screen, define relevant tables for mass maintenance. Select the following line:

Short Description Table Name

Plant Data for Material MARC

3. On the Fields tab page, select the following line :

Description Fld Name

MRP Type MARC-DISMM

4. Choose Execute.

5. On the Data Records to Be Changed tab page, specify the materials you want to maintain:

Field name User action and values Example

Material To define the range of materials you want to change, specify a high and a low value (material number)

e.g. APO-FERT-01 to APO-FERT-04

Plant To define the range of plants, specify a high and a low value (plant key)

e.g. BP01 to BP0X

6. Choose Execute.

7. On the Plant Data for Material tab page, select the materials you want to maintain.

The last column of the table contains the MRP type that needs to be maintained.

8. On the New Values screen area, select X0 - W/O MRP, with BOM Explosion.

9. To assign this value to all products, choose Carry Out a Mass Change.

You can undo changes by selecting Undo Changes.

© SAP AG Page 8 of 45

Page 7: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

10. Choose Save and choose Back four times.

2.1.4 Assigning the Node Type: Plant (SAP R/3)

UseThe R/3 system does not differentiate between production plants and distribution centers. In the SAP APO system, however, these locations are distinguished by a location type. Moreover, different settings apply to them, for example, no production is possible in a distribution center. In order for the data to be transferred correctly, it is required to specifically define which plants in SAP R/3 correspond to production plants and which to distribution centers.

Procedure1. Access the transaction using one of the following navigation options:

SAP R/3 Role Menu Maintaining assignment of node type - plant

Transaction Code SPRO

SAP IMG Menu Production Distribution Resource Planning (DRP) Basic Settings Maintain assignment of node type - plant

2. Select Allocation of node type.

3. Assign the node type “PL” to your production plants and “DC” to your distribution centers.

4. Choose Save.

5. Choose or create a customizing request.

6. Go back.

2.1.5 Checking Material (Procurement Type) (SAP R/3)

Use

The procurement type defines how a material is procured. In a distribution center, the material should be procured externally, for example, from a production plant. All location products where the location is a distribution center are to have the procurement type “F” for external procurement.

If you want to use mass maintenance, implement the transaction MM17 (see chapter Changing Material (MRP Type) using Mass Maintenance (SAP R/3)). In this case choose Table = Plant Data for Material (MARC) and Field = Procurement (MARC-BESKZ).

Be careful when working with the mass maintenance transaction.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Changing Material (MRP Type) (SAP R/3)

© SAP AG Page 9 of 45

Page 8: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Transaction Code MM02

SAP Menu Logistics Materials Management Material Master Material Change Immediately

2. On the initial screen, enter the material number and choose Enter.

3. On the Select View(s) dialog box, select the views: MRP 2 and choose Enter.

4. On the Organizational Levels dialog box, enter your plant (distribution center) and choose Enter.

5. On the MRP 2 tab page, in the Procurement screen area, select F as procurement type.

6. Save and go back.

7. Repeat the procedure for all materials that are to be planned in the SAP APO system.

2.1.6 Checking Material (Purchasing Group) (SAP R/3)

UseThe purchasing group is a buyer or a group of buyers, who is/are responsible for certain purchasing activities. In order to create purchase requisitions in SAP APO and to transfer them to SAP R/3, assign a purchasing group in your material master.

If you want to use mass maintenance, implement the transaction MM17 (see chapter Changing Material (MRP Type) using Mass Maintenance (SAP R/3)). In this case choose Table = Plant Data for Material (MARC) and Field = Purch. Group (MARC-EKGRP).

Be careful when working with the mass maintenance transaction.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Changing Material (MRP Type) (SAP R/3)

Transaction Code MM02

SAP Menu Logistics Materials Management Material Master Material Change Immediately

2. On the initial screen, enter a material number and choose Enter.

3. In the Select View(s) dialog box, select the MRP 1 views and choose Enter.

4. In the Organizational Levels dialog box, enter your plant and choose Enter.

5. On the MRP 1 tab page, in the General Data dialog box, assign an existing Purchasing Group.

6. Save and go back.

7. Repeat the procedure for all materials that are to be planned in the SAP APO system.

© SAP AG Page 10 of 45

Page 9: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

2.1.7 Selecting Resource Type (SAP R/3)

UseThis step is mandatory only if you plan to work with Supply Network Planning (SNP) in SAP APO.

The purpose of this activity is to specify which resource type is to be assigned to resources created in SAP APO. Per default, capacities are mapped to single-activity resources or multi-activity resources in SAP APO and can be used only in Production Planning and Detailed Scheduling (PP/DS). You cannot change the resource type in SAP APO.

In order to use resources for Production Planning and Detailed Scheduling (PP/DS) and Supply Network Planning (SNP), you have to use mixed resources.

Prior to the first transfer of capacities from SAP R/3 to SAP APO, you have to specify which resource type is to be assigned to the resources created in SAP APO.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Selecting Resource Type

Transaction Code SPRO

IMG Menu Integration with Other mySAP.com Components → Advanced Planning and Optimization → Application-Specific Settings and Enhancements → Settings for Resources → Set the Transfer of Resources to SAP APO

2. On the Change View “Change Target-System-Independent Settings in CIF screen, make the following entries:

Field name Description User action and values Notes

Type Single Resource

04 Single mixed resource

Type Multiresource

05 Multi-mixed resource

3. Choose Save.

4. Choose or create a customizing request.

5. Go back.

© SAP AG Page 11 of 45

Page 10: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

.2.2 SAP APO: Preliminary Steps

2.2.1 Activating the Customizing Import from SAP R/3 (SAP APO)

UseThe purpose of this activity is to activate the settings in SAP APO that allow customizing to be imported from SAP R/3 to SAP APO.

The customizing import from SAP R/3 to SAP APO is selected in the integration model in the section Material Independent Objects. You can import customizing for Available-to-Promise (ATP) and for product allocation.

We recommend that you copy customizing data only once. Otherwise, existing settings could be overwritten.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Activating the Customizing Import from SAP R/3 (SAP APO)

Transaction Code SPRO

IMG Menu mySAP SCM - Implementation Guide → Advanced Planning and Optimization → Global Available-to-Promise (Global ATP) → General settings → Maintain Global Settings for Availability Check

2. On the Change View “Global Settings: Overview“ screen, make the following settings:

Field Value Comments

TQA (Temporary quantity assignment) X Select

IC (Import Customizing) Do not select (check the Possible Entries list (F4))

3. Choose Save and go back.

2.2.2 Maintaining Units of Measure (SAP APO)

UseCarry out this activity only if your SAP R/3 data, which has to be transferred to SAP APO, requires additional units of measure that are not included in the SAP standard.

Procedure1. Run the activity Activate Units of Measure or access the transaction as following:

© SAP AG Page 12 of 45

Page 11: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

SAP APO Role Menu Maintaining Units of Measure (SAP APO)

Transaction Code CUNI

IMG Menu mySAP SCM - Implementation Guide → General settings → Check Units of Measurement

2. On the Units of Measurement: Initial Screen, specify a dimension for the unit of measurement you want to create in SAP APO. To do this, choose Possible Entries (F4), next to Units of Measurement, and select the required dimension.

3. Choose Units of measurement.

4. On the Change Unit of Measurement of Dimension screen, choose Create from the application toolbar to add a new unit of measurement.

5. Maintain all fields in accordance with the corresponding Customizing settings in your SAP R/3 system.

Use the transaction CUNI to access and check the settings in SAP R/3.

6. Save your entries.

7. Enter a customizing request and go back.

8. Repeat this step for all the additional units of measurement required.

2.2.3 Defining the Transportation Group (SAP APO)

UseThe assignment of a transportation group to a material is transferred to SAP APO via CIF with the material master. The customizing for defining the transportation groups, however, is not transferred. Therefore, you must create manually all relevant transportation groups in SAP APO customizing before starting data replication.

You can check and define the transportation groups in the SAP R/3 system by using the following R/3 IMG path: Sales and Distribution → Basic Functions → Routes → Route Determination → Define Transportation Groups.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Defining the Transportation Group (SAP APO)

Transaction Code SPRO

IMG Menu mySAP SCM - Implementation Guide → Advanced Planning and Optimization → Transportation Planning/Vehicle Scheduling → Basic Settings → Maintain Transportation Group

2. In the Change View "Transportation Group": Overview screen, choose New entries.

3. Make the necessary entries:

© SAP AG Page 13 of 45

Page 12: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Transportation Group Description

Enter the transportation group used in your material master (e.g. 0002)

Enter transportation group description

(e.g. Transportation Grp. 01)

4. Save your entries and go back.

You can check the transportation group assigned to your materials in the R/3 system as following:

1. Open the transaction MM02 or use the path SAP Menu -> Logistics Materials Management Material Master Material Change Immediately

2. On the initial screen, enter a material number and choose Enter.

3. In the Select View(s) dialog box, select Sales: General/Plant and choose Enter.

4. In the Organizational Levels dialog box, enter your plant, sales organization and distribution channel and choose Enter.

5. On the Sales: General/Plant tab page, in the Shipping data (times in days) screen are, select the transportation group (Trans. Grp) and make changes if necessary.

6. Save your entries.

2.2.4 User Settings and Activating the CIF Application Log (SAP APO)

UseWith this step, you maintain some global parameters for the SAP APO users. In addition, you activate the CIF application log for these users. This enables you to analyze errors occurring during data transfer, because error messages are stored in the destination system’s application log. You have already activated the CIF application log in the R/3 system in the previous step.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu User Settings and Activating the CIF Application Log (SAP APO)

Transaction Code /SAPAPO/C4

SAP MenuAdvanced Planning and Optimization → APO Administration → Integration Settings → User Settings

2. On the Change View Maintenance View for Global Parameters …” screen, choose New entries from the application toolbar and make the following entries:

User Logging Debugging Recording

<User name> Standard (only the number of transferred data records)

Debugging Off Default

© SAP AG Page 14 of 45

Page 13: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

3. Save your entries and go back to the installation role.

To avoid any performance problems, it is recommended to set the user parameters for logging to "Standard". To display a detailed error log, change the logging setting from "Standard" to "Detailed" for your user. Do not forget to change the settings back to "Standard" after you have finished.

2.2.5 Defining Class System (SAP APO)

UseIn this step, you define the characteristics and class systems required for planning configurable materials in the SAP APO system.

This activity is optional and is applicable only if you want to work with classes and characteristics within APO.

If you use classification in SAP APO, you have to decide which class system you want to use. You can choose between two characteristics: CDP and Classical.

• CDP (C: Characteristic-dependent planning) can be used in Make-To-Order and Make-To-Stock scenarios. It enables you to use functions like characteristics propagation, block scheduling, and the consideration of characteristics during pegging.

• Classical System (I: IBase and R/3 characteristics) can be used in Make-To-Order scenarios for mass production, for example in the automobile industry. Product configuration is shown in the iPPE (integrated product and process engineering).

You must define the class system before creating classified master data and characteristics-dependent transaction data in the SAP APO system.

Subsequent changes to this setting during productive operation may lead to loss of data!

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Defining Class System (SAP APO)

Transaction Code SPRO

IMG Menu mySAP SCM Implementation Guide → Advanced Planning and Optimization (APO) → Basis Settings → Define Class System (CDP or Classical Characteristic)

2. On the Change View “Definition of Characteristic and Class System”: Details screen, in the Definition of Characteristic and Class System screen area, select the required value, depending on your scenario:

© SAP AG Page 15 of 45

Page 14: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Field Value

Settings C (CDP) or I (IBase and R/3 characteristics)

3. Save your entries and go back.

2.2.6 Installing General User Exit (SAP APO)

UseCustomers, suppliers, production plants, distribution centers, etc. from SAP R/3 are all defined as locations, that is, as one category in the SAP APO system. As a consequence, you have to rename locations in the SAP APO system to prevent a customer and a production plant number from having the same location number in SAP APO. To do this, you need a user exit. The user exit adds the prefix “CU” for customers, the prefix “SU” for suppliers, and so on, and the logical system name is appended as a postfix to all location numbers. This way, you can be sure that even if two locations have the same number in SAP R/3, each of them has a unique number in SAP APO.

The following three situations deal with three different source codes for the user exit (this section uses note 458914 as a reference)

1. Different location types with the same name or number in the external system. For example, a customer and a supplier both have the number 1000. This problem increasingly occurs with vendor and customer numbers.

2. The same locations from different external systems. Here you must explicitly decide whether it is the same location in the different systems or not. The proposed source code deals only with the case where locations have the same external name, but are in fact different objects.

Example: Location (plant) 0001 in system A does not correspond to Location (plant) 0001 in System B.

However, if such a case occurs, you must deal with it explicitly in the user exit.

3. A combination of the first and the second problem.

The SAP R/3 enhancement concept allows you to add your own functions to SAP standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functions. Instead, the customer exits act as hooks. You can hang your own add-on functions onto these hooks.

Procedure

1. Access the activity using one of the following navigation options:

SAP APO Role Menu Installing User Exits (SAP APO)

Transaction Code CMOD

© SAP AG Page 16 of 45

Page 15: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

SAP Menu Tools ABAP/4 Workbench Utilities Enhancements Project Management

2. In the Project Management of SAP Enhancements screen, enter a name for the project.

Project Name e.g. U02B0501„U“ for user exit“02” for a defined area/function“B05” for a relevant building block“01” as a counter

Generally, you give your project a name that indicates the type of functions contained and that shows which transactions are affected. It may be useful to agree upon a company-wide naming convention for enhancement projects.

3. Choose Create.

4. In the Attributes of Enhancement for Project… screen, enter a short text describing the function of the user exit - in this case” Renaming Locations”.

5. Choose Save.

6. The system prompts you to assign a change request. Enter a development class or choose Local object to save it locally. If you enter a development class, you will be able to transport the project and its components into a productive system if you wish to do so.

7. Go back.

8. Select Enhancement assignments and choose Change.

9. Go to the first line and specify the SAP enhancement packages you want to include:

Enhancement APOCF001

10. Choose Save.

11. Return to the main screen of the Project Management transaction, select Components from the sub-objects and choose Display. Make sure that the name of the project is correct.

12. In the Display U02B0501 screen, double-click the function exit: EXIT_/SAPAPO/SAPLCIF_LOC_001

13. In the next screen, under the Source code tab page, scroll down to the bottom of the screen and double-click the Include ZXCIFUSERU06 field.

14. The Create object dialog box is displayed. Confirm the message: Do you want to create the object?

15. Confirm the information message.

16. In the Create Object Directory Entry dialog box, choose a development class or save as local object.

The View ABAP Editor: Change Include ZXCIFUSERU06 screen is displayed.

17. Choose Utilities → More utilities → Upload/Download → Upload.

18. Select one of the following files, depending on your particular requirements:

cifloc1.txt: for situation (1) mentioned in the Use section

cifloc2.txt: for situation (2) mentioned in the Use section

© SAP AG Page 17 of 45

Page 16: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

cifloc3.txt for situation (3) mentioned in the Use section

Make sure that all lines containing comments, which starts with an asterisk “*” are blue in color and have no indent, i.e. are aligned to the left. Only then does the system recognize these lines as comment lines. Otherwise a syntax error will be displayed.

In the coding provided, the locations are renamed by appending the logical system, e.g. plant number 1000 in SAP R/3, plant number in PL1000/SS8CLNT224 SAP APO where “SS8” is the system name and “224” the client name. Please note that the character “@” is not used when renaming the plant because SAP APO-BW does not recognize the symbol “@”. Therefore, the plant number is separated from the postfix with the character “/”.

19. Choose Save and Choose Activate.

20. Choose Back three times to return to the Project Management screen.

21. Choose Activate project from the application toolbar.

22. Go back.

2.2.7 Installing User Exit for SNP (SAP APO)

UseWith this step you will install a user exit which is required to run Supply Network Planning in the APO system. The user exit maintains the variable bucket consumption of mixed resources.

Procedure

1. Run the activity Enhancements or access the transaction as follows:

SAP APO Menu Path SAP Menu Tools ABAP/4 Workbench Utilities Enhancements Project Management

Transaction Code CMOD

2. On the Project Management of SAP Enhancements screen, enter a name for the project:

Project Name

e.g. U02SNP02„U“ for user exit“02” for a defined area/function“SNP” for the building block“01” as a counter

© SAP AG Page 18 of 45

Page 17: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Generally, you give your project a name that indicates the type of functions it contains and shows, which transactions are affected. It may be useful to agree upon a company-wide naming convention for enhancement projects.

3. Choose Create.

4. On the Attributes of Enhancement for Project…screen, enter a short text describing the function of the user exit - in this case “PPM Bucket Capacities”.

5. Choose Save

6. The system prompts you to assign a change request. Enter a development class or choose Local object to save it locally. If you enter a development class, you will be able to transport the project and its components into a productive system if you wish to do so.

7. Go back.

8. Select Enhancement assignments and choose Change.

9. Go to the first line and specify which SAP enhancement packages you want to include:

Enhancement APOCF012

Inbound Processing: Production Process Model

10. Choose Save.

11. Return to the main screen of the Project Management transaction, select Components from the sub-objects and choose Display. Make sure that the name of the project is correct.

13. On the Display U02S1102 screen, double-click the function exit EXIT_/SAPAPO/SAPLCIF_PPM_001

14. In the next screen under the Source code tab page, scroll down to the bottom of the screen and double-click the row: Include ZXCIFUSERU16.

The Create object dialog box is displayed.

15. Confirm the message Do you want to create the object?

16. Confirm information message.

17. In the Create Object Directory Entry dialog box, choose a development class or save as local object.

The View ABAP Editor: Change Include ZXCIFUSERU16 dialog box is displayed.

18. From menu choose Utilities → More utilities → Upload/Download → Upload

19. Select the file ppm_bucket_consumption_user_exit_01.

It is delivered with SAP Best Practices CD.

20. Choose Save

21. Double-click the line perform bcons_prop_mix_res.

The Create Object dialog box is displayed.

22. Confirm the message Do you want to create the object?

23. In the following dialog box, change ZXCIFUSERU01 to ZXCIFUSERU16 and choose OK.

24. Confirm the warning message.

25. On the following screen, delete all codings except the first three lines. The screen should look as follows:

© SAP AG Page 19 of 45

Page 18: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

*----------------------------------------------------------------------*

***INCLUDE ZXCIFUSERU16 .

*----------------------------------------------------------------------*

26. Choose Utilities → More utilities → Upload/Download → Upload.

27. Select the file ppm_bucket_consumption_user_exit_02 and choose Save.

28. Choose Activate.

29. Select all entries.

30. If a dialog box concerning syntax errors is displayed, ignore the error.

31. Choose Back three times to return to the Project Management screen.

32. Choose Activate project and go back

In some cases an error occurs during the implementation of the user exit: the INCLUDE ZXCIFUSERU16 is created twice. The result is that variable bucket consumptions are not transferred correctly. To solve this problem proceed as follows:

1. The Project Management of SAP Enhancements screen area is displayed. Enter the project you have just created, e.g. U02S1102

2. Select Components and choose Display.

3. Double-click EXIT_/SAPAPO/SAPLCIF_PPM_001.

4. Go to the bottom of the source code.

5. Double-click ZXCIFUSERU16.

6. Double-click the line perform bcons_prop_mix_res

7. Double-click ZXCIFUSERU16.

Under Found locations screen area INCLUDE ZXCIFUSERU16 is displayed

twice.

8. Double-click one of the lines.

9. Delete one of the identical lines ZXCIFUSERZZZ.

10. Save and activate ZXCIFUSERZZZ.

© SAP AG Page 20 of 45

Page 19: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

3 Data Replication

The following section describes how to create and activate integration models. Integration models are used to transfer master data from the SAP R/3 system to the SAP APO system and transaction data between both systems.

Before you start with the data replication, please make sure that the business transaction events are active in the SAP R/3 system. Only if these events are active for the SAP APO integration, will changes to the transaction data be transferred from the SAP R/3 system to the SAP APO system. This setting should have already been performed by your system administrator, so this note is just a reminder in order to avoid possible problems later on. Use the following procedure:

1. In your SAP R/3 system, open the transaction BF11.

2. Confirm the message The table is cross client.

3. On the Change View: Application Indicator”: Overview screen, check that the applications ND-APO and NDI are active, i.e. selected. If they are inactive, set them to active by selecting the box.

4. Choose Save and go back.

.3.1 Creating Integration Models (SAP R/3)

UseIntegration models are used to transfer both master and transaction data from SAP R/3 to SAP APO.

This section describes how to create integration models in general. It does not contain specific information about the type of data you are going to transfer. You can find detailed instructions on the integration models of the scenario you are installing in the Data Replication section of the corresponding scenario installation guide. To continue with the installation of your scenario, open the Data Replication section of this scenario installation guide and go through this step using both documents.

PrerequisitesYou have decided how many integration models you need to create. The number of required integration models depends on the total amount of data you have to transfer.

ProcedureIt is recommended to create different integration models for master and transaction data. This does not only improve the performance, but also helps to identify any errors that may occur during data transfer.

© SAP AG Page 21 of 45

Page 20: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Please note that only the data you specifically define within your integration models will be transferred. If the data is incomplete, errors may occur during data transfer or the run of a process in the SAP APO system.

1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Creating Integration Models (SAP R/3)

Transaction Code CFM1

SAP Menu Logistics → Central Functions → Supply Chain Planning Interface → Core Interface Advanced Planner and Optimizer → Integration Model → Generate → Create

2. Make the following entries:

Field name User action and values Default values

Model Name Specify a name for the integration model

<Name> _ <Data type>

e.g. VMI_MD

Logical System Specify target logical system <System ID>CLNT<client number>

e.g. CS7CLNT001

APO Application

Specify the name of the SAP APO application

e.g. MASTERDATA or TRANS_DATA

The Create Integration Model screen is divided into three major sections:

− Material Dependent Objects

− General Selection Options for Materials

− Material Independent Objects.

3. Refer to the scenario installation guide and select the Material Dependent Objects specified there.

4. In the General Selection Options for Materials screen area, specify or define ranges for the material dependent objects by using the criteria applicable to all objects. The following table shows an example:

Field name User action and values Comments

Material To define the range of materials you want to plan in SAP APO, specify a high and a low value (material number)

Choose the yellow selection arrow to specify the details and to define the range for each data type.

Use the online help (press F1) for detailed information on specific settings

Plant To define the range of plants, specify a high and a low value (plant key)

MRP Type X0

…. ….

© SAP AG Page 22 of 45

Page 21: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

• If you are installing a scenario where no production takes place (example: VMI or Order Fulfilment) continue with step 9.

• If you use production process models (PPMs) for your business processes, perform steps 5 and 8.

• If you use run time objects, perform steps 6 to 8.

5. Choose the yellow arrow button to the right of the PPM field. A dialog box is displayed. Make the following entries:

Field name User action and values

PPM Selection Date Enter 1: Resolution according to time of transfer

Rep.mfg Change the default value Detailed Planning to Rate-based Plng only if it corresponds to your requirements

6. Choose the yellow arrow button to the right of the PP/DS runtime object field. A dialog box appears. Make the following entries:

Field name User action and values

Production Version Enter a production version of the product

Rep.mfg Change the default value Detailed Planning to Rate-based Plng only if it corresponds to your requirements

7. If you have phantom products in your BOM, you can also transfer them with the runtime object. Choose the yellow arrow button to the right of the BOM field. A dialog box is displayed. Make the following entries:

Field name User action and values

Usage Enter the usage type of the BOM you want to transfer

Alternative Enter the alternative ID of the BOM

8. You can apply additional criteria to the PPM selection, for example, by further restricting the materials or the plants.

9. You can further restrict the selected material dependent objects by choosing the yellow arrow button next to the object. The selection criteria will be applied in addition to those defined in General Selection Option for Materials.

10. Refer to the scenario installation guide and select Material Independent Objects

11. Specify or define ranges for the material independent objects by choosing the yellow arrow button next to the objects. A dialog box is displayed. You can define value ranges and selection criteria for the objects you have already selected.

Please note: If you make no restrictions to the material independent objects selected for the integration model, the system automatically selects all objects for this object type, for example, all customers in the system. This can lead to significant performance problems during data transfer.

© SAP AG Page 23 of 45

Page 22: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

.3.2 Saving Results and Creating Variants (SAP R/3)

Procedure1. After selecting the objects to be included in the integration model, choose Execute to display

the results list.

On the Create Integration Model screen, the selected filter objects are displayed, that is, the type and the (total) quantity of the selected data.

2. Navigate to the detailed view for each filter object by choosing Details.

A list and information of the data objects you have selected with the name of your model and the target system is displayed.

3. Verify that only the required objects are included in the integration model.

4. Choose Consistency Check to conduct a consistency check of the integration model.

If, as a result of the consistency check of the integration models for transaction you have warning messages such as “material is not included in the integration model”, you can ignore them, since the material master data have already been included in a previous model.

5. Choose Save or press Ctrl+S.

6. Confirm the information message "Integration model <name of your model> generated for target system <logical system name> and application <name of application>.

7. Choose Back twice.

8. In the Should your selection options be saved as a variant? dialog box, choose Yes.

It is recommended that you create variants, because the system does not save the selection options you have made when creating an integration model. By working with variants you are able to reuse the settings or change the original integration model at a later point in time. For more information see also the respective chapter “Changing Integration Models”.

9. On the ABAP – Save as Variant screen, enter a name and a description for your variant and choose Save.

10. Go back.

© SAP AG Page 24 of 45

Page 23: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

.3.3 Activating Integration Models (SAP R/3)

UseAfter creating the integration models, containing the data you want to transfer to the SAP APO system, you need to activate them. The activation of an integration model leads to the initial data transfer from SAP R/3 to SAP APO.

PrerequisitesYou have created the required integration models as described in the previous step.

Procedure

1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Activating Integration Models (SAP R/3)

Transaction Code CFM2

SAP Menu Logistics → Central Functions → Supply Chain Planning Interface → Core Interface Advanced Planner and Optimizer → Integration Model → Activate

2. On the Activate or Deactivate Integration Model screen, make the following entries:

Model Logical/target system APO application

Enter the name of the integration model or press F4 to choose from the available models

e.g. AS7CLNT001 e.g. MASTERDATA, TRANS_DATA

If several integration models exist with the same name, they will be displayed in chronological order according to date and time. They may also be assigned to different logical systems (target systems) and SAP APO applications.

3. Choose Execute.

You can carry out a consistency check of the integration model before activating it. To do that, choose the creation data of the integration model and choose Check. This way, you can identify possible errors before the actual data transfer begins.

4. Select a model by double-clicking the creation date of the model or selecting Set to active/inactive from the application toolbar.

5. A green checkmark is placed before the creation date of the model.

6. If a model is already activated (green checkmark), deactivate the model by double-clicking the date or selecting Set to active/inactive from the application toolbar.

A red cross is placed before the model, which is deactivated now.

7. Choose Start.

The message Integration Model has been successfully activated or deactivated is displayed.

© SAP AG Page 25 of 45

Page 24: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

If during the model activation the system displays error message NR 751 ‘For object CIF_LOAD , number range interval 1 does not exist, go to transaction code SNUM, enter the object CIF_LOAD and choose Number Range and Intervals to add the number range 1 (0001 – 9999).

You can choose Check to carry out a consistency check of the integration model.

.3.4 Changing Integration Models (SAP R/3)

UseThis activity describes how to change existing activated integration models. Changes to integration models may be necessary, if you intend to plan additional products or locations in SAP APO.

PrerequisitesThe integration model you want to change has already been created and the settings have been saved as a variant.

Generating a New Integration Model1. Access the activity using one of the following navigation options:

SAP R/3Role Menu

Changing Integration Models

Transaction Code CFM1

SAP R/3 Menu Logistics → Central Functions → Supply Chain Planning Interface → Core Interface Advanced Planner and Optimizer → Integration Model → Generate → Create

2. On the Create Integration Model screen, go to Goto -> Variants -> Get Variant.

3. Select the variant, which corresponds to the integration model you want to change.

The settings for the integration model are displayed.

4. Proceed with making the required changes or enhancements to the integration model.

5. Choose Execute.

A new integration model is generated.

6. Choose Save and go back.

7. On the ABAP: Save as Variant screen, decide if you want to overwrite the existing variant or create a new one.

8. Go back.

Activating the Changed Integration Model1. Access the activity using the following navigation options:

© SAP AG Page 26 of 45

Page 25: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

SAP R/3Role Menu

Changing Integration Models

Transaction Code CFM2

SAP R/3 Menu Logistics → Central Functions → Supply Chain Planning Interface → Core Interface Advanced Planner and Optimizer → Integration Model → Activate

2. Enter a model name, a logical system and an APO application and choose Execute.

3. On the Activate or Deactivate Integration Model screen, a green check symbol indicates the currently active integration model.

The changed integration model with the time and date of the change is displayed in the first row and is not active.

4. Double click the changed integration model. A green check symbol appears on its left. At the same time, a red cross appears to the left of the old integration model.

5. Choose Start.

The changed integration model is activated and the old version of this integration model is deactivated.

6. Go back.

Result You can now perform changes to active and deactivate integration models.

© SAP AG Page 27 of 45

Page 26: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

.3.5 Maintaining Distribution Definition (SAP APO)

UseThis step describes how to distribute the planning results from SAP APO to the relevant logical backend systems.

Information on the particular planning results to be distributed can be found in the replication section of the respective SCM scenario.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Maintaining Distribution Definition (SAP APO)

Transaction Code /SAPAPO/CP1

IMG Menu mySAP SCM – Installation Guide Advanced Planning and Optimization Basis Settings Integration Publication Maintain Distribution Definition

2. On the Change View "Maintenance View for Distribution Definitions" screen, choose New Entries from the application toolbar.

3. On the New Entries: Overview of Added Entries screen, make the following entries as required for your scenario:

Publication Type Location No. Logical System SAP Rel.

e.g. In-house Production

e.g. Planned independent requirements

Enter your location no.

e.g. 1000

Name of the R/3 logical system e.g.

DS7CLNT330

e.g. 4.6C

4. Save your entries and go back.

© SAP AG Page 28 of 45

Page 27: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

4 Additional Customizing for Replication

.4.1 Deactivating the Customizing Import from SAP R/3 (SAP APO)

UseThe purpose of this activity is to deactivate settings in the SAP APO systems that allow customizing imports from SAP R/3 into SAP APO. Thus, you stop further customizing data being imported into SAP APO.

This activity is optional. We recommend that you copy the customizing data only once. Otherwise, existing settings could be overwritten. This activity prevents any additional customizing data from being imported into SAP APO.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Deactivating the Customizing Import from SAP R/3 (SAP APO)

Transaction Code SPRO

IMG Menu mySAP SCM – Implementation Guide → Advanced Planning and Optimization (APO) → Global Available-to-Promise (Global ATP) → General settings → Maintain Global Settings for Availability Check

The Change View “Global Settings for Availability Check“ screen is displayed.

2. In order to deactivate the import of customizing make the following settings:

Field Value Comments

TQA (Temporary quantity assignment) X Select

IC (Import Customizing)X

Select (check the Possible Entries list (F4))

3. Choose Save and go back.

© SAP AG Page 29 of 45

Page 28: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

5 Master Data Delta Transfer

UseThe following section describes how to transfer changes concerning the master data in R/3 to the APO system. This section does not describe how to perform the initial data transfer.

PrerequisitesThe initial data transfer has already been performed. This means, that the objects to be transferred, for example, material master or PPM have been already included in an active integration model.

.5.1 Activating ALE Change Pointers

UseThis activity allows you to activate the setting that enables the transfer of master data changes using change pointers.

Procedure1. Access the activity using one of the following navigation options:

Transaction Code spro

R/3 IMG Menu SAP Web Appication Server → Integration with other mySAP.com components → Advanced Planning and Optimization → Basic Settings for the Data Transfer → Change Transfer → Change Transfer for Master Data → Activate ALE Change Pointer Generally

2. On the Activate Change Pointers Generally screen, select Change pointers activated – Generally.

3. Choose Save and go back.

© SAP AG Page 30 of 45

Page 29: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

.5.2 Delta Transfer of Material Masters, Customers and Suppliers

UseIn contrast to transaction data such as orders, purchase requisitions, etc., changes to master data in the SAP R/3 are usually not transferred to SAP APO automatically. This section describes which settings are required for a delta data transfer for material masters, customers and suppliers.

Please note that the first part of the procedure must be performed before the changes to the master data are made.

PrerequisitesAn active integration model for the objects to be transferred already exists.

Configure Change Transfer Before Changing the Master Data1. Access the activity using the one of following navigation options:

Transaction Code CFC9

IMG Menu SAP Customizing Implementation Guide → Integration with other mySAP.com Components → Advanced Planning and Optimization → Basic Settings for the Data Transfer → Change Transfer → Configure Change Transfer for Master Data

2. In the Change Transfer for Master Data screen area, specify the periodic delta transfer of material masters, customers and vendors. It is not recommended to set the master data delta transfer to “immediately”, since this can easily lead to data inconsistencies between the two systems.

Field name User action and values

Material Master Change Transfer 1: ALE change transfer, periodic

Change Transfer for Customers 1: ALE change transfer, periodic

Change Transfer for Vendors 1: ALE change transfer, periodic

This setting defines that a change pointer is issued every time you change the material master, a customer or a vendor. As a result, you can periodically select these pointers and initiate the delta data transfer.

The delta transfer for resources is set to ALE Change Transfer, Periodic by default. To change that, go to the Initial Data Transfer and Change Transfer for Resource screen area.

3. Choose Save and exit the transaction.

© SAP AG Page 31 of 45

Page 30: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Transferring the Master Data Changes1. To collect the change pointers and initiate the delta transfer, use one of the following

navigation options:

SAP R/3 Menu Logistics → Central Functions → Supply Chain Planning Interface → Core Interface Advanced Planner and Optimizer → Integration Model → Change Transfer → Master Data

Transaction Code CFP1

2. In the Send Parameters screen area, make sure that the logical name of the target SAP APO system is correct.

3. In the Object Types screen area, select the objects that have been changed in SAP R/3 and have to be re-transferred to SAP APO.

If the selected objects have not been changed since the last data transfer, the message No master data changes – Transfer has not taken place is displayed.

.5.3 Delta Transfer of PPMs

UseAny changes to bills of materials, routings, receipts and production versions taking place in SAP R/3 are recorded automatically. In this procedure, you can update the PPMs in SAP APO that are affected by the changes made in SAP R/3. However, there are not functions available allowing you to have different PPM versions in the SAP APO system at the same time.

PrerequisitesAn active integration model with the PPM is available.

ProcedureAll changes to BOM, routing, etc. made after the last PPM transfer have been automatically

recorded by the system.

1. Access the activity using one of the following navigation options:

Transaction Code CFP3

SAP Menu Logistics → Central Functions → Supply Chain Planning Interface → Core Interface Advanced Planner & Optimizer → Integration Model → Change Transfer → PPM → Send Changes

2. On the Sending Changes to Production Process Models screen, make the following entries:

Field name User action and values

© SAP AG Page 32 of 45

Page 31: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Material Enter a materials for which you changed the BOM or routing

Plant Enter a production plant

Production Version Enter a production version number

3. Choose Execute.

ResultThe PPM in SAP APO is updated using the current information. If changes were not transferred, refer to the troubleshooting section.

.5.4 Delta Transfer of Runtime Objects

UseAny changes to bills of materials, routings, receipts and production versions taking place in SAP R/3 are automatically recorded. If APO runtime objects are affected by these changes, you can use this procedure to update the runtime objects in SAP APO.

PrerequisitesAn active integration model with runtime object is available.

Procedure1. Access the activity using one of the following navigation options:

Transaction Code CURTO_Create

IMG Menu Logistics Central Functions Supply Chain Planning Interface Core Interface Advanced Planner & Optimizer Integration Model Change Transfer PP/DS run time object Transfer PP/DS Runtime Object

2. On the Transfer of PP/DS Runtime objects to APO screen, make the following entries:

Field name User action and values

Logical system Enter an APO logical system number

Version Enter the version “000”

Material Enter the materials for which you have changed the BOM or routing

Plant Enter an production plant

Production Version Enter a production version number

Rate Routing Select if you use rate routing

Change Transfer By setting this indicator, you specify that only those R/3 runtime

© SAP AG Page 33 of 45

Page 32: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Field name User action and values

objects are transferred to SAP APO for which a master data change has been made since the last transfer.

3. Choose Execute.

Result The runtime objects in APO are updated using the current information. If changes were not transferred, please refer to the troubleshooting section.

.5.5 Delta Transfer of Production Orders

UseThe purpose of this activity is to give some general recommendations about the changes of production orders in SAP R/3 that are transferred to SAP APO.

PrerequisitesAn active integration model for production orders is available.

ProcedureThe following changes to production orders will automatically be transferred to SAP APO:

• Delete operation

• Include component

Changes to the duration of an operation will not be transferred to SAP APO, because SAP APO is the leading system as far as the scheduling is concerned and the APO values will overwrite the R/3 values. However, the user still has the option to include a new operation in SAP R/3 or change the work centers, for example. In this case, the operation data has to be complete. In addition, the following settings must be made. For details, please refer to note 314816.

Settings in SAP R/31. Access the activity using one the following navigation options:

Transaction Code OPU3

IMG Menu Production → Capacity Requirements Planning → Operations → Scheduling → Define Scheduling Parameters for Production Orders

© SAP AG Page 34 of 45

Page 33: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

2. On the Change View: Scheduling Parameters Overview screen, select your plant and the order type you are using. For example:

Field name Values

Plant e.g. BP01

Order Type e.g. PP01

3. Choose Details.

4. Regardless of the production method you are using, select all the settings mentioned below:

Field name Values

Scheduling Select

Generate Capacity Requirements

Select

Automatic Scheduling Select

5. Choose Save and go back.

These settings ensure that when, for example, an operation is added to a production order in SAP R/3, and the capacity requirements are generated and transferred to SAP APO. This is required if this operation does not exist in SAP APO.

Settings in SAP APO1. Access the activity using one of the following navigation options:

Transaction Code /N/SAPAPO/CP3

IMG Menu mySAP SCM – Implementation Guide Advanced Planning and Optimization → Basis Settings → Integration → Publication → Maintain Object-Specific Settings

2. On the Change View: Object Specific Settings for Publication – Overview screen, choose New Entries.

3. Make the following entries:

Field name Values

Publ. Type Inhouse production

Retransfer Only retransfer after online transfer

4. Choose Save and go back.

© SAP AG Page 35 of 45

Page 34: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

6 Monitoring

.6.1 Setting up the qRFC Alert (Optional)

UseThe qRFC Alert supports the user during the initial and the subsequent delta transfer of master and transaction data. In this step, you define the systems you want to monitor and identify which person(s) and in what way are to be informed about errors occurring during the data transfer. This way, no time is wasted and the user can quickly respond to any unusual situations.

PrerequisitesIf you want to receive e-mails via the Internet, you must enter an Internet address in your user settings.

Procedure4. Access the activity using one of the following navigation options:

SAP APORole Menu

Setting up the qRFC Alert

Transaction Code /SAPAPO/CW

APO Menu Advanced Planning and Optimization → APO Administration → Integration → Monitor → qRFC Alert (Outbound Queues)

If you are working with inbound queues, you must open transaction /sapapo/cqinw.

5. In the qRFC Monitoring (Outbound Queues) screen, make the following entries:

Field name User action and values

Local Outbound Queue

Target System Enter the logical name of the target R/3 system or leave the wild card “*” if more than one R/3 system is connected to SAP APO.

Notification Select “Initiator” (user who caused the queue block) or “Administrator” if there is one person responsible for the queue monitoring.

Remote Outbound Queue

Remote Systems Enter the logical name of the target R/3 system or enter a wild card “*”

Target System Enter the logical name of the SAP APO system, e.g. AS7CLNT001

Notification Select “Administrator” and enter the name of the user

© SAP AG Page 36 of 45

Page 35: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

After creating a profile, you must schedule a job to periodically activate the qRFC Alert.

.6.2 Monitoring in R/3

6.2.1 Displaying the qRFC Monitor (SAP R/3)

UseCommunication between SAP R/3 and SAP APO is based on the asynchronous transfer technique of queued Remote Function Calls (qRFC). This technique is used for the integration of SAP APO to the SAP R/3 system, concerning both the initial data supply and transfer of data changes (SAP R/3 SAP APO), as well as the publication of planning results (SAP APO SAP R/3). The data is:

• buffered by the sending system and transferred to the target system in a second step (outbound queue), or

• transferred by the sending system and buffered in the target system (inbound queue).

The qRFC Monitor is used to monitor application errors in outbound and inbound queues. It is available in both SAP R/3 and SAP APO.

It is used for:

• displaying the current status of a queue, e.g. status or number of entries in a queue,

• locking or unlocking specified queues.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Displaying the qRFC Monitor

Transaction Code CFQ1

SAP Menu Logistics Central Functions Supply Chain Planning Interface Core Interface Advanced Planner and Optimizer Monitoring qRFC Monitor

In the qRFC Monitor (outbound queue) screen, the total number of entries and queues displayed.

2. To see the details of any particular entry/queue, select or highlight it and choose Display Selection from the application toolbar.

3. To refresh or delete the entries or queues, choose the respective buttons from the application toolbar.

© SAP AG Page 37 of 45

Page 36: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

6.2.2 Displaying the CIF Application Log (SAP R/3)

UseThis transaction is used to view the CIF application log. The application log allows you to track the following information concerning the data transfer:

• time/ date

• which integration model and data objects were transferred

• name of the user who last made changes

The application log provides a detailed error message for queues with errors. It can be accessed from both SAP APO and SAP R/3.

Prerequisites• logging is activated

• at least one integration model has been generated and activated

Procedure1. Access the activity using one of the following navigation option:

SAP R/3 Role Menu Displaying the CIF Application Log

Transaction Code CFG1

SAP Menu Logistics Central Functions Supply Chain Planning Interface Core Interface Advanced Planner and Optimizer Monitoring Application Log Display Entries

2. On the Evaluate Application Log screen, select the subobjects for the object CIF you want to display.

Use the possible entries option (F4) next to Subobject or, alternatively, use the wild card (x) to see the complete logs.

In the Time restriction screen area, define the date and time (from/to) in order to see more specific logs distinguished by user, transaction code, program, etc. in the Log triggered by screen area.

3. Choose Execute from the application toolbar.

On the Display Logs screen, you can navigate to the messages for each transfer log by double-clicking a subobject. This enables you to see what data objects were sent between the systems. This function is particularly useful for determining errors.

You can get further information about a message by selecting the log row and then choosing Detailed information or Technical information from the application toolbar.

The navigation tree contains information for navigating within the message set. It can have any number of levels. You can select a subset of messages in the tree by double-clicking it. The selected messages are displayed in a list below the application logs list in the same screen.

© SAP AG Page 38 of 45

Page 37: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

Colored icons in the application toolbar area distinguish the message types and the number of messages for each type. These icons or pushbuttons are represented with different shapes: octagon stop: for cancel, red rectangle: for error, yellow triangle: for warning, green circle: for information.

In the message list, you can see whether there is a long text (yellow question mark button next to the message text) or further detailed information available. Choose the question mark icon next to the message text to display detailed information in a new dialog box.

You can reduce the number of messages by choosing the respective message type pushbutton or icon from the application toolbar. For example, to hide all messages of the type Information, choose Information – Hide (green circle push button). Choosing this pushbutton again shows all messages of this type.

6.2.3 Deleting Entries in the Application Log (SAP R/3)

UseThe records in the application log are not automatically deleted by the system. To prevent the database from overflowing, it is recommended that you delete the records at regular intervals.

If required, you can also schedule a background processing job to carry out this task.

Procedure1. Access the activity using one of the following navigation options:

SAP R/3 Role Menu Deleting Entries in the Application Log

Transaction Code CFGD

SAP Menu Logistics Central Functions Supply Chain Planning Interface Core Interface Advanced Planner and Optimizer Monitoring Application Log Delete Entries

2. On the Delete Application Log Entries screen, select the subobjects for the CIF object you want to delete and choose Delete from the application toolbar.

If you do not make any entries in the date and time fields, all records that are older than one week are automatically deleted.

3. On the Delete Application Log Entries screen, the following information is displayed:

• number of deleted logs

• number of undeleted logs

4. Go back.

© SAP AG Page 39 of 45

Page 38: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

.6.3 Monitoring in APO

6.3.1 Checking the qRFC Monitor - Outbound Queue (SAP APO)

UseThe qRFC Monitor is a central monitoring tool in the SAP system for asynchronous data transfer when using the queued Remote Function Call (qRFC) between two SAP systems or between an SAP system and external systems.

The qRFC Monitor is used to monitor application errors in outbound and inbound queues. It is available in both SAP R/3 and SAP APO.

It is used for:

• displaying the current status of a queue (e.g. status or number of entries in a queue)

• locking or unlocking specified queues

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Checking the qRFC Monitor - Outbound Queue (SAP APO)

Transaction Code SMQ1

SAP Menu Advanced Planning and Optimization → APO Administration → Integration → Monitor → QRFC Monitor (Output Queue).

2. In the qRFC Monitor (Outbound queue) screen, choose Execute.

The total number of entries and queues is displayed.

2. To see the details of any particular entry/queue, select it and choose Display Selection from the application toolbar.

3. To refresh and delete entries or queues, choose the respective buttons from the application toolbar.

6.3.2 Checking the qRFC Monitor – Inbound Queue (SAP APO)

UseThe qRFC Monitor is a central monitoring tool in the SAP system for asynchronous data transfer when using the queued Remote Function Call (qRFC) between two SAP systems or between an SAP system and external systems.

The qRFC Monitor is used to monitor application errors in outbound and inbound queues. It is available in both SAP R/3 and SAP APO.

It is used for:

© SAP AG Page 40 of 45

Page 39: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

• displaying the current status of a queue (e.g. status or number of entries in a queue)

• locking or unlocking specified queues.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu

Checking the qRFC Monitor – Inbound Queue (SAP APO)

Transaction Code SMQ2

SAP Menu Advanced Planning and Optimization → APO Administration → Integration → Monitor → QRFC Monitor (Input Queue).

2. In the qRFC Monitor (Inbound queue) screen, choose Execute.

The total number of entries and queues is displayed.

3. To see the details of any particular entry/queue, select it and choose Display Selection from the application toolbar.

4. To refresh and delete entries or queues, choose the respective buttons from the application toolbar.

6.3.3 Displaying the CIF Application Log (SAP APO)

UseThis activity is used to view the application log. You can analyze the logs and their messages, and get more information about them in the Display logs dialog box. The application log allows you to track the following information about data transfer:

• time/ date

• which integration model and data objects were transferred

• name of the user who last made changes

The application log provides a detailed error message for queues with errors. It can be accessed from both SAP APO and SAP R/3.

Prerequisites• logging is activated

• at least one integration model is generated and activated.

Procedure1. Access the activity using one of the following navigation options:

© SAP AG Page 41 of 45

Page 40: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

SAP APO Role Menu Displaying the CIF Application Log (SAP APO)

Transaction Code /SAPAPO/C3

SAP Menu Advanced Planning and Optimization APO Administration Integration Monitor Application Log Display Entries

2. On the Evaluate Application Log screen, select the subobjects for the CIF object you want to display.

You can use possible entries options (F4) next to Subobject or, alternatively, use the wild card (x) to see the complete logs.

In the Time restriction screen area, define the date and time (from/to) in order to see more specific logs distinguished by user, transaction code, program, etc. in the Log triggered by screen area.

3. Choose Execute from the application toolbar.

On the Display Logs screen, you can navigate to the messages for each transfer log by double-clicking a subobject. This enables you to see what data objects were sent between the systems. This function is particularly useful for determining errors.

You can get further information about a message by selecting the log row and then choosing Detailed information or Technical information from the application toolbar.

The navigation tree contains information for navigating in the message set. It can have any number of levels. You can select a subset of messages in the tree by double-clicking it. The selected messages are displayed in a list below the application logs list in the same screen.

Colored icons in the application toolbar area distinguish the message types and the number of messages for each type. These icons or pushbuttons are represented by different shapes: octagon stop: for cancel, red rectangle: for error, yellow triangle: for warning, green circle: for information.

In the message list, you can see whether there is a long text (yellow question mark button next to the message text) or further detailed information available. Choose the question mark icon next to the message text to display detailed information in a new dialog box.

You can reduce the number of messages by choosing the respective message type pushbutton or icon from the application toolbar. For example, to hide all messages of the type Information, choose Information – Hide (green circle push button). Choosing this pushbutton again shows all messages of this type.

6.3.4 Deleting Entries in the Application Log (SAP APO)

UseThe records in the application log are not automatically deleted by the system. To prevent the database from overflowing, it is recommended to delete the records at regular intervals.

© SAP AG Page 42 of 45

Page 41: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

If required, you can also schedule a background processing job to carry out this task.

Procedure1. Access the activity using one of the following navigation options:

SAP APO Role Menu Deleting Entries in the Application Log (SAP APO)

Transaction Code /SAPAPO/C6

SAP Menu Advanced Planning and Optimization APO Administration Integration Monitor Application Log Delete Entries

2. On the Delete Application Log Entries screen, select the subobjects for the CIF object you want to delete and choose Delete from the application toolbar.

If you do not make any entries in the date and time fields, all records that are older than one week are automatically deleted.

On the Delete Application Log Entries screen, the following information is displayed:

• number of deleted logs

• number of undeleted logs.

.6.4 Compare / Reconcile Function

UseThe following section describes how the compare/reconcile function supports the user in correcting data inconsistencies that might exist between SAP R/3 and the SAP APO system.

PrerequisitesActive integration models for the objects, which show inconsistencies, are already active.

Procedure1. Access the activity using one of the following navigation options:

SAP APORole Menu

Compare / Reconcile Function

Transaction Code /SAPAPO/CCR

© SAP AG Page 43 of 45

Page 42: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

APO Menu Advanced Planning and Optimization → APO Administration → Integration → CIF Compare/Reconcile Function → Execute Compare/Reconcile

2. On the CIF Compare/Reconcile Function screen, make the following entries:

Field name User action and values

Partner System Enter a logical name of the target R/3 system

Material (Product Name) Enter the materials, for which inconsistencies exist

Plant (Location Name) Enter the respective plants

Model Name Enter the name of the active integration model, where the inconsistent objects are included

3. In the Objects to be Checked screen area, select the inconsistent objects, for example planned orders, production orders, etc.

4. Choose Execute.

The results screen consists of at least one tab page summarizing the check results. If they indicate inconsistencies, for example in the planned orders, a separate Planned Orders tab page will be displayed.

5. Go to the tab page with the detailed error message. There is a list indicating exactly which planned orders are inconsistent. It is divided in two sections: one for the objects missing in SAP APO and one for the objects missing in SAP R/3.

6. For details on the reason that caused the inconsistency, choose the error code number.

If you are aware of the reason that caused the inconsistency, and want only to update the system, select all inconsistent items and choose Transfer to APO or Transfer to R/3.

7. The message Refresh was triggered for the selected objects is displayed.

8. Choose Iteration.

The results table is updated. Check whether the inconsistent objects have disappeared.

For additional information on the CIF compare reconcile function, go the respective chapter in the SAP APO online help.

© SAP AG Page 44 of 45

Page 43: R3 to dp

SAP Best Practices Building Block Replication: Configuration Guide

7 Troubleshooting

UseThe following section provides some useful tips on frequently encountered issues.

PPM TransferYou want to initially transfer the PPMs or you want to perform a delta transfer. The transfer is not successful. For more information on the PPM transfer, including Tips & Tricks, read SAP note 448085.

Error During Transfer of LocationsDuring the transfer of locations (customers, vendors, etc.) from SAP R/3 to APO you may get the error message “location does not exist” or a similar message.

ProcedureTo correct the error, proceed as follows:

1. Run the report /sapapo/check_customizing in SAP APO. In the result screen, you can probably see some entries with red light, showing data inconsistencies.

2. Access the following transaction in both the SAP R/3 and the SAP APO system:

SPRO → WebAS → Basis Services → Address Management → Maintain Texts for Form of Address

3. Compare the entries of a table.

4. Add the missing entries in SAP APO.

5. Activate the integration model again.

© SAP AG Page 45 of 45

Page 44: R3 to dp

SAP SCM 5.0

November 2007

English

Building BlockDPL Demand Planning

SAP AGDietmar-Hopp-Allee 1669190 WalldorfGermany

Building Block Configuration Guide

Page 45: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

Contents

1 Preparation ................................................................................................................................. 5

1.1 Prerequisites ........................................................................................................................ 5

1.2 SAP Notes Building Block Demand Planning ..................................................................... 5

2 Setting up APO BW .................................................................................................................... 6

2.1 Creating the Source System (APO BW) .............................................................................. 6

2.2 Setting up the Info Source (APO BW) .................................................................................. 7

2.3 Setting up Info Area (APO BW) ........................................................................................... 9

2.4 Setting up the Info Cube (APO BW) .................................................................................. 10

2.4.1 Creating the Update Rules .......................................................................................... 11

2.5 Creating the Infopackage ................................................................................................... 13

3 Setting up the Demand Planning Book ..................................................................................... 14

3.1 Maintaining Periodicities for Planning Area ........................................................................ 14

3.2 Activating the Planning Object Structure ............................................................................ 15

3.3 Setting up the Planning Area ............................................................................................. 15

3.4 Maintaining the Time Buckets Profile ................................................................................. 17

3.5 Setting up the Planning Book ............................................................................................. 18

3.6 Creating the Forecast Profile (SAP APO) .......................................................................... 23

3.7 Creating Macros (SAP APO) ............................................................................................. 25

3.7.1 Creating Macros for the Standard View ...................................................................... 25

3.7.2 Creating the Sales Volume Macro for the Sales View ................................................. 31

3.8 Promotion Specific Settings (SAP APO) ............................................................................ 32

3.8.1 Maintain Promotion Key Figures ................................................................................. 32

3.9 Assigning User to Planning Book (SAP APO) .................................................................... 32

4 Loading Historical Data .......................................................................................................... 34

4.1 Loading Historical Data from Excel (SAP APO) ................................................................. 34

4.2 Testing the Data Upload (SAP APO) ................................................................................. 35

4.3 Maintaining Characteristic Combinations: Non-VMI (SAP APO) ........................................ 36

4.4 Maintaining Characteristics Combinations: VMI (SAP APO) .............................................. 37

4.5 Initializing the Planning Area .............................................................................................. 38

4.6 Creating Selection Profiles for the Planning Book ............................................................. 39

5 Setting up the Release of the Demand Forecast ..................................................................... 40

5.1 Release to SNP ................................................................................................................. 40

5.2 Release to SAP ECC ......................................................................................................... 42

5.2.1 Creating the Transfer Profile ....................................................................................... 43

5.2.2 Creating an Activity ..................................................................................................... 44

5.2.3 Creating a Planning Job .............................................................................................. 45

5.2.4 Scheduling the Planning Job ....................................................................................... 46

© SAP AG Page 4 of 46

Page 46: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

Demand Planning: Configuration Guide

1 Preparation

1.1 PrerequisitesThe Demand Planning building block contains all configuration settings that are necessary to generate demand forecasts in the SAP APO System.

Before starting with the installation, make sure that you have successfully set up the relevant sections of the Connectivity and the Replication building blocks.

A basic prerequisite for executing demand forecasts in SAP APO, is the availability of historical sales data. In this building block, SAP Best Practices provide the settings for loading historical data from an excel file or, alternatively, from your SAP ECC System.

Use the configuration guide to make the configuration settings by performing all required steps manually.

1.2 SAP Notes Building Block Demand Planning Currently, no SAP Note is required to run this building block:

SAP Note # Component Description

– – –

© SAP AG Page 5 of 46

Page 47: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

2 Setting up APO BWTo enable SAP APO to load historical sales data, you need to make several settings in the BW part of the SAP APO system, which is called the Data Warehousing Workbench.

The following section describes the basic steps that are necessary if you want to load historical data into SAP APO using Microsoft Excel files as the default source system. However, many of these settings are also required if you intend to use an OLTP system as your source system. In the latter case, some additional settings are required which can be found in the Loading Historical Data from OLTP section.

2.1 Creating the Source System (APO BW)

UseA source system indicates the system from which the transaction data and master data originated. This activity is an example that shows you how to create the Excel source system so that you can use it later for loading the historical sales data from Excel files. You need to create a separate source system if you want to load the data from a different data source.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Data Warehousing Workbench

Transaction code RSA1

2. In the left screen area of the Data Warehousing Workbench: Modeling screen, choose Source Systems.

3. In the right screen area, right-click Source Systems and choose Create.

4. In the Select Source System Type dialog box, select the File System (Manual Metadata, Data using file interface) option and choose Transfer.

The Create Source System dialog box is displayed.

5. Enter Excel in both rows (Logical System Name and Source System Name) and choose Enter.

Sometimes the error message “No entry for BW_USER in table RSADMIN available” appears. In this case, choose Help and double-click on Proposal for Users in Source System in the Performance Assistant.

a) Choose the Customizing activity (transaction RSCUSTV3).

b) Enter RFCUSER in field SS user ALE.

c) Choose Save and choose or create a workbench request.

d) Go back and leave (!) the Data Warehousing Workbench.

e) Try again to create the source system.

If you still encounter problems, see SAP note 410952 (BW User = RFCUSER)

© SAP AG Page 6 of 46

Page 48: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

2.2 Setting up the Info Source (APO BW)

Use In this activity, you create the InfoSource for transaction data so that you can transfer data from the source system to the SAP APO System. The InfoSource is created in the Data Warehousing Workbench.

In this activity, you also define the communication structure, assign the source system and define the transfer rules. The Communication Structure represents the structure of an InfoSource. It contains all InfoObjects that belong to an InfoSource. The Transfer Structure is the framework in which data from the source system is transferred to the SAP APO system. Transfer rules enable you to specify how the fields in the transfer structure are assigned to the InfoObjects in the communication structure. This is normally a 1:1 assignment, although InfoObjects can also be filled via routines or constants.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu SAP Menu Advanced Planning and Optimization Demand Planning Environment Data Warehousing Workbench

Transaction code RSA1

2. In the Modeling screen area on the left, choose InfoSources.

3. Right-click the InfoSources node and choose Create Application Component.

4. Make the following entries:

Field name User action and values Comment

Application comp. DP_APPL_COMP The system adds the prefix “Z” ZDP_APPL_COMP

Long description Demand Planning Application Component

5. Choose Continue.

6. Right-click the Demand Planning Application component you have created, and choose Additional Functions → Create InfoSource 3x.

7. In the Create InfoSource dialog box, select Flexible Update in any Data Target and enter the following values:

Field User action and values

InfoSource DP_IS

Long description Demand Planning InfoSource

Template-Info Source Leave empty

8. Choose Transfer.

9. Right-click the new info source and choose Additional Functions → Create Transfer rules.

10. In the dialog box that appears, enter the source system EXCEL using the input help.

11. Choose Transfer.

12. Confirm the system prompt to save your changes.

13. In the right screen area, choose Communication Structure to expand the structure.

© SAP AG Page 7 of 46

Page 49: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

14. Enter the following InfoObjects in the InfoObject column:

InfoObjects Description

9ALOCNO APO Location

9AMATNR APO Product

9ABRAND Brand

9ALOCTO APO Destination Loc.

9AVKORG Sales Organization

0CALMONTH Cal.year/month

9AVHISTORY History

0UNIT Unit of measure

15. To expand the transfer structure entry screen, choose “Transfer_structure / Transfer_rules”.

16. In the drop down menu in the Source System field, choose the source system Excel. Then select the Transfer Rules tab and choose Propose Transfer Rules.

17. Save the InfoSource.

18. Choose Activate on the menu bar to activate the InfoSource.

19. Go back to the Data Warehousing Workbench.

© SAP AG Page 8 of 46

Page 50: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

2.3 Setting up Info Area (APO BW)

UseIn this activity, you create the info area and the application component in the Data Warehousing Workbench of the SAP APO BW. The info area is used for cataloging InfoCubes, allowing them to be assigned more effectively.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu SAP Menu Advanced Planning and Optimization Demand Planning Environment Data Warehousing Workbench

Transaction code RSA1

2. On the left side, in the Modeling screen area of the Data Warehousing Workbench, choose InfoProvider.

3. In the right screen area, right-click InfoProvider and choose Create InfoArea.

4. Enter the following data:

Field name Description User action and values Comment

Info Area DP_INFOAREA

Long Description Demand Planning Info Area

5. Choose Continue.

© SAP AG Page 9 of 46

Page 51: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

2.4 Setting up the Info Cube (APO BW)

UseIn this activity, you create an InfoCube, which is a data container for planning data, and assign characteristics and key figures to it. Then you maintain update rules for the InfoCube. Update rules specify how data (key figures, time characteristics, characteristics) is written to the InfoCube from the communication structure of an InfoSource. This way, the InfoSource is linked to the InfoCube. An InfoCube can receive information from several InfoSources. A set of update rules must be maintained for each InfoSource you wish to link with the InfoCube.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu SAP Menu Advanced Planning and Optimization Demand Planning Environment Data Warehousing Workbench

Transaction code RSA1

2. In the left screen area of the Data Warehousing Workbench, choose InfoProvider.

3. Right-click the new InfoArea and choose Create InfoCube.

4. In the Edit InfoCube dialog box, make the following entries:

Field name User action and values Comment

InfoCube DP_IC

Description Demand Planning InfoCube

InfoProvider Type

Select the radio button Standard InfoCube

5. Choose Create.

The Choice of BW Application dialog box is displayed.

6. Double-click BW.

The Edit InfoCube screen is now divided into four columns:

• Navigation area (Modeling or other) on the left

• InfoProvider area

• Template area

• InfoCube area

7. In the Template area, choose with the quick info text Info Source 3.x to display the InfoSource table.

8. In the Select Info Source window, choose All Applications, then click on DP_IS Demand Planning Info Source in the InfoSource table.Choose Continue.

The InfoSource template is now displayed in the template area.

9. Expand all folders of the InfoSource template.

© SAP AG Page 10 of 46

Page 52: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

10. Select the following characteristics from the template area (in the Characteristics folder):

• APO Location

• APO Product

• Brand

• APO Destination Location

• Sales Organization

11. Using drag and drop, move these characteristics to the Dimension 1 element under the Dimensions folder in the InfoCube area on the right.

12. Likewise, assign the time characteristics Calendar year/month to the dimension Time of the InfoCube. As a result, the InfoObject Unit of measure is automatically assigned to the InfoCube.

13. Assign the key figure History to the Key Figures folder of the InfoCube.

14. To assign the APO Planning Version (9AVERSION) characteristics to this InfoCube, right-click the InfoCube dimension Dimension 1 and choose InfoObject Direct Input.

15. In the Insert InfoObjects dialog box, enter 9AVERSION and choose Continue. You have assigned all relevant characteristics to the InfoCube.

16. Save the InfoCube, activate the InfoCube and go back to the Data Warehousing Workbench.

2.4.1 Creating the Update Rules1. Right-click the Demand Planning InfoCube and choose Additional Functions → Create

update rules.

2. In the Info Source field, select the Demand Planning InfoSource and choose Continue

3. In the Update Rules create: Rules screen, default update rules are generated from the InfoCube. Update rules must be created for all key figures and characteristics in the InfoCube.

4. Double-click key figure History or choose Detail. The Update Rule: Detail dialog box is displayed.

5. On the Key Figure tab, choose Addition n the Update Type section..

A key figure can be updated according to different rules (Addition or No update option). No update means that the InfoCube is not updated. In other words, no data records are written to the InfoCube during the initial data transfer, or the data records that are already available remain with subsequent transfers. Addition means that new values are added where the primary key is the same.

6. In the Update Method section, choose History as a Source Key Fig (Source Key Figure).

7. Go to the Characteristics tab.

8. Choose method blank of the characteristic APO-Planning Version.

© SAP AG Page 11 of 46

Page 53: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

9. Choose Constant and enter the value 000.

10. Choose Transfer.In the Update Rules table, the status must be green for the next step.

11. Choose Update Rules → Activate from the menu bar and go back to the Data Warehousing Workbench.

© SAP AG Page 12 of 46

Page 54: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

2.5 Creating the Infopackage

UseIn this step, you create an InfoPackage to upload historical data from an Excel sheet.

Procedure1. Access the Data Warehousing Workbench in SAP SCM using one of the following

navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Environment → Data Warehousing Workbench

Transaction code RSA1

2. In the left part of the Data Warehousing Workbench, in the Modeling section, choose InfoSources.

3. Look for the relevant InfoSource, for example, DP_IS Demand Planning InfoSource.

4. Expand the InfoSource DP_IS and right-click the second subnode and choose Create InfoPackage.

5. In the Create InfoPackage dialog box, enter the InfoPackage description (e.g. Demand Planning Info Package). Choose Save.

6. The Scheduler (Maintain InfoPackage) screen is displayed.

7. Choose the External Data tab page. In the Load external data from section, select Client Workstation.

8. In the File Type section, select the CSV file radio button. In the Data separator field, enter “;”. In the Escape sign field, enter “ “ “.

9. In the Name of file field, enter the path to the Excel file which contains the data to be uploaded.

10. Choose the Processing tab page and select the radio button PSA and then into Data Targets (Package by Package).

11. Choose the Data targets tab page and select the radio button Select Data Targets.

12. Choose your InfoCube and set the indicator Updating the data target. Do not set the indicator Delete entire content of data target.

13. Choose the Update tab and select the radio button Full update and Always update data, even if no master data exists for the data.

14. On the Schedule tab page, specify when the data is to be uploaded (either immediately, or as a batch job).

15. Save the Infopackage.

© SAP AG Page 13 of 46

Page 55: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3 Setting up the Demand Planning Book

3.1 Maintaining Periodicities for Planning Area

UsePeriodicities for a planning area (also called storage buckets profile) define the time buckets in which data based on a given planning area is saved in Demand Planning or Supply Network Planning. The periodicity for Demand Planning is usually divided in weeks and months whereas the periodicities for SNP are usually made up of days or weeks. You need to define a storage buckets profile before you can create a planning area.

Procedure

1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Environment → Current settings → Periodicities for Planning Area

Transaction code /SAPAPO/TR32

2. On the Maintain Periodicity screen, choose the storage buckets profile 9ADP.

3. If necessary, change the horizon during which the profile is valid:

Field name Description User action and values Comment

Start date for example, 01.01.2005

End date for example, 31.12.2008

4. Save and go back to the SAP Easy Access Menu.

© SAP AG Page 14 of 46

Page 56: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.2 Activating the Planning Object Structure

UseYou need to activate the standard planning object structure for Demand Planning, which groups together characteristics that can be planned in one or more planning areas of Demand Planning. You cannot create a planning area without a master planning object structure.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Environment → Administration of Demand Planning and Supply Network Planning

Transaction code /SAPAPO/MSDP_ADMIN

2. In the upper left screen area, choose Planning areas → Plng object structures.

3. Right-click the planning object structure 9ADPBAS and choose Activate (even if the status light is green).

4. Go back.

3.3 Setting up the Planning Area

UseA planning area is the central data structure of Demand Planning. It groups the parameters that define the scope of planning activities.

ProcedureCreate a planning area by executing the following steps:

1. Change to the S&DP Administration screen.

SAP SCM menu Advanced Planning and Optimization Demand Planning → Environment Administration of Demand Planning and Supply Network Planning

Transaction code /SAPAPO/MSDP_ADMIN

2. If no planning areas are displayed, choose Plng Object Structures in the upper left screen area and switch to the Planning area view.

3. In Name screen area, right-click the Planning Areas folder name and choose Create planning area.

4. In the Create Planning Area dialog box, make the following entries:

Field name User action and values Comment

Planning area DP_001

Master plg object structure

9ADPBAS

© SAP AG Page 15 of 46

Page 57: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

Field name User action and values Comment

Database connection LCA

Stor. bckts prfl 9ADP

Unit of measure for example, PC

Statistics currency for example, EUR

If you want to change settings of an existing planning area, you need to deactivate the active planning area. To do this, go to the S&DP Administration screen, right-click on the relevant planning area, and choose Delete time series objects. Make the required changes.

5. Choose Enter.

6. Choose the Key figs tab and select the following key figures for the planning area:

Key fig. Description InfoCube Comment

9AVHISTORY History DP_IC Relevant for Scenario MTS

9ADFCST Forecast Relevant for Scenario MTS and VMI

9APROM1 Promotion 1 Relevant for Scenario MTS

9AAFCST Forecast (addition.) Relevant for Scenario MTS

9APRICEFC Planned Price Relevant for Scenario MTS

9AREVFC Sales Forecast Relevant for Scenario MTS

9APPROD Production (Planned) Relevant for Scenario MTS

9AMANUP Manual Correction Relevant for Scenario MTS

9AADDKF1 Additional Field 1 Relevant for Scenario VMI

9AADDKF2 Additional Field 2 Relevant for Scenario VMI

9AADDKF3 Additional Field 3 Relevant for Scenario MTS

9AADDKF4 Additional Field 4 Relevant for Scenario MTS

9AADDKF5 Additional Field 5 Relevant for Scenario MTS

7. Choose Details and assign the InfoCube DP_IC to the key figure 9AVHISTORY. To do this, enter DP_IC in the corresponding field in the InfoCube column. You also need to change the value in the Semantic column from 001 to 002.

Without the assignment of the InfoCube to the key figure 9AVHISTORY (for historical data), historical data from the data source cannot be displayed in the planning book, even if no error messages appear for the upload.

8. Choose Key Fig. Selection to go back.

9. Choose the Key Figure Aggregatn tab page and change the calculation type of all key figures from S to P except for the key figure 9AVHISTORY.

10. Assign the disaggregation key figure APODPDANT to each key figure except for the key figure 9AVHISTORY.

11. Save the planning area and go back.

© SAP AG Page 16 of 46

Page 58: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.4 Maintaining the Time Buckets Profile

UseTime bucket profiles define the historical or future time horizon for Demand Planning or Supply Network Planning. With this step, you define which time buckets can be used for planning, how many periods of each time bucket are used and in which sequence the time buckets appear in the planning table.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Current settings Maintain Time Buckets profile for Demand Planning and Supply Network Planning

Transaction code /SAPAPO/TR30

2. Define the following three profiles using the values in the respective tables:

Profile 1

3. Enter the ID and a name for the time buckets profile:

Field name User action and values Comment

Time buckets prfl ID

DP_4Weeks_5Months In this example, the time horizon spans 6 months (5+1). The first month is displayed in weeks.

Short text Enter a name for this profile

4. In the entry table, enter the following values. Choose Enter after completing each row to get to the next row.

Number Basic periodicity Periv2 Display periodicity

6 M

1 M W

W

5. Save the profile. Create the following two profiles following the same procedure.

© SAP AG Page 17 of 46

Page 59: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

Profile 2

6. Create the profile 2 following the same procedure as for profile 1.

Field name User action and values Comment

Time buckets prfl ID

DP_12Months In this example, the time horizon spans 1 year. This year is displayed in 12 months.

Number Basic periodicity Periv2 Display periodicity

12 M

M

Profile 3

7. Create the profile 3 following the same procedure as for profile 1 and 2.

Field name User action and values Comment

Time buckets prfl ID

DP_20Days In this example, the time horizon spans 20 days.

Number Basic periodicity Periv2 Display periodicity

20 T

8. Go back when you have created all profiles.

3.5 Setting up the Planning Book

UseA planning book defines the content and the layout of the interactive planning screen. Planning books are used 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. You can create several user-specific data views in a planning book. In this step, you create a planning book for Demand Planning.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Environment → Current settings → Define Planning Book

Transaction code /SAPAPO/SDP8B

2. Enter the planning book DP_001 and choose Create.

The Planning Book Wizard dialog box is displayed.

© SAP AG Page 18 of 46

Page 60: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3. Make the following entries:

Field name User action and values

Planning Book Enter the planning book DP_001

Planning book text Demand Planning

Planning area Select the planning area DP_001 and choose Enter

Manual Proportion Maintenance

X

Promotion X

Univariate forecast X

4. Choose Continue.

5. Assign the following key figures from planning area to the planning book by using drag and drop or choose Add all new Key Figures to add all key figures:

Description Value Comment

History 9AVHISTORY Relevant for Scenario MTS

Forecast 9ADFCST Relevant for Scenario MTS and VMI

Promotion 1 9APROM1 Relevant for Scenario MTS

Forecast (addition.) 9AAFCST Relevant for Scenario MTS

Planned Price 9APRICEFC Relevant for Scenario MTS

Sales Forecast 9AREVFC Relevant for Scenario MTS

Production (Planned) 9APPROD Relevant for Scenario MTS

Manual Correction 9AMANUP Relevant for Scenario MTS

Additional Field 1 9AADDKF1 Relevant for Scenario VMI

Additional Field 2 9AADDKF2 Relevant for Scenario VMI

Additional Field 3 9AADDKF3 Relevant for Scenario MTS

Additional Field 4 9AADDKF4 Relevant for Scenario MTS

Additional Field 5 9AADDKF5 Relevant for Scenario MTS

The Proportional factor APODPDANT key figure is automatically added to your planning area when you create the planning area. You do not have to add this key figure yourself and assign it to the planning book in this step. When you create the respective view, this key figure will be automatically there for your selection.

6. Choose Continue.

7. Assign the following characteristics from the planning area to the planning book by using drag and drop:

Description Value

APO Location 9ALOCNO

APO Product 9AMATNR

Brand 9ABRAND

Sales Organization 9AVKORG

APO Destination Loc. 9ALOCTO

© SAP AG Page 19 of 46

Page 61: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

The characteristic 9AVERSION (APO Planning Version) will be added to the planning book automatically after you complete this step.

9. Choose Continue to go to the Data View tab (the Key Fig. Attrib tab is available in the change mode only after you have completed the planning book).

10. On the Data view tab; enter the following values:

Field name User action (Scenario MTS) User action (Scenario VMI)

Data view DP_Standard VMI_Standard

Data view description Demand Planning Demand Planning

TB profile ID (future) DP_4Weeks_5Month DP_4Weeks_5Month

TB profile ID (history) DP_12Month DP_12Month

Status 3 (Changeable) 3 (Changeable)

11. Choose Enter.

12. Select Visible and select the date as of which you wish the past planning horizon to be visible when this data view is opened.

13. Choose Continue, and assign the following key figures from the planning book to the data view for either the MTS or the VMI scenario, keeping the same order as in the table:

Make-to-Stock

Key Figures Description

9AVHISTORY History

9ADFCST Forecast

9APROM1 Promotion 1

9AAFCST Forecast (additional)

9APRICEFC Planned Price

9AREVFC Sales Forecast

9APPROD Production (Planned)

9AMANUP Manual Correction

9AADDKF4 Additional Field 4

Vendor-Managed Inventory

Key Figures Description

9AADDKF1 Additional Field 1

9AADDKF2 Additional Field 2

9ADFCST Forecast

© SAP AG Page 20 of 46

Page 62: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

14. Choose Complete.

15. When the Planning Wizard prompt appears, choose Yes to complete the planning book and data view.

16. On the initial screen, change the planning book you have just created by choosing Edit.

17. If you are installing the VMI scenario, continue with step 21 (entering a free text for the key figures).If you are installing the Make-to-Stock scenario, repeat steps 9 to 12 to create the following views:

Views View Description Key Figures

DP_CLP COLLABORATIVE DEMAND PLANNING

History

Forecast

Forecast (additional)

DP_RELEASE DEMAND PLANNING - RELEASE VIEW

Manual Correction

18. On the Data View tab page, specify the following TB profile IDs for the DP_RELEASE view,

Field name User action and values

TB profile ID (future) DP_12Month

TB profile ID (history) blank

19. Create the remaining views for the Make-to-Stock scenario according to the steps 9-12:

Views View Description Key Figures

DP_LOGISTICS DEMAND PLANNING - LOGISTICS VIEW

Forecast

Production (Planned)

DP_SALES DEMAND PLANNING - SALES VIEW

History

Forecast

Forecast (addition.)

Planned Price

Sales Forecast

Manual Correction

DP_PROP DEMAND PLANNING - PROPORTIONAL FACTOR VIEW

Proportional Factor

To modify the proportional factors manually, you need to create a separate data view containing only the APODPDANT key figure to control the authorization to change these factors. This key figure is a default value in the view and is thus invisible, so you do not need to assign any key figure from the right list in this view.

© SAP AG Page 21 of 46

Page 63: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

20. Choose Complete.

21. Go to the Key fig. attributes tab, select the FreeText radio button and make the following entries for each key figure. Choose Save Setting after entering the data for each key figure (depending on your scenario).

Key Figures Free Text Relevant for scenario

9AVHISTORY Historical Data MTS

9ADFCST Statistical Forecast MTS and VMI

9APROM1 Promotion MTS

9AAFCST Sales Forecast MTS

9APRICEFC Planning Price MTS

9AREVFC Sales Revenue Forecast MTS

9APPROD Logistics Forecast MTS

9AMANUP Final Forecast MTS

9AADDKF1 VMI Historical Data VMI

9AADDKF2 VMI Customer Forecast VMI

9AADDKF3 – MTS

9AADDKF4 Forecast Deviation MTS

9AADDKF5 Customer Forecast MTS

22. Choose Complete and exit the planning book maintenance.

© SAP AG Page 22 of 46

Page 64: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.6 Creating the Forecast Profile (SAP APO)

UseYou need to create a forecast profile to prevent your forecast data from being overwritten. Univariate forecasting provides methods that allow you to forecast the following time series patterns, for example, constant demand, trend demand, seasonal demand, and seasonal trend demand.

Procedure (Non-VMI)1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Maintain Forecast Profiles

Transaction code /SAPAPO/MC96B

2. On the Master Prfl tab page, enter the following values:

Field name User action and values Comment

Planning area DP_001

Master prfl DP_Master_Profile

Description Demand Planning Master Profile

Forecast key figure 9ADFCST

Period indicator M

Forecast horizon Define a time period for your forecast horizon

History horizon Define a time period for your history horizon

3. On the UnivariateProfile tab, enter the following values:

Field name User action and values Comment

Profile DP_UNI_PROFILE

Description Demand Planning Univariate Profile

Key figure 9AVHISTORY

Version 000

Forecast strategy 10 (Forecast with constant models)

Alpha 0,20

Beta 0,30

4. Choose Save Single Profile.

5. On the Master prfl. tab, select Univariate forecast and enter the following values:

Field name User action and values Comment

Univariate forecast DP_UNI_PROFILE

6. Save the forecast profile and go back.

© SAP AG Page 23 of 46

Page 65: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

Procedure (VMI)1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Maintain Forecast Profiles

Transaction code /SAPAPO/MC96B

2. On the Master prfl tab, enter the following values:

Field name User action and values Comment

Planning area DP_001

Master prfl VMI_Master_Profile

Description VMI Master Profile

Forecast key figure 9ADFCST

Period indicator M

Forecast horizon Define a future period for your forecast horizon, for example from the current date until six months in the future

History horizon Define a period in the past for your history horizon, for example, starting twelve months in the past until one month in the past

3. On the Univariate prfl tab, enter the following values:

Field name User action and values Comment

Profile VMI_UNI_PROFILE

Description VMI Univariate Profile

Key figure 9AADDKF1

Version 000

Forecast strategy 11

Alpha 0,20

Beta 0,30

4. Choose Save Single Profile.

5. On the Master prfl. tab, select Univariate forecast and enter the following values:

Field name User action and values Comment

Univariate forecast VMI_UNI_PROFILE

6. Choose Save and go back.

© SAP AG Page 24 of 46

Page 66: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.7 Creating Macros (SAP APO)

Use

You can use advanced macros to perform complex calculations quickly and easily. Macros are executed either directly by the user or automatically at a predefined point in time. When defining advanced macros, you work in a special desktop environment known as the MacroBuilder.

In total, four macros are created in the Demand Planning building block. They are all defined for the planning book DP_001. You create three macros for forecast calculation according to the following instruction. The chapter Creating the Macro for Consensus-Based Planning describes how to create the alert macro for consensus-based planning.

In the DP_STANDARD view of the planning book DP_001, you create two macros:

The first macro is used for the standard and consensus-based planning. The system calculates the arithmetic average of Statistical Forecast, Sales Forecast and Logistics Forecast, the result of average forecast data plus Promotion Data is inserted in the Final Forecast cell. It enables the user to consider the forecast input and the promotion plan from different departments within the company. The planner can make manual adjustments and enter the final agreed forecast into the Final Forecast cell. All of this information can be shown in the planning book screen.

The second macro multiplies the Final forecast data with the Planned price to calculate the sales volume. The third macro is an alert macro used for highlighting exceptional situations in consensus-based planning.

In the DP_SALES view of the planning book DP_001, you create the fourth macro. This macro multiplies the Final forecast data with the Planned price to calculate the sales volume, which is the same as the one in the standard view.

3.7.1 Creating Macros for the Standard View 1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Current settings Define Planning Book

Transaction code /SAPAPO/SDP8B

2. Enter the name of the planning book: DP_001

3. Select Data view DP_standard.

4. Choose Edit.

5. Choose MacroBuilder → MacroBuilder → Data view.

© SAP AG Page 25 of 46

Page 67: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.7.1.1 Creating the Macro for Consensus-Based Planning1. Right-click the macro node below the planning table and choose Create New Macro → Add

macro. In the APO Macro Builder dialog box, enter a descriptive text for the macro, for example, Forecast + Promotion → Final Forecast. Choose Continue.

2. Right-click the macro and choose Add macro Element → Step.

In the APO Macro Builder dialog box, in the descriptive text section, enter a name for the macro step, for example, First Step and choose Continue.

3. Right-click the macro step and choose Add Element (Result Level) Add results row. In the APO Macro Builder dialog box, choose Final Forecast in the Row field. Choose Adopt.

4. Right-click the result row you have just created and choose Add Element (Argument Level) Add Operator/Function. In the APO Macro Builder dialog box, choose “(“.

5. Right-click the operator/function you have just created and choose Add Element (Argument Level) Planning Table Element Append argument row. In the APO Macro Builder dialog box, choose Statistical Forecast in the Row field.

6. Right-click the argument row you have just created and choose Add Element (Argument Level) Append Operator/Function. In the APO Macro Builder dialog box, choose “+”.

7. Right-click the operator/function you have just created and choose Add Element (Argument Level ) → Planning Table Element → Append argument row. In the APO Macro Builder dialog box, choose Sales Forecast in the Row field.

8. Right-click the argument row you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “+”.

9. Right-click the operator/function you have just created and choose Add Element (Argument Level ) → Planning Table Element → Append argument row. In the APO Macro Builder dialog box choose Logistics Forecast in the Row field.

10. Right-click the argument row you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “)”.

11. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “/”.

12. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, enter “(”.

13. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “SIGN()” and change it to “SIGN(“.

14. Right-click the operator/function you have just created and choose Add Element (Argument Level ) → Planning Table Element → Append argument row. In the APO Macro Builder dialog box, choose Statistical Forecast in the Row field.

15. Right-click the argument row you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “)”.

16. Right-click the operator/function you have just created and choose Append Operator/Function. In the APO Macro Builder dialog box, choose “+”.

© SAP AG Page 26 of 46

Page 68: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

17. Right-click the operator/function you have just created and choose

Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “SIGN()” and change it to “SIGN(“.

18. Right-click the operator/function you have just created and choose Add Element (Argument Level ) → Planning Table Element → Append argument row. In the APO Macro Builder dialog box, choose Sales Forecast in the Row field.

19. Right-click the argument row you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “)”.

20. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “+”.

21. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box choose the character “SIGN()” and change to “SIGN(“.

22. Right-click the operator/function you have just created and choose Append argument row. In the APO Macro Builder dialog box, choose Logistics Forecast in the Row field.

23. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “)”.

24. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, choose “)”.

25. Right-click the operator/function you have just created and choose Add Element (Argument Element) → Append Operator/Function. In the APO Macro Builder dialog box, enter “+”.

26. Right-click the operator/function you have just created and choose Append argument row. In the APO Macro Builder dialog box, choose Promotion in the Row field.

27. Select the macro and choose Check to check it. Generate the macro by choosing Generate.

28. Move the macro by using drag and drop to the Events section and to the Default folder in the upper right screen area.

29. If you want to continue with the configuration, proceed with the next activity to create the Sales Volume Macro (see below). If you want to discontinue the configuration at this point, we recommend that you save your settings. To do this, go back to the Planning book Design screen and choose Save. Choose All Functional Areas when the confirmation prompt appears.

3.7.1.2 Creating the Sales Volume Macro

1. Right-click the macro node below the planning table and choose Create New Macro → Add macro

In the APO Macro Builder dialog box, enter a descriptive text for the macro, for example, Sales Revenue Forecast.Choose Continue.

2. Right-click the macro and choose Add Macro Element → Step.

In the APO Macro Builder dialog box, in the descriptive text section, enter name for the macro step for example, First Step.

© SAP AG Page 27 of 46

Page 69: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3. Right-click the macro step and choose Add Element (Result Level) → Add results row.

In the APO Macro Builder dialog box, choose Sales Revenue Forecast in the Row field.

4. Right-click the results row you have just created and choose Add Element (Argument Level) → Planning Table Element → Add argument row.

In the APO Macro Builder dialog box, choose Final Forecast in the Row field.

5. Right-click the argument table row you have just created and choose Add Element (Argument Level) → Append operator/function.

In the APO Macro Builder dialog box, enter *.

6. Right-click the operator/function and choose Add Element (Argument Level) → Planning Table Element → Append argument row.

In the APO Macro Builder dialog box, choose Planning Price in the Row field.

7. Select the macro and choose Check to check it. Choose Generate to generate the macro.

8. Using drag and drop, move the macro to the Events section and to the Default folder in the upper right corner screen area.

9. Go back to the Planning book design screen and choose Save.

10. Choose All Functional Areas when the confirmation prompt appears and go back to the main menu path.

3.7.1.3 Creating an Alert Macro

UseIn this section, you create an alert macro. The alert is used to highlight exceptional situations in the consensus-based planning. In this case, the alert macro compares the figure of the Logistics Forecast data with that of Sales Forecast data. If the deviation is more than 10 percent, an alert is generated.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Current settings Define Planning Book

Transaction code /SAPAPO/SDP8B

2. Enter the name of the planning book: DP_001.

3. Select the DP_Standard data view.Choose Edit. The Planning Book: Design Demand Planning Book /Demand_Planner screen is displayed.

4. Select the Forecast Deviation row, right-click it and choose Selected rows → Hide.

5. Choose MacroBuilder → MacroBuilder → Data view.

6. Right-click the macro node below the planning table and choose Create a New Macro → Add macro.

© SAP AG Page 28 of 46

Page 70: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

In the APO MacroBuilder dialog box, in the Description section, enter a name for the macro, for example, Forecast Deviation, and choose Continue.

7. Right-click the macro and choose Add macro element → Step. In the APO MacroBuilder dialog box, in the Description section, enter a name for the macro step, for example, Calculate Difference, and choose Continue.

8. Right-click the macro step and choose Add Element (Result Level ) → Add results row.In the APO MacroBuilder dialog box, in the Row field, choose Forecast Deviation and choose Continue.Right-click the result row you have just created and choose Add Element (Argument Level) → Append operator/function.In the APO MacroBuilder dialog box, choose an open bracket “ ( “ and choose Continue.

9. Right-click the operator/function you have just created and choose Add Element (Argument Level) → Planning Table Element → Append argument row.In the APO MacroBuilder dialog box, in the Row field, choose Sales Forecast and choose Continue.Right-click the argument row you have just created and choose Add Element (Argument Level) → Append operator/function. In the APO MacroBuilder dialog box, choose a minus - and choose Continue.

10. Right-click the operator/function you have just created and choose Add Element (Argument Level ) → Planning Table Element → Append argument row.In the APO MacroBuilder dialog box, in the Row field, choose Logistics Forecast and choose Continue.Right-click the argument row you have just created and choose Add Element (Argument Level ) → Append operator/function.In the APO MacroBuilder dialog box, enter “ ) * 100 / ” (separated by blanks) and choose Continue.

11. Right-click the operator/function you have just created and choose Add Element (Argument Level) → Planning Table Element → Append argument row.In the APO MacroBuilder dialog box, in the Row field, choose Logistics Forecast and choose Continue.

12. Right-click the macro and choose Add macro element → Step.In the APO MacroBuilder dialog box, in the Description section, enter a name for the macro step, for example, Alert, and choose Continue.

13. Right-click the macro step and choose Add Element (Result Level) → Add Control Statement.In the APO MacroBuilder dialog box, in the Statement field, choose IF and choose Continue.

14. Right-click the control statement row you have just created and choose Add Element (Result Level) → Append Condition.In the APO MacroBuilder dialog box, enter “Condition: Forecast Deviation > 10%” and choose Continue.

15. Right-click the condition row you have just created and choose Add Element (Argument Level) → Planning Table Element → Append argument row.In the APO MacroBuilder dialog box, in the Row field, choose Forecast Deviation and choose Continue.Right-click the argument row you have just created and choose Add Element (Argument Level) → Append operator/function.In the APO MacroBuilder dialog box, enter > 10 (separated by blanks) and choose Continue.

16. Right-click the IF control statement you have created in step 13 and choose Add Element (Result Level) → Planning Table Element → Append results row.

In the APO MacroBuilder dialog box, in the Row field, choose Sales Forecast in the Row field and Attribute change in the Change mode field. Choose Continue.

© SAP AG Page 29 of 46

Page 71: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

Right-click the result row you have just created and choose Add Element (Argument Level) → Add operator/function.In the APO MacroBuilder dialog box, enter CELL_BG( 6 ) (with a blank before and after the figure “6”) and choose Continue.

17. Right-click the result row and choose Add Element (Result Level) → Append Control Statement.In the APO MacroBuilder dialog box, choose ELSE in the Statement field and choose Continue.

18. Right-click the control statement you have just created and choose Add Element (Result Level) → Planning Table Element → Append result row.In the APO MacroBuilder dialog box, choose Sales Forecast in the Row field and Attribute change in the Change mode field.

19. Right-click the result row you have just created and choose Add Element (Argument Level) → Add operator/function.In the APO MacroBuilder dialog box, enter CELL_BG( 2 ) (with a blank before and after the figure “2” and choose Continue.

20. Right-click the result row you have just created and choose Add Element (Result Level) → Append Control Statement.In the APO MacroBuilder dialog box, in the Row field, choose ENDIF and choose Continue.

21. Select the macro and choose Check to check it. Choose Generate to generate the macro.

22. Move the macro to the right upper corner of the screen to the Events section and into the Default folder by using drag and drop.

23. Go back to the Planning book Design screen and choose Save.

© SAP AG Page 30 of 46

Page 72: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.7.2 Creating the Sales Volume Macro for the Sales View

1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Current settings Define Planning Book

Transaction code /SAPAPO/SDP8B

2. Enter the name of the planning book: DP_001

3. Choose Data view DP_Sales.

4. Choose Edit.

5. Choose MacroBuilder.

6. Choose MacroBuilder Data view.

To create the macro, perform the following steps:

7. Right-click the macro node below the planning table and choose Add macro.

8. In the APO Macro Builder dialog box, in the descriptive text section, enter a name for the macro, for example, Sales Revenue Forecast

9. Choose Continue.

10. Right-click the macro and choose Add macro element → Step.

11. In the APO Macro Builder dialog box, in the descriptive text section, enter a name for the macro step, for example, First Step.

12. Right-click the macro step and choose Add results row. In the APO Macro Builder dialog box, choose Sales Revenue Forecast in the Row field.

13. Right-click the results row you have just created and choose Add element (Argument Element) → Planning Table Elements → Add argument row. In the APO Macro Builder dialog box, choose Final Forecast in the Row field.

14. Right-click the argument table row you have just created and choose Append operator/function. In the APO Macro Builder dialog box, enter *.

15. Right-click the operator/function and choose Append argument row. In the APO Macro Builder dialog box, choose Planning Price in the Row field.

16. Select the macro and use the Check pushbutton to check it. Choose Generate to generate the macro.

17. Move the macro by using drag and drop to the Events section and to the Default folder in the upper right screen area.

18. Go back to the Planning book design screen and choose Save.

19. Choose Save All and go back to the main menu.

© SAP AG Page 31 of 46

Page 73: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3.8 Promotion Specific Settings (SAP APO)

3.8.1 Maintain Promotion Key Figures

UseIn this step, you define the lowest level of detail in which promotions are saved.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Planning Promotion Settings Maintain Promotion Key Figures

Transaction code /SAPAPO/MP33

2. On the Maintain Promotion Level screen, maintain the following entry

Planning Area Promotion Key Figures Char. for promotion Level

DP_001 9APROM1 9AMATNR

3. Choose Save.

3.9 Assigning User to Planning Book (SAP APO)

UseYou need to assign the default planning book to each DP user. When a planner opens the demand planning desktop, he or she sees the planning book assigned to them. Note that you can assign only one planning book to a user.

You can restrict the users’ authorization so that they can only navigate to a specified planning book or a specific data view.

Procedure1 Access the activity using one of the following navigation options:

SAP Menu Advanced Planning and Optimization Demand Planning Environment Current Settings Assign User to Planning Book

Transaction code /SAPAPO/SDPPLBK

2 Choose New Entries.

3 Change the following two lines, the first without the transaction code as shown in the table:

Name Trans. Code Plng book Data view Specific book Fixed View

username DP_001 DP_Standard

username /SAPAPO/SDP94 DP_001 DP_Standard

© SAP AG Page 32 of 46

Page 74: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

If you set an indicator in the Specific book column, the user whose name you have entered in the left column can only navigate to the specified planning book in interactive demand planning (the user can access all the data views for this planning book).

If you set an indicator in the Specific View column, the user you have entered in the left column can use this planning book and the planning view only and cannot navigate to other planning books and views in the interactive demand planning.

4. To restrict a person’s authorization (for example, for a sales person), so that they can only use planning book DP_001 and data view DP_Sales, you have to maintain the table as follows:

Name Trans. Code Plng book Data view Specific book

Fixed View

Sales person

DP_001 DP_SALES

Sales person

/SAPAPO/SDP94 DP_001 DP_SALESX X

5. Choose Save. If a system prompt appears, choose or create a customizing request and go back.

6. Repeat the same procedure for all other users.

© SAP AG Page 33 of 46

Page 75: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

4 Loading Historical Data

If you are installing the Vendor-Managed Inventory scenario (VMI), only the following activities from this section need to be configured:

• Maintaining Characteristics Combinations: VMI (SAP APO)

• Initializing the Planning Area (SAP APO)

4.1 Loading Historical Data from Excel (SAP APO)

UseIn this step, you upload historical data from an Excel sheet.

ProcedureThe file that contains the sample historical data is called DP_Upload_HIST_DATA_<IndustryName>.csv.. The sample file is located on the Best Practices Documentation CD.

If you want to run Demand Planning with your own data, open the sample file and replace the sample data with your data. The file is laid out as follows:

Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 Column 7 Column 8

Plant Product Brand Sold-to party (customer)

Sales organization

Month (for example, 012006)

Quantity Unit of measure

The CSV file provided on the CD is just an example for your reference. You must edit the data (for example, the plants, products, brand, customers, etc.) according to your data before you can make the upload. You can only change or edit this file in a text editor, for example, in Microsoft Notepad. Otherwise, special characters could be added to the file that prevent you from importing the data into the SAP APO System.

Note that MS Excel may cause leading zeros (for example, in dates, such as 012005) to disappear, which prevents a successful data import. To ensure all dates or other figures that require a leading zero have this figure in the Excel file, open the file by right-clicking on the file and choose Open with.

1. Open the file and enter all the relevant historical data.

2. Choose Save and close the file.

3. Access the Data Warehousing Workbench in SAP SCM using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Environment → Data Warehousing Workbench

Transaction code RSA1

© SAP AG Page 34 of 46

Page 76: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

4. In the left part of the Data Warehousing Workbench, in the Modeling section, choose

InfoSources.

5. Look for the relevant InfoSource, for example, Demand Planning InfoSource.

6. Expand the InfoSource DP_IS and double-click the InfoPackage.

7. Choose the External Data tab page. In the File name field, enter the path to the Excel file which contains the data to be uploaded.

8. On the Schedule tab page, specify when the data is to be uploaded (either immediately, or as a batch job).

9. Choose Start to execute the upload schedule.

10. Confirm all messages that are displayed.

11. If the Delete Entire Contents of Infocube dialog box is displayed, choose Fact tble and dims.If the Delete InfoCube/ODS content dialog box is displayed, choose Delete entries.

The message Data was requested is displayed.

The Data Warehousing Workbench offers a monitor, which enables you to get information about data transfer. To use the monitor, choose Monitor in the upper left screen area or choose Goto → Monitoring.

4.2 Testing the Data Upload (SAP APO)

UseThe following section describes different ways of checking the historical data loading process, data processing, analyzing errors and displaying the uploaded data.

ProcedureBy using the Monitor within the Data Warehousing Workbench, you can keep monitor the data request and data processing in the background. In the different levels of the detail display, you can check the status of the data processing.

Action: Right after the data upload, choose Monitor or choose Goto → Monitor.

You can find the most important markers for localizing an error that was not logged in the error message in the Detail screen of the Monitor under the Environment menu option.

Display Uploaded Data in InfoCube1. After the data upload, go back to the Data Warehousing Workbench: Modelling screen.

2. Choose InfoProvider in the left screen area.

3. Expand the node of your InfoArea, for example, Demand Planning InfoArea.

4. Right-click your InfoCube (for example, DP_IC) and choose Manage.

5. In the Manage Data Targets screen, select the line with the name and the technical name of your InfoCube and choose Contents.

6. Choose Field selection for output to define which data is to be displayed.

7. Choose Select all and choose Execute twice.

© SAP AG Page 35 of 46

Page 77: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

ResultThe successful upload of historical data to SAP APO is confirmed.

4.3 Maintaining Characteristic Combinations: Non-VMI (SAP APO)

UseIn order to run Demand Planning, the master data on which you want to create the demand plans has to be determined for the planning area. In this step, the characteristic combinations (product A, distribution center B) are created for the demand plans you want to create.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Master Data → Application-Specific Master Data → Demand Planning → Maintain Characteristic Values

Transaction code /SAPAPO/MC62

2. In the Maintain Planning-Relevant Characteristic Combinations view, make the following entries:

Field name Description User action and values Note

Master Planning Object Structure 9ADPBAS

3. In the Maintain Characteristic Combinations section, choose Create Characteristic Combinations.

4. In the Create Characteristic Combinations view, make the following entries:

Field name User action and values Note

Generate immedtly

X Select the Generate immedtly checkbox

Load Data From

InfoProvider

InfoProvider DP_IC InfoCube containing the historical data

Version 000

Date from Specify the start date of your historical data from your data source

The time must contain the entire characteristic combinations relevant for scheduling and cover the period from your data source!

Date to Specify a the end date of historical data from your data source

4. Choose Execute.

ResultThe system displays the following message: “Planning Object successfully created”.

© SAP AG Page 36 of 46

Page 78: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

If the message “No new characteristics combinations were loaded” is displayed, please check the Date from / to – they must correspond to the period covered by the data source.

You have generated the master data for Demand Planning.

To check the characteristics combination you have just generated, choose Display characteristics combinations in the Maintain characteristic combinations relevant to planning view.

4.4 Maintaining Characteristics Combinations: VMI (SAP APO)

UseIn order to run Demand Planning, you need to determine the master data that you will use for creating demand plans for the planning area.

This activity is only required for the Vendor-Managed Inventory scenario (VMI).

Procedure1. Access the transaction using one of the following navigation options:

SAP SCM role menu Maintaining Characteristic Combinations

SAO SCM menu path Advanced Planning and Optimization → Master Data → Application-Specific Master Data → Demand Planning → Maintain Characteristic Values

Transaction code /SAPAPO/MC62

2. In the Maintain Planning-Relevant Characteristic Combinations screen, enter the following data:

Field name User action and values Note

Master plnng object structure 9ADPBAS -

3. Under Maintain Characteristic Combinations, choose Create Single Characteristic Combination.

4. In the Create Characteristic Value Combinations screen, make the following entries:

Field name User action and values Note

Brand e.g. 1 -

APO - Location e.g. PLBP01/ES7031 “ ES7031” stands for your ECC system and client

APO Destination Location e.g. C6111 -

Product e.g. APO-FERT-03 -

Sales organization e.g. BP01 -

Adjust time series objects Select indicator -

© SAP AG Page 37 of 46

Page 79: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

immediately

5. Choose Execute.

The message Background job scheduled successfully appears.

In the Maintain Planning-Relevant Characteristic Combinations screen, you can check the characteristics combination that you have generated. To do this, choose Display characteristics combinations.

4.5 Initializing the Planning Area

UseThe purpose of this activity is to initialize the planning area and to create time series objects.

Procedure1. Access the activity using the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Administration of Demand Planning and Supply Network Planning

Transaction code /SAPAPO/MSDP_ADMIN

2. Right-click the planning area you created (for example, DP_001).

3. Choose Create time series objects.

4. Make the following entries :

Field name Description User action and values Notes

Plng Version 000

Start Date for example, current date – one year

End Date for example, current date + two years

5. Choose Execute.

6. Go back.

© SAP AG Page 38 of 46

Page 80: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

4.6 Creating Selection Profiles for the Planning Book

UseFor your planning process, you need to make a selection that restricts the range of products and locations. To do this, you create one or more selection profiles.

The demand planner uses the selection profile to quickly access frequently used selections.

Procedure

1. To access the planning book choose one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Planning → Interactive Demand Planning

Transaction code /SAPAPO/SDP94

2. In the Planning Book: SAP Standard Demand Planning screen, choose Selection window in the left screen area.The Object Selection dialog box is displayed.

3. From the possible entries list in the Show field, select APO Product.

4. Enter the planning version 000 in the field to the right of the APO Planning Version field.

5. In the second row, restrict the range of products by specifying only those products that you actually need for your planning task. To do this, select APO Product and use the multiple object selection :

For the Make-to-Stock scenario, for example, select APO-FERT-01 and APO-FERT-02, for other scenarios, specify the respective products.

6. Choose Save selection in the Objects Selection dialog box.

7. Enter for example, MTS_CPG or VMI_CPG as the selection description and choose Save.

8. Choose Adopt

9. To store the saved selection in your selection profile, choose Maintain selection profile in the left screen area. In the Maintain Selection Profiles for Users dialog box, use drag and drop to transfer the saved selection from the right area to your selection profile on the left.

10. Choose Save and Copy.

11. To display objects that belong to a selection profile, double-click the selection. The system displays the objects in the upper left screen area.

© SAP AG Page 39 of 46

Page 81: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

5 Setting up the Release of the Demand Forecast

5.1 Release to SNP

UseA demand plan is a plan that is free of restrictions. This means, it is created from a distribution/marketing viewpoint, considering the input from these departments. However, it does not consider any real production, storage, or transportation capacities. These aspects are considered during Supply Network Planning. By releasing the demand plan to Supply Network Planning, the plan can be processed further and decisions about sourcing, deployment and transportation based on it can be made. From a technical point of view, you copy the data from the liveCache time series objects into a forecast category of the liveCache orders.

We recommend that you perform this activity to save the aforementioned settings as a variant. The variant for releasing the demand plan to SNP is used after the planner has run demand planning and generated a forecast.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization → Demand Planning → Planning → Release → Release Demand Planning to Supply Network Planning

Transaction code /SAPAPO/MC90

2. In the Release to SNP view in the Data source area, make the following entries.

Field name Description User action and values

Note

Planning area

DP_001

Planning version

000 Active version

Key figure Key figure from which you want to copy the requirements data.

9AMANUP For all Non-VMI Scenarios

Key figure 9ADFCST VMI Scenario (if you want to transfer the forecast based on the historical data)

Key figure 9AADDKF2 VMI Scenario (to transfer a forecast the customer has already created)

Choose this key figure if you want to test the SAP Best Practices VMI scenario

© SAP AG Page 40 of 46

Page 82: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

3. In the Target area, make the following entries:

Field name Description User action and values Note

Planning version 000 Active version

Category FA

4. In the Horizon area, define the future period to be covered by your demand plan:

Field name User action and values Note

From date beginning of the next month as of the current date, e.g. 01.10.2007

To date For example, six months as of your start date, 31.03.2008

5. In the Periodicity area, make the following entries:

Field name Description User action and values Note

Daily buckets profile DP_20DAYS

6. In the Object Selectn area, make the following entries:

Field name Description User action and values Note

Product APO-FERT-01

or

APO-FERT-03

Scenario MTS

Scenario VMI

7. Activate the Results Log option if you want a log to be generated when the demand plan is released.

8. Choose Goto Variants Save as Variant to be able to use these settings again. In the new screen, enter the variant name and a description:

Variant Name Description Scenario

MTS_CPG Release to SNP MTS Make-to-Stock

VMI_CPG Release to SNP VMI Vendor-Managed Inventory

9. Choose Save and go back.

© SAP AG Page 41 of 46

Page 83: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

5.2 Release to SAP ECC

UseThe following section describes the necessary settings that enable the user to transfer the demand planning results back to the SAP ECC System. The forecast results and planned independent requirements are transferred to the Demand Management and can be further processed there.

Prerequisites• The materials and locations that exist in SAP ECC also exist in the SAP APO system. They

have been transferred during data replication. For these materials, a planning strategy is defined in the SAP ECC system.

A location split, which is the split of the product demand to locations, has been defined. In this case, the location split has already been defined through the calculation type of the key figures. All key figures in the planning area are disaggregated by using the calculation type “P” – based on different key figures. For further information about the APODPDANT key figure and relevant disaggregation logic, refer to chapter Setting Up Planning Area.

You can confirm the calculation type of the key figures by opening transaction /SAPAPO/MSDP_ADMIN or by double-clicking your planning area. Confirm the warning message and go to the KeyFig Aggregation tab. For more information on aggregation and disaggregation, refer to the respective chapter of the SAP APO Online Help.

• A product split is optional and is not considered in this document. If you wish to define a product split, read the relevant section in the SAP APO Online Help.

• The Release data view has been created.

• When defining the planning book, refer to chapter Setting Up Planning Book for further information.

© SAP AG Page 42 of 46

Page 84: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

5.2.1 Creating the Transfer Profile

UseYou have to create a transfer profile, which is to be used for transferring your forecast results to SAP ECC Demand Management. In the transfer profile, you also define which key figure is to be transferred. Depending on your requirements, you can define several transfer profiles.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Environment Maintain Transfer Profiles

Transaction code /SAPAPO/MC8U

2. Enter a name for your transfer profile (example: TP_DP) and choose Create.

3. Make the following entries:

Field name User action and values Comment

Planning Area DP_001

Key Figure 9AMANUP alternatively you can use the key figure 9ADFCST

Planning version 000

APO Extras

Char. Product optional If you do not make an entry, the system uses the characteristic 9AMATNR

Char. Location optional If you do not make an entry, the system uses the characteristic 9ALOCNO

R/3

Requirements Type optional You can leave the field empty if your materials are assigned to an MRP group which is included in a strategy group

Version 00 ID of the SAP ECC demand program to which you wish to transfer

00: Requirements Plan

4. Select the Active box if you want the independent requirements to be included in the MRP run in the SAP ECC system.

5. Choose Save and go back twice.

© SAP AG Page 43 of 46

Page 85: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

5.2.2 Creating an Activity

UseWith this step you define which action takes place, for example, a transfer to the SAP ECC system, when you create and schedule the respective job (see also the next two steps).

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Planning Demand Planning in the Background Define Activities for Mass Processing

Transaction code /SAPAPO/MC8T

2. Enter a name for the activity (example: DP_ECC) and a short description for the planning activity.

3. Choose Create.

4. Make the following entries:

Field name User action and values Comment

Planning Book DP_001

Data View DP_Release

5. Select the R/3Transfer Prfl. Tab page in the lower screen area.

6. Enter the name of your transfer profile (TP_DP) and choose Enter. The settings of your transfer profile are displayed.

7. Choose Save. The action “R/3 Transfer” with action counter 1 is automatically inserted in the activity.

8. Go back twice.

© SAP AG Page 44 of 46

Page 86: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

5.2.3 Creating a Planning Job

UseYou create a planning job to transfer the forecast data to the SAP ECC system. The actual transfer takes place when you actually schedule the planning job (see next step). You create a planning job after having created an additional data view, a transfer profile and an activity profile. This step is usually performed by the user. Nevertheless, it is recommended that you also perform it during the installation process, to test the data transfer to SAP ECC.

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning → Planning → Demand Planning in the Background → Create Demand Planning in the Background

Transaction code /SAPAPO/MC8D

2. Enter a name (TRANSFCAST) and a short description (Planning Job Transfer Forecast) for the planning job.

3. Choose Planning job Execute. The initial Create Planning Job screen appears.

4. Select the planning book and the data view you specified in the activity, and as the name of the planning version for which you want to run the job.

Field name User action and values Note

Planning book DP_001

Data view DP_Release

Version 000 Active version

5. Choose Planning job Execute. The second Create Planning Job screen appears.

6. Enter the activity DP_ECC.

7. Specify whether the system should generate a job log.

8. In the Chars section, choose Select All.

9. Choose Aggregation Level.

10. In the dialog box, choose Deselect All.

11. Select the fields 9ALOCNO (APO – Location) and 9AMATNR (APO Product).

12. Choose Continue.

13. Save the planning job.

ResultYou have created a planning job for transferring the demand plan to Demand Management in SAP ECC.

© SAP AG Page 45 of 46

Page 87: R3 to dp

SAP Best Practices Building Block DPL Demand Planning: Configuration Guide

5.2.4 Scheduling the Planning Job

Procedure1. Access the activity using one of the following navigation options:

SAP SCM menu Advanced Planning and Optimization Demand Planning Planning Demand Planning in the Background Schedule Demand Planning in the Background

Transaction code /SAPAPO/MC8G

2. Enter the job name.

3. Choose Program Execute.

4. In the Start Time dialog box, specify when you wish the job to start running.

5. Choose Save.

ResultThe system carries out the planning job at the time specified. To check the job status, choose Demand Planning Planning Demand Planning in the Background Job Overview of Demand Planning in the Background or open transaction code SM37. You can also view the job log using transaction /SAPAPO/MC8K.

In SAP ECC Demand Management (Logistics Production Production Planning Demand Management Planned Independent Requirements Display), planned independent requirements are created in the same buckets as those of the data view on which the mass processing job is based.

For information on how to process the results in SAP ECC Demand Management, see the document PP Demand Management in the SAP Library of your SAP ECC System.

© SAP AG Page 46 of 46

Page 88: R3 to dp

March 2003

SAP America, Inc. 3999 West Chester Pike Newtown Square PA 19073

Data Analysis and Statistical Model selection

Page 89: R3 to dp

3

TABLE OF CONTENTS 1. Introduction to Statistics.................................................................................5

1.1. General...................................................................................................5 1.2. Overview of Forecasting Process ...........................................................6

2. Data Analysis.................................................................................................7 2.1 Source of Raw Data................................................................................7 2.2 Data Format............................................................................................7 2.3 How much data should you use to prepare forecasts?...........................8 2.4 Goals of Data Analysis ...........................................................................8 2.5 Workshop Overview................................................................................9

2.5.1 Attendees ........................................................................................9 2.5.2 Workshop questions for data analysis and model selection ............9

2.6 Analysing the Data ...............................................................................11 2.6.1 Plotting Data..................................................................................11 2.6.2 Summarizing Data.........................................................................11

3. Statistical Model Selection...........................................................................12 3.1 Process Flow........................................................................................13 3.2 Factors Influencing Model Selection.....................................................14 3.3 Categories of Forecasting Methods......................................................16 3.4 Quantitative Methods............................................................................16

3.4.1 Time Series Models.......................................................................16 3.4.1.1 Constant Models ....................................................................17 3.4.1.2 Trend Models .........................................................................19 3.4.1.3 Seasonal Models....................................................................21 3.4.1.4 Seasonal Trend Models .........................................................21 3.4.1.5 Auto Selection Models............................................................22 3.4.1.6 Croston Model ........................................................................24 3.4.1.7 Other Models..........................................................................25 3.4.2 Synopsis of time series models..................................................27

3.4.3 Causal Models (Multiple Linear Regression) .................................27 3.4.4 Time Series vs. Causal Model.......................................................27

3.5 Statistical Tests ....................................................................................28 3.5.1 For Time Series Models ................................................................28 3.5.2 For MLR Models............................................................................31

4. Reasons for Ineffective Forecasting ............................................................32 5. Conclusion...................................................................................................32 6. Appendix......................................................................................................33

6.1 Useful Web Sites ..................................................................................33 6.2 Books & Articles ...................................................................................33 6.3 Details / Best Practices for Workshops.................................................33 6.4 Statistical Patterns................................................................................38 6.5 Product Life Cycle ................................................................................41 6.6 Acronym Guide.....................................................................................42 6.7 Analysing the data - Links.....................................................................43

Page 90: R3 to dp

5

1. Introduction to Statistics

1.1. General The well-known statement attributed to Mark Twain, there are 3 kinds of Lies � Lies, Damned Lies and Statistics - is often quoted by cynics who do not have faith in statistics. Statistics is a set of methods that are used to collect, analyse, present, and interpret data. Studying a problem through the use of statistical data analysis usually involves four basic steps.

• Defining the problem • Collecting the data • Analysing the data • Reporting the results

As Demand Planners who use Statistics as the basis of our forecast it is extremely important that we understand what statistics can and cannot do. The basis of our forecast and the assumptions on which the model is build has to be clearly understood. In this discussion we are focusing on � Analyzing the data � stage only. In this stage, we do the data analysis and the model selection for the purpose of generating a forecast. It is important to note the difference between forecasting and planning. Forecasting: what one thinks will happen Planning: what one thinks should happen

�A forecast is an input into a plan� The role of a forecaster can be summarized as: Analyse the data to identify a pattern that can be used to describe the data � DATA ANALYSIS Selecting the appropriate model that will allow extrapolation of the data pattern into the future � MODEL SELECTION

Page 91: R3 to dp

6

1.2. Overview of Forecasting Process

No

Yes

CONFIGURE DP[5.0]

Data AnalysisCompleted

[2.0]

DATA ANALYSISWORKSHOPSwith Functional

Consultant[2.1]

No

Yes

Raw Data[1.0]

Analyzeddata[3.0]

Model SelectionCompleted

[4.0]

MODELSELECTION

WORKSHOPSwith Functional

Consultant[4.1]

Workshop questions for data analysis and model selection [Pg 9]

Workshop questions for data analysis and model selection [Pg 9]

Page 92: R3 to dp

7

2. Data Analysis

2.1 Source of Raw Data In APO, the data comes in raw format from the following sources, Legacy, OLTP, Excel, BW, and others.

2.2 Data Format This data is usually in the form of daily, weekly or monthly buckets. Typically we analyse data at the lowest level, depending on the nature of the business. We then decide the level of aggregation to be used for forecasting ex: weekly vs Monthly. (Typically we don�t recommend data to be run at the daily level for long term forecasting, for reasons of sizing and performance. Also the forecast is typically not used at the daily level)

DATA

OTHER

EXCEL

OLTP

BW

LEGACY

OTHER

EXCEL

OLTP

BW

LEGACY

FORECAST

Selecting Model

Data Analysis

START END

Page 93: R3 to dp

8

2.3 How much data should you use to prepare forecasts? The amount of data used depends on:

• How quickly the data pattern changes • Type of industry • Type of product • Model selected • Forecast horizon • Ex-post forecast results

2.4 Goals of Data Analysis The primary goal of data analysis is to maximize the analyst's insight into a data set and into the underlying structure of a data set, while providing all of the specific items that an analyst would want to extract from a data set, such as:

• A good-fitting, prudent model that suits the data. • A list of outliers • A sense of robustness about conclusions • Estimates for parameters • Uncertainties for those estimates • A ranked list of important factors • Conclusions as to whether individual factors are statistically significant

Page 94: R3 to dp

9

2.5 Workshop Overview

The purpose of this workshop is to determine the data that the customer would like to use for forecasting process. It is a process to determine data requirements & availability by selecting products to be used in the Demand Planning process. 2.5.1 Attendees

Client Strategic head of planning Client Demand Planner Client Head of IT Client IT resource SAP DP Team Lead SAP DP Consultant

2.5.2 Workshop questions for data analysis and model selection

Data is analysed using statistics. Workshops will need to be held with the customer to establish the following:

(These questions are largely from the SAP APO online help documentation)

<1> How many products do you wish to forecast? All products? Which products? What are the most critical products from the forecasting perspective? [Pg 33-34]

<2> What is the granularity of the data (dd/ww/mm)? Is the historical data available in days, weeks or months? [Pg 34]

<3> What is the Frequency of forecasting. How often do you plan? � Weekly? Monthly? Quarterly [Pg 34]

<4> How much Data is required? How much data is to be used to prepare for the forecast? [Pg 34]

<5> Is the present market situation similar enough to the past situation that I can use existing historical data, or has there been some major structural or economic change that renders my historical data unsuitable for forecasting future demand? [Pg 35]

<6> If I have no historical data for a product, is it possible to forecast that product using the historical data of another product? [Pg 35]

<7> For which products do I already know the pattern of historical data? Or are the patterns of historical data clearly visible? [Pg 35]

Page 95: R3 to dp

10

<8> Do I wish the system to pick the best forecasting method? For which products? [Pg 35]

<9> Is demand for any of my products intermittent? Which ones? [Pg 35]

<10> Do I have outliers in my historical data? Are these due to promotions or to other factors? [Pg 35]

<11> Do I wish to adjust for the different number of days in different months? [Pg 35]

<12> Am I aware of multiple causal factors that explain the demand for a product? [Pg 36]

<13> Will different demand planners use different forecasting methods for different products? [Pg 36]

<14> Do I wish to combine several forecasting methods? For which products? [Pg 36]

<15> Does my company intend to run promotions for any products? [Pg 36]

<16> How is the Data going to be analysed? [Pg 36] <17> How many forecast methods should be used? [Pg 36-37] <18> Do I wish to forecast each product individually, or are there certain

product families that I can forecast together? [Pg 37] <19> What is the quality of this historical data? Does it contain errors? Is

there data missing? For how many periods do I have historical data? [Pg 37]

<20> What forecast accuracy measures do you require? [Pg 38] <21> Do you require proprietary forecast algorithms? [Pg 38]

<22> Do you plan to use bill of material (BOM) functionality to forecast Dependent Demand? [Pg 38]

Page 96: R3 to dp

11

2.6 Analysing the Data

Expert Selection begins by analysing the data. Once that analysis is completed, it generates an audit trail -- a report that shows the various mathematical methods the program has applied to the data, what the level of error is likely to be, the final choice of statistical modelling method, and the forecasted results.

The data is typically stored in:

• Microsoft Excel

• Microsoft Access

• Other software

Most of the available software provide you with complete flexibility to analyse and summarize data. Regardless of where your data originates, you can use all of the powerful features of any applications to create the summaries, reports, and charts you need.

What method should you use to analyse your sales data?

2.6.1 Plotting Data Plotting data is necessary because it makes it easier to see patterns and trends in data that numbers alone can�t show. These patterns and trends further help to identify the appropriate model. You can plot data using Microsoft excel and/or Microsoft access and/or other applications. [Pg 43]

2.6.2 Summarizing Data

Chances are, you have all the detailed data you need to make decisions, but it isn�t always presented in a way that makes it easy to draw conclusions from it. For example, suppose what you want is the big picture: How is each product selling? Who is selling the most of each product?

From the same data, you can create several instant summaries, called PivotTables, to answer your questions. If you work with sales figures or other similar business data, Microsoft Excel can rapidly produce the summaries you want from the details you have.

If you�re working on a sales report, you can create an overview of sales results to see how well sales representatives are doing and which products are selling the most for example. To do so, store

Page 97: R3 to dp

12

details about each order in a Microsoft Access sales database, and then switch to Microsoft Excel to summarize the data. Microsoft Excel can automatically create an interactive table, called a PivotTable that summarizes large amounts of data. The PivotTable stays current because whenever you change information in the sales database, it�s automatically updated in the PivotTable as well.

3. Statistical Model Selection There is no systematic approach for the identification and selection of an appropriate model, and therefore, the identification process is by trial and error. Now that the data set has been analysed, the demand planner is faced with the task of selecting the RIGHT model that will generate the most accurate forecast.

Page 98: R3 to dp

13

3.1 Process Flow

No

APO DP Timeseries model

selection[4.5.1

Analyzeddata[4.1]

Model Selection[4.0]

Plot data[4.2]

Identify Patterns[4.3]

Yes

SelectUnivariatemodels?

[4.5]

Select Causalmodels?

[4.4]

APO DP Causalmodel selection

[4.4.1]

Selectedmodel(s)

[4.7]

YesYes

No

Check selectedmodel(s). Ok?

[4.6]

No

Forecast with final selectedmodel(s)

[4.10]

Forecast errors OK.Yes/ No?

[4.9]

Yes

Check results/forecast errors

[4.8]No

Page 99: R3 to dp

14

3.2 Factors Influencing Model Selection In general, selection of an appropriate technique or model selection can be guided by considering the following key factors about the forecasting situation.

Factors Forecast Horizon [Pg 14]

Data Availability / Requirements [Pg 15] Pattern of Past Data [Pg 15]

Level of Detail in the Forecast [Pg 15] Cost Factors [Pg 15]

Accuracy [Pg 16] Ease of Application [Pg 16]

Forecast Horizon: Basically, one has to make sure that the technique allows you to pick up changes that might occur during the forecast time interval. For example, � Short-term: < 3 months In the short-term, seasonal fluctuations and randomness have little influence on sales volumes and purchasing decisions. Short-term forecasts are mostly used in Operations Planning, determining inventory levels, work force levels and scheduling. � Medium-term: 3 months to 2 years Medium-term forecasts require that fluctuations of a medium-term nature (e.g., economic and competitive conditions) be accounted for by the technique. Since cyclical change and trend are important factors in this time frame, techniques such as regression analysis and time-series methods are useful. Medium term forecasts would be used in budget planning & cost control, new product planning, capacity, warehouse & distribution planning and transportation contracts � Long-term: > 2 years With long-term horizons, the major consideration is with expected trends, as well as economic, competitive, and technological conditions, which can only be estimated subjectively. In many situations judgmental methods are employed. Long-term forecasts would be used in capacity expansion, facility location, new market entry and workforce management.

Page 100: R3 to dp

15

Data Availability / Requirements: Techniques differ by virtue of how much data is available and required to successfully employ the technique. Pattern of past data: The pattern of a product's previous sales history is an important factor to consider. While a commonly seen pattern is the trend, there are also cyclic and seasonal patterns to consider. Certain techniques are best suited for capturing the different patterns, such as Horizontal, Seasonal, Cyclical, Trend etc in the data. The underlying data pattern typically encompasses one of the following. See the graphs in the Appendix 6.4 [Pg 38] Horizontal Pattern (Constant) Seasonal Pattern Cyclical Pattern Trend Pattern Random or Irregular Pattern A combination of the above Level of detail: Aggregate or Detailed Level Planning for Characteristics and Time.

- Aggregate Level: If the planning is done at the aggregate level, the resulting forecast can be disaggregated down to the detail level based on proportional factors. At the higher levels the individual product patterns are not clearly visible.

- Detail Level: On the other hand if the planning is done at the detail level, the patterns are visible. Here it is summed up to the next level. When the forecast is disaggregated to the detail level, these patterns become more apparent. Cost Factors The selection of the model is effected by the following cost related factors The time taken to develop a new model The cost involved in additional data storage equipment The time taken to do the modelling (Opportunity Cost) The time taken to do a model selection

Page 101: R3 to dp

16

Accuracy Different products demand different levels of accuracy. For example if we are forecasting aircrafts the accuracy levels are more critical than for example diapers. Ease of Application Sometimes only those models that are easily understood are used, though more complex models may be more accurate, for example econometric models.

3.3 Categories of Forecasting Methods In many situations, there is rarely one best technique for selecting a model. It is not unusual to combine multiple forecasting techniques. The 3 major categories of forecasting methods are Quantitative, Qualitative and Unpredictable. Elements of Forecasting methods

Quantitative Qualitative Unpredictable

Characteristics Information about the past is available Can be quantified in the form of numerical data

Rely on Subjective assessments of people, using intuition based on experience

Little or no information is available

Assumption Past Pattern will continue into the future

Experienced and knowledgeable person is available

Techniques Time Series & Causal

Delphi, Jury of executive

Crystal ball!!

Example Predicting Monthly Sales

Predicting speed of Telecommunications in 2020

Predicting the discovery of a new, very cheap form of energy that produces no pollution.

3.4 Quantitative Methods 3.4.1 Time Series Models

�History repeats itself� is the central theme of quantitative time series forecasting A Time Series is a series of observations over time of some quantity of interest (a random variable).

Page 102: R3 to dp

17

The time series models, also know as Univariate forecasting techniques in APO Demand Planning consist of multiple strategies, which are explained, in the following table. The various statistical models used in APO DP and their specific details are listed in the table below.

Time Series Models Constant Models [Pg 17]

Trend Models [Pg 19] Seasonal Models [Pg 21]

Seasonal Trend Models [Pg 21] Auto Selections Models [Pg 22]

Croston Model [Pg 24] Other Models [Pg 25]

APO DP has two choices of Auto selection of Statistical Models. However it is to be noted that forecasting can never be relegated completely to the automatic forecasting capability of the forecasting software. Not all-forecasting software is capable of recognizing and adjusting for "special events". For example, a one time special event occurring in October may well lead to a model that erroneously projects upward spikes in October months in the future.

3.4.1.1 Constant Models

Forecast Method Forecast Strategy Details Observations 10 - Constant Models 10 Constant Models A

Used for data that has no Trend or Seasonality.

Same as Strategy 11.

B

Used when Demand varies slightly from the stable mean value.

11

Constant Model with First Order Exponential Smoothing A

Used for data that has no Trend or Seasonality.

Same as Strategy 10.

B

More recent data has more weight.

C

The user chooses the smoothing factor for the Basic (Alpha) value

Fairly good accuracy for Short Term (<= 3 months). Not

Page 103: R3 to dp

18

recommended for Medium Term & Long Term.

D

The forecast calculated using the historical value, the preceding forecast value & the Alpha smoothing factor.

Hard to find correct Alpha value.

E

If data has Trends, the forecast will lag. This can be overcome by using 2nd order exponential smoothing. (Strategy 21)

Most widely accepted Time series.

Strategy 11 (First Order Exponential Smoothing) does not apply to data have any underlying Trend or seasonality.

12

Constant model with Automatic Alpha Adaptation (1st order) A

Used for data that has no Trend or Seasonality.

B

The Alpha factor is adapted in every ex-post forecast.

C

The Alpha factor is based on Mean Absolute Deviation (MAD) & Error Total (ET) ranging from 0.05 to 0.90. The default Alpha factor is 0.3.

C

The Alpha factor is based on Mean Absolute Deviation (MAD) & Error Total (ET) ranging from 0.05 to 0.90. The default Alpha factor is 0.3.

13 Moving Average AUsed for data that has no Trend or Seasonality.

Special emphasis word "equal" & "every".

B

All Historical data gets equal weight

C Calculates average of the

Page 104: R3 to dp

19

historical data in the time horizon.

D

The Average value is the forecast result for every period in the forecast horizon.

14 Weighted Moving Average A

Every Historical value is weighted with a factor (From the Weighting Group)

Sum of weighting factors does not have to be 100%.

BNo ex-post forecast calculated.

Accuracy of this model largely is dependant on user's choice of weighting factors.

C

This model gives more weight to recent data and can therefore react more quickly to changes.

3.4.1.2 Trend Models

Forecast Method Forecast Strategy Details Observations 20 - Trend Models 20

Forecast with Trend Models A

Used for data that has no Seasonality nor Constant

Same as Strategy 21

21 Holt's method A

Better accuracy for forecasting periods of less than 3 months.

Also known as Holt's Linear Trend method or Double exponential Smoothing.

B

Smoothing factor Alpha, between 0 and 1.0 is assigned to the model.

Strategy 11 (First Order Exponential Smoothing) was extended by Holt's to allow forecasting of data with Trends.

C

More weight for recent sales history is allowed, by increasing the value of

Uses 2 smoothing constants Alpha

Page 105: R3 to dp

20

Alpha (say 0.8) & Beta.

D

Smaller Alpha (0.1) decreases the impact of recent data.

Does not work with Seasonal Patterns.

Same as Strategy 20

22

2nd Order exponential Smoothing A It is based on Linear Trend.

The key difference between the 1st order and 2nd order exp smoothing is based on data patterns. If the data series has a horizontal pattern,(no trend) 1st order is used. If it has trend, 2nd order exponential is used.

B Consists of 2 equations.

C

If, over several time periods, time series shows a change in the average value such that a trend pattern is revealed, first-order exponential smoothing produces forecast values that lag behind the actual values by one or several periods. You can achieve a more efficient adjustment of the forecast to the actual values pattern by using second-order exponential smoothing.

23

Trend model with Automatic Alpha Adaptation (2nd order)

Same as 22, except the system selects the value of Alpha.

Same automatic Alpha adaptation is used in Strategy 12 and 23

The Alpha factor is generated by the system,

Page 106: R3 to dp

21

based on the MAD and ET

The Alpha values are between 0.05 and 0.90

3.4.1.3 Seasonal Models

Forecast Method Forecast Strategy Details Observations 30 - Seasonal Models 30

Forecast with Seasonal Models.

Uses 1st order Exponential smoothing

Same formula for 20,21,30,31, 40 & 41

The Seasonal factor is Gamma. Here Alpha and Gamma factors are given values.(Both trend and seasonal variations are taken into account)

Holt's Method was extended by Winters to capture seasonality.

31

Seasonal Trend based on the Winters method Same as 30

35 Seasonal + Linear Regression A

Here Seasonal Indices are calculated and the seasonal data is removed, before linear regression is done on the remaining data.

B

The seasonal indices are added back after the LR is done.

C

Do NOT use if there are strong TREND patterns

Smoothing factor (PERMSO) is to be 1. If 0 is used, no seasonal influence is calculated

3.4.1.4 Seasonal Trend Models

Forecast Method Forecast Strategy Details Observations 40 - Seasonal Trend 40

Forecast with seasonal trend models

Here Alpha, Beta and Gamma values are used

Same formula for 20,21,30,31, 40 & 41

Page 107: R3 to dp

22

Models

Here the Alpha, Beta and Gamma factors are all given values

41

First - Order Exponential Smoothing Same as 40

3.4.1.5 Auto Selection Models

Forecast Method Forecast Strategy Details Observations

50 - Auto Selection 1 50 Auto Selection 1 A

Used when there is no knowledge of patterns in historical data

Quicker than Auto Model Selection 2 (Strategy 56).

B

Tests for Constant, Trend, Seasonal & Seasonal Trend.

Not as precise as Auto Model Selection 2 (Strategy 56).

C

If no pattern detected, system uses Constant model

Shorter time to run in comparison with Auto Model Selection 2 (Strategy 56).

Auto Selection Model 1 is used when data pattern is not obvious.

51 A

Used if you think historical data has Trend pattern & NO other pattern

Special emphasis word "think".

B

Regression Analysis is run on Historical data to check for trend

Faster than Auto Model selection 1 & 2, as limited tests carried out.

C

If no Trend pattern detected, system uses Constant model

Vice-versa of strategy 52; Checks for Trend pattern.

Page 108: R3 to dp

23

52 A

Used if you think historical data has Seasonal pattern & NO other pattern

Special emphasis word "think".

B

Possible Trend Patterns are removed from the historical data

Faster than Auto Model selection 1 & 2, as limited tests carried out.

C

Autocorrelation test is carried out to check for seasonal pattern.

Vice-versa of strategy 51; Checks for Seasonal pattern.

D

If no Seasonal pattern detected, system uses Constant model

53 A

Used if you think historical data has Seasonal and / or a Trend pattern

Uses strategy 51 and 52 or a seasonal trend model.

B

Regression Analysis is run on Historical data to check for trend

Special emphasis word "think".

C

Possible Trend Patterns are removed from the historical data

Faster than Auto Model selection 1 & 2, as limited tests carried out.

D

Autocorrelation test is carried out to check for seasonal pattern.

Historical data does not exhibit constant pattern.

E

If a Seasonal pattern is detected, system uses Seasonal model, If a Trend pattern is detected, system uses Trend model, If a Seasonal and Trend pattern is detected, system uses Seasonal Trend model.

54 A

Used if you think historical data has Trend pattern & you know that there is a Seasonal pattern.

Special emphasis word "think" & 'know'.

B

Regression Analysis is run on Historical data to check for trend

This is a Manual + Auto model selection strategy.

Page 109: R3 to dp

24

C

If Trend pattern detected, system uses Seasonal Trend model.

Vice-versa of strategy 55; Checks for Trend pattern.

D

If no Trend pattern detected, system uses Seasonal model.

55 A

Used if you think historical data has Seasonal pattern & you know that there is a Trend pattern.

Special emphasis word "think" & 'know'.

B

Autocorrelation is run on Historical data to check for Seasonality.

This is a Manual + Auto model selection strategy.

C

If Seasonal pattern detected, system uses Seasonal Trend model.

Vice-versa of strategy 54; Checks for Seasonal pattern.

D

If no Seasonal pattern detected, system uses Trend model.

56 - Auto Selection 2 A

Used when no knowledge of pattern in historical data

Highly detailed tests carried out.

B

Tests for Constant, Trend, Seasonal & Seasonal Trend. More precise.

C

Uses all possible combinations of Alpha, Beta & Gamma smoothing factors.

Longer time to run.

DChooses model based on lowest MAD.

Not recommended for use in Mass Processing.

3.4.1.6 Croston Model

Forecast Method Forecast Strategy Details Observations 80 - Croston Model A

Used in case of sporadic or intermittent demand.

Generates one value as forecast for all forecasting

Page 110: R3 to dp

25

periods.

B

No Ex-post Forecast is calculated.

C

None of the Errors calculated.

D

Calculation based on # of data points, actual data value & intervals between data.

E

Results differ based on where the data is located in the time horizon. Clustered data in the initial period or end of time horizon gives different results as also data well spread out in the entire time horizon.

3.4.1.7 Other Models

Forecast Method Forecast Strategy Details Observations 60 - Historical Data A

Used when demand does not change.

No forecast is calculated.

B

Last year's history is copied to forecast.

70 - Manual Forecast A

User manually specifies Basic value (Alpha), Trend value (Beta), Trend Dampening profile & Seasonal indices (Gamma)

Not to be used for mass processing.

Page 111: R3 to dp

26

Parameters.

B

Not to be used for background jobs

C

No Ex-post Forecast is calculated.

D

Initially uses Forecast Strategy 40 to calculate forecast based on seasonal trend model.

94 - Linear Regression A

Used when only single explanatory variable influences the forecasts.

Same principles as of MLR except only one independent variable is used.

B Based on least squares method.

C

Relationship between the independent variable X and the dependent variable Y is assumed to be linear.

D

Used most often for medium term (>3 & <= 24 months)

98 - No Forecast A No forecast done. 99 - External Forecast A

Forecast done by external systems.

User exits can be used.

Page 112: R3 to dp

27

3.4.2 Synopsis of time series models In conclusion, selection of time series models can be summarized in the table below. Pattern of data Model to select No Trend, No Seasonality Moving Average

Exponential Smoothing Trend, No Seasonality Holts method Trend and Seasonality Winters Model No knowledge of patterns in historical data

Auto Selection 1 Think it is Trend Think it is Seasonal Think Seasonal/or Trend Think Trend, Know Seasonal Think Seasonal, Know Trend

Auto Selection 2 System Selection

With Sporadic/ Intermittent Demand Croston method

3.4.3 Causal Models (Multiple Linear Regression) This method of forecasting is used to find the relationship between a single dependent variable and numerous independent variables. Important requirements for MLR to be accurate in its forecast 1. There should not be a linear relationship BETWEEN the independent variable 2. The independent variables should not be stochastic � random events The selection of the independent variables is one of the most important steps in a successful MLR forecast. APO uses the ordinary least square methods � which is one of the most popular methods of doing MLR

3.4.4 Time Series vs. Causal Model In summary; Time Series compares data being forecast over time. Here time is the independent variable (X variable) Causal Models compare data being forecast against some other data set Time Series methods assume that past trend and patterns will continue in the future.

Page 113: R3 to dp

28

Causal methods take into account what �caused� past data. Causal forecasting methods attempt to forecast future values of a time series variable (called the dependent variable) by using past data to estimate the relationship between the dependent variable and one or more independent variables. Selecting between the above two models is determined by a variety of factors. One of them being the product's stage in it�s life cycle. Product Life Cycle Stage Relevant Method New Life Cycle [Pg 41]

Opinion Mature, unpromoted Time Series Mature, promoted Time Series

Cause/Effect Seasonal Life Cycle

Time Series Dependent Causal Cyclical (such as luxury items) Causal For example, forecasting sales of emerging products, which have little or no sales, history or a similar past product must rely on more qualitative techniques. As the product becomes more mature and more data is available, simple time series models become more useful. Causal models can ultimately be used with a rich data history. Forecasting methods that can perform very effectively on good data may break down when applied to time series that are short or interrupted. For example certain models require a minimum set of data and if these models are erroneously chosen, the software will go ahead and fit these models on request; however the results may ignore key patterns in the data and lead to implausible forecasts.

3.5 Statistical Tests

3.5.1 For Time Series Models Statistical testing is conducted to help identify which of the forecasting methods chosen will work best with the available data. It is to be noted that all forecasts will have errors. Two components make up the actual figures (sales) � systematic and random. The systematic component consists of Level, Trend, and Seasonality. The random events cannot be predicted. Hence the aim of the forecast method is to minimize the error in the systematic component.

Page 114: R3 to dp

29

Testing is necessary in order to avoid inappropriate methods and concentrate more effort on the methods that produce the most accurate forecasts. We can carry out testing to select the best method by producing ex post forecasts for past periods and comparing the forecast values with the actual values for those periods. When the best method has been found it is used to make ex ante forecasts. Testing can also be used to refine the accuracy of the technique being employed since many methods have internal parameters, which can be varied [e.g. weights in weighted moving average, or the value of alpha in exponential smoothing]. Experiments and tests are used to find the most suitable parameter values. The overall objective is to minimize the error between forecast values and actual values. There are a number of different tests that are used for measuring forecast accuracy. APO DP uses the following error analysis methods: Test Measure Comments Mean Absolute Deviation (MAD)

Average Absolute Deviation of forecast from actual.

The mean absolute deviation gives the mean average difference between the forecasted value and the historical value in the ex-post forecast. Best Practices: MAD to be as small as possible

Mean absolute percentage error (MAPE)

Absolute Error as a percentage of the forecast.

Same as MAD, except measures deviation as a percentage of actual data

Mean square error (MSE)

Variance of Forecast error

Not easily interpreted as MAD, MAPE. Not intuitive

Square root of the mean square error (RMSE)

Square root of Mean Square Error

Use instead of MAD.

Mean percentage error (MPE)

It is the difference between the history and the forecast; expressed as a percentage (divided by forecast) It is the same as MAPE

It is the same as MAPE.

Page 115: R3 to dp

30

but without taking the absolute.

Error total (ET)

It is the absolute value of the difference between the history and forecast value

It is the simplest of all errors.

In most cases the MAD and MAPE are used as the basis of comparison. In the example shown below, two forecasting methods were used to generate errors. The errors from these two methods are listed below. Based on the customer�s business process, the error that is deemed significant is used as the basis of the forecast model. The MAD, ET, MSE and MAPE are calculated for two forecasting methods in the example below. The results of this error show that the forecasting method 2 is more accurate based on the error methods chosen. It is possible that certain errors may be less in one method, while other errors are less in the alternate method. In such cases, the decision has to be based on the business requirements - the specific needs of the particular product/product group.

Page 116: R3 to dp

31

3.5.2 For MLR Models After the MLR is selected, the forecast results are tested using one or more of the following tests Test Measure Comments R Square Goodness �of-fit 0 = Model not explained

1 = Model perfect fit Explains how the chosen X�s the Y

Adjusted R Proportion of If this is significantly lower than R Square, an X is

Forecasting Method1 Period Forecast Actual MAD ET MSE MAPE 1 500 480 6.0 20 400 4.2% 2 550 525 11.7 25 625 4.8% 3 575 530 21.7 45 2025 8.5% 4 625 580 28.7 45 2025 7.8% 5 680 720 32.0 40 1600 5.6% Average 32.0 35 1335 6.1% Forecasting Method 2 Period Forecast Actual MAD MAE MSE MPE 1 470 480 3.0 10 10 2.1% 2 530 525 3.6 5 25 1.0% 3 560 530 11.5 30 900 5.7% 4 600 580 14.0 20 400 3.4% 5 715 720 11.3 5 25 0.7% Average 11.3 14 290 2.6%

Page 117: R3 to dp

32

Square Variation in Y missing Use the same X when comparing two models

Durbin H Autocorrelation [Pg 42] in time series (If Value >=1.96)

X�s lag by one or more periods Can be used only if there are more than 100 time series values.

Durbin Watson

First order autocorrelation (Acceptable range1.5 to 2.5 )

No lag between the time series values

T-Test Is a particular X to be used in the model

SAP recommends +/-1.4 to be left in the model

Elasticity Measures the effect of 1% change in Y

Unit Free Higher the number, more responsive Y is to changes in X

4. Reasons for Ineffective Forecasting

• Not involving a broad cross section of people • Not recognizing that forecasting is integral to business planning • Not recognizing that forecasts will always be wrong • Not forecasting right things • Not selecting an appropriate forecasting method • Not tracking accuracy of forecasting models

5. Conclusion

In summary, after the Data analysis has been completed, the appropriate model has been selected & the forecast executed, then the forecast is ready for release to other systems. For Example:

• EXCEL • OLTP • BW • LEGACY • OTHER

Page 118: R3 to dp

33

6. Appendix

6.1 Useful Web Sites International Institute of Forecasting: http://forecasting.cwru.edu/ Principles of Forecasting (Wharton): http://morris.wharton.upenn.edu/forecast/ The Institute for Forecasting Education: http://www.forecastingeducation.com/ Other links http://www-marketing.wharton.upenn.edu/forecast http://www.tai.hut.fi/ecomlog/publications/use.html http://www.hacketthighway.com/bpc_bp_qw.asp?PgId=32 http://www.infochain.org/quarterly/feb97/lq2_pg23.html http://www.itl.nist.gov/div898 http://www.cosc.brocku.ca/~duentsch/archive/stattech.pdf http://www.statsoftinc.com/textbook http://obelia.jde.aca.mmu.ac.uk/resdesgn http://ubmail.ubalt.edu/~harsham/Business-stat

6.2 Books & Articles

Forecasting: Methods and Applications. By Spyros G. Makridakis, Steven C. Wheelwright (Editor), Rob J Hyndman

6.3 Details / Best Practices for Workshops

< 1 > Details / Best Practice Workshop The products that are critical to the business should be forecasted. For example criticality, could be based either on any one or more of the following criteria

(A) Profitability: The contribution of this product or group of products to the company overall profit margins.

(B) Product Life Cycle [Pg 41] (C) Influence of Promotions

(D) Volume

Data analysis

Page 119: R3 to dp

34

(E) Lead Time

(F) Resource Constraints

< 2 > Details / Best Practice Workshop Data can be stored in days but rather forecast in weeks or months. Typically we analyse data at the lowest level, depending on the nature of the business. We then decide the level of aggregation to be used for forecasting ex: weekly vs Monthly. (Typically we don�t recommend data to be run at the daily level for long term forecasting, for reasons of sizing and performance. Also the forecast is typically not used at the daily level)

Data analysis

< 3 > Details / Best Practice Workshop This depends on the nature of the business and the specific business requirements. Business requirements drive the frequency of forecasting.

Model Selection

< 4 > Details / Best Practice Workshop This depends on a variety of factors, some of them include: (A) Specific business requirements. Although there is no single correct answer, to reliably fit and test statistical models, a time series of 48-60 months is desirable. At least 3 seasonal cycles are in order for estimating a seasonal model. With 48 months, for example, the first 36 can be used to fit the model and the last 12 to test the model's forecasting accuracy. On the other hand, for short-term forecasting, going back more than 60 months is unlikely to be helpful, since most statistical methods assign more weight to the recent than to the distant past. Use the largest sample possible.

(B) Data availability is one of the Factors Influencing Model Selection. [Pg 14]

Model Selection

Page 120: R3 to dp

35

< 5 > Details / Best Practice Workshop The basic premise of time series forecasting is that �history repeats itself�.

But in case of major structural or economic changes, the historical data needs to reflect the changes. �Corrected History� needs to be used which corrects the outliers, highlight past promotions if any & also to reflect mergers or acquisitions.

Identify patterns from existing historical data.

Data analysis

< 6 > Details / Best Practice Workshop If a new product is being introduced, history can be created using like modelling. Create history for like (similar) products using like modelling.

Model Selection

< 7 > Details / Best Practice Workshop Data patterns for certain products can be easily highlighted through plotting (Data Analysis). Though for certain products, the pattern is not clearly visible. Hence use of techniques, which facilitate automatic model selection. These methods verify various parameters simultaneously to find the best-fit model.

Model Selection

< 8 > Details / Best Practice Workshop After data analysis, patterns should emerge that enable model selection. Analyse data to establish patterns.

Model Selection

< 9 > Details / Best Practice Workshop Products with intermittent demand cannot be treated similar to products with regular demand. The frequency of the demand pattern is critical. These products need to be clubbed together.

Data analysis/Model Selection

Page 121: R3 to dp

36

< 10 > Details / Best Practice Workshop Since outliers influence the results of almost all statistical estimators and testing procedures you must remove outliers from your data.

Data analysis

< 11 > Details / Best Practice Workshop The number of workdays impacts the forecasted quantities. Hence it needs to be taken into consideration.

Model selection

< 12 > Details / Best Practice Workshop If the customer is aware of the impact of Causal factors and has data to support the assumptions, then they need to be collected and loaded into the application

Data analysis

< 13 > Details / Best Practice Workshop If so, recognize the difference between planning values generated by different models. Do not compare the forecasts generated by different models for different products.

Model Selection

< 14 > Details / Best Practice Workshop If two or more methods are combined, the weightage of each of these methods must be clearly understood.

Model Selection

< 15 > Details / Best Practice Workshop If past promotions exist, they can be used as a benchmark for any future promotions. Past promotions can be copied and edited to facilitate the creation of new promotions.

(Applicable to both model selection and data analysis)

< 16 > Details / Best Practice Workshop This is typically the role of a statistician. (In some cases the data analysis is not required, since the Demand Planner is experienced enough to suggest a forecast model.) If the

Data analysis

Page 122: R3 to dp

37

statistician is not available this process is to be done jointly by the Demand Planner and the consultant.

< 17> Details / Best Practice Workshop The 80-20 rule could be applicable in many cases where20% of the products contributes to 80% of the profits. Fast vs. Slow moving products Typically 80% of the products maybe able to use forecast method A and 20% could use forecast method B. Another scenario would be the slow movers could be manually forecasted vs forecasting fast movers using a selected model.

Model Selection

< 18 > Details / Best Practice Workshop Forecasting aggregated entities typically results in lower forecast errors than forecasting individual entities. This is due to the principal of compensating errors, in which errors cancel each other out. For example, forecasts of product groups are more accurate than forecasts for each SKU in the group, and forecasting for several periods of time is more accurate than forecasting for an individual period.

Model Selection

< 19 > Details / Best Practice Workshop Reliable quantitative historical data has to be available. Time series methods would not be appropriate where relevant historical data is not available. Nor would they be appropriate where the historical data is unreliable, perhaps because it has not been recorded in a consistent manner over the relevant time period.

One has to be certain that information is both reliable and in a usable form. If the data has

Model Selection

Page 123: R3 to dp

38

low reliability then you will need to increase the sample size.

< 20 > Details / Best Practice Workshop Different forecast accuracy measures are available. Depending on the business requirements a specific measure is chosen and that value is used to select the model.

Model Selection

< 21 > Details / Best Practice Workshop This is generally not recommended as it involves development efforts & budgets. However, unique products & situations / industries may require this. This can be handled by USER EXITS.

Model Selection

< 22 > Details / Best Practice Workshop In situations, where the planning of the dependant demand is critical as the main product, this methodology is recommended. APO supports SINGLE INDENTURE BOMs.

(Applicable to both model selection and data analysis)

6.4 Statistical Patterns Horizontal Pattern No trend, stationary. Equally likely chance that the next value will be above or below the mean. Ex; Stable sales.

Horizontal Pattern

1 2 3 4 5 6 7 8 9 10

Page 124: R3 to dp

Seasonal Pattern Periodic Patterns in a time series that complete themselves within a calendar year. The pattern also repeats itself each year. It is caused by: Production/harvesting patterns Weather Customs Cyclical Pattern This refers to recurring up and down movement around TREND levels. Cycles can last 2 to 10 years in length. Cycles can be caused by changes in taste and preferences due to the whims of fashion. They vary in length and magnitude from one cycle to another.

Seasonal

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Cyclical

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Page 125: R3 to dp

Trend Pattern A general upward or downward movement of a series over some period of time. Trend represents long-term growth or decay. They usually have a strong underlying explanation such as: Technological change Changes in consumer preferences & tastes Changes in per capita income Changes in the number of consumers Market competition Inflation or deflation Policy change Random or Irregular Pattern Erratic, Nonsystematic, Random, �Residual� Fluctuations. Due to random variations of: - Nature

- Accidents Short Duration & Non - Repeating

Trend

0 5 10 15 20

Page 126: R3 to dp

6.5 Product Life Cycle The 4 different stages in a Life Cycle of the product are as below:

Hard to forecast. Need long-range forecasts. Qualitative models.

Phase-in Maturity Phase-out

Sales

Forecasting critical, both for future magnitude and growth rate. Long-range forecasts still important.

Easier to forecast. Quantitative models.

Hard to forecast, but forecasting is less important.

Page 127: R3 to dp

6.6 Acronym Guide Alpha: Smoothing factor for the Basic value in a Constant Model Beta: Trend factor for the trend value in a Trend Model Gamma: Seasonal factor for the Seasonal Indices in a Seasonal or

Seasonal/Trend Model Autocorrelation: Is a tool for identifying dependence of current data on

previous data points. It is undesirable since it can falsify the demand forecast.

BW: Business Warehouse ET : Error Total Ex-Post Forecast: This is the forecast created by the system, for the past

periods, using the alpha, beta, gamma values that was generated, based on the historical data

Legacy System: Any old computer system, which is home grown/Main Frame MAD: Mean Average Deviation MAPE: Mean Absolute Percentage Error MPE: Mean Percentage Error MSE: Mean Square Error MLR: Multiple Linear Regressions OLTP: On-Line Transaction Processing OLAP: On-Line Analytical Processing PERMSO: Periods in Smoothing factor RMSE: Square root of Mean Square Error

Page 128: R3 to dp

6.7 Analysing the data - Links

For data stored in Microsoft Excel, you can display it graphically in a chart. Show the values as lines, bars, columns, pie slices, and other data markers, and even combine different markers in the same chart.

If the chart is all that is needed, a separate chart sheet can be created. When it�s best to display the chart along with the associated data, you can either create a chart directly on the worksheet or add a table to a chart sheet containing the pertinent data. In any case, the values in the chart are updated whenever the source worksheet data changes.

For data stored in Microsoft Access, you can represent your data in chart form and then add the chart to a database form or report. To create a chart quickly, you can use the Chart Wizard.

Page 129: R3 to dp

44

For Data Stored in Microsoft Excel

If you want to Do this

Create a detailed report that organizes, subtotals, and summarizes your data

Add automatic subtotals to your data, Ex: Create a Detailed Sales Report.

Create a chart that summarizes your data graphically

Run the Microsoft Excel Chart Wizard.

Create a summary table that lets you change your view of the data dynamically

Create a Microsoft Excel PivotTable.

Create a detailed Microsoft Access report without making changes to your original worksheet

Run the Microsoft Access Report Wizard directly from your Microsoft Excel worksheet. Click MS Access Report (Data menu). This command appears only if the Access Links add-in is installed and available. Click Add-Ins (Tools menu), and then click Access Links Add-In If this option does not

Page 130: R3 to dp

45

appear, rerun setup and install the Data Access options.

Ex: Creating a detailed sales report

Do you have detailed data and want to see totals? For example, suppose you receive information about orders as each is filled over the course of several months. You might need to calculate the total sales for each region and the total product sales across the regions. Microsoft Excel can rapidly organize and sum up this kind of data for you.

For Data Stored in Microsoft Access

Use the following table to decide which topics to read for more information.

Page 131: R3 to dp

46

If you want to Do this

Create a detailed report that organizes, subtotals, and summarizes your data

Run the Microsoft Access Report Wizard.

Create a chart that summarizes your data graphically

Run the Microsoft Access Chart Wizard.

Create a Microsoft Excel summary table that lets you change your view of the data dynamically

Create a Microsoft Excel PivotTable.

Organize, subtotal, and summarize the data by using Microsoft Excel

In Microsoft Access, click Office Links (Tools menu), and then click Analyse It With MS Excel to export a snapshot of the data to a Microsoft Excel worksheet. Create a Detailed Sales Report. When your data changes, you must repeat these steps for updated results.

Create a Sales Summary from a Microsoft Access Database

Page 132: R3 to dp

47

Use Office Applications Together

If Your Data Is Stored Somewhere Other Than in Microsoft Access or Microsoft Excel

Both Microsoft Access and Microsoft Excel let you work with data from external sources.

Import files into or link files to your Microsoft Access database Importing a file copies a snapshot of its contents into your database. Creating a link allows you to work with a file that continues to be maintained in its originating application. Use Office Applications Together.

Bring data into your Microsoft Excel worksheet by using Microsoft Query You can analyse external data in Microsoft Excel and refresh the data in your worksheet when it changes. Get Sales Information from a Database.

Use Office Applications Together

It�s easy to use Office applications together. For example, you can create a Microsoft PowerPoint presentation from a Microsoft Word outline. Probably the most common way to share information between applications is to copy and paste information from one application to another. You can also create a link from one application to another or insert objects to include information. In online documents, you can use hyperlinks to jump to other files on your organization�s internal Web (intranet) or sites on the World Wide Web.

Combine information from different applications by using the Microsoft Office Binder to organize and print files with continuous page numbers from Microsoft Excel, Word, and PowerPoint as a single unit.

Page 133: R3 to dp

48

Get Sales Information from a Database

Chances are you sometimes work with data that isn�t stored on your computer. For example, your company may compile sales statistics in a database located on a networked mainframe.

Out of mountains of detailed data in the corporate database, extract just what is relevant to your work by using a query�a method of extracting specific data from a database. Then you can use familiar spreadsheet analysis tools on that data, without retyping it.

Page 134: R3 to dp

49