You need to
a)either copy the program and change the copy as you need, in this case for any future changes from SAP, you need to incorporate the same/similar changes in your version
b)or use change methods like bAPI BADI or ABAP enhancement. These will not be affected by changes from SAP. However you still need to ensure that your changes are ok with the changes from SAP.
In any case, as in any system changes, documentation is advisable re: the solution for the requirements.