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
Set V[date2] "&V[date1]" + 1

// convert to YYYYMMDD for function call
Set
V[diff] "&V[date2]" - "01.01.1900"
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[dx2] "&V[dx](7,8).&V[dx](5,6).&V[dx](1,4)"
Set V[diff] "&V[dx2]" - "&V[date1]"
Set V[date2] "&V[date1]" + "&V[diff]"

// test message
Message
"&V[date1], next factory working day: &V[date2]"

Components
InputAssistant