Macros are created for various Demand planning and forecasting activities through transaction /SAPAPO/ADVM (Macro Workbench). Macros are created upon Planning books & Data views.
Created Macros could be manually executed within the planning book data views in foreground. They could be set to run at various stages or actions inside the planning books data views through Interactive planning (Example Default Macro, Start Macro, Manual execution etc.)
Running the macros for a large selection of data at a detailed level would be time consuming process in foreground. From performance perspective, it would make sense to run these Macros at a detailed level for larger data selection in background through a process chain during non-business hours.
This document provides step by step by approach on how to add created macros into a process chain that could be scheduled to run in background.
Overall steps overview:
A) Create an activity:
Transaction: /SAPAPO/MC8T – Define Activities in Mass Processing
In the initial screen give the Activity name and Description that suits the Macros inside the activity better. Then Click Create icon, below detailed screen would appear.
Detailed Screen inputs:
1) Enter the Planning book on which Macro is based
2) Enter the data view on which the Macro is based
3) Enter the Planning area associated with this Macro and CVC
4) Click on TAB Page “Macro” in the lower half of the screen and select the
newly created or existing macro that needs to be added to this activity as a Macro Step.
5) Execute and Counter # 1 is automatically set as the sequence number for this macro step.
Once executed the step turns green as below
Finally save the activity.
** Please note multiple Macro steps could be added to same activity by repeating steps 4) & 5) above, Macro steps are assigned with the internal automatic counter number for sequencing the steps perspective in ascending order as 2, 3, 4 etc..
B) Create Planning Job:
Transaction: /SAPAPO/MC8D (Create Planning Job)
Enter suitable Job Number and Job Name (Description) to reflect the activities inside the job in initial screen.
Then Enter the Planning Book & Data view in the next screen.
Post, this below detailed screen would appear
Detailed screen inputs:
1) Select the Activity created in Previous step A)
2) You can run this job for a specific set of CVC selection. For instance, you would want this
Macro & background job to be run only for Europe region. Then one needs to create a
selection ID in respective planning book data view in transaction /SAPAPO/SDP94 by
selecting value Europe in Shuffler.
– The created selection ID could be assigned here by selecting “One” radio button
by looking at the “specs” indicator
– “Several” radio button option could be used assign multiple selection ID’s to which this
job could be applicable.
– Use the option “Select all” to make this macro and background job applicable to all data
3) CVC Level at which this macro would run is based on the “Aggregation Level” Selection
as shown below
Finally Save the Background Job which would be subsequently referenced at
Process chain maintenance
C) Process Chain maintenance
Transaction – RSPC
1) Creating a “Start Variant” block step in the process chain:
· Click “Create” icon in RSPC transaction & then enter suitable name
(Alpha numeric) & description of your choice for the process chain itself.
as shown below:
· Post this “Start variant” pop up appears: Click “Create” icon and enter the
start variant name and description.
Then the below detailed screen for “Start Variant” appears where you can set the option (1) of
running it as a direct scheduled chain (Manually by users) or Option (2) Start using Meta chain
(For External Scheduling tool) :
**Process chains could be auto scheduled through external scheduling tool such as Control M etc.. In that case in the Start variant of the chain one should select the “Start using Meta chain or API” option instead of direct scheduling option
Here we would use the “Direct Scheduling” option for users to execute the chain directly in RSPC transaction manually when they need to execute the same.
This can be done by further clicking “Change selection Icon” .you can select “Immediate”, then “check” and “save” In subsequent pop up screen as shown below.
Then the “START VARIANT” appears as a block in the working section on right pane.
2) Adding Planning Job as a block step next to Start Variant step above:
2.1) As a next step to add the Planning job created as a block in Process chain working section
– Click on the Process type’s (Locking chain symbol) icon below
2.2) From the process types drill down under “SCM – Demand Planning” select “DP Background Processing”
as shown below:
2.3) In the subsequent pop that would appear – Select the created background Planning job
in previous step by clicking possible entries (F4)
2.4) Then the “Planning job” block appears in work area as a step below in addition to the start variant block:
2.5) To Link/connect the 2 process steps (Blocks) right click on first process block “Start Variant”
and select the option as shown in below screen shot
Then the blocks get connected as below
Finally activate the process chain by clicking the activate icon (Candle symbol).
Then users can use RSPC transaction, select the process chain and execute them in foreground as needed.
Please note the Planning job created could also be added to existing process chain as a step
To add this macro background processing job as a separate step pls use steps from 2.2) to 2.5) in edit mode of the existing process chain.