Throughput Accounting (TA) with SAP Part I – Investment- First steps

Throughput Accounting (TA) with SAP

Part I – Investment – First steps

 

As I mentioned at the end of my latest post, I am going to build a tool for TA in an SAP environment. For this tool I will start with the component of TA called investment (I). (For more information see “The Haystack Syndrome” by Dr E.M. Goldratt 1990 or “Throughput Accounting” by Thomas Corbett 1998.) The investment consists of work in process (WIP), finished goods ( including finished assemblies), raw materials, machines, buildings, etc. Starting with the first three items (WIP, finished goods, and raw materials), let´s build the first cornerstone.

 

Each item of these three is evaluated for the purpose of TA only by Totally Variable Cost (TVC): that is, the amount of cost that varies for every increase in the product´s sale (in the majority of the cases it is just raw material). (“Throughput Accounting” by Thomas Corbett 1998, p.30.) So we need to programme a class in ABAP that serves us TVC for those items mentioned above per given financial period. Let´s call it ZCL_TA_PRODUCT. The class provides various methods and primarily serves TVC of the product (GET_PRODUCT_TVC method). The logic of this method is very simple. It starts with a check to see if the product is a directly purchased part. If this is the case, then by using the next method (GET_STD_PRICE) the class returns the value of TVC. It is in this particular case that is the standard price from database tables MBEW or MBEWH (depending on actual or nearest financial year and period ). If the product is finished goods or assembly then the class reads the actual bill of materials (BOM) for the product using the GET_BOM method. Once the BOM is built, the class checks the whole BOM for purchased materials in the GET_PRODUCT_TVC method. For all these materials their own standard prices are read from database tables MBEW and MBEWH using an actual financial period or the nearest to it. At the end, all single prices are added in the result TVC for the product.

Here is the ABAP coding:

Using classes ZCL_TA_I_PRODUCTS and ZCL_TA_PRODUCT, let´s build a class for WIP called ZCL_TA_WIP.
The main method in this class is GET_TVC_SUM, which turns the sum off TVC in a given financial period. The process in that method goes like this: the first three steps prepare a selection table that is used as an input table in the third method GET_TAB_AFKO. Here a function module borrowed from a well-known SAP transaction COOIS is used (information system for orders and plan orders in production, etc.) The result of that method is a table with all production orders that are in some state of progress at the end of the given financial period. The next step is only a check. All orders in the table are checked for whether or not goods movements have been done. If there are no movements the particular order is deleted from the table. The next step is called the GET_MAT_TVC_FORM_ORDER method. It calls all items in the table with orders and finds out how many pieces of materials have been confirmed for that particular production order until the last day of the given financial period. For those, all pieces of the class ZCL_TA_PRODUCT and its GET_PRODUCT_TVC method deliver the total variable costs (TVC). All items and their TVCs are added in the final sum.

Here is the ABAP coding:

The next items for investment evaluation in TA, as mentioned above, are raw materials, unfinished goods (assemblies), and finished goods. You can use various approaches to evaluate them. The principle in SAP remains the same.
I have chosen to evaluate all items at once. You can, of course, evaluate them separately. Let´s look at the class for stock materials. I named it ZCL_TA_STOCK and it is inherited from ZCL_TA_I_PRODUCTS. Its function is very simple. Firstly, we must build an internal table with a stock of all materials on the last day of the evaluated period. For this purpose, we can use the database table MARDH. There are not entries for all periods. You can read the explanation in the SAP-Note 193554 – Stock/valuation data of previous periods. Once the table with all the materials and their stock is built, we evaluate them in the same way as in WIP using class ZCL_PRODUCT_TVC and its GET_PRODUCT_TVC method.

Here is the ABAP coding:

We now have all of the needed classes to evaluate WIP, raw materials, unfinished goods, and finished goods in a financial period. Let´s use them in a test report.

Here is the ABAP coding: