cancel
Showing results for 
Search instead for 
Did you mean: 

Macro doesnot work in few buckets

Former Member
0 Kudos

We have default DP Macro to copy Key figures to Target key figure based a Flag. That is if flag is 1, copy key figure A to Target key figure, if flag is 2 copy Key figure B etc.

This macro works correctly interactively except last time buckets. In those buckets, when I enter flag default macro does nothing, no error message, no action But works perfectly all other buckets.

I tried timeseries consistency check, activation of macro that didn't fix the problem.

But problem fixed when macro is 'consistency checked' (stauts yellow) and activated through Macro workbench.

But problem reoccurred during next fiscal period (Our timebucket is in Fiscal periods )

Thanks,

Niranjan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In the step definition of the macro, where you select the processing area i.e. Future , History , Total ...etc. Select the Check Boxes of Start and End for "Automatic Col.Adjustment For Column Area' .

Following is the Help provided by SAP, which matches with your requirement.

Pl check & confirm:

"<b>Identification for Automatic Adjustment of Column Area</b>

You can use these two indicators, if you are working with a data view that can contain a varying number of time buckets (columns). The number of columns in the table then depends on the date when you call up the planning function. One time (for instance when you defined the macro) it may have 20 columns, on another date 24 columns. This can produce unexpected results in macros, since the last column would be the 20 th column when you defined the macro. This is not necessarily the last column at runtime.

If you set this indicator, the system automatically determines at runtime which is the first or last column and uses this column in the relevant calculations.

"

Regards

Former Member
0 Kudos

Hello All,

Thanks all for your replys..

Mangesh,

As Harish said, "Automatic col adujustment" is not working correctly as we are using Fiscal period (I tried this in other macro), When I used that, Macro Step iterations messed up.

Srinivas,

I can input manually in those buckets, I didn't tried in background as we use this macro interactively. We have bunch of default macro, this one of them. no, I didn't tried deactivating other macros.

Harish,

Per requirement, I should use Fiscal period which is base of planning (after one year), This is interactive planning book and Planner input values. So I cannot use normal weeks and months.

srinivas_krishnamoorthy
Active Contributor
0 Kudos

Request you to try out what I said in earlier mail

- deactivate other macros and see if the macro you talk about works

- run in bkground and look at logs

Former Member
0 Kudos

not sure if there is any way to sort this....

but can give you an idea in the process

you can extend the planning book by me 5 more periods that necessary and warn the user it will be wrong for the last three (or zero out the last 5 after the maco is run and keep it blank and maybe use COLUMN_INVISIBLE( 0 ) and make it invisible)

Answers (1)

Answers (1)

Former Member
0 Kudos

Are the time intervals in the macro allright?

Have you set it up to adjust the start and end date by itself. Is this happening? Its possible the last bucket is being missed because of the FY periods. You can see if this macro works in a Data view with just Calendar months ans see if this problem occurs there as well so you can eliminate the Periodicity being the reason and narrow down on the macro itself

Former Member
0 Kudos

Harish,

Thanks for reply.

Time intervals are correct in macro, till end of planning book horizon.

Data view is configured to 52weeks and 12 Fiscal periods (total 2 years in future)

Fiscal preriods defined correctly and last bucket end date is end of the fiscal period. So we have total 64 time buckets(Future) out that macro works uptp 60 buckets and it doesnot work last 4 buckets

Macro works correctly if I reactivate in macro workbench. And this problem reoccurres again next fiscal period, macro doesnot work for last 4 buckets. This is very weird..

Thanks,

Niranjan

srinivas_krishnamoorthy
Active Contributor
0 Kudos

Two quick checks

- are you manually able to write in the target KF in last 4 buckets?

- did you try running in Bkground and checking the log?

- try deactivating other macros just to ensure there is no interference

Former Member
0 Kudos

I would suggest u run it in a planning book with standard Weeks or Months and not in a fiscal period one. the effect of the macro will anyhow update the fiscal period. I think the automatic updation of From and To dates of periods dont work well with fiscal periods