Technical Articles
TOC Measurements with SAP Part 1
Introduction:
The topic of this blog is to show you how SAP ( in my case ERP ECC 6.0 ) can be used to get the right data for performance measurements, which are used in TOC ( Theory of Constraint ). These measurements consist of T (Throughput), I (Investment) and OE (Operating Expense). My main goal is to direct you to where and how to obtain data from (out of) SAP. A detailed examination of TOC and it’s TA (Throughput Accounting) is beyond this post. You can find a lot of information on the internet and books related to this subject.
The Goal:
There was a project in our company to improve financial control processes of the whole company and to simplify it. It was decided to take an approach from TOC and its Throughput Accounting (TA) by using its measurements T, I, OE for evaluating the company´s performance. These are the basic values and from these, you can gain e.g. NET PROFIT (T – OE) and RETURN ON INVESTMENT ((T – OE) / I) or PRODUCTIVITY (T/OE) and TURNS (T/I). Unfortunately, there is no standard way in SAP ECC 6.0 to get this data directly. Let me demonstrate a way of how to gain our measurements for a time period of a month:
T(Throughput)
T = Revenues – TVC (Totally Variable Cost – mostly just raw material)
There are at least two possible ways how to build it. We have to start with sales. Fortunately, there are LIS – Infostructures with revenues in time periods such as S001 and others.
See picture…
In my case, it is the infostructure S660. Now with data (Month, MaterialNumber and Sales) for building our throughput (T) value we have to get the second part of the equation and this is TVC (Totally Variable Costs => in our case raw material) One way is to break down to all these component(raw materials) of the product in BOM ( Bill of Material) with the function module CS_BOM_EXPL_MAT_V2 and then find out their price in the time period (tables MBEWH / MBEW) or another way is to use calculations (tables KEKO + KEPH) for the product in that time period where TVC is available. I created for TVC a cds view.
See code:
define view zcds_calc as select from keko
left outer join keph
on keko.bzobj = keph.bzobj
and keko.kalnr = keph.kalnr
and keko.kalka = keph.kalka
and keko.kadky = keph.kadky
and keko.tvers = keph.tvers
and keko.bwvar = keph.bwvar
and keko.kkzma = keph.kkzma
{
key keko.werks as werks,
key keko.kalnr as kalnr,
key keko.matnr as matnr,
key keko.kadky as kadky,
keko.poper as mesic,
keko.bdatj as rok,
keko.losgr as losgr, // Quantity
(keph.kst001 + keph.kst002) as tvc // our total variable costs for Quantity
}
where keph.kkzst <> 'X'
and freig = 'X'
Now we have everything needed for our equation for Throughput and we can sum all products sold in a month in one T in a time period. Here are my methods as for an example:
METHOD get_throughput.
SELECT * FROM zcds_throuput INTO TABLE lt_thrpt
WHERE matnr IN sl_matnr
AND spmon IN sl_month
AND vkorg IN sl_werk
AND matnr NOT IN sl_nomat.
LOOP AT lt_thrpt ASSIGNING FIELD-SYMBOL(<thrpt>).
lo_thrpt = lcl_throuput=>create( <thrpt> ).
lo_thrpt->calc_position( ).
<thrpt>-throughput = lo_thrpt->ls_thrpt-throughput.
ENDLOOP.
ENDMETHOD.
METHOD calc_position.
CLEAR: ls_thrpt-throughput.
ASSIGN lcl_measure=>lt_main[ werks = ls_thrpt-vkorg spmon = ls_thrpt-spmon ] TO FIELD-SYMBOL(<line>).
ls_thrpt-throughput = ls_thrpt-revenues - ( ls_thrpt-unit * lcl_calc=>get_tvc( i_matnr = ls_thrpt-matnr is_main = <line> ) ).
<line>-t = <line>-t + ls_thrpt-throughput.
ENDMETHOD.
In the next part, we will look at how to build OE and I and how we use them for performance evaluation.
Credit (Books): The Haystack Syndrome by Eliyahu M. Goldratt, Throughput Accounting by Thomas Corbett
Best Regards
jaroslav.hrbacek@tocwithsap.com
This is a nice effort but I'm not sure if it's very helpful to the global community. Maybe I've missed something but this blog seems to be looking at a very specific scenario, it also references custom LIS structure and custom CDS view (?) ZCDS_THROUPUT which do not exist in other systems, so how would this help others?
S001 might not even be populated at many SAP customers or data might not be correct. Not sure it's a good suggestion to use it. But in general, honestly, I suspect everyone already knows how to get their revenue figures from SAP. Doubt this needs explaining.
If you're serious about blogging, make sure that the suggested solutions make sense for most SAP customers and add some value. If a suggestion is to create some custom table then at least mention what purpose does it serve exactly and why. As it is, this is mostly rather confusing bits of information, sorry. Could've just skipped the custom stuff and simply outlined the whole project, what formulas you used, what was the outcome. Would've been a shorter and more useful blog, I believe.
Thank you very much for your feedback. I will consider all your suggestions.
Hi Jaroslav Hrbacek
From my understand:
2.1.TDD(Throughput Dollar Days)
2.2.IDD (Inventory Dollar Days)
So I am waiting for you can explain how to realize two report in SAP.
SAP can do that too.
2.1. I´ve seen more definitions for it, e.g. in the book you The Haystack Syndrome as a negative measurement for the backlog. ( I like this one)
You can get needed data from function module SD_SELECT_SALES_DOCUMENTS in combination with RV_SCHEDULE_CHECK_DELIVERIES. There are due dates and comparing to today you get the difference. Difference times value of the particular schedule makes TDD.
More examples of TOC with SAP can be found on http://www.tocwithsap.com/my-projects-contemplation/.
2.2. I haven’t programmed it yet, but thank you very much for the question. I´ll do it.
If you have some other suggestions, you can email me them to jaroslav.hrbacek@tocwithsap.com
Wonderful to read this. I read Goldratt many times, but longing to see those as KPIs in SAP.
Nice effort. I also just checked your blog. Interesting!