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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 21st August 2017, 14:13
VishalMistry's Avatar
VishalMistry VishalMistry is offline
Guru
 
Join Date: Dec 2004
Location: India, Gujarat
Posts: 573
VishalMistry has a little shameless behaviour in the past
Baan: Baan IV, ERPLn - DB: SQL Server 2000 / 2008 - OS: Windows Server 2003 / 2008
Wink Unable to get error message in AFS call

Hi all,

I want to bulk update order system system (tiitm001.osys) to MRP. For this I am passing a text file that contains list of items.

I am deliberately passing an item with MPS order system to check if the system returns same error message as if I am working with Item master session (tiitm0101m000). But, If I check value of error.desc, it remains empty. In fact when I try to change the order system directly through session, I get the error message "Item found in MPS". My code is as given below:

stpapi.put.field("tiitm0101m000", "tiitm001.osys", str$(tcosys.mrp))
stpapi.save("tiitm0101m000", error.desc)

Can anybody guide me how to get the error message ?

Vishal
Reply With Quote
  #2  
Old 21st August 2017, 15:06
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Have you tried stpapi.get.mess.code? Are you sure it is an error and not just a warning?
__________________
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 21st August 2017, 15:26
VishalMistry's Avatar
VishalMistry VishalMistry is offline
Guru
 
Join Date: Dec 2004
Location: India, Gujarat
Posts: 573
VishalMistry has a little shameless behaviour in the past
Baan: Baan IV, ERPLn - DB: SQL Server 2000 / 2008 - OS: Windows Server 2003 / 2008
Hello Mark,

Yes. It is an error. I tried to execute the session directly and change the order system, it gave an error message and reverted back to old order system.

I tried to check the value of error as well as mess.
mess = stpapi.get.mess.code("tiitm0101m000", error)

Both are empty after stpapi.save.

Vishal
Reply With Quote
  #4  
Old 21st August 2017, 16:14
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,929
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Have you tried stpapi.update versus save?
__________________
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
  #5  
Old 21st August 2017, 16:36
VishalMistry's Avatar
VishalMistry VishalMistry is offline
Guru
 
Join Date: Dec 2004
Location: India, Gujarat
Posts: 573
VishalMistry has a little shameless behaviour in the past
Baan: Baan IV, ERPLn - DB: SQL Server 2000 / 2008 - OS: Windows Server 2003 / 2008
Hi Mark,

My problem got solved after replacing stpapi.save with stpapi.update call.

Thank you for your guidance.

Vishal
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 call session specific commands in afs jojovalenton AFS/DDC/OLE: Function servers 9 26th March 2014 14:54
AFS stuck on synchronize API call cyrilchacko AFS/DDC/OLE: Function servers 2 18th November 2010 16:19
Call a Shell using AFS wilsonphilips AFS/DDC/OLE: Function servers 1 7th September 2006 01:13
Cant Generate Receipt number when AFS call alibaba AFS/DDC/OLE: Function servers 4 4th September 2006 11:36
ERP: problems function call and AFS spartacus AFS/DDC/OLE: Function servers 8 15th November 2002 03:45


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


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