Hi,
Changing the original masthead application is not the correct approch for changes as any deploy of a Patch or SP provided by SAP will override your changes.
Please follow the following document to crete your own application and replace the masthead iView
with your custom one.
Masthead Customization in NW 7.31
Best Regards,
Dror.