So for we have seen coded versus configured, dynamic versus on demand. Now let consider the available methods in regards to what business rule
1. For the very advanced requirements there is no other way than running standard planning operators from SAP. Seems logical to get advanced calculation from such SAP Integrated Business Planning solution via programs isn’t it? They represent the true added value of the product.
This is the case for statistical algorithms, Optimizer, Heuristic, Safety stock multi-echelon. By essence they are executed on Demand, via planning operators
Planning operators are not modifiable.
2. For any other requirements, using a customizable path, I have established a scale, to better understand what method to use with regards to complexity.
Beforehand, lets revisit the APO framework. Any business rule was to be modeled in macro, at least in DP and SNP. Even for a simplistic addition you would have to design and run a macro. Macro language was a simple one, reachable by consultants and business analyst. This probably explains why APO was fairly appreciated, providing a high level of flexibility. However, the weak point of macro was the fact they were attached to planning books and DataView. In other words, you had to replicate the same macro in many places, which was not efficient from the maintenance perspective.
With IBP this has been dramatically transformed to a revolutionary model. Now data transformations rules are supported by formulas, not anymore macro. These formulas are attached to the Key Figures, so that any read or write activity in the HANA database triggers a calculation run of each requested Keyfigure. Looks pretty good, however formulas are not “jack of all trades”. They cannot do everything like macro. Let’s see that.
a- Simple requirement vs single period
This is a common case where a result calls for operands in the same period. For instance, Stock value which reverts to same period stock quantity multiplied by the product cost.
StockValue(n) = StockQty(n) * ProductCost(n)
In such case, formulas are really simple and easy to maintain. They are organized by planning level, which is really a great thing. You may imagine combining several planning level together like calculating a demand level of a product-location, starting with a detailed demand plan being done at product-location-customer-distribution channel level.
See below a Stock value example where the request level defined dynamically by the user according to his selection in Excel, will aggregate the sum of each individual product*cost. So the same formula will help calculating the stock value of a product, of a family, of a sub-family over a country etc..

b- Advanced requirement over multiple periods
Let’s be simple. Let’s consider a projected stock calculation. Here the formula calls for several periods and applies a simple addition and subtraction. This is really a simple think in Excel isn’t it? Well in IBP it is not so easy.
Stock(n) = Stock(n-1) + TotalReceipt(n) – TotalDemand(n)
In such case you need to point a different period (here n-1) by means of attribute transformation. Wat’s that? A clever way to avoid programming language and still create such formula. Clever however not easy. The attribute transformation process, an SAP IBP feature, requires addition a planning level and Keyfigures, which in the end makes the readability complex. Let’s be clear this is only affecting consultants, users won’t know about it. So after 18 years of simplicity in Macro of APO DP and SNP, we have to adapt ourselves in SAP IBP. I recommend reading a recent linkedin post on this exact subject of attribute transformation. It is a useful cookbook about it.
c- Complex requirement over multi-periods
Now let’s consider further complexity like a stock cover, a target stock, a safety stock etc. Here the expected formula do need a programmed logic with loops, with standard programmatic and conditional operators. E.G in APO for the stock cover calculation you would use the formula COVER() which was coded by SAP in ABAP and delivered in standard APO macro-Builder.
Cover(n) = Function( Demand(n to m), Stock(n), Calendar (n to m) )
In SAP IBP the coded approach is supported with the specific LSCRIPT language. It is not documented and not accessible anymore since SAP Integrated Business Planning 6.2. Here below is an example of such program. So if you cannot cover your requirement with formula and attribute transformation, you have to revert to SAP asking them to code your need into a given Lscript procedure, to be attached to the corresponding Keyfigure. This is a billable scenario not for free. In project mode that constrains money and timelines aspect. Nothing impossible though.
