
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.
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'
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 |