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 22nd September 2011, 02:10
ppchong ppchong is offline
Junior Member
 
Join Date: Aug 2009
Posts: 9
ppchong is on a distinguished road
Baan: B40 c90 - DB: oracle - OS: windows vista
Red face AFS fail to delete record in Maintain Estimated End Items

Hi Baan Expert,

i face a problem of using the AFS to delete record in a session call "Maintain Estimated End items (pspmg0113m000). Found that not able to select/mark a record and delete it. Details of the script as below :

*****************************************************
long retValFind, retValMark, retValDelete, retVal1, retVal2,rc

stpapi.put.field("pspmg0113m000", "pspmg013.orno", strip$(str$(ornoTxt)))
stpapi.put.field("pspmg0113m000", "pspmg013.cntr", strip$(str$(pspmg801.cntr)))

retValFind = stpapi.find("pspmg0113m000",error.msg)


if retValFind then |found


rc = stpapi.change.view("pspmg0113m000",error.msg)
retValMark = stpapi.Mark("pspmg0113m000")


if retValMark then
retValDelete = stpapi.delete("pspmg0113m000", true, error.msg)


if not isspace(error.msg) then
retval2 = stpapi.recover("pspmg0113m000", recover.msg)
Error.desc = "Error occur in Maintain Estimated end item -- during Delete container"
brp.ready(brp1.id)
else

|** Production size will be changed; Continue ?
stpapi.enum.answer("pspmg0113m000", "pspmg01132", tcyesno.yes)
stpapi.continue.process("pspmg0113m000",error.msg)


endif
endif


else

Error.desc = "Error occur in maintain Estimated end item FIND process -- during Delete container"
brp.ready(brp1.id) |**** send_error_report
endif

stpapi.end.session("pspmg0113m000")



*********************************************


Regards & Thanks
chong
Reply With Quote
  #2  
Old 22nd September 2011, 14:47
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,905
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
To me it looks this easy:
Code:
stpapi.put.field("pspmg0113m000", "pspmg013.orno", strip$(str$(ornoTxt)))
stpapi.put.field("pspmg0113m000", "pspmg013.cntr", strip$(str$(pspmg801.cntr)))
retValFind = stpapi.find("pspmg0113m000",error.msg)


if retValFind then |found
stpapi.enum.answer("pspmg0113m000", "pspmg01132", tcyesno.yes)
retValDelete = stpapi.delete("pspmg0113m000", true, error.msg) 
endif
stpapi.end.session("pspmg0113m000")

Granted we do no use the session, but just looking at the session on my 4c4 system this is what I would expect the code to look like. So for a delete - find the record, answer all the possible questions that might get asked, and then delete the record. No reason for change view, mark record or the continue. I did remove the error checking on the delete just to shorten the code.
__________________
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
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
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Handling Unit functionality baazigar Distribution, Transportation & Warehousing 4 19th February 2012 15:54
AFS fail to delete record in Maintain Estimated End Items ppchong AFS/DDC/OLE: Function servers 1 21st September 2011 13:16
Maintain Outbound in AFS fails for Order Type: "Collect Order" FoxZapper AFS/DDC/OLE: Function servers 7 3rd November 2005 14:45
How to delete record in scheme? yurong Tools Administration & Installation 4 30th December 2004 23:35


All times are GMT +2. The time now is 04:54.


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