Return error

nate100

Member
I have the following code:

on write of so_mstr new new-so old old-so
do:
if new-so.so_cust <> old-so.so_cust
then display new-so.so_cust old-so.so_cust.
return error.

end.

for each so_mstr
where so_domain = "us1"
and so_nbr = "1000343" exclusive-lock:
update so_cust with frame a.
end.


--------
Say if so_cust was 1111 and I updated it to 1234. I cannot understand how it is that the return error keeps the value at 1111 if the value has been updated. I did not think return error had the ability.
 
do:
if new-so.so_cust <> old-so.so_cust
then display new-so.so_cust old-so.so_cust.
return error.

end.

Lets look at the code block.
if new-so.so_cust <> old-so.so_cust
then /* we want to see it */ display new-so.so_cust old-so.so_cust.
return error. /* this statement is firing what ever, it is not part of the if statement */
/* why are you setting the error status to be true ??? Do you need the flag? or did you want to simply drop out aka return no-apply ?? */
 
Back
Top