Hi Maren,
Create an update function module. This can be set in the attributes tab of the FM.
Now, call your commit in the update function module. This will get updated at the time of BADI commit. Don't forget to call your FM as CALL FM IN UPDATE TASK. Please let me know if you need any other details on this.
Thanks,
Faisal