how are your variables defined and what values are causing this to happen? I suspect that v_verz1 is packed decimal and is too small to hold the result of the subtraction. The right fields look like dates which are 8 digits so the v_verz1 should be able to hold 8 digits in case p_keydt = 0.
try defining it as: data v_verz1(8) as type p.
Add a comment