Some issues are reported related to tax not including exemption as it should in SD documents like sales order and invoices. The cause for that varies but some checkpoints in customization and source code are worth knowing. I have collected and written them in this SAP SCN document for your knowledge, I will be updating it when new cases.
Case 1:
Confirmation for Licenses fied is not checked (BELIC field). It should be flagged along with license number in XD02> Sales Area Data > Billing > Licenses:
It can be detected in the source code as shown below which the case was two licenses on different customer and sales orders:
Form KONDITIONSVORSTEP (LV61AA12)
...
select * from knvl up to 1 rows where kunnr = komk-kunwe
and aland = komk-aland
and tatyp = komt1-kschl
and datab <= preisdatum
and datbi >= preisdatum
and belic ne ' '.
endselect.
if sy-subrc = 0.
komt1-kozgf = space.
if protokoll = 'X'.
clear koprt.
move-corresponding t683s to koprt.
koprt-typ = typ_messa.
koprt-kolnr = '99'.
koprt-msgnr = '019'.
koprt-msgv1 = knvl-licnr.
...
Fields content:
Order 40398 Order 49095
komk-kunwe USCCR01239 USCCR01280
komk-aland US US
komt1-kschl UTXJ UTXJ
preisdatum 20100910 20100908
-> sy-subrc 4 0
KNVL:
KUNNR ALAND TATYP LICNR DATAB DATBI BELIC
USCCR01239 US UTXJ CRCCHA19653094 2010/11/20 2015/01/20
USCCR01280 US UTXJ CR-FH-25-754887 2010/05/27 2012/05/27 X
Case 2:
Valid From and Valid To are overlapping. It is easily seen in the screenshot, refer to the date fields available. In case they overlap for same customer then error F2629 is raised.
Case 3:
KNVL table is the one for licenses, it is usually filled by VX01N transaction, that transaction requires company code input. It does not store sales area data, only customer number. Make sure in XD02 customer company code and and license company code set in KNVL matches, some cases shown inconsistency and exemption does not work.
Case 4:
KNVL data is checked in copy routine 032 (LV61A032), if the codition requirement formula is different the license is not even checked. It can cause an unexpected behavior.
Case 5:
You have defined custom routines and it impacts on exemption tax behavior. Some codings like SORT table, MODIFY and READ without INTO clauses in some specific tables like VBRP (Business Partner) then other licenses settings are pulled accordingly to respective VBRP row modified by custom code.
Some overall additional information is available in SAP Help.
Legal Control in SD Documents (SD and Export Control Interface)