dhruv_x0
26th October 2010, 14:35
Hi....
I did a validation....it was that line wise sum of a field "price" in satellite session should always be less than a field "amount " in header session....but now i m unable to save the records.......as all above stuff i hv done was in "Check.input" and when we save the records "check.input" executed again and satellite sessions 'price' becomes greater....how can i solve that.......

mark_h
26th October 2010, 15:25
Post the relevant code - maybe someone will see something that could fix it.

dhruv_x0
26th October 2010, 15:35
Hi... Mark
This is the Code which i hv written.........


field.timsl403.prce:
check.input:

select timsl404.*
from timsl404
where timsl404.item={:timsl403.item}
selectdo
total1=timsl403.prce
total=total+total1
if(total>timsl404.amnt) then
total=total-timsl403.prce
message("Price Can't Be Greater")
set.input.error("",e)
endif

endselect


Here timsl403.prec is a satellite field which is compared Against timsl404.amnt of Header......validation is taking place but problem arises during save because of "Check.Input"

mark_h
26th October 2010, 17:56
Where is total1 initialized? The first think that went through my mind was during the save you could set a flag and skip this code. Probably a better way in LN - which I do not know.