You are on page 1of 6

SAP Note 21734 - Determining sales tax (VAT) from any

partner
Note Language: English Version: 18 Validity: Valid Since 11.04.2001

Summary

Symptom
The tax determination requires the following information:

country of origin
destination country
tax number STCEG for businesses within the EC
tax classification of the customer
tax classification of the material

The determination of the country of origin and the associated access to the
customer master and material master for the determination of the tax
classification is described in Note 10560.

The determination of

country of origin
tax number
tax classification of the customer
in the standard system is performed according to certain rules:

a) The destination country is generally taken from the ship-to party.

b) The tax classification of the customer is determined from the


ship-to party, the payer, or the sold-to party based on the
existence of a tax number in the customer master record (also see
Note 15244).

How can you configure the system such that the tax determination, that is

destination country
tax number
tax classification of the customer
is not done using this rule, but instead is determined

1. generally from the sold-to party

2. generally from the payer

3. based on the existence of the tax number

4. generally from the ship-to party


----------------------------------------------------------------------
Symptom 2:
*********
Tax data that was created manually is lost when relevant address data of
the ship-to party (for example, the field 'Land') is changed. However, the
original tax data should be kept.

Additional key words


Tax determination, STCEG, Tax number, Indentification number, Tax
classification, Country

10.02.2011 Page 1 of 6
SAP Note 21734 - Determining sales tax (VAT) from any
partner

Cause and prerequisites

Solution
The possibility of selecting the desired procedure via customizing settings
exists as of Release 4.0.
A solution is possible by a modification to the user exits. Refer also to
Note 381348. As a precondition, however, the correction to programs
LV05EU01 and LV05EU06 described below must be performed. This correction is
present in the standard from Release 2.2F.

***********************************************************************
Adjusting customer order completion
***********************************************************************

To make the desired control possible, program MV45AFZZ is available for


customer order completion. In the routine USEREXIT_PRICING_PREPARE_TKOMK
you can use the following commands:

Possibility 1:
If you generally want to use the sold-to party for tax determination

TKOMK-TAXK1 = KUAGV-TAXK1. <--- for the tax indicator: Customer


TKOMK-LAND1 = KUAGV-LAND1. <--- for the Country Key

Possibility 2:
If you generally want to use the payer for tax determination

TKOMK-TAXK1 = KURGV-TAXK1. <--- for the tax indicator: Customer


TKOMK-LAND1 = KURGV-LAND1. <--- for the Country Key

Possibility 3:
If you want to control the tax determination independently (according to
choice) of the ship-to party, the the sold-to party or the payer.

IF KURGV-STCEG NE SPACE AND KURGV-KUNNR NE KUAGV-KUNNR.


TKOMK-LAND1 = KURGV-LAND1.
ELSEIF KUWEV-STCEG NE SPACE OR KUAGV-STCEG = SPACE.
TKOMK-LAND1 = KUWEV-LAND1.
ELSE.
TKOMK-LAND1 = KUAGV-LAND1.
ENDIF.

In possibility 3, the receiving land is determined according to the same


logic used to determine the tax number (STCEG) and the tax classification
(TAXK1) of the customer.

Possibility 4:
If you want to pull up the ship-to party for the tax determination
generally

TKOMK-TAXK1 = KUWEV-TAXK1. <--- for the tax indicator: customer


TKOMK-LAND1 = KUWEV-LAND1. <--- for the country key

10.02.2011 Page 2 of 6
SAP Note 21734 - Determining sales tax (VAT) from any
partner
***********************************************************************
Adjusting the billing document
***********************************************************************

Create a new data transport routine for the billing document with
Transaction VOFM by copying the coding used and expanding it with the
additions below. Afterward, place this new data routine in the document
flow for the affected types of billing documents.

Possibility 1:
VBRK-TAXK1 = KUAGV-TAXK1. <--- for the tax indicator: Customer
VBRK-LAND1 = KUAGV-LAND1. <--- for the Country Key
if vbrk-stceg_h ca 'ABC'.
VBRK-STCEG = KUAGV-STCEG. <--- for the tax number
vbrk-stceg_h = 'C'.
vbrk-stceg_L = kuagv-land1.
endif.

Possibility 2:
VBRK-TAXK1 = KURGV-TAXK1. <--- for the tax indicator: Customer
VBRK-LAND1 = KURGV-LAND1. <--- for the Country Key
if vbrk-stceg_h ca 'ABC'.
VBRK-STCEG = KURGV-STCEG. <--- for the tax number
vbrk-stceg_h = 'B'.
vbrk-stceg_L = kurgv-land1.
endif.

