You're overcomplicating it..
No need for a button, this or that.. lol
Lets take a step back and make sure we're on the same page.
At this point, you do have your calculated sum [of two fields] being displayed to the user on some page/screen?
EditView, or DetailView in a particular module, right?
If that is correct so far, then what you want to do is create a custom field in that same module, and for entertainment purposes, also place that custom field in your view file layout.. In simplicity, you want that the end user to see that custom field and be able to use it (enter data in it if they're in the EditView) and see it on the DEtailView page.. This step isn't technically neccessary but it greatly helps the devloper 'see' things working, and identify where at what stage a problem exists, if things aren't working right...
Once you have this new custom field created, and function without problem which means you test it a few times, in EditView you enter data in this field for a record or two, and then verify that it is saved to the db, and that it is displayed in the DetailView, and also that it is displayed and retrieved within EditView when you come back to the EditView 5 mins later..
There are alot of ways to pass/populate the data to that field, from many different places as well which include svr side php code or even on the client side via js; however, the simplest solution and how I would do it is just passing the data between the two variables which is this single line of code: $SCAN_TOTAL_C = $sumfngebuehr ;
Pretty easy eh? Just one line of code is all ya need in order to accomplish this little goal..