Purpose Determine the next factory working day |
Solution // in: date1, any date in a valid SAP date format // out: date2, next factory working day Set V[date1] "&V[today_d.m.y]" // sample date// next day // convert to YYYYMMDD
for function call Set V[d] "01.01.1900" + "&V[diff]" Set V[yyyymmdd] "&V[d](7-10)&V[d](4-5)&V[d](1-2)" Call "DATE_CONVERT_TO_FACTORYDATE" _in.DATE="&V[yyyymmdd]" _ in.CORRECT_OPTION="+" _ in.FACTORY_CALENDAR_ID="01" _ out.DATE="dx" // convert YYYYMMDD to date format Set V[diff] "&V[dx2]" - "&V[date1]" Set V[date2] "&V[date1]" + "&V[diff]" // test message |
Components |