Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
18%
500 - 800 GB
6%
800 - 1200 GB
6%
1200 - 1500 GB
12%
1500 - 2000 GB
18%
> 2000 GB
24%
Total votes: 17

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th September 2018, 09:38
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 200
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
afs for sales order lines

hi,

i just want to ask if anybody already did afs for sales order lines using tdsls4100m900 session. i checked here mostly i found was using baan4/5. thanks in advance.

regards,
jojo
Reply With Quote
  #2  
Old 14th September 2018, 08:28
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 519
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
May i ask, What exactly about it?
Reply With Quote
  #3  
Old 14th September 2018, 10:00
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 200
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi Ajesh,

actually i started to do the script for afs on this tdsls4100m900 to insert lines but i'm having trouble when run appearing fatal error on tdsls401.disc field that is why i'm asking for sample afs.

regards,
jojo
Reply With Quote
  #4  
Old 17th September 2018, 02:30
BaanInOhio BaanInOhio is offline
Senior Member
 
Join Date: Oct 2005
Location: Northeast Ohio
Posts: 183
BaanInOhio is on a distinguished road
Baan: Baan 4c4, 5C, LN - DB: Informix, Oracle, SQL - OS: HP UX, Win2K
Try to use DAL2 instead. You can easily create the sales order and lines by setting a few fields for the header then lines. Same for purchase orders. Unlike some tables/functions, the DAL2 usage for the order entry/edit sessions are pretty strong. I prefer to use a custom session with DAL instead of EDI due to the simplicity of the calls. Also easier to get the exception messages from the session than how you have to do it in AFS.
Reply With Quote
  #5  
Old 18th September 2018, 14:04
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 200
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi,
thanks for dal2 suggestions, its working.
regards,
jojo
Reply With Quote
Sponsored Links
  #6  
Old 20th September 2018, 07:22
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 200
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi,
i was able to insert lines but the only problem is i can't able to modify ldam(1) field and system saying the position field can't be modified in sales order line. any idea?
regards,
jojo
Reply With Quote
  #7  
Old 24th September 2018, 09:54
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 519
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Quote:
Originally Posted by jojovalenton View Post
hi,
i was able to insert lines but the only problem is i can't able to modify ldam(1) field and system saying the position field can't be modified in sales order line. any idea?
regards,
jojo
Can you post your code?
Reply With Quote
  #8  
Old 24th September 2018, 21:12
BaanInOhio BaanInOhio is offline
Senior Member
 
Join Date: Oct 2005
Location: Northeast Ohio
Posts: 183
BaanInOhio is on a distinguished road
Baan: Baan 4c4, 5C, LN - DB: Informix, Oracle, SQL - OS: HP UX, Win2K
The cause could be a one of a few issues. Make sure that you are calling dal.set.field using the 3rd (element) argument since the discount is an array field: dal.set.field("tdsls401.ldam", value.for.discount, 1).

It may be due to a condition in the standard DAL and the field value or when trying to modify a field that the DAL script has as being disabled. I try to model these by doing an insert in GTM using the same fields as in the code. After entering the package, module, table, company in ttaad4100, enter a '*' at the choice prompt to enable the DAL validation. Will show "DAL active" under the company name. If a data/condition issue, you will receive an error message after entering the field or saving the record.
Reply With Quote
  #9  
Old 25th September 2018, 07:50
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 200
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
Thanks for additional inputs.
Reply With Quote
  #10  
Old 28th September 2018, 13:45
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 519
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
@ Jojo, Could you post your AFS code for going to Lines from Header, when its not the Same Multi Occ/Single Occ Session Combination?

Wanted to have a look as to how to go about doing it..
Reply With Quote
  #11  
Old 29th September 2018, 06:02
jojovalenton jojovalenton is offline
Senior Member
 
Join Date: Aug 2007
Posts: 200
jojovalenton is on a distinguished road
Baan: InforLN FP7 - DB: SQL Server 2008 R2 - OS: Window Server 2008 R2
hi Ajesh,

Below is how the scripts goes:

function extern add.sls.ord.header(
domain tccom.bpid i.ofbp.sls,
domain tccom.bpid i.cadr.sls,
domain tccom.ccnt i.ofcn.sls,
domain tccwoc i.sls.ord.cofc,
domain tccotp i.sls.ord.sotp,
domain tcccur i.sls.ord.ccur,
domain tcrtyp i.sls.ord.rtyp,
domain tccpay i.sls.ord.cpay,
ref domain tcorno o.sls.ord.orno)
{
long save.tdsls400
domain tcmcs.str100 error.msg
|dal2 script...
dal.new.object("tdsls400")
dal.set.field("tdsls400.orno",i.sls.ord.sotp)
dal.set.field("tdsls400.ofbp",i.ofbp.sls)
dal.set.field("tdsls400.ofad",i.cadr.sls)
dal.set.field("tdsls400.ofcn",i.ofcn.sls)
dal.set.field("tdsls400.stbp",i.ofbp.sls)
dal.set.field("tdsls400.stad",i.cadr.sls)
dal.set.field("tdsls400.stcn","")
dal.set.field("tdsls400.itbp",i.ofbp.sls)
dal.set.field("tdsls400.itad",i.cadr.sls)
dal.set.field("tdsls400.itcn","")
dal.set.field("tdsls400.pfbp",i.ofbp.sls)
dal.set.field("tdsls400.pfad",i.cadr.sls)
dal.set.field("tdsls400.pfcn","")
dal.set.field("tdsls400.corg",tdsls.corg.manual)
dal.set.field("tdsls400.sotp",i.sls.ord.sotp)
dal.set.field("tdsls400.odat",utc.num())
dal.set.field("tdsls400.mprm",tdsls.mprm.cumulative)
dal.set.field("tdsls400.ccur",i.sls.ord.ccur)
dal.set.field("tdsls400.ratt",i.sls.ord.rtyp)
dal.set.field("tdsls400.bpcl","")
dal.set.field("tdsls400.cfrw","TRU")
dal.set.field("tdsls400.ddat",utc.num())
dal.set.field("tdsls400.prdt",utc.num())
dal.set.field("tdsls400.odty",tdsls.odty.notappl)
dal.set.field("tdsls400.cofc",i.sls.ord.cofc)
dal.set.field("tdsls400.fdpt",i.sls.ord.cofc)
dal.set.field("tdsls400.cpay",i.sls.ord.cpay)
dal.set.field("tdsls400.oamt",0.0000)
dal.set.field("tdsls400.hdst",tdsls.hdst.free)
dal.set.field("tdsls400.hiss",tcyesno.yes)
dal.set.field("tdsls400.ehis",tcyesno.yes)
sls.order.num(i.sls.ord.sotp, o.sls.ord.orno)
save.tdsls400 = dal.save.object("tdsls400")
dal.get.error.message(error.msg)
mess("tcnpc.common", 0, error.msg)
if save.tdsls400 = 0 then
commit.transaction()
endif
}

function extern add.sls.ord.lines(
domain tcorno i.l.orno,
domain tcpono i.l.pono,
domain tcitem i.l.item,
domain tcpric i.l.pric,
domain tcqsl1 i.l.qoor,
domain tccwar i.l.cwar,
domain tccuni i.l.cuqs,
domain tccuni i.l.cups,
domain tcconv i.l.cvqs,
domain tccvat i.l.cvat,
domain tddiam i.l.ldam,
domain tccom.bpid i.l.ofbp,
domain tcmcs.st17m i.bsls1)
{
domain tcpsty i.l.styp
domain tcdate i.l.date
long i, save.tdsls401
string error.msg(120)
i = 0
error.msg=""
i.l.date=utc.num()
i.l.styp="MCSLS"
|*dal2 script
dal.new.object("tdsls401")
dal.set.field("tdsls401.orno",i.l.orno)
dal.set.field("tdsls401.pono",i.l.pono)
dal.set.field("tdsls401.sqnb",0)
dal.set.field("tdsls401.ofbp",i.l.ofbp)
dal.set.field("tdsls401.item",i.l.item)
dal.set.field("tdsls401.pric",i.l.pric)
dal.set.field("tdsls401.porg",tdgen.porg.manual)
dal.set.field("tdsls401.ddta",i.l.date)
dal.set.field("tdsls401.qoor",i.l.qoor)
dal.set.field("tdsls401.cuqs",i.l.cuqs) |sales unit
dal.set.field("tdsls401.ccty","SAU")
dal.set.field("tdsls401.cvat",i.l.cvat)
dal.set.field("tdsls401.bptc","SAU")
dal.set.field("tdsls401.bpcl","")
dal.set.field("tdsls401.cwar",i.l.cwar)
dal.set.field("tdsls401.cwoc","")
dal.set.field("tdsls401.cubs",i.l.cuqs) |*
dal.set.field("tdsls401.cvbs",i.l.cvqs)
save.tdsls401 = dal.save.object("tdsls401")
dal.get.error.message(error.msg)
mess("tcnpc.common", 0, error.msg)
if save.tdsls401 = 0 then
commit.transaction()
endif
}
Reply With Quote
  #12  
Old 29th September 2018, 09:17
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 519
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Ohhh..... I thought you tried in pure AFS...
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
AFS Sales Order Insert eric.dizon AFS/DDC/OLE: Function servers 3 11th June 2014 22:46
Afs for Outbound Lines at warehouse order not working... patwanirav Blogs and Web links 1 26th July 2013 11:24
Use Afs to Create Sales Order and Sales Order Lines JerryMaWang AFS/DDC/OLE: Function servers 2 1st June 2011 22:12
Dal king1980 Tools Development 6 19th March 2010 12:10
Baan IV c4 SP18 Sales Order Lines AFS vinceco252 AFS/DDC/OLE: Function servers 6 21st July 2009 23:23


All times are GMT +2. The time now is 09:11.


©2001-2018 - Baanboard.com - Baanforums.com