VishalMistry
10th June 2019, 18:31
Hi,

NOTE: THIS IS REGARDING BAAN IVC4

I was trying to create items from csv file and then update the cost price through AFS for sessions ticpr2210m000 but no luck. I also tried AFS for update cost price session ticpr2220m000 but without any good luck.

The strange thing is i am not getting any error message. Then I came across a thread (i do not remember) that mentioned dll ticprdll2001. I tried to do bic_info on this dll but could not find anything. I think this dll exists in LN.

Is there any similar DLL in Baan IVc4 through which I can calculate cost price of item? Or, can someone explain with example how to use session ticpr2210m000 or ticpr2220m000 to update cost price.

I have crawled all the threads related to this cost price update stuff but without any luck.

Any help will be highly appreciated in this regard.

Vishal

BaanInOhio
11th June 2019, 14:18
Try to call ticpr2210 (background) from your session. The ticpr2210 script will auto load some expected extern variables from the caller and attempt to update the cost price when running in background. Make sure that you use these exact field names and define all as extern.

I did this a long time ago so your version of ticpr2210 may differ, but it worked for me back then.


table tiitm001

extern domain tcyesno actualize.copr | update cost prices?
extern domain tccpcc calc.cd fixed | cost price calc code
extern domain tcdate calc.date | cost price calc date
extern domain tcccmt calc.meth | cost price calc method
extern domain tccitg citg.f fixed, citg.t fixed | item group
extern domain tcitem item.f fixed, item.t | item
extern domain tccuni cntr.f fixed, cntr.t fixed | container
extern domain tcyesno optm.oqan | optimized order qty
extern domain tcyesno optm.oqan.sub | optimized order qty sub
extern domain tiqep1 calc.oqan | order quantity


| read tiitm001 fields from imported item

calc.item.f = tiitm001.item
calc.item.t = tiitm001.item
calc.cntr.f = tiitm001.cntr | or ' ' when containers not used
calc.cntr.t = tiitm001.cntr | or 'zzz' when containers not used
calc.citg.f = tiitm001.citg
calc.citg.t = tiitm001.citg
calc.cd = ticpr000.sccc | or specific calc code
calc.meth = tcccmt.single.level | can also use tcccmt.top.down
calc.date = date.num() | or specific date
optm.oqan = tcyesno.yes
optm.oqan.sub = tcyesno.yes
calc.oqan = 0
actualize.copr = tcyesno.yes
zoom.to$("ticpr2210s000", z.session, prog.name$, "", 0)

mark_h
11th June 2019, 14:48
In this thread http://www.baanboard.com/baanboard/showthread.php?t=23612&highlight=ticpr2210m000+afs it looks like a couple of them got the session working thru afs by writing the report to a file.

VishalMistry
11th June 2019, 17:25
Hi BaanInOhio,

Worked like a charm. Thanks a lot. :)

Vishal

avpatil
17th June 2019, 23:26
I had used load dll , exec dll fucntion to run in type 4 programs and they have worked without any issues, an alternative to AFS