Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
50%
Handover everything to System Integrator from drawing BP till implementation of ERP
0%
Hire more inhouse skilled & capable IT Resource to work directly with SI
50%
Rely on SI Architects/Consultants
0%
Total votes: 4

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 4th April 2005, 16:21
jmathew jmathew is offline
Senior Member
 
Join Date: Aug 2003
Location: Middle East
Posts: 184
jmathew is on a distinguished road
Baan: Baan IV C4 - DB: Oracle 8i - OS: Windows 2000
Cost update not working through AFS

Hi,

I am trying to update cost of new purchased items through the session ticpr2210m000 using AFS. The code that is used is given below, can someone help me or is this not possible through AFS?

Code:
stpapi.put.field("ticpr2210m000", "item.f", item)
stpapi.put.field("ticpr2210m000", "item.t", item)
stpapi.put.field("ticpr2210m000", "calc.cd", sccc)
stpapi.put.field("ticpr2210m000", "calc.meth", str$(3))
stpapi.put.field("ticpr2210m000", "actualize.copr", str$(1))
stpapi.set.report("ticpr2210m000", "rticpr221001000", prdev, error.msg)
if isspace(error.msg) then
    stpapi.continue.process("ticpr2210m000", error.msg)
endif
__________________
Regards,
John.
Reply With Quote
  #2  
Old 6th April 2005, 14:50
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,447
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Well - it should be possible. Are you getting any error messages? You might also want to try stpapi.get.mess.code after the continue. I know I use this on my manual transfer session to see if there was a warning on why the transfer might not take place.
__________________
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
  #3  
Old 7th April 2005, 07:32
jmathew jmathew is offline
Senior Member
 
Join Date: Aug 2003
Location: Middle East
Posts: 184
jmathew is on a distinguished road
Baan: Baan IV C4 - DB: Oracle 8i - OS: Windows 2000
No error messages

Hi Mark,

I debugged the program and it does not give any error messages at all, but the update is not taking place. I tried a lot, but not successful. Can someone try the same and see if the problem exists.

The result of AFS debug is also attached with this mail from the afs.log file.
Attached Files
File Type: rtf afs_log.rtf (1.5 KB, 52 views)
__________________
Regards,
John.

Last edited by jmathew : 7th April 2005 at 09:35.
Reply With Quote
  #4  
Old 7th April 2005, 11:00
kbartelds kbartelds is offline
Senior Member
 
Join Date: Feb 2003
Location: Netherlands
Posts: 264
kbartelds is on a distinguished road
Baan: B40c4 - DB: Oracle 7 - OS: Sun Solaris
Did you check the print queue ttaad320 if there is any output? Did you check whether costprice has already been calculated for this date?

Regards,
Klaas
Reply With Quote
  #5  
Old 7th April 2005, 14:42
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,447
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I noticed that this session zooms to tipcr2220s000 - is it possible for you to run ticpr2220m000 instead? Not familiar enough with these sessions. It could be that you also have to set the report for ticpr2220s000, before it gets called.
__________________
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
  #6  
Old 7th April 2005, 15:19
shaboo's Avatar
shaboo shaboo is offline
Senior Member
 
Join Date: Dec 2002
Location: U.S. of A
Posts: 182
shaboo is on a distinguished road
Baan: BaanIVc4 - DB: SQL Server, Oracle - OS: Win2003, Sun
We created a Function Server based BOI that calculates and update cost price calculation based on ticpr2210m000 and it has been working just fine. The issue we faced during it was related to report handling and we wrote the report to disk to solve the issue. Here is how our function server call look in our BOI DLL.

Code:
    spool.fileout = "costcalc.log" & "." & dte$()
    stpapi.put.field("ticpr2210m000", "spool.fileout", spool.fileout)
    f2210m000.set.report("rticpr221001000", "ASCIF" , g.fs.error.message )
    f2210m000.continue( g.fs.error.message )
Reply With Quote
  #7  
Old 8th April 2005, 13:38
Pieter van de L's Avatar
Pieter van de L Pieter van de L is offline
Member
 
