To define a processing sequence for performance indicator scriptFor complex performance indicator computations ERP sometimes requires certain base data from which the resultant performance indicator value can be derived. So for every performance indicator script, a unique Processing Sequence number performance indicator is specified. When a performance indicator is processed by using the Calculate Performance Indicators (tgeis0214m000) session based on the processing sequence number, all performance indicators with a processing number less than the current performance indicator are computed. The computation of the higher level PIs is done according to the time fence required by the current performance indicator. In the Performance Indicators (tgeis0511m000) session the performance indicator is linked to a calendar code. The start dates for all periods from a year are maintained in the Enterprise Period Table (tgeis0103s000) session. Example In the calculation of work-center utilization we have domain tgeis.valu planned.hours |Total planned hours domain tgeis.valu availab.hours |Total available hours planned.hours = GET.PI.VALUE(tgeis.modu.sfc, "L057.1") availab.hours = GET.PI.VALUE(tgeis.modu.rou, "L057.2") if availab.hours <> 0.0 then cwoc.utilization = round(planned.hours/ availab.hours * 100, 0,1) else cwoc.utilization = 0 endif UPDATE.PI.VALUE(cwoc.utilization) This will now be implemented as follows: PI named SFCPLANHRS with Seq. no 10 ==> will contain the script for calculation planned hours table ttisfc011 table ttisfc012 long dummy long end.week long end.year long start.week long start.year domain tgeis.valu tot.plan.hours |Total planned hours for all |work center itgeis0002.get.dates.n.period(date.num(), cur.yrno, cur.yrpt, prev.cur.prod, cur.start.date, cur.end.date) itgeis0002.get.dates.n.period(tgeis000.lcdt, run.yrno, run.yrpt, processed.prod, start.date, end.date) num.to.week(start.date,dummy, dummy, start.week, start.year) num.to.week(end.date, dummy , dummy, end.week, end.year) select tisfc011.* from tisfc011 where tisfc011._index2 between {:start.year, :start.week, :start.date} and {:end.year, :end.week, :end.date} selectdo if tisfc011.prdt >= start.date and tisfc011.prdt <= end.date then tot.plan.hours = tot.plan.hours + tisfc011.prtm endif endselect UPDATE.VALUE("SFCPLANHRS", tot.plan.hours) PI named ROUAVLBHRS with Seq. no 10 ==> will contain the script for calculation of available hours for all work center PI existing as WCENUTILITY with seq. no 20 ==> will calculate the work center utilization as shown below domain tgeis.valu cwoc.utilization domain tgeis.valu planned.hours domain tgeis.valu availab.hours planned.hours = GET.VALUE("SFCPLANHRS", 1995, 1, 3) availab.hours = GET.VALUE("ROUAVLBHRS", 1995, 1, 3) if availab.hours <> 0.0 then cwoc.utilization = round (planned.hours / availab.hours * 100, 0,1) else cwoc.utilization = 0 endif UPDATE.VALUE("WCENUTILITY", cwoc.utilisaton, 1995, In the calculation of work-center utilization we have domain tgeis.valu planned.hours |Total planned hours domain tgeis.valu availab.hours |Total available hours planned.hours = GET.PI.VALUE(tgeis.modu.sfc, "L057.1") availab.hours = GET.PI.VALUE(tgeis.modu.rou, "L057.2") if availab.hours <> 0.0 then cwoc.utilization = round(planned.hours/ availab.hours * 100, 0,1) else cwoc.utilization = 0 endif UPDATE.PI.VALUE(cwoc.utilization) This will now be implemented as follows: PI named SFCPLANHRS with Seq. no 10 ==> will contain the script for calculation planned hours table ttisfc011 table ttisfc012 long dummy long end.week long end.year long start.week long start.year domain tgeis.valu tot.plan.hours |Total planned hours for all |work center itgeis0002.get.dates.n.period(date.num(), cur.yrno, cur.yrpt, prev.cur.prod, cur.start.date, cur.end.date) itgeis0002.get.dates.n.period(tgeis000.lcdt, run.yrno, run.yrpt, processed.prod, start.date, end.date) num.to.week(start.date,dummy, dummy, start.week, start.year) num.to.week(end.date, dummy , dummy, end.week, end.year) select tisfc011.* from tisfc011 where tisfc011._index2 between {:start.year, :start.week, :start.date} and {:end.year, :end.week, :end.date} selectdo if tisfc011.prdt >= start.date and tisfc011.prdt <= end.date then tot.plan.hours = tot.plan.hours + tisfc011.prtm endif endselect UPDATE.VALUE("SFCPLANHRS", tot.plan.hours) PI named ROUAVLBHRS with Seq. no 10 ==> will contain the script for calculation of available hours for all work center PI existing as WCENUTILITY with seq. no 20 ==> will calculate the work center utilization as shown below domain tgeis.valu cwoc.utilization domain tgeis.valu planned.hours domain tgeis.valu availab.hours planned.hours = GET.VALUE("SFCPLANHRS", 1995, 1, 3) availab.hours = GET.VALUE("ROUAVLBHRS", 1995, 1, 3) if availab.hours <> 0.0 then cwoc.utilization = round (planned.hours / availab.hours * 100, 0,1) else cwoc.utilization = 0 endif UPDATE.VALUE("WCENUTILITY", cwoc.utilisaton, 1995,
| |||