Internal Tax Determination Internal tax determination determines the tax rate.
Internal tax determination takes place if you have selected the value
01
Internal tax determination
in the table HEADERS (field TAX_DET_TYPE in the structure BAPI_IST_EXTDOC_H).
The following figure shows the rules used to determine the tax rate for internal tax determination.

Firstly, the processing of an item where the field TAX_ID is not filled in table ITEMS (structure BAPI_IST_EXTDOC_I) is considered. In this case, the tax is determined indirectly by the generic fields PA2640_POS_ID1 to PA2640_POS_ID7 of table ITEMS. Firstly, the system accesses posting area 2640 with these fields. Using posting area 2640, the following fields of the billing document item are filled:
HVORG
Main Transaction
TVORG
Subtransaction
BUKRS
Company Code
SPART
Division
In a further step, these fields are used for the access to posting area 2610. A key field of posting area 2610 is the
Account Determination ID
(field KOFIZ). The
account determination ID
is determined by event 2100. Usually, event 2100 uses the
account determination ID
defined in the contract account. Posting area 2610 defines the
tax determination code
stored in the billing document item (field ERMSKZ).
To determine the tax code (field MWSKZ) from the tax determination code (field ERMWSKZ), you need a further date. There are various alternatives. With the field TAX_DATE_TYPE, in table HEADERS you define which tax date is to be used. The system transfers your selection to the field in the billing document header with the same name (FKKINVBILL_H-TAX_DATE_TYPE). Depending on your selection,
Invoicing in Contract Accounts Receivable and Payable
uses the document date, the posting date, or the date of creation. You can also define the value
04
Tax calculation on external tax date
for TAX_DATE_TYPE. In this case, you have to enter an explicit tax date in the field TAX_DATE for all tax-relevant items in table ITEMS. The tax date is copied to the field EXT_TAX_DATE of the billing document item and used by
Invoicing in Contract Accounts Receivable and Payable
.
In
Invoicing in Contract Accounts Receivable and Payable
,
tax determination code
(ERMWSKZ) and
tax date
determine the
tax code
(field MWSKZ) and thus the tax rate.
Determination using the
tax determination code
has the advantage that you do not have to know the tax rate at the time when the billing document is created. You can create a billing document and still use the tax rate valid at the time of invoicing.
However, if you know the final valid tax rate when you create the billing document, you can save this explicitly in the billing document. To do this, in table ITEMS fill the field TAX_ID. With this external tax code the system accesses posting area 2641. The company code of the item defines the country key also required for the access. Posting area 2641 provides the
tax code
(field MWSKZ). The tax determination code of the billing document item (field ERMWSKZ) is not filled.
Invoicing in Contract Accounts Receivable and Payable
transfers the value of the field MWSKZ.
In some countries, the calculation of the tax is also dependent on the tax jurisdiction (
jurisdiction code). In the inbound interface, you can use the field TAXJURCODE in table ITEMS for the tax jurisdiction. The field is copied to the field TXJCD of the billing document item that
Invoicing in Contract Accounts Receivable and Payable
uses for the tax calculation.