Autoaccounting is used to determine the accounts when the distribution table is not populated. When AutoInvoice gives this error, it generally gives the account with the missing segment(s).
Query the account mentioned in the above error and note the setup for that missing segment.
If it is based on:
Transaction Type - Menu: Setup>Transaction>Transaction Types, and verify that all accounts are populated.
Salesperson - Menu: Setup>Transactions>Salespersons, and verify that all accounts are populated.
Standard Lines - For an Inventory Item navigate to Menu: Setup>Transactions>Items>Inventory items, and verify that the 'Sales Account' is populated in the 'Invoicing' alternate region. For a Memo Line, navigate to Setup =>Transactions =>Memo Lines, and make sure that 'Revenue Account' is populated.
Taxes - Menu: Setup>Tax>Codes and verify that account is populated in 'Tax' column under the 'Accounting' alternate region.
Additionally the following can be checked: Setup of Cross Validation Rules. Run Cross validation Listing Report in GL to identify the cross validation rule stopping the import of this line.