1 Setup Macros For Planning Book YDP - PB - MASS - JOB and Data View YDP - DV - FCST Procedure
1 Setup Macros For Planning Book YDP - PB - MASS - JOB and Data View YDP - DV - FCST Procedure
Transaction code
/SAPAPO/ADVM
Use
Calculate key figure Corrected Sales History, It equals to Historical Sales Override if this key figure is not
initial, otherwise, it equals Historical Sales without additional demand minus Historical Sales Correction.
Procedure
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,
Initial val: calc to corr hist sales. Choose Continue.
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, choose Past in Processing Area, and choose Continue.
Right-click the macro step and choose Add Element (Result Level) Add control
statement.
In the APO Macro Builder dialog box, choose IF. Choose Continue.
Right-click the result row you have just created and choose
Add Element (Result Level) Append Condition.
In the APO Macro Builder dialog box, input Description Sales override = Initial, and choose
Continue.
Right-click the operator/function you have just created and choose
Add Element (Argument Level) Add Operator/Function. In the APO Macro Builder
dialog box, choose IS_INITIAL(. Choose Continue.
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 Historical Sales Override in the Row field, and
Row Attributes in Data field in the part of Data Source: Value or Row/Column Attributes.
Choose Continue.
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 ) = 1. Choose Continue.
10
11
12
13
14
15
16
17
Result