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 9th December 2008, 17:36
tsnaresh tsnaresh is offline
Junior Member
 
Join Date: Aug 2001
Posts: 14
tsnaresh is on a distinguished road
Error sales order not allowed - AFS

Hi,

I am trying to test the creation of sales orders via AFS (IVc4 with SP24). I am getting the error "Sales Order not allowed" (tools error message) when the pogram inserts into sales order lines. The sales order Header is created fine. Please see the code below: Do you see any problem with the code?

|* Insert into Header
stpapi.put.field( "tdsls4101m000", "tdsls040.orno", "8")
stpapi.put.field( "tdsls4101m000", "tdsls040.cuno", "TEST")
stpapi.put.field( "tdsls4101m000", "tdsls040.cotp", "W1")
stpapi.put.field( "tdsls4101m000", "tdsls040.cpay", "N30")
ret = stpapi.insert( "tdsls4101m000", 1, error.mesg )

if ret = 0 then
message(error.mesg)
stpapi.end.session("tdsls4101m000")
return
endif

stpapi.get.field( "tdsls4101m000", "tdsls040.orno", value.orno )
hold.orno = lval(value.orno) |* hold.orno gets the valid order number
display("hold.orno")
tdsls040.orno = hold.orno

error.mesg = ""
stpapi.handle.subproc("tdsls4101m000", "tdsls4105s000", "add")
stpapi.continue.process("tdsls4101m000", error.mesg)

if strip$(error.mesg) <> "" then
message(error.mesg)
stpapi.end.session("tdsls4105s000")
stpapi.end.session("tdsls4101m000")
return
endif

stpapi.handle.subproc("tdsls4105s000", "tdsls04504s000", error.mesg)
|* Insert into sales order lines
stpapi.put.field("tdsls4105s000", "tdsls040.orno", value.orno)
stpapi.put.field("tdsls4105s000", "tdsls041.orno", value.orno)
stpapi.put.field("tdsls4105s000", "tdsls041.pono", "1")
stpapi.put.field("tdsls4105s000", "tdsls041.item", "100")
stpapi.put.field("tdsls4105s000", "tdsls041.cwar", "100")
stpapi.put.field("tdsls4102s000", "tdsls041.ddta", str$(date.num()))
stpapi.put.field("tdsls4105s000", "tdsls041.oqua", "1")
stpapi.put.field("tdsls4105s000", "tdsls041.drct", "2")
stpapi.put.field( "tdsls4105s000", "tdsls041.pric", "1.25")

ret = stpapi.insert("tdsls4105s000", 1, error.mesg)

if strip$(error.mesg) <> "" then
message(error.mesg)
endif
while true
error.mesg = stpapi.get.mess.code("tdsls4105s000", error.mesg)
if strip$(error.mesg) = "" then
break
endif
endwhile

stpapi.end.session("tdsls4504s000")
stpapi.end.session("tdsls4105s000")
stpapi.end.session("tdsls4101m000")


I appreciate your input.
Thanks
Reply With Quote
Sponsored Links
  #2  
Old 9th December 2008, 21:10
tsnaresh tsnaresh is offline
Junior Member
 
Join Date: Aug 2001
Posts: 14
tsnaresh is on a distinguished road
it is working now

I have updated with latest object (tdsls4102).

Thanks.
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
how to add sales order with AFS maclezhang AFS/DDC/OLE: Function servers 2 20th November 2007 02:39
problem in AFS - Sales Order Splitting veyant AFS/DDC/OLE: Function servers 7 10th May 2006 06:40
AFS: Maintain Production Order: Routing field problem khadarBaaNBoard AFS/DDC/OLE: Function servers 1 30th March 2006 17:09
Maintain Outbound in AFS fails for Order Type: "Collect Order" FoxZapper AFS/DDC/OLE: Function servers 7 3rd November 2005 14:45
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 03:56.


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