The is a control flag in the GL Setup that needs to be changed to allow out of balance posting. You would regularly utilize this flag when performing year end.
Before embarking on that endevor, I would look into why the Sub-ledger is out of balance. Do you know which one, (AP,AR,IM..)
Historical reasons I have seen, an invoice stuck in posting. A system crash in the middle of a post. Cancelation vouchers in different version / releases.
Once identified that you have to figure out what entry will be required to bring the sub-ledger back into balance. I would normally post out of balance, then book a journal entry that balance the sub-ledger.
Don't forget, that many time you are only seeing a symptom of a failure somewhere else. Make sure to balance you AP, AR, IM to the GL and run your pre-post invoice list when you thing it should have nothing on it.