laminov
28th May 2008, 14:41
How to now the name of this tape of field


eg: in table td sls041 i found this field "disc" and "ldam" but


discount Amount "disc" ..... 1
...................................... 2
...................................... 3


also i found

discount Amount "ldam" ..... 1
....................................... 2
....................................... 3

the question is : what is the name of every field ????

Kozure Ohashi
28th May 2008, 15:14
The field name is tdsls041.disc(1) and tdsls041.disc(2) and tdsls041.disc(3)

Regards,

Kozure

vahdani
29th May 2008, 02:52
Hi Laminov,

in Baan script these table array fields you must add the field index in parenthesis. For example tdsls041.disc(1), tdsls041.disc(2), ...

But be carefull: You cannot use this naming in SQL Select statements (except in newer LN Porting Sets). So following gives you compilation error:


select *
from tdsls041
where tdsls041.disc(1) = 5
selectdo
...
endselect


Here you must use something like the following instead:

select *
from tdsls041
selectdo
if double.cmp(tdsls041.disc(1), 5.0, 0.01) = 0 then
...
endif
endselect