cancel
Showing results for 
Search instead for 
Did you mean: 

Macro not working in background

Former Member
0 Kudos

Hi Experts,

I am creating a macro that uses auxiliary row. With the following logic:

If Standard

Forecast = Base forecast + Base forecast Correction

    If Cannibalization event > Total Forecast

          Cannibalization Event = Total Forecast

    End If

End IF

This is working when i run it manually in Planning Book, but when I tried using it in background job.. This is not working anymore.. Please Help!

Thanks!

Kris

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member187488
Active Contributor
0 Kudos

Hello,

There're two important points here.

First, please make sure all relevant key figures (except the auxiliary KF) are well calculated and saved in the liveCache. If any of the KFs is calculated from macro, maybe you'll need to run the macro also in background job, to have correct values for the key figures. (Maybe you should use a dataview without start macro and default macro. It's a more direct way.)

Second, you did not mention which key figure is auxilary, but you should notice that auxiliary key figure is only working for the current planning object. You'll need to be careful when you execute a macro with auxiliary KF on multiple planning objects. Please follow note 1623462.

Best Regards,
Ada

former_member209769
Active Contributor
0 Kudos

Hi Kris,

1) When you are in planning view, you select a "display" option when you make the selection. This is the aggregation level at which the macro would run (unless you drilled down later to a different level).

When you use background job, then in the job definition, there is a place to maintain "aggregation".

Go to /sapapo/mc8e (Change planning job), give your selection ID, same as what you were using in foreground, and then click on "aggregation level" button. Do a F4 and then select the level at which you made the "display" in foreground, or at which you want teh macro to run.

2) If you had any default macros that did the calculation for the auxiliary row in the interactive view, you would need the same macros to be run in the background job also before you do your calculation for the current macro. You could add these macros in the same background activity as for the current macro.

3) Also in your macro definition, ensure that the box "do not initialize auxiliary table" has been checked. I think this must already be there, since you are able to use auxiliary data in the foreground.

Thanks - Pawan

Former Member
0 Kudos

HI Pawan,

Thanks for your response. Please see my comments on your answer..

1)  I am running the job on the same level I used in the foreground.

2) I just tried to set the macro as directly executable in planning book so I can check if it is working, since it is working I have now used it in background job but with no luck.

3) Yes the  "do not initialize auxiliary table" is checked.

Im running out of ideas what else to check..