Possibility 3:
IF KURGV-STCEG NE SPACE AND KURGV-KUNNR NE KUAGV-KUNNR.
VBRK-LAND1 = KURGV-LAND1.
ELSEIF KUWEV-STCEG NE SPACE OR KUAGV-STCEG = SPACE.
VBRK-LAND1 = KUWEV-LAND1.
ELSE.
VBRK-LAND1 = KUAGV-LAND1.
ENDIF.

Possibility 4:
VBRK-TAXK1 = KUWEV-TAXK1. <--- for the tax indicator: Customer
VBRK-LAND1 = KUWEV-LAND1. <--- for the Country Key
if vbrk-stceg_h ca 'ABC'.
VBRK-STCEG = KUWEV-STCEG. <--- for the tax number
vbrk-stceg_h = 'A'.
vbrk-stceg_L = kuwev-land1.
endif.

***********************************************************************
***********************************************************************

For possibilities one and two, the following corrections must still be
performed (in Standard from Release 2.2F)

Correction in program LV05EU01


.
.
* Lesen Kundenstamm
PERFORM LESEN_KUAGV_KNA1_01.
* EG93ADD

10.02.2011 Page 3 of 6
SAP Note 21734 - Determining sales tax (VAT) from any
partner
* IF LKNA1-STCEG NE ' '. <--- delete
.
.
.
* IF VTCOM-ALAND CN ' ' AND ZAEHL > 0
* Flag: Steuerdaten sind o.k.
* KUAGV-STDOK = 'X'.
* ENDIF.
* ENDIF. <--- delete
* EG93ADD
.
.
.

Correction in program LV05EU06


.
.
KURGV-STCEG = KNAS-STCEG.
ENDIF.
*IF KURGV-STCEG NE ' ' AND VTCOM-ALAND NE ' '. <--- delete
IF VTCOM-ALAND NE ' '. <--- insert
* Steuern
IF VTCOM-ALAND CN ' '.
PERFORM LESEN_KUWEV_KNVI_04.
.
.

Correction in program LV05EU02


.
.
.
PERFORM LESEN_KUAGV_KNA1_01.
* EG93ADD
* IF LKNA1-STCEG NE ' '. <--------- delete
* Steuern
IF VTCOM-ALAND CN ' '.
PERFORM LESEN_KUWEV_KNVI_04.
IF LTSTL-TALND NE VTCOM-ALAND.
SELECT * FROM TSTL INTO TABLE LTSTL WHERE TALND = VTCOM-AL
ENDIF.
ENDIF. <---------- delete
* Steuerindikatoren
.
.
.
.
ENDLOOP.
ENDIF.

* IF VTCOM-ALAND CN ' ' AND ZAEHL > 0.


* Flag: Steuerdaten sind o.k.
* KUAGV-STDOK = 'X'.
* ENDIF.
* ENDIF. <--------- delete
* EG93ADD

---------------------------------------------------------------------

10.02.2011 Page 4 of 6
SAP Note 21734 - Determining sales tax (VAT) from any
partner
Solution for symptom 2: correction in program MV45AFZB
********************
...
form userexit_check_vbak using us_dialog.
*>>>>>>>>>>>>>>>>>>>>> start of insertion <<<<<<<<<<<<<<<<<<<<<<<<<<<<
if not rv02p-weupd is initial and svbak-tabix > 0.
vbak-taxk1 = *vbak-taxk1.
vbak-taxk2 = *vbak-taxk2.
vbak-taxk3 = *vbak-taxk3.
vbak-taxk4 = *vbak-taxk4.
vbak-taxk5 = *vbak-taxk5.
vbak-taxk6 = *vbak-taxk6.
vbak-taxk7 = *vbak-taxk7.
vbak-taxk8 = *vbak-taxk8.
vbak-taxk9 = *vbak-taxk9.
endif.
*>>>>>>>>>>>>>>>>>>>>> end of insertion <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
endform.
...

Header Data
Release Status: Released for Customer
Released on: 10.04.2001 22:00:00
Master Language: German
Priority: Recommendations/additional info
Category: Workaround for missing functionality
Primary Component: SD-BF-TX Taxes

Secondary Components:
SD-BF-PR Pricing

The Note is release-independent

Related Notes
Number Short Text
1406106 EU tax package 2010 (1)
677488 EU Directive 2001/115/EG
434562 Determination and country of VAT registration number
381348 Using user exit, customer exit, VOFM in SD
302998 Collecting fields for user-exit
170183 What to consider when applying modifications

10.02.2011 Page 5 of 6
SAP Note 21734 - Determining sales tax (VAT) from any
partner
Number Short Text
95958 Determination of tax classification in billing doc.
91109 VAT registration number of customer disappears
88283 Tax indicators of the ship-to party are missing
86358 An incorrect value-added tax is displayed
65621 Taxes: Jurisdiction code from sold-to party
15244 Incorrect VAT amount is displayed
10560 Tax determination for plant abroad

10.02.2011 Page 6 of 6

You might also like