Posts

Showing posts from March, 2015

WRKFORCE: Simple Change Makes Huge Differences in TRANSFER

In WRKFORCE, you can transfer menu to transfer Employee from Department to Department. The original Business Rule takes about about seven minutes to complete with is painful to users. Further more, after 80+ employees are transferred, one of the calculation script (CurPlnPr), used to take 1~2 minutes to complete, now shot up to an hour and twenty minutes. Let's take a look at the original Rule in Transfer - /* Description: Employee Transfer between Division & Department*/ /*STARTCOMPONENT:SCRIPT*/ SET LOCKBLOCK HIGH; SET AGGMISSG ON; SET CACHE HIGH; SET UPDATECALC OFF; /*ENDCOMPONENT*/ /*STARTCOMPONENT:SCRIPT*/ SET CREATENONMISSINGBLK ON; VAR yearTransfer = 0; VAR savedAction = 0; /*ENDCOMPONENT*/ FIX (/*DIM:Year*/{Years},/*DIM:Employee*/{Employees},/*DIM:Scenario*/{Scenario},/*DIM:Version*/{Version},/*DIM:Currency*/{Currency})   /*STARTCOMPONENT:SCRIPT*/   DATACOPY {FromDivision}->{FromDepartment} TO {ToDivision}->{ToDepartment}; "PrevCYTDTotalSalary" ( {T