Check your charging circuit. Once you start the bike it will run without the battery installed as it is charged independently of the power circuit supplying the bike. Sounds like you could either a bad stator or a bad rectifier. In either case, parts are easy to get but will be pricy. Hope this helps.
Sent from my iPad using Tapatalk HD
2008 - KTM 990 Adventure
2010 - BMW G450X