Hi
There are many threads available in SCN for helping you on this. Please search in Google or SCN with text create authorization object in SAP.
For authority check logic again search in SCN with text add authority check logic in MV45AFZZ. I believe you'll find useful threads.