Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 11th June 2014, 22:27
eric.dizon's Avatar
eric.dizon eric.dizon is offline
Senior Member
 
Join Date: Feb 2012
Posts: 151
eric.dizon is on a distinguished road
Baan: ERP LN - DB: MS SQL - OS: 2003
AFS Sales Order Insert

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
else
g.pctr = g.pctr + 1
orno = tdslsf4100m900.get.Number()
endif

"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?
Reply With Quote
  #2  
Old 11th June 2014, 22:34
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Are these dates two dates are the form? Do you put both dates into the session?

I have seen something like this before - when you run a session manually some events get hit and change default screen values. When you run it using AFS code these events do not get hit and some fields might default differently. One of the reasons I always try to put all of the fields. Not sure this is the situation here.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #3  
Old 11th June 2014, 22:37
eric.dizon's Avatar
eric.dizon eric.dizon is offline
Senior Member
 
Join Date: Feb 2012
Posts: 151
eric.dizon is on a distinguished road
Baan: ERP LN - DB: MS SQL - OS: 2003
Mark yes the date field I am working with are :
tdsls400.odat
tdsls400.ddat
tdsls400.prdt

I tried populating those 3 dates but for some reason when I put odat < current date. I get the AFS issue.
Reply With Quote
  #4  
Old 11th June 2014, 22:46
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
So is prdt the receipt date? When you run it manually and put in odat does it change prdt at all? I am wondering if in the AFS code you just put both dates in as the same date if it would work without an error. Maybe set them both to like current date -1 to test.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error sales order not allowed - AFS tsnaresh AFS/DDC/OLE: Function servers 1 9th December 2008 21:10
Sales Order Line Deletion learner Distribution, Transportation & Warehousing 2 1st May 2007 21:42
insert sales order line in baan5 thru AFS Kingsto88 AFS/DDC/OLE: Function servers 9 27th November 2006 13:49
Extension to sales order header being updatesd thru AFS or update table will work darpan Tools Development 4 16th April 2005 09:16
Sales order through AFS Debdas Banerjee AFS/DDC/OLE: Function servers 1 4th November 2004 16:39


All times are GMT +2. The time now is 02:22.


©2001-2017 - Baanboard.com - Baanforums.com