Wrong dates shown in the document flow for the accounting documents
I met one problem which is a side effect of reusing the SD number range. The problem cannot be reproduced for customer but we can find the root cause after further analysis. I’d like to share this process for you as below:
The problem is the wrong dates shown in the document flow for the accounting documents. (The highlighted lines in RED)
The correct FI accounting document date should be 2016-07-28 which is the same with the billing creation date.
However, the FI accounting date was taken as 2011-01-01 on the document flow and the FI accounting document cannot be displayed either. It seems the FI accounting document was not actually created yet for customer.
if customer tried to cancel the billing and still they got the wrong FI accounting document date as 2011-01-01 which should be 2016-07-28 as well.
Since the two FI accounting documents cannot be displayed through the document flow, I tried to display them in FB03 instead. In FB03, I can now display the two accounting documents in the year 2011. From the field ‘Reference key’ and ‘Entry date’ in FB03, I found these two old accounting documents were created with reference of the OLD billing document 91000141 & 91000190 in the year 2011. However, the two OLD billing documents have already been archived and the same number is reused for customer.
So the situation here is that it was the two old accounting document in 2011 that linked to the current billing document in 2016 but WHY?
The reason for the two old accounting documents displayed in the document flow is that we use a kind of dynamic document flow. Here we display the document flow and in include LV05CF01 (FORM BELEGFLUSS) we call the PERFORM buchhaltungsbeleg and here function module ‘FI_DOCUMENT_READ’. With AWTYP = ‘VBRK’ and AWREF = ‘invoice number’ we determine the corresponding accounting document.
The old billing document 91000141 & 91000190 are already archived. But with this link AWTYP = ‘VBRK’ and AWKEY = ‘91000141’ ‘91000190 ‘ leads to the new accounting document for the new invoice in 2016, determined in function module ‘FI_DOCUMENT_READ’.
The SD number range could only be used if the whole SD document chain including the document flow & subsequent accounting document are all archived. Otherwise, it will lead to such inconsistency. Note 781802 has provided more information on it.
To correct the problem, customer needs to define and assign a new number range interval for the billing type. Or another option is they have to archive all the old accounting documents which have the reference to the old billings falling into the same number range interval.
Hope it gives you some hint and reminding.
Thank you very much for your post. It will help us tackle any similar issues that we may encounter.