cancel
Showing results for 
Search instead for 
Did you mean: 

Macros are not workout to keyfigure

Former Member
0 Kudos

Hi Experts

I have written below macro for one data view but this formula is not workedout in planning book

NET FCST = CONS FCST PROD + CONS FCST DP : ( 3 Iterations : M 05.2008; M 07.2008 )

Row: NET FORECAST ( Frm M 05.2008 ) =

Row: CONSENSUS FCST ( Frm M 05.2008 )

+

Row: PRODUCTION CONSENSUS FORECAST ( Frm M 05.2008 )

If I enter forecast figures for Production consensus key figure, automatically the Net forecast should be calculated based on Consus forecast and Production consus forecast figures. But It is not happing.

I have checked consistency check also but there is no errors.

Is there any setting I have missed

pl. help me in this regard

Thanks in advance pl.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

As Ian said First execute a very simple macro like adding a number to the existing quantity, if that works then develop a little higher level.

Try to find out how it went wrong, by eliminating each possibility for making a mistake.

I did a very similar thing, and I didnot activate the macro correctly, The macro shows as activated but for some reason it was never activated, I created the macro again from scratch with small steps like adding a single numeral to the quantities finally built the whole macro and activated , then it worked fine.\

Let me know if you still have problems.

Thanks,

My

Former Member
0 Kudos

Ok, simple things first

Have you assigned that macro as a Default macro?

Is the macro active in the planning book?

Is there another macro that also adjusts the Net Forecast Key figure, which may be executed after this macro?

Regards

Ian

Former Member
0 Kudos

Hi Lan

Thank you for your prompt reply

I have assigned macro to Default macro and activated and generated

There is no another macro to adjust Net Forecast Key figure.

Are there any checks I have to check

Pl. help me

Thanks & Regards

Former Member
0 Kudos

Hi

Okay then, lets try the more complex checks 🐵

There are certain functions in the macro builder which you can help you conduct detailed analyses of macros. These are activated by entering certain function codes in the transaction field (on the screen in the top left below the menu):

The macrodebugger is activated with function code

=MSDP_DBO

This debugger displays a message before the execution of a macro, with the name of that macro. This enables you to check, in particular, whether the system is running standard macros (Start-/Default-/Level-/Termination macros) in the required sequence. This should show you if the macro is actually executing after data is entered.

Function code

=MSDP_DBLIST

ensures that before and after every execution of a macro a dialog box appears with the most important data for its execution. It is then possible to check whether the expected data is included in the execution of the macro and whether the desired results are calculated for the incoming data.

You can also set stops when defining macros for elements of the macro. The function is contained in the menu for a node in the macrotree, which is activated via the right mouse button. A stop for an element of the macro definition causes a window to appear when executing the macro in interactive planning, this displays information on the element explaining its execution.

Try the debugger first to check your macro is actually executing. The other options will give you increasingly more information as to what is happening.

Hope these help.

Regards

Ian

Former Member
0 Kudos

Hi Lan

Where I have to enter these function codes

You have mentioned transaction field (on the screen in the top left below the menu)

but I couldn't find that filed in the macro workbench screen

pl. give me more light

thanks & regards

Former Member
0 Kudos

Hi

You need to do this in the Interactive Planning Book /sapapo/sdp94.

Use the data view to load your planing data then enter that code and process the data as normal, when the macro executes you should get a pop up in the planning book telling you which macro is running.

Regards

Ian

Former Member
0 Kudos

Hi Lan

I have selected data view and selction profile and loaded data into planning book.

and I have entered function code as =MSDP_DBO and pressed enter button then system display the message as Macro debugging switched on in bottom.And again I have entered second function code as =MSDP_DBLIST then system displayed the message as "Macro debugging for output of results data switched on"

then I entered forecast figures in the consus forecast figures but system doesn't calculate net forecast automatically.

Pl. explain what I have to do next

Thanks & regards

Former Member
0 Kudos

I think i saw a similar problem, When i am in debugging mode, none of my default macros were running.

How do we debugg them? Do we have to make them as directly executable to perform the testing?

Thanks,

My

Former Member
0 Kudos

HI,

I think there is also another way to test your macro in Macro work bench itself, Pull your macro into the panel, Then go to

Utilities > Test Macro >It will create another screen, very similar to the plannign book and all the rows and columns, there you can enter soem numbers in the relevant fields choose your macro and run the macro.

ENTER FEW QUANTITIES IN THE RELEVANT FIELDS AND THEN EXECUTE THE CORRESPONDING MACRO.

I think you can also run default macros at once by choosing the Default macro button.

Let me know if you need any help in performing this.

Thanks,

My

Former Member
0 Kudos

Hi My

Thank you very much for your suggestion

I have tested as per your procedure and macros are working fine here and calculating forecast figures as per formulas written in macros.

But in my planning book these macros are not working.

What I have to do next pl.

Thanks & regards

Chandu

Former Member
0 Kudos

Is it the only macro in the Dataview, is it possible to run this macro in anyother dataview and check.

To strictly perform debugging, try performing the following steps in the given sequence. It will be easy for you to debug.

1) Create a new simple macro

2) NET FCST = fixed quantity ( 3 Iterations : M 05.2008; M 07.2008 )

Row: NET FORECAST ( Frm M 05.2008 ) = 1

3) Try to see if this is executable, in the test

4) Execute as a default macro in the planning book

5) If it works then add one more step

NET FCST = CONS FCST PROD ( 3 Iterations : M 05.2008; M 07.2008 )

Row: NET FORECAST ( Frm M 05.2008 ) =

Row: CONSENSUS FCST ( Frm M 05.2008 )

6) If this works in Test and Planning Book. then go to the next step

7) Recreate the macro as

NET FCST = CONS FCST PROD + CONS FCST DP : ( 3 Iterations : M 05.2008; M 07.2008 )

Row: NET FORECAST ( Frm M 05.2008 ) =

Row: CONSENSUS FCST ( Frm M 05.2008 )

+

Row: PRODUCTION CONSENSUS FORECAST ( Frm M 05.2008 )

and check if it is working.

Let me know if you are able to perform all the steps or stopping at any step. If you stop at nay step give the details of the row and macro creation parameters.

Thanks,

My