cancel
Showing results for 
Search instead for 
Did you mean: 

Will default macros work with Time series keyfigures???

Former Member
0 Kudos

Hi,

I wanted to update time series keyfigures using Default macros. For example, i wanted to populate safety stock in a time series keyfigure while i'm running the heuristics in background.

Whole idea of doing it is to do reporting i.e. we couldnot extract safety stock because its an auxialiary key figure.

If someone has done this on a better way, can you please share with me?

And also i wanted to know whether default macros work with time series key figures.

Any help is rewarded with pionts.

Thanks & Regards,

Jagadeesh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Now if you are using the standard Safety stock in Planning book 9ASNP94 view SNP (1), there is a macro "Safety Stk/Reorder Point/Targt Stock Lvl ", there is a step where the safety stock is calculated using macro funciton SAFETY_CALC( ACT_PRODUCT ; ACT_LOCATION ; ACT_VERSION ; ......) and written into row Safety stock

you can use the same safety stock stock macro and modify the row it is writing to. you can use a time series KF here

btw, also check Safety Stock (planned) 9ASAFETY is the KF in Planning area 9ASNP05

The extended safety stock planning writes into that KF

If you look at planning book 9ASNP_SSP View( SAFETY) you can see this KF

Former Member
0 Kudos

Hi Harish,

Thanks for your reply. We have done the same thing i.e changed the macro "Safety Stk/Reorder Point/Targt Stock Lvl " and modified the row it is writing into ( have used Time series key figure).

Issue here is, it is not updating the time series KF when i run heuristics in background. I 'm actually going to RSA3 and testing the data source, there i cant see the updated values. The values are getting updated only when i opened plng book in interacrtive planning and save in change mode.

My questions:

1. Will SAP supports default macros to update time series key figures?

If so, am i missing anything which stops me populating time series KF.

Thanks & Regards,

Jagadeesh.

0 Kudos

The default macro writing to keyfigure is not elevant for background job. For that just run the macro step (mentioned by Harish) and put the values in a different Time Series keyfigure. Make sure the keyfigure is added to the SNP Planning Area you are using - it has to be a planning area keyfigure.

Then the macro run in background will write the values to your Time Series keyfigure from which you can extract to Infocube for reporting.

Hope this helps.

Thanks,

Somnath

Former Member
0 Kudos

Hi,

I think i'm not clear on what i have posted so let make it very clear abt my scenario.

We wanted to do reporting on SNP planning area, where we take report on

Safety stock, Stock on hand which are auxialiry key figures currently.

As we cannot extract data on auxialiry key figures, we wanted to track

those information on Time series key figures.For that, we have modified

the macros and copied the auxialiry key figures into time series key

figures. All the macros are Default macros, all the prerquisites are been set and all other macros which are supposed to run before this macro, also been set.

We are not running the bcakground jobs for this macros ( exclusively), instead we are running the heuristics in background and we assume that all the default macros will get executed once the heuristics is done i.e values in auxialiry key figures are been copied to time series key figures.

Now we found out that Times series key figures are not getting updated

using Default macros.

Nowi think i make you all clear. Somehow my questions are still not answered.

1. Without running background jobs seperately for macros, will time series key figures get updated?

Thanks & Regards,

Jagadeesh.

0 Kudos

Hi Jagadessh,

A default macro executes in case of Interactive Planning if there is any chage in the data of planning table like you modify any cell. If you run Heuristics in background then the default macro will NOT execute. It will execute only if you load the selected location-product combination in Interactive Planning.

Moreover a default macro does not neccesarily SAVE the data especially in an Auxiliary keyfigure.

You best option is to run a macro to execute the steps of the default macro (not the copy) to populate the Stock on Hand into a TimeSeries keyfigure (added to the Planning Area). Then xtract data from that timeseries keyfigure for reporting. In the background job make sure the macro step shows "Data has been saved" with green traffic light. This esures that the Tim Series keyfigure is populated and data avilable for extraction and reporting.

Thanks,

somnath

Answers (4)

Answers (4)

Former Member
0 Kudos

HI Jagadeesh,

If reporting is your main criteria then chcek the macro which populates the auxilary key figure and implement the same function modules in ur report.

There is no need of transferring the value to time series key figure and taking the same value again in ur report. Let me know if need more help.

Regards,

Siva.

Former Member
0 Kudos

Hi Sivaprakash,

Actually our main criteria is reporting only, but we felt using time series KF will be easier than using the function modules.

Now i'm more intrested in knowing the functionality of default macros i.e whether they updates the time series KF or not. Mean while if you can help out on reporting from Functional modues, i ll be thankful.

Regards,

Jagadeesh.

srinivas_krishnamoorthy
Active Contributor
0 Kudos

Just ensure that all the pre-requisite macros are run before the calculations on TS key figure. This is important while running in background so that the contexts are set properly.

Former Member
0 Kudos

Hi Jagadeesh,

I hope you can't store the safety stock in Time Series Key Figure.

The reason is , Safety Stock is attached to the orders with the category <b>CB</b>.

Regards,

Siva.

Former Member
0 Kudos

Hi Jagadeesh,

The auxiliary key figure 'Safety Stock' is calculated by using the function module /SAPAPO/SAFETY_CALC. Copy it in a custom function module and change it accordingly. Also the function module '/SAPAPO/CTM_TDSSAFTY_GET' is used for calculating safety stock.

<u>Reference:</u>

Regards,

null