You are on page 1of 4

Concept of tax jurisdiction code & tax

jurisdiction structure
As we know, each country has a tax procedure. Tax procedure is a list of tax condition types and each condition type
represents a type of tax.

Tax percentage against each tax condition type is maintained in tax code.

Why is the need for tax jurisdiction code?


In USA, tax authority is different for each area and tax authority decides tax percentage in that area. Hence the tax
percentage applicable on a business transaction depends upon which area the transaction belongs to (tax to be paid
to which tax authority).

Sap handles this requirement by using concept of tax jurisdiction code. Each tax authority is created as a tax
jurisdiction code in sap.

Tax jurisdiction structure

Since tax jurisdiction code is to identify which area or which tax authority is involved in business transaction hence by
looking at tax jurisdiction code you should be able to identify the area.

Hence tax jurisdiction code is created in such a way that it answers below

Which state?

Which county?

Which city?

Which district?

Tax jurisdiction code is composed of codes which represent state/ county/ city/ district.
3 alphanumeric digits representing state

2 alphanumeric digits representing county

4 alphanumeric digits representing city

3 alphanumeric digits representing district

Tax jurisdiction code = (State + county + city + district)

Defining how many characters which represent state, how many characters represent county, how many characters
represent city and how many characters represent district is known as tax jurisdiction structure.

Composition of tax jurisdiction code is knows as tax jurisdiction structure.

Before creating tax jurisdiction code, tax jurisdiction structure has to be defined in the system.

How is tax percentage maintained when tax jurisdiction code is used?


Tax percentage against tax condition types is maintained in combination of tax code and tax jurisdiction code.
In a business transaction, how system decides tax jurisdiction code?
Entered document has company code. Company code leads to country, country leads to tax procedure. Procedure
has condition types but tax percentage for condition types is maintained in combination of tax code and tax
jurisdiction code.

When document is entered, tax code is input but jurisdiction code is not input. So how does system identify which
jurisdiction code to use?

System fetches tax jurisdiction code from

 Involved parties in the transaction like vendor master, customer master


 Objects involved in transaction like internal order master, cost center master, profit center master.

Note: Tax jurisdiction code is maintained in vendor master, customer master, internal order master, cost center
master, profit center master etc.

Finally I found out that even if you put values in xvbadr, this table is not used for the database update but instead
values in memory are taken to update the database.
To solve this problem, I updated directly the values stored in memory.
Here is the logic:
1- Go to user exit MV45AFZZ-userexit_save_document to write your code
2- Call function 'ADDR_GET_COMPLETE' in order to get the actual values of the address
3- Change the desired values
4- Update the address with function 'ADDR_UPDATE'
Sample of the code:
**Used in address update
DATA: gd_ret_code LIKE szad_field-returncode,
gd_err_tab LIKE addr_error OCCURS 10 WITH HEADER LINE.
**Used to get actual address
DATA: gd_addr1_complete TYPE szadr_addr1_complete,
gd_addr1_tab_line TYPE szadr_addr1_line.
**Used to update actual address
DATA: gd_final_values LIKE addr1_data.
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
addrnumber = xvbadr-adrnr
addrhandle = ''
IMPORTING
addr1_complete = gd_addr1_complete
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
internal_error = 3
OTHERS = 4.
READ TABLE gd_addr1_complete-addr1_tab INTO gd_addr1_tab_line
WITH KEY nation = space.
IF sy-subrc EQ 0.
gd_final_values = gd_addr1_tab_line-data.
ENDIF.
**Set jurisdiction code to expected value
gd_final_values-taxjurcode = 'My Tax Code'.
**Update address in memory
CALL FUNCTION 'ADDR_UPDATE'
EXPORTING
address_data = gd_final_values
address_handle = ''
address_number = xvbadr-adrnr
 DATE_FROM = '00010101'
 LANGUAGE = SY-LANGU
 NATION = ' '
 CHECK_EMPTY_ADDRESS = 'X'
IMPORTING
address_data = gd_final_values
returncode = gd_ret_code
 DATA_HAS_CHANGED =
TABLES
error_table = gd_err_tab
EXCEPTIONS
address_not_exist = 1
parameter_error = 2
version_not_exist = 3
internal_error = 4
OTHERS = 5.
https://archive.sap.com/discussions/thread/489086

A053 - Taxes Using Jurisdiction Code

You might also like