On which table have you written MODIFY statement and which table in database is not getting updated.
If database table is not getting updated, there should be problem with the ABAP statement modifying the table but not with implementation. And if your implementation is not getting triggered in transaction then there is problem in implementation.
It would be better you post the code you implemented in the BAPI.
Regards,
Vijay