Predominently, this error will come if an Account Assignment Group of either customer or material is missing. So first go to VF02, input that billing document and execute. There again you can see an icon straight to Billing date. Click that so that system will take you to header data where you can see Account Assign Group of Customer. If this is blank, then system will pop up that error. Similarly, for material, you need to check, if need be. Other reason could be G/L Account not assigned to an Account Key which you can see in VKOA.
G. Lakshmipathi