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 13th January 2003, 14:59
Guillaume.G's Avatar
Guillaume.G Guillaume.G is offline
Member
 
Join Date: Aug 2002
Location: Lyon - France
Posts: 69
Guillaume.G is on a distinguished road
Baan: Triton3.1, BaanIV,baan ERP and ERP Ln - Workflow - DB: Oracle(7 to 10i), SQLserver(6.5 to 2005), Bisam - OS: NT,2000, 2003, Unix(Solaris,AIX,HPUX)- Linux
Copy (option dupl.occur) with AFS ??

Hi,

I want to simulate the dupl.occur action with the AFS.
But after several try, it's not work !!!!!

In my case i want to copy à record of tipcs2121m000

So what is the solution to user dupl.occur with AFS ???


Thank you for your help


Guillaume.G
Reply With Quote
  #2  
Old 13th January 2003, 16:56
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Not sure it is possible.

I think this is one of the features that is not possible using AFS. Like in this post what I recommend trying is to do a find of the record you want to copy, then put the new key fields(or item), then try a insert. This may work. If you do try it I would be interested in knowing if it did work.

Good Luck!

Mark
Reply With Quote
  #3  
Old 13th January 2003, 17:16
Guillaume.G's Avatar
Guillaume.G Guillaume.G is offline
Member
 
Join Date: Aug 2002
Location: Lyon - France
Posts: 69
Guillaume.G is on a distinguished road
Baan: Triton3.1, BaanIV,baan ERP and ERP Ln - Workflow - DB: Oracle(7 to 10i), SQLserver(6.5 to 2005), Bisam - OS: NT,2000, 2003, Unix(Solaris,AIX,HPUX)- Linux
Dupl.occur is possible but ....

Hi mark_h,

I try your solution, but it's not work
because the field of the screen is not in the API field buffer so the fields are empty (==> Error message )
Your idea is correct if you make a stpapi.get.field for all field of all form of the session
and for the copy you make a put field of all field (with modify value) and finish with an insert.
But the very big problem is the code of the choice.dupl.occur of the session is NOT executed !!!!

So i find an another solution which it's possible only if you have the program script std. and with stpapi.application.option.

the solution is :
you create a user.9 option in the std script (tipcs2121)
choice.user.9
on.choice
if api.mode then
execute(dupl.occur)
endif

And in the specific program
stpapi.put.field(ARTPCS,"tipcs021.cprj",itm.cprj)
stpapi.put.field(ARTPCS,"tipcs021.item",itm.item)
stpapi.put.field(ARTPCS,"tipcs021.dsca",itm.dsca)
stpapi.application.option(ARTPCS, 1, 9, error)
if error <> "" then
retsave = stpapi.save(ARTPCS,error)
if retsave = 0 then
stpapi.recover(ARTPCS,err.recover)
message.erreur = "Pb sauvegarde Article :"
& strip$(error)
send.mess(message.erreur,"----")
retour = 7
endif
endif
stpapi.end.session(ARTPCS)


Best Regard

Guillaume.G
Reply With Quote
  #4  
Old 13th January 2003, 17:25
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Guillaume -
Good Idea
Also, you can add a section like that to the standard code without modifying the source code at all using the wrapper tools out there - QKEY, RMCgen and the freeware version on these boards: 'rush'.

Good thinking outside of the box - so much of the AFS programming needs that.
Reply With Quote
  #5  
Old 13th January 2003, 18:05
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Talking Excellent Solution

Great solution Guillaume.G and thanks to Lisa for pointing out how the extended source solutions could work with this. I have to keep this in mind .

Mark
Reply With Quote
  #6  
Old 21st January 2005, 09:36
goooch goooch is offline
Member
 
Join Date: Mar 2003
Posts: 74
goooch will become famous soon enough
Baan: Baan 4c4 - DB: Informix - OS: AIX
Hi
And what about stpapi.application.option( "...", 1, -32 (or any form option relative to user.0), error ) ?
(looks like it works, tdsls4102s000 raises copy session tdsls4201s000, for example, but I did not play with it enough time, sorry)
Reply With Quote
  #7  
Old 21st January 2005, 14:49
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Interesting concept. The instructions mention executing only user.0 thru user.9. I just tested stpapi.application.option("tibom8411m000",1,-25,msg) to see if it would print a report(of course the print option was set on this session) - it did work.

If you did use it just be prepared that this functionality might not work or exist in the future. Of course it is not like future releases will never break API function server. I have not seen any new documentation on API commands, so good find Goooch. Others may want to test this and report back.

Mark
Reply With Quote
  #8  
Old 13th June 2006, 22:00
mefreakboy mefreakboy is offline
Newbie
 
Join Date: Mar 2006
Posts: 1
mefreakboy is on a distinguished road
Baan: BaanIV - DB: All - OS: All
If anybody is interested, I have tried the above suggestion and it does work for copying records. I am using a "template" supplier to copy to a new temporary supplier that is being handled by file transfers, replacing only the supplier code and name fields. Here's a sampling of the code for B4c4:

tccomf2101m000.put.Supplier(titce900.suno)
if tccomf2101m000.find() <> 1 then
|error - can't find supplier template
else
tccomf2101m000.put.Supplier(temp.suno)
tccomf2101m000.put.Name.tccom020.nama(temp.nama)
stpapi.application.option( "tccom2101m000", 1, -32, err.mess)
tccomf2101m000.save(err.mess)
tccomf2101m000.end()
endif

Thanks to all those who hinted at a solution here. There are way too many fields in the supplier table to make this a palatable experience.

Carey
Reply With Quote
  #9  
Old 11th June 2007, 15:36
baangeek77 baangeek77 is offline
Junior Member
 
Join Date: May 2006
Posts: 9
baangeek77 is on a distinguished road
Baan: bivc4 - DB: oracle 9i - OS: w2k
beautiful!

i realize this is a year old (almost exactly a year old i just noticed ) but this is exactly what i was looking for , thx so much mefreakboy! just curious, where can I find a list of codes to use for stapi.application.option. in other words how do you know -42 is for copy and -25 is for print? if any one knows i'd appreciate it. Thx!

-bg77
Reply With Quote
  #10  
Old 12th June 2007, 14:30
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
You get the numbers from the maintain form, then standard options. This gives you a list with the number associated with that option.
__________________
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
  #11  
Old 11th March 2017, 16:34
garias's Avatar
garias garias is offline
Member
 
Join Date: Feb 2002
Location: Ecuador
Posts: 44
garias is on a distinguished road
Baan: Baan IV b2, c2, c2 mcurr, Baan V ERP, Infor LN - DB: Oracle, Informix, SQL - OS: AIX, Solaris, Windows NT
Any option for Infor LN

Since stpapi.application.option does not work for Infor LN
which option we could use to enable the dupl.occur command in a session called by AFS

Regards

Gerard
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
AFS - Print Order Documents BurghMan AFS/DDC/OLE: Function servers 5 29th October 2004 21:07
afs basics, please comment yogrind AFS/DDC/OLE: Function servers 1 21st April 2004 23:07
AFS (tfgld1101m000) don´t run fine since a user with a Dynamic menu (DEM) garias AFS/DDC/OLE: Function servers 4 20th January 2004 14:24
AFS : do we need BOI installed to use AFS rohan_rege AFS/DDC/OLE: Function servers 7 17th August 2002 09:54
Using AFS in reportscript jdhaan AFS/DDC/OLE: Function servers 4 22nd May 2002 08:22


All times are GMT +2. The time now is 18:39.


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