acahapay
11th November 2021, 05:58
I have created a script and encounter a lot of error but I manage to solve the other error.
But for this one if ever someone knows how to fix this error.
ptdcus41020tii30(154): Error: 3 arguments expected for function 'get.sales.detials'
script:
get.sales.details(cisli310.orno,cisli310.pono)
functions:
function get.sales.details(domain tcorno i.orno,domain tcpono i.pono,domain tcpono i.sqnb)
{
i.lang = "2"
select tdsls401.*
from tdsls401
where
tdsls401.orno = {:i.orno}
and tdsls401.pono ={:i.pono}
and tdsls401.sqnb ={:i.sqnb}
and tdsls401.oltp <> 1
order by tdsls401.orno
selectdo
get.payment.terms(tdsls401.orno)
get.tax.details(tdsls401.ccty,tdsls401.cvat)
get.item.details(tdsls401.item)
discount = (tdsls401.qidl * (((tdsls401.pric * tdsls401.disc(1))/100))) +(tdsls401.qidl * (tdsls401.ldam(1)))
pvat = (tcmcs032.pvat/100)
line.amount = line.amount + (tdsls401.qidl * tdsls401.pric)
tot.inv.amt = tot.inv.amt+round((line.amount + tax.amount),2,1)
tcmcs.dll0006.decode(tot.inv.amt,
0,
decode0 ,
decode1 ,
decode2 ,
decode3 ,
i.lang )
tcmcs.dll0006.break.string( decode0 , decode1 ,decode2)
rprt_send()
endselect
}
Need to solve this error
thanks
bdittmar
11th November 2021, 09:40
Hello,
script:
get.sales.details(cisli310.orno,cisli310.pono)
i see only 2 args. sqnb is missing.
Regards
acahapay
11th November 2021, 11:19
Hi thanks for the reply but when I put sqnb i got this error
tdcus41020tii30:
std_gen -z -s ptdcus41020tii30 -qe "C:\Infor\LN\bse\tmp/tmp268652599"
bic -T 1700 -Pvariant=0 ptdcus41020tii3g -z -u -d ottstpstandard:otcmcsdll0006:otccomdll4030 -o otdcus41020tii3 -f "C:\Infor\LN\bse\tmp/tmp508387732" -pacc b61ae -qe "C:\Infor\LN\bse\tmp/tmp164715778"
ptdcus41020tii30( 154): Error: 'cisli310.pono.cisli310.sqnb' not declared
ptdcus41020tii30( 154): Error: 3 arguments expected for function 'get.sales.details'
ptdcus41020tii30( 154): Error: Unknown type of argument 2 for function 'get.sales.details'.
ptdcus41020tii30( 154): Error: Argument 2 for function 'get.sales.details' has illegal type.
ptdcus41020tii30( 154): Error: Illegal type combination: '? should be: long'
5 ERRORS REPORTED.
bdittmar
11th November 2021, 11:47
Hello,
cisli310.pono = domain tcmcs.long6
the definitions for get.sales.details(cisli310.orno,cisli310.pono)
don't fit.
Regards
acahapay
11th November 2021, 12:02
actually this is the script from Infor LN FP7
select cisli205.*
from cisli205
where cisli205._index1 inrange {:comp.f,:ttyp.f,:docn.f} and {:comp.t,:ttyp.t,:docn.t}
selectdo
line.amount = 0
tax.amount = 0
| total.amount = 0
| total.amount1 = 0
| tot.inv.amt =0
sort.field = cisli245.slso|cisli205.ityp&str$(cisli205.idoc)
select cisli245.*
from cisli245
where cisli245._index2 ={:cisli205.sfcp,:cisli205.ityp,:cisli205.idoc}
order by cisli245._index2
selectdo
get.bp.details(cisli205.ofbp)
get.address.details(cisli205.ofad)
get.sales.order.details(cisli245.slso,cisli245.pono,cisli245.sqnb)
get.contactperson.details()
get.ae.details(tdsls400.crep)
endselect
endselect
}
function get.sales.order.details(domain tcorno i.orno,domain tcpono i.pono,domain tcpono i.sqnb)
{
i.lang = "2"
select tdsls401.*
from tdsls401
where
| tdsls401._index1 = {:i.orno}
tdsls401.orno = {:i.orno}
and tdsls401.pono ={:i.pono}
and tdsls401.sqnb ={:i.sqnb}
and tdsls401.oltp <> 1
order by tdsls401.orno
selectdo
get.payment.terms(tdsls401.orno)
get.tax.details(tdsls401.ccty,tdsls401.cvat)
get.item.details(tdsls401.item)
discount = (tdsls401.qidl * (((tdsls401.pric * tdsls401.disc(1))/100))) +(tdsls401.qidl * (tdsls401.ldam(1)))
pvat = (tcmcs032.pvat/100)
| line.amount =((tdsls401.qidl * tdsls401.pric) - discount)
line.amount = line.amount + (tdsls401.qidl * tdsls401.pric)
tax.amount = tax.amount + (pvat * (line.amount))
| tot.inv.amt = tot.inv.amt+tax.amount
| tot.inv.amt = tot.inv.amt + round((line.amount + tax.amount),2,1)
| total.amount = round((line.amount + tax.amount),2,1)
| total.amount1 = total.amount1+round((line.amount + tax.amount),2,1)
| tot.inv.amt = tot.inv.amt+round((line.amount + tax.amount),2,1)
| tcmcs.dll0006.decode(tot.inv.amt,
| 0,
| decode0 ,
| decode1 ,
| decode2 ,
| decode3 ,
| i.lang )
| tcmcs.dll0006.break.string( decode0 , decode1 ,decode2)
rprt_send()
endselect
}
What I need is a script that will accept in Infor LN 10.6
that is why I change some table because the old table in FP7 is already obsolete
Thank you
andreas.toepper
11th November 2021, 12:30
ptdcus41020tii30( 154): Error: 'cisli310.pono.cisli310.sqnb' not declared
It's a typo (a syntax error). Arguments are seprarated by "," (comma), not by "." (decimal point).
acahapay
12th November 2021, 07:36
Here is the code but they have a error.
Compilation Failed
tdcus41020tii30:
std_gen -z -s ptdcus41020tii30 -qe "C:\Infor\LN\bse\tmp/tmp471108085"
bic -T 1700 -Pvariant=0 ptdcus41020tii3g -z -u -d ottstpstandard:otcmcsdll0006:otccomdll4030 -o otdcus41020tii3 -f "C:\Infor\LN\bse\tmp/tmp651769509" -pacc b61ae -qe "C:\Infor\LN\bse\tmp/tmp552373976"
ptdcus41020tii30( 154): Error: 3 arguments expected for function 'get.sales.details'
1 ERROR REPORTED.
select cisli305.*
from cisli305
where cisli305._index1 inrange {:comp.f,:ttyp.f,:docn.f} and {:comp.t,:ttyp.t,:docn.t}
selectdo
line.amount = 0
tax.amount = 0
| total.amount = 0
| total.amount1 = 0
| tot.inv.amt =0
sort.field = cisli310.orno|cisli205.ityp&str$(cisli205.idoc)
select cisli310.*
from cisli310
where cisli310._index1 ={:cisli305.sfcp,:cisli305.tran,:cisli305.idoc}
order by cisli310._index1
selectdo
get.bp.details(cisli305.ofbp)
get.address.details(cisli305.ofad)
get.sales.details(cisli310.orno,cisli310.pono)
get.contactperson.details()
get.ae.details(tdsls400.crep)
endselect
endselect
}
function get.sales.details(domain tcorno i.orno,domain tcpono i.pono,domain tcpono i.sqnb)
{
i.lang = "2"
select tdsls401.*
from tdsls401
where
| tdsls401._index1 = {:i.orno}
tdsls401.orno = {:i.orno}
and tdsls401.pono ={:i.pono}
| and tdsls401.sqnb ={:i.sqnb}
and tdsls401.oltp <> 1
order by tdsls401.orno
selectdo
get.payment.terms(tdsls401.orno)
get.tax.details(tdsls401.ccty,tdsls401.cvat)
get.item.details(tdsls401.item)
discount = (tdsls401.qidl * (((tdsls401.pric * tdsls401.disc(1))/100))) +(tdsls401.qidl * (tdsls401.ldam(1)))
pvat = (tcmcs032.pvat/100)
| line.amount =((tdsls401.qidl * tdsls401.pric) - discount)
line.amount = line.amount + (tdsls401.qidl * tdsls401.pric)
| tax.amount = tax.amount + (pvat * (line.amount))
| tot.inv.amt = tot.inv.amt+tax.amount
| tot.inv.amt = tot.inv.amt + round((line.amount + tax.amount),2,1)
| total.amount = round((line.amount + tax.amount),2,1)
| total.amount1 = total.amount1+round((line.amount + tax.amount),2,1)
tot.inv.amt = tot.inv.amt+round((line.amount + tax.amount),2,1)
tcmcs.dll0006.decode(tot.inv.amt,
0,
decode0 ,
decode1 ,
decode2 ,
decode3 ,
i.lang )
tcmcs.dll0006.break.string( decode0 , decode1 ,decode2)
rprt_send()
endselect
}
andreas.toepper
12th November 2021, 11:30
get.sales.details(cisli310.orno,cisli310.pono) - two parameters
function get.sales.details(domain tcorno i.orno,domain tcpono i.pono,domain tcpono i.sqnb) - three parameters
ptdcus41020tii30( 154): Error: 3 arguments expected for function 'get.sales.details'
-> correct error message