Skip to Content

SD Userexit – II

Preventing back-dated Invoice through Userexit. 

While creating invoice through VF01 transaction (or canceling through VF11) the user have the options to enter any date for the invoice. If the user do not enter any date then the system takes the posting date(in case of delivery or billing) or the document date (in case of sales order) of the reference document. This especially in case of invoice cancellation creates problem, since sometimes the invoice to be cancelled are quite old.


To prevent this situation and where the requirement is that the system always takes the current date as the billing date userexit can be used effectively. The userexit can be fine tuned to do this for specific billing type, user or date range.


Some of the SDN postings which gives similar scenario are given below.


For it we can use the include program for invoice RV60AFZC. The userexit USEREXIT_NUMBER_RANGE_INV_DATE we have to do the coding.

For using this userexit make sure that we are not using USEREXIT_NUMBER_RANGE for assigning internal number range to invoices of different plant/company code.

The following codes will make all invoices created (S1 or F2) take system date(ie current date) by default.


*{ INSERT DEVK906746
data : date type dats.
date = sy-datum.
vbrk-fkdat = date.
modify vbrk.



1 Comment
You must be Logged on to comment or reply to a post.
  • hello
    in my opinion, this is the wrong place to add the coding.
    The right place would be in copy control delivery -> invoice or order -> invoice. You can create your own copy control form in Transaction VOFM and assign them in customizing to the appropriate document types.