Missing Billing Documents Number Range

While creating billing documents, we faced a peculiar problem that the numbers are missing. We missed some numbers in order. Can you please help in finding out the reason?

There is no buffer maintained in the number range also.

Answer:

There are a number of reasons why gaps in invoice numbers may occur:

1. Number range object is buffered. Please refer to note 62077 for details.

2. Update terminate/short dump occurs while billing document update.

- the number is set in to the invoice at the beginning of the program. 

If an interruption of the process happens after the assignation of this number, the number has run in the range and cannot be recovered.

Update terminations in transaction VF01 and VF04. The billing document number is reserved prior to the update. After a possible update termination, it cannot be used again. Update terminations are displayed in transaction SM13. At present, there is no possible
solution.

3. Incorrect user exit, e.g. in Program RV60AFZZ, USEREXIT_NUMBER_RANGE.

If there is an FI/CO validation/substitution or any program modification (user exit, custom formula, custom print program) causing a commit, then this error can occur.

Notice the commit can be implicit or explicit.

An implicit 'COMMIT' can really only be triggered online.

Implicit commits on the database are always triggered if the work process would have to wait. This includes the following:

- The sending of a SAP screen.
- The sending of a dialog message (E, I, W message).
- The call of a synchronous RFC (Remote Function Call)
- Call of a function module or termination of a function
module in another work process
- CALL of the 'COMMIT CALL' function module
- CALL screens (POPUP)
- possibly indirectly by a screen changes after a call by CALL
TRANSACTION <t_code> or SUBMIT <program>.

You have the following options to improve the situation:

- check in customer coding (user exit, validation, substitution etc.) for eventual statement causing commit.
- use a two-step process to post the invoice to accounting:
1. create the invoice
2. release the invoice to accounting

This can be get by setting the flag Posting block = [x] in transaction VOFA.
This is also recommended from performance point of view.
This could ensure that no accounting documents can ever be posted for non-existing invoices.
- do not print immediately (do not use print at time '4'), this is also recommended for performance improvement.

SAP SD Tips

Get help for your SAP SD problems
SAP SD Forums - Do you have a SAP SD Question?

SAP Sales and Distribution Books
SAP SD Books  - Certification, Interview Questions and Configuration

Delivery Hints
SAP Logistics Execution

SAP Sales and Distribution Tips
SAP SD Discussion Forum and Sales/Distribution Tips

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.