I hope you must be trying this in VA02 with condition that can't be changed manually. Just check what is happening after the routine call. Sap must be taking the data into temp work area before the routine call and replacing back to original work area after the routine call. This is just to avoid changing the conditions that can't be edited manually.
If you are not allowed to do something manually in foreground, same thing should happen even through the code.
Check with your functional for more inputs on the type of the condition type.
where are you changing the condition value (KWERT)? I think, you need to change in Condition value routine but not in condition base value routine.
Again, You need to change in right routine which means, if you are changing value for zxxx condition, you need to change in the routines that are assigned to this condition type. You cannot change the value in zyyy condition routine for zxxx.
You can see them in VOK0 transaction - choose pricing procedures and pricing procedures- see your condition type
there are routines for condition base value and condition value make sure the place where you are making the changes to xkomv-kwert is allowed in the routine...
Xkomv-kwert is calculated and stored in ardfeld field you can find this field in global tab of your debugger.. this arbfeld will be again placed in xkwert field.. which will be carried forward from the routine..
also Xkomv is a table with header line make sure you are making changes to header line as well as the table value.
First check if you attached the routine in condition value , check with functional consultant and then if it is
Just Modify the Value of XKWERT.
use the bellow code.
loop at xkomv with key = 'KEY' "KEY = your condition key
calculate the value on xkomv-kwert.
XKWERT = val.
It will reflect on screen. Hope this will solve the problem.