Prerequisites
At the system level:
Set up the Journal Generator (General Ledger) template.
Set up distribution codes.
Associate products with distribution sets and define distribution codes within the distribution sets.
Additionally, you must have created a contract and saved at least one active line to that contract.