Today’s enterprise resource planning programs are complex, and most of them are way over budget. Leading companies get six factors right.