Skip to Content

Why I get VAT DATE error in MIRO when BADI VATDATE_VALUES is active?

Nov 03, 2016 at 10:57 AM


avatar image
Former Member


While entering a document in MIRO transaction I get the error in "Messages" : "Enter a tax reporting date" . But when I switch to TAX tab, the Vat Date is already there and the error dissapears..

This situation takes place only when badi vatdate_values is active.

How can I FIX it ?

Thank You.


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Pablo Casamayor Nov 04, 2016 at 08:57 AM


have a look at this OSS Note:

1232484 - How to use the VAT due date, tax reporting date VATDATE

and check the badi documentation, e.g.:


Determine Tax Reporting Date (VATDATE_DETERMINE)

Check Tax Reporting Date (VATDATE_CHECK)

SAP Note: 1232484

Check Tax Reporting Date


You can change the default value of the tax reporting date in the transaction for changing documents (FB02). But first you need to allow for the date to be changed in Customizing for Document Change Rules under Document Change Rules, Document Header.

In transactions for entering FI documents (for example, FB01, FB60, MIRO), when processing the accounting interface (function module AC_DOCUMENT_CREATE ) , or when saving a cash journal document, the system needs to check whether a tax reporting date needs to exist or whether an existing value adheres to certain rules.

This method checks whether a provided value, a proposed value, or an entered value fulfills certain conditions or rules.


In the standard delivery, this method is always executed at various call points (see also SAP Note 1232484).


By default, the tax reporting date (VATDATE) must not be prior to the posting date and the document date. If it is earlier, the system issues the message FF785; you can change this message in Message Control.

Alternatively, the method allows you to return a changed tax reporting date.


The following import parameters are available:

  • IT_BSEG with type BSEG

The following export parameters are available:

  • E_VATDATE_ERROR with type Boolean

The following changing parameters exist:

  • C_BKPF with type BKPF
  • C_ACC with type ACC_DOCUMENT
  • C_VATDATE with type VATDATE

Not all import parameters are passed simultaneously, and the changing parameters are not all modified at the same time.

Depending on the call-up environment, the data is available in different parameters:

  • When calling from FI transactions: BKPF, BSEG
  • When calling from the accounting interface: ACC_DOCUMENT
  • When calling from the cash journal: ISCJ_POSTINGS

In the changing parameters the tax reporting date can be returned with a modified value.

If the import parameter IM_MESSAGE_IF_INITIAL is set, then the system issues a message (for example, FF786) only if no tax reporting date was passed, even when the date is required.

If the import parameter IM_MESSAGE_IF_WRONG is set, then the system issues a message (for example, FF785) only if the checks done on the tax reporting date that is passed consider the date to be incorrect.

If neither of the message parameters mentioned above are set, the system attempts to determine and return a correct date whenever the tax reporting date is missing or incorrect.


The following exception is possible: NO_INPUT_FOR_VATDATE.

The exception can be triggered if no input data is passed or the input data cannot be used to determine a tax reporting date.

The message FF789 can be issued.


When this is called from the cash journal, you cannot directly issue an error message. Instead, the export parameter E_VATDATE_ERROR needs to be set to enable the display of an informational message.

See also

BAdI: Define and Check Tax Reporting Date (VATDATE_VALUES)

Best regards,


10 |10000 characters needed characters left characters exceeded