Hi Suba,
Creating Authorization Objects and Authority-Check is the best approach.
If you dont want to use it and if you are only concerned about EPC error, then replace the username with constatns.
CONSTANTS : c_username type sy-uname value 'USERNAME'.
if sy-uname = C_USERNAME.
do something.
endif.
With this you can pass the EPC check. But still it is not the right appraoch.
Go for Authorization Objects and use Authority Check statement for it is the correct approach.