4.2.11

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

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

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

***********************************************************************
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
* 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

---------------------------------------------------------------------
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.
...

No comments:

Post a Comment