Hi,
In WDA, the business logic should be separated and it should be placed in a model viz class, function module, BAPI etc
Hence, FM is also a model and you can call FM in WDA.
As suggested by Mr. Chandra, it is standard practice that we use assistance class to write our business logic.
In your case, you can create a method in assistance class with MODIFY & COMMIT WORK logic and call method in WDA as you require.
Regards,
Rama