Join Date: Jun 2004
Location: Netherlands (Eindhoven)
Posts: 31
Pieter van de L is on a distinguished road
Baan: B50_c-baan4-erpln - DB: oracle-mssql - OS: unix / as400-windows
Solution i use

We are using baan V and i update the costprices with the following script.
Code:
dev.log = "ASCIF"
spooler.for.log = spool.open("",dev.log,0)
spool.fontnumber = 2
spool.pg.length = 66

function do.calculation()
{
	domain	tcdsca	mes1, mes2, mes3

	stpapi.put.field("ticpr2210m000", "citg.f", "      ")
	stpapi.put.field("ticpr2210m000", "citg.t", "zzzzzz")
	stpapi.put.field("ticpr2210m000", "item.f", tcibd977.item)
	stpapi.put.field("ticpr2210m000", "item.t", tcibd977.item)
	stpapi.put.field("ticpr2210m000", "calc.cd", "001")
	stpapi.put.field("ticpr2210m000", "calc.meth", str$(etol(tcccmt.single.level)))
	stpapi.put.field("ticpr2210m000", "calc.date", str$(utc.num()))
	stpapi.put.field("ticpr2210m000", "only.new.items", str$(etol(tcyesno.no)))
	stpapi.put.field("ticpr2210m000", "actualize.copr", str$(etol(tcyesno.yes)))

	stpapi.set.report("ticpr2210m000", "rticpr221001000", "ASCIF", mes1)

	if isspace(mes1) then
		stpapi.form.command("ticpr2210m000", 5, "continue.process", mes2)
		spooler.save = spool.id
		spool.id = spooler.for.log
		while true
			mes3 = stpapi.get.mess.code("ticpr2210m000", mes2)
			if isspace(mes3) and isspace(mes2) then
				break
			endif
				spool.pr.line = "COSTPRICE "&tcibd977.item&" "& mes2 
				spool.line()
				mes2 = ""
				mes3 = ""
		endwhile
		spool.id = spooler.save
	else
		message("Report not found")
	endif
	stpapi.end.session("ticpr2210m000")
Reply With Quote
Sponsored Links
  #8  
Old 9th April 2005, 08:07
jmathew jmathew is offline
Senior Member
 
Join Date: Aug 2003
Location: Middle East
Posts: 184
jmathew is on a distinguished road
Baan: Baan IV C4 - DB: Oracle 8i - OS: Windows 2000
Cost price update not working still!!!

Hi all,

I tried all the option given and still the cost update does not work. For the same item when i manually run the session ticpr2210m000 the cost is updated. I am still not sure why it is not working.
__________________
Regards,
John.
Reply With Quote
  #9  
Old 10th April 2005, 03:02
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,447
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Contact Baan - it may be that you need updated stpapi libraries or a new session object.
__________________
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
  #10  
Old 8th July 2005, 06:06
sant123's Avatar
sant123 sant123 is offline
Member
 
Join Date: Mar 2002
Location: USA
Posts: 77
sant123 is on a distinguished road
Baan: B4C4 - DB: Oracle9i - OS: AIX 5.2
STD cost doen't get calculated using AFS

James,

Did you get this working??

I am using the similar code to calculate the cost, I don't get any errors but nothing happens, std cost doesn't get updated.


I am on baan4c4, sp18 on tools & sp13+weeks patch on application.


Appreciate any help.

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
AFS to update Sales Order Line Discount Percentage DStroud AFS/DDC/OLE: Function servers 4 18th March 2005 14:59
AFS not working after Service Pack update SriksAdi AFS/DDC/OLE: Function servers 8 6th January 2005 09:38
Std cost update Problem! r_aamir Manufacturing & Supply Chain 1 14th November 2003 09:24
How to update Estimate Cost ??? rini pudjiastut Distribution, Transportation & Warehousing 0 20th October 2003 07:56
Find not working in AFS pinakin AFS/DDC/OLE: Function servers 2 29th November 2002 06:43


All times are GMT +2. The time now is 19:13.


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