Skip to Content
0
Aug 11, 2023 at 07:40 PM

Calculations at TWK using Calendar Week Attributes

198 Views

If a PO is past due, the earliest it can arrive is today + transit time. To do this today, I calculate in calendar weeks, convert to days and sum to TWK. The business doesn't like the rounding issue this causes. Is it possible to compare the start and/or end of a calendar week and a technical week. Example, IF calendar week = current week + TLEADTIME and calendar week start equals technical week start, rollup value, else....

kf1@wkprodloclocfr = IF( ("PERIODID4" = "$$PERIODID4CU$$" + "TLEADTIME@CALWKPRODLOCLOCFR") and ("$$PERIODID4CU$$START" = "$$PERIODID5CU$$START") ) , "HCBLOPENPOROLLFWD@PRODLOCLOCFR" , ....

or

("$$PERIODID4CU$$END" = "$$PERIODID5CU$$END") to load into beginning of month instead of end of month.