I have created a session that reads in a Purchase Order excel file and put it on an interim sales order and lines table. I used AFS to convert the imported orders into a real LN Sales Order. The Sales Orders are created if the date are within the current date or greater.
If Order date is less than the current date I get this error on the snippet that inserts the Order Header data on the o.mess.
retval = tdslsf4100m900.insert(1, o.mess)
if not retval then |If insert fails
|Insert an entry on error log
create.log.entry(cxadi200.orno, 0, cxadi200.corn, "", cxadi.err.type.error, o.mess)
retval = stpapi.recover("tdsls4100m900", dummy.msg)
return (isspace(o.mess)) |Exit AFS process
g.pctr = g.pctr + 1
orno = tdslsf4100m900.get.Number()
"Receipt Date before Order date. Receipt date will be changed to match order date".
But if I change the Order date to be >= the current date the AFS works.
I tried to proved that I can back date an order in a manual Sales Order Entry and I won't get an error. This manifest only in AFS Sales Order insert, Any ideas on how to overcome the issue and error that is showing when the Order date < Current date?