In SAP standard, billing document numbers can only be assigned internally by the SAP system.
Basic Explanation:
Bear in mind that the Sales & Distribution module and the Financial Accounting module are seamlessly integrated. An accounting entry is posted in Financial Accounting during Release of Billing to Accounting procedure. The basic entry that will be created is:
Dr. Customer Accounts Receivable
Cr. Revenue
Cr. Output Taxes
Upon Release of Billing to Accounting (VF02), the above basic entry is automatically created. It should be configured in the system the necessary account determination for billing document postings.
And as a rule of thumb, every transaction posted in SAP system creates a document number. In this case, during Release to Accounting a billing document number is created. Logically, since the entry is automatically created the billing document number should also be created automatically created by the system. There should be no (there is no) user intervention during posting of billing document to accounting.
You may also consider reading these: