FAQ: New Cancellation Procedure in SD
Q1. What is the new cancellation procedure ?
The old cancellation procedure (the only possible before release 4.6A) is made transferring to accounting a "reversed" billing document. Technically speaking the system performs the function module AC_DOCUMENT_CREATE (the same that is used when a normal invoice - not a cancellation - is transferred to accounting).
In the new cancellation procedure there is a 'real' reversal of the original accounting document directly in accounting.
The most evident effect of the new cancellation procedure is the automatic clearing of the accounting documents.
Technically speaking the system performs the function module AC_DOCUMENT_REVERSE.
Q2. Which cancellation procedure does the system perform ?
Starting with release 46A, the system tries to perform at first the new cancellation.
If it fails, then the system gives message VF208 or VF216 and afterwards it performs the old cancellation procedure.
See note 339928 for further details.
This note gives a workaround to change this standard behaviour.
Q3. Why is the new cancellation procedure not performed ?
From SD side the new cancellation procedure cannot be performed for the following reasons:
1. the cancellation is an item cancellation (see note 400000).
2. the billing document has one or more items relevant for revenue recognition (field VBRP-RRREL not blank)
3. the billing document is a down payment request
4. the field RULE_NEW_CANCEL is set to 'A' (see note 339928).
If at least one these conditions occurs, the system performs the old cancellation procedure (in this case it does not give message VF208 or VF216 as the new cancellation procedure will not be tried at all).
If none of these conditions occurs, then the system executes the function AC_DOCUMENT_REVERSE for the new cancellation procedure.
If this function module returns an exception (SY-SUBRC <> 0) then the new cancellation is forbidden by any functionality in FI, CO, EC (example: the accounting document to be reversed is already cleared).
The note 309208 reports a list of possible causes.
Q4. What happens when the new cancellation procedure is successful ?
When function AC_DOCUMENT_REVERSE returns without error messages (SY-SUBRC = 0), then the release to accounting is finished. The original accounting document will be used as basis and directly reversed in accounting.
Most of the userexits in the SD-FI interface (see note 301077) will not be performed.
The function AC_DOCUMENT_REVERSE receives very few information from SD, by the structure LOC_ACCREV (like ACCREV).
The data of the FI cancellation document are determined directly in FI.
If there are userexits, changing contents of XACCHD, XACCIT or XACCCR on SD side, they have no effect in the new cancellation procedure.
Q5. What is the FI document type, generated by the cancellation ?
In the old cancellation procedure, the FI document type is always determined in SD, and passed to FI (the same when a normal invoice - not a cancellation - is transferred to accounting).
In transaction VOFA there is the field 'Document type' (TVFK-BLART).
If this field is filled, then the FI document will have the document type maintained here.
If TVFK-BLART is empty, then the FI document will get the default document type 'RV'.
If the new cancellation procedure is performed, the FI document type is always determined in FI, based on the document type of the FI document to be reversed.
In transaction OBA7 the FI document type has assigned the field 'Reverse document type' (T003-STBLA).
If it is filled, then the FI cancellation document will get the document type maintained here.
If T003-STBLA is empty, then the FI document cancellation will get the same document type as the cancelled FI document.
Notice that an unexpected FI document type can cause the error message F5151.
Example:
F2 invoice 90000001 was released, creating an accounting document with document type 'RV'.
This F2 invoice is reversed by the S1 billing document 70000001.
In customizing of SD there is:
Billing Type Document Type
-----------------------------
F2 RV
S1
In customizing of FI there is:
Document Type Number range Reverse Document Type
-----------------------------------------------------
RV 00 AB
AB 01 AB
The FI number ranges (object RF_BELEG) are:
No From number To number Ext
----------------------------------
00 0090000000 0099999999 X
01 0100000000 0199999999
Different situations can occur, due to these customizing settings of the FI document type, caused by the type of cancellation.
If the new cancellation is used:
The FI document type 'RV' has 'Reverse Document Type' = 'AB'.
Document type 'AB' has number range '01' set as internal.
So the FI document will have its own number included in 100000000-199999999.
There is no issue.
If the old cancellation is used:
The cancellation billing type S1 has no 'Document type' maintained, so the FI document will get document type 'RV'. It has number range '00', set as external number range.
So the FI document should get the same number of S1 billing document.
But the S1 billing document has number 70000001, not included in the interval of number range '01'.
This will cause error F5151.