Sandy Blondino
22nd September 2011, 18:39
Hello everyone,

I'm getting an odd error when running a script I wrote using the DAL functionality.
I'm using the DAL tdsls401 and trying to mimic the functionality of session tdsls4122m000 "Change Prices and Discounts after Delivery".

It's not working and the error I trapped is "ptdslsdll40260", which seems to be a DLL. We do have that DLL installed.

I'm just wondering what it means when the error is the name of a DLL?
What's the true error?

Thanks for any help,
Sandy

Clecuyer
22nd September 2011, 21:07
Hello, have you make a trace of execution , the way of this problem can happear inside !
and send my the result , if you want !

best regard
c.Lecuyer

Sandy Blondino
22nd September 2011, 22:56
I'm not sure how to do a trace in LN.
How do I do that?

Thanks,
Sandy

Clecuyer
23rd September 2011, 14:17
(sorry for my bad english, i'm french !)

can you send me your script and the error message please .

Your OS windows or unix , or another ?

on windows or unix i can help you for do the trace

Best regard

Sandy Blondino
23rd September 2011, 15:52
Here is the script:
declaration:

table ttdsls401 | Sales Order Lines
table ttdsls406 | Sales Order Actual Delivery Lines

long error.found, error.code
extern domain tcmcs.str40 error.mess, recover.msg
long ret.val

domain tcorno orno
domain tcpono pono
domain tcpono sqnb
domain tcpric pric
long i
domain tcdisc disc(11)
domain tcdate del.date



#include <bic_dam>
#include <bic_tt>

|****************************** FIELD SECTION

|****************************** CHOICE SECTION choice.exec.cont.process:
on.choice:

|change price of sales order line
change.price()

|****************************** FUNCTION SECTION
functions:

function change.price()
{
db.retry.point()
orno = "B00000009"
pono = 10
sqnb = 0
pric = 300

select tdsls401.*
from tdsls401 for update
where tdsls401.orno = :orno
and tdsls401.pono = :pono
and tdsls401.sqnb = :sqnb
selectdo
del.date = tdsls401.ddta
dal.change.object("tdsls401")
if tdsls401.pric <> 300 then
dal.set.field("tdsls401.orno", orno)
dal.set.field("tdsls401.pono", pono)
dal.set.field("tdsls401.sqnb", sqnb)
dal.set.field("tdsls401.ofbp", "SB0840")
dal.set.field("tdsls401.item", " 21105N-AA-03/D486P")
dal.set.field("tdsls401.qoor", 3.00)
dal.set.field("tdsls401.cuqs", "PCS")
dal.set.field("tdsls401.opol", tcyesno.no)
|dal.set.field("tdsls401.sdsc", tcyesno.yes)
dal.set.field("tdsls401.pric", pric)
dal.set.field("tdsls401.porg",tdgen.porg.manual)
dal.set.field("tdsls401.ddta", del.date)
dal.set.field("tdsls401.rdta", del.date)
for i = 1 to 11
dal.set.field("tdsls401.disc", disc(i), 0.00)
dal.set.field("tdsls401.ldam", disc(i), 0.00)
endfor
dal.set.field("tdsls401.dorg", tdgen.dorg.manual, 1)
endif

error.found = dal.save.object("tdsls401")

if error.found then
error.mess = dal.error.file
else
commit.transaction()
endif
endselect
commit.transaction()
}


Here is the error:
ptdslsdll40260 (that's it)

We run Windows and MS SQL Server.

Your english is fine.
I had 6 years of french in school and barely remember any, so you're doing better than me.

Sandy

Clecuyer
24th September 2011, 10:41
Baan IV (no DAL !)
Baan V
Baan VI

I analyze your script and i seach the debug information for you !

several methode (less than 3) in baan V/VI

1 ) you can use the debug mode throw the icon appear in the right down , ....

2) you can trace the execution by the bshell command in worktop customer when you lanch the bw , a command create a debug file only the session is called in bshell command (the interesting)

3) debug mode , need the programmer tools for put the programm in debug mode + compiling

The result of this 3 methode are storage in ${bse}\tmp


Send me a Mail , at this adress, in fact i need your mail for sent a attached file (screen shot or pdf file..) : christophe.lecuyer8@orange.fr

best regard

Clecuyer
25th September 2011, 19:30
your target of this script is just to make an update of table tdsls401, you can do a sql update when use sql entreprise manager , you need to respect the value of eahc field (work made by the DAL when you pass by baan script) but is a simply way if your are very busy and this need is urgent !

i found the trace mode , i wait after your answer about version of BAAN / ERP LN , and porting set.

xxx = Num societe

Value() => find value in domain enumerated ...

update ttdsls401xxx set t_ofbp='SB0840',
t_item=' 21105N-AA-03/D486P',
t_qoor=3,
t_cuqs='PCS',
t_opol=1,
t_sdsc=2,
t_pric=300,
t_porg=value(tgen.porg.manual),
t_rdta=t_ddta,
t_disc='0',
t_ldam='0',
t_dorg=value(tdgen.dorg.manual)
where t_orno="B00000009"
and t_pono=10
and t_sqnb=0
and t_pric<>300;

vinceco252
26th September 2011, 17:13
I think she has the fixed values in the script for testing purposes. I believe she wants this to be a program where she would pass the order, etc...

Sandy Blondino
26th September 2011, 17:34
Vince,
That's right. I just want to test a proof of concept. Eventually, the values will be passed in or read from a file.

Sandy

vinceco252
26th September 2011, 17:37
Just trying to point out that I didn't think SQL was going to work for you (and I know it won't in your environment...). Not that I have an answer myself...