Вы находитесь на странице: 1из 0

SAP Labs, Inc. May 2000 - Tax Interface Workshop rel.

46x (Irene Oei) / 1


Tax Interface Release 4.6x
Intended to
SAP and SAP tax partners
Customer Support Team
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 2
Workshop Purpose
Facilitate the interaction between
SAP customer support team
And
SAP tax partners
Customer support team
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 3
Workshop Objectives
Understanding the Tax Interface System
within the SD, MM and FI Modules
Understanding the Tax Interface System
Understanding the Audit file On-line
Update process
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 4
Workshop Contents
Part 1: Basic Concepts on US Sales & Use tax
Part 2: Basic Configuration (+ exercises )
Part 3: Introduction to Pricing Procedure and
Condition Techniques
Part 4: Tax calculation in SD, MM and FI (+ exercises)
Part 5: Tax posting in SD, MM and FI
Part 6: Audit file on-line update process
Part 7: External Tax Document (+ exercises)
Part 8: User-Exit
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 5
Part 1: US Sales & Use Tax
Introduction to
US Sales & Use Tax
Legal & Business
Requirements
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 6
Part 2: Basic Configuration
1. Set up Physical Destination
2. Activate Tax Interface System
3. Extra Requirements
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 7
Physical Destination
Set up Physical Destination (SM59)
Installation Method:
Application server
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 8
Physical Destination
Set up Physical Destination
(SM59)
Installation Method:
Explicit host
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 9
Physical Destination
Set up Gateway:
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 10
Physical Destination
Verify External Tax System version:
System Information -> Function List
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 11
Test Remote Functions
Test Jurisdiction Determination:
RFC_DETERMINE_JURISDICTION
Test Tax Calculation:
RFC_CALCULATE_TAXES_DOC
Test Tax Update:
RFC_UPDATE_TAXES_DOC
Test Tax Forced Update:
RFC_FORCE_TAXES_DOC
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 12
1) Questions
1. When can DOC_NUMBER be blank ?
When is DOC_NUMBER always filled ?
2. What is GROUP_ID ?
3. What is the difference between PROD_CODE and
GROUP_PROD_CODE ?
4. What is the difference between ITEM_NO and
POS_NO ?
5. Is there a relation between
NR_JUR_LEVELS and TXJLV ?
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 13
1) Answers
1. DOC_NUMBER can be blank during RFC_CALCULATE_TAXES_DOC
DOC_NUMBER is always filled during RFC_UPDATE/FORCE_TAXES_DOC
2. GROUP_ID is defaulted as higher-level material item position (BOM).
3. PROD_CODE is component item ext. product code and GROUP_PROD_CODE is set item
ext. product code.
4. ITEM_NO is a sequential internal numbering (starting with 1) given to each tax document
item. POS_NO is the item position number in the SD, MM or FI document.
5. Indicator for the total number of tax lines by jurisdiction level for each item returned by
external tax system (O_TAX_CAL_JUR_LEVEL_OUT).
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 14
2) Questions
6. Is AMOUNT always equal to GROSS_AMOUNT ?
7. Is it possible to have
APAR_IND=A in a Purchase Order ?
8. What is the difference between
USER_DATA and USER_REPT_DATA ?
9. What does CURRENCY contain ?
10. Is it possible to have
TAX_PER_ITEM=X and NR_LINE_ITEMS>1 ?
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 15
2) Answers
6. GROSS_AMOUNT is always defaulted by AMOUNT.
7. No, except if you had configured to use Use Tax Codes for a sales order/billing doc.
8. USER_DATA: it is sent during tax calculation (recommended for reporting purposes only).
USER_REPT_DATA: filled in user-exit but only for reporting/update purposes
9. CURRENCY: During RFC_CALCULATE_TAXES_DOC => document/transaction currency
During RFC_UPDATE_TAXES_DOC => Local currency (= document currency)
During RFC_FORCE_TAXES_DOC => Local currency (not always same as document
currency)
10. NO, during RFC_CALCULATE_TAXES_DOC
YES, during RFC_UPDATE/FORCE_TAXES_DOC
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 16
Data for the Exercises
Country USV UST
Company Code USXV USXT
Controlling Area USXV USXT
Cost Centers USV1 UST2.
Plant USV1 UST1
Storage Location 0001 0001
Sales Area USV1 01 01 UST1 01 01
Shipping Point USV1 UST1
Purchase Org USV1 UST1
Customer CVERTEX1 CTAXWARE1
Vendor VVERTEX1. VTAXWARE1
Material MVERTEX1. MTAXWARE1
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 17
Exercises 1
1. Build your own test data for tax calculation:
- Copy test data from existent Test Data Directory
- Change test data accordingly by adding more items, etc.
- Save test data in test data directory
- Test and verify results
2. Build your own test data for tax update:
- Copy from previous test data
3. Build your own test data for tax forced update:
- Copy from previous test data (en test results data?)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 18
Activate Tax Interface System
1. Define a tax procedure to a country
2. Activate external tax calculation (TTXD):
- RFC Destination (defined in SM59)
- Interface Version (TAXDOC00 only !!!)
- Notice: Logical Destination is no longer used (TTXC)
3. Define Number Ranges for External Tax Document:
- Interval: 01 (from 000000000001 to 999999999999)
4. Activate External Tax Document
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 19
Extra Requirements.
Define tax jurisdiction code structure:
- Only for BSET reconstruction.
- The way to insert a tax procedure in table TTXD
- Tx In: Expand tax calculation per item (FI/MM):
Off: Aggregate per TaxCode x Jurisdiction Code
Item data such as posno, material and quantity is lost
On: Calculate for each item without losing item data
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 20
Part 3: Pricing
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 21
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 22
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 23
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 24
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 25
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 26
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 27
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 28
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 29
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 30
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 31
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 32
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 33
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 34
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 35
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 36
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 37
Part 4: Taxes in SD/MM/FI
The 3 Tax Calculation methods:
1) SD tax calculation method for Sales Order and Billing
2) PO tax calculation method for Purchase Order
3) FI tax calculation method for IV/LIV and FI (AR/AP)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 38
Sales
Order
Goods
Issue
Billing
Central Tax Central Tax
Postings Postings
Credit
Memo
Request
Credit
Memo
SD Tax SD Tax
Calculation Calculation
Part 4: Taxes in SD
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 39
Tax Calculation in SD
Condition Records for UTXJ
Delivery Country : US
Customer Tax Class. : 1
Material Tax Class. : 1
Tax Code : O1
Pricing Procedure: RVAXUS
UTXJ 300
XR1 301
XR2 302
.. ..
Condition Type: UTXJ
Access Sequence: UTX1
Access Sequence: UTX1
20. Domestic Taxes
Alternate
Condition Type
Formula
Tax Procedure: TAXUSX
XR1 MW1
XR2 MW2
. ..
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 40
Tax Calculation in RVAXUS
R
F
C
_
C
A
L
C
U
L
A
T
E
_
T
A
X
E
S
_
D
O
C
Each Item is sent to the Tax System at the time:
No MAXTAX per Document
RFC_CALCULATE_TAXES_DOC is being called for each item
with the same header
300 (UTXJ)
Item 10
External
Tax Document
Tax Manager
External
Tax Document
External
Tax Document
External
Tax Document
Tax System
COLLECT_AND_CALCULATE
_TAX_DATA
301 (XR1)
Item 10
GET_TAX_RESULTS
_FOR_301_306
302 (XR2)
Item 10

SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 41
KOMK = Pricing Communication Header data:
komk-kunwe (ship-to-party)
komk-land1 (destination country)
komk-txjcd (ship-to-party jurisdiction code)
komk-lifnr (vendor for MM/AP)
KOMP = Pricing Communication Item data
komp-kposn (item position number)
komp-matnr (material number)
komp-werks (plant)
komp-mwskz (item tax code)
komp-uepos (higher-level item position number in BOM)
XKOMV = Item Pricing (active condition type table)
xkomv-kawrt (tax base amount)
xkomv-ksteu (copy pricing flag)
Function COLLECT_AND_CALCULATE_TAX_DATA:
Item Pricing -> Tax Manager
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 42
Function GET_TAX_RESULTS_FOR_301_306:
KOMK (input):
komk-no_upd (dummy calculation flag LTAX1)
komk-belnr (document number)
komk-txjcd (tax jurisdiction code)
KOMP (input):
komp-taxps (item number for tax document)
komp-mwskz (tax code)
XKOMV (output):
xkomv-kbetr (condition type tax rate : XR16)
xkomv-kwert (condition type tax amount : XR16)
xkomv-txjlv (jurisdiction level: 16)
Tax Manager -> Item Pricing
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 43
Tax Calculation in RVAXUD
External
Tax Document
Tax Manager
External
Tax Document
External
Tax Document
External
Tax Document
Tax System
FV64A500
Item 10
500 (UTXD)
Item 20

500 (UTXD)
Item 10
510 (UTXE)
CHECK_IF_TAX_INPUT
_COLLECTION
CHECK_IF_TAX
_CALCULATION
301..306
(XR1XR6)
Item 10
GET_TAX_RESULTS
_FOR_301_306
301..306
(XR1XR6)
Item 20

R
F
C
_
C
A
L
C
U
L
A
T
E
_
T
A
X
E
S
_
D
O
C
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 44
MAXTAX per Document
RFC_CALCULATE_TAXES_DOC is being called
once for all items of a document
Tax calculation happens in each pricing_complete:
to view item tax results before saving the document, header
pricing has to be triggered first.
Tax Calculation in RVAXUD
All items are sent at once to the Tax System:
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 45
Configuration in RVAXUD
UTXJ is replaced by UTXD
UTXD has alternate condition formula 500:
- formula will map and store item tax input data
- is executed once for each item (in pricing complete)
UTXE has alternate condition formula 510:
- triggers tax calculation for all items
- is executed once per document (in pricing complete)
UTXD and UTXE are statistical
XR1XR6 as in RVAXUS w/ formulas 301306
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 46
UTXD required configuration:
- is a group condition
- has access sequence UTX1:
has the same access sequence as UTXJ
- has UTXJ as reference condition type:
has the same condition records as UTXJ
- has scale base formula: 500 init document taxes:
initialize the current tax document
- all condition record rates have the value 100%
Configuration for UTXD
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 47
UTXE required configuration:
- is a group condition
- has NO access sequence
Configuration for UTXE
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 48
Purchase
Order
Goods
Receipt
Invoice
Verification
Central Tax Central Tax
Postings Postings
Purchase
Order
Goods
Receipt
Logistics
Inv. Verif.
Central Tax Central Tax
Calculation Calculation
Part 4: Taxes in MM
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 49
Tax Calculation in PO
Tax Code Determination in PO:
1. Manual entry
2. NAVS Condition Records
3. Info Record
Tax Code Determination in IV/LIV:
1. Manual entry
2. Copy from PO
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 50
Tax Calculation in PO
2. NAVS Condition Records
Condition Type : NAVS
Access Sequence : 0003
Access Sequence : 0003
50. Material tax class.
PO Pricing Proc. : RM0000
NAVS $ base amount
Condition Records for NAVS
Destination Country : US
Material Tax Class. : 1
Tax Code : I1
BASB
300
XP1I 301 NVS
XP2I 302 NVS
. .. ..
Tax Procedure: TAXUSX
Alternate
Condition Type
Formula
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 51
3. Info Record
PO Pricing Proc. : RM0000
NAVM $ base amount
Condition Type : NAVM
NO Access Sequence
Info Record :
Tax Code : U1
BASB
300
XP1I 301 NVS
XP2I 302 NVS
. .. ..
Tax Procedure: TAXUSX
Alternate
Condition Type
Formula
Tax Calculation in PO
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 52
Part 4: Taxes in FI
Central Tax Central Tax
Postings Postings
A/P -
Vendor
Invoice
A/R -
Customer
Invoice
Central Tax Central Tax
Calculation Calculation
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 53
Central Tax Calculation
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 54
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 55
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 56
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 57
Relevant for tax system? (1)
Configuration consistent? (2)
Check exemption and copy flag (4)
Return to pricing.
Yes
Yes No
No
Error message.
no copy, no exempt exempt
Error
Error message.
OK
Return to pricing.
Map input data and (3)
Customer user exit.
Store tax amounts in
External Tax Document.
RFC to external system. (5) Set tax amounts to 0. (5)
Fill tax amounts w/ XKOMV.
(5)
copy, no exempt
Form 300 Program Flow
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 58
Form 300 Program Flow I
Relevant for tax system? (1)
Return to pricing.
No Yes
Class (se24):
CL_XTAX_RULES_CONFIGURATION
Methods:
- check_display_mode
- check_calculation_relevancy
Configuration consistent?
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 59
Form 300 Program Flow II
Class (se24):
CL_XTAX_RULES_CONFIGURATION
Methods:
check_tax_configuration
Configuration consistent? (2)
No Yes
Error message.
Map input data and
Customer user exit.
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 60
Configuration consistent?
No Yes
Error message.
Map input data and (3)
Customer user exit.
Class (se24):
CL_XTAX_RULES_CALCULATION
Methods:
add_input_data_header
add_input_data_item
handle_user_exit
Form 300 Program Flow III
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 61
Map input data and
Customer user exit.
Check exemption and copy flag (4)
Form 300 Program Flow IV
Class (se24):
CL_XTAX_RULES_CONFIGURATION
Methods:
check_taxes_defaulted
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 62
Check exemption and copy flag
No copy, no exempt
RFC to external system.
Class (se24):
CL_XTAX_RULES_RFC
Methods:
rfc_calculate_taxes_doc
Form 300 Program Flow V
(5)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 63
Check exemption and copy flag
exempt
Set tax amounts to 0.
Class (se24):
CL_XTAX_RULES_CONFIGURATION
Methods:
check_if_tax_exempt
Form 300 Program Flow VI
(5)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 64
Check exemption and copy flag
Fill tax amounts w/ xkomv.
Class (se24):
CL_XTAX_RULES_CONFIGURATION
Methods:
check_if_copy_pricing
Copy, no exempt
Form 300 Program Flow VII
(5)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 65
RFC to external system. Set tax amounts to 0.
Fill tax amounts
w/ xkomv.
OK
Error
Error message.
Store tax amounts in
External Tax Document.
(6)
Class (se24):
CL_XTAX_DOCUMENT
Methods:
get_input_data_and_calculate
set break-point at: store_output_from_calculation
Form 300 Program Flow VIII
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 66
Exercises 2A
Customer is asking SAP why the tax rates/amounts are .
1. Set break-point right after the call to the external tax system in:
Method: RFC_CALCULATE_TAXES_DOC
in Class: CL_XTAX_RULES_RFC
2. Create a SD, MM or FI transaction
3. Verify the External System tax results during the break-point
(let it be, DO NOT press CONTINUE)
4. Open another session and using Single Test functionality for
Function Module: RFC_CALCULATE_TAXES_DOC,
simulate the above transaction by inputting the same input
parameters (copy/paste) and executing the Test.
Do you get the same tax results as with debugging?
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 67
Exercises 2B
Check the tax exempt indicator and if taxes are being copy
from a reference (previous) document.
1. Set break-point at methods: - check_if_copy_pricing
- check_if_tax_exempt
in class: CL_XTAX_RULES_CONFIGURATION
2. Create a credit memo request (Doc. Type: G2 trans: VA01):
- At break-point, verify if copy pricing and the tax exempt ind.
- Press Continue and save the document
3. Change the document:
- Change customer or material tax classification to non-taxable
in the credit memo request itself. Verify again the 2 indicators.
4. Post the credit memo from previous document (VF01).
Verify again the 2 indicators. NOTE your results.
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 68
Part 5: Tax Postings SD/MM/FI
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 69
The three stages in the life of a Tax Document
I) Application SD/MM/FI:
Calculate taxes, prepare for TTXY.
II) RW interface Post:
Convert and compress tax data,
insert into Database (TTXY and
BSET).
III) Tax update program:
Check tax data from TTXY and
BSET, update external system.
FV64A300
US_TAXES_UPDATE_TABLE
..
RFYTXU00
RFYTXF00
Before
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 70
Application
RW Interface
Update Program
BSET TTXY
Tax Interface:
Calculation
Tax Interface:
Posting
Tax Memory Actual Tax Data
Compressed
FI Tax data
Tax System
Taxes for
reporting
Tax Data
I)
II)
III)
Tax
Data
Update Programs
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 71
TTXY: (logistics) document data
output of external system (COM_TAX)
per document item
BSET: tax data of accounting document
taxes in local AND document currency
G/L account number
per tax code, jurisdiction code, tax level
TAX storage: BSET v.s. TTXY
Tax Tables: BSET and TTXY
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 72
B
S
E
T
T
T
X
Y
Tax data
Different Views
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 73
Taxes per document item and level
BSET
TTXY
Level Tax code Jur. Code Tax amount
1 O1 CA0000000 18.75
2 O1 CA9440401 3
3 O1 CA9440401 0
1 O0 CA0000000 0
2 O0 CA9440401 0
3 O0 CA9440401 0
Item Tax code Jur. Code Tax Amt 1 Tax Amt 2 Tax Amt 3
10 O1 CA9440401 6.25 1 0
20 O0 CA9440401 0 0 0
30 O1 CA9440401 12.5 2 0
Item No. Level Tax code Jur. Code Tax amount
10 1 O1 CA9440401 6.25
2 O1 CA9440401 1
3 O1 CA9440401 0
20 1 O0 CA9440401 0
2 O0 CA9440401 0
3 O0 CA9440401 0
30 1 O1 CA9440401 12.5
2 O1 CA9440401 2
3 O1 CA9440401 0
Projection on TTXY and BSET
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 74
BSET TTXY
Accounting
document
Logistics
document
BSET
BSET
TTXY
TTXY
Relationship BSET - TTXY
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 75
TTXY BSET
TTXI BKPF
m n
n
1 1
1 1
m
Accounting data Logistics data
BSET, TTXY and Headers
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 76
BKPF
Primary key:
Company code BUKRS
Accounting document number BELNR
Fiscal year GJAHR
TTXI:
Primary key:
Object type of calling application AWTYP
Reference document number AWREF
Reference organizational units AWORG
Keys of BKPF and TTXI
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 77
Secondary index BKPF (unique):
AWTYP Object type of calling application
AWKEY Object key
Map as follows:
BKPF-AWTYP = TTXI-AWTYP
BKPF-AWREF = TTXI-AWREF TTXI-AWORG
From TTXI to BKPF?
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 78
Programs RFYTXU00 and RFYTXF00
Update in batch
performance
no accounting document yet during tax
calculation
Source: TTXI/TTXY
output data of last tax calculation
Update Tax Register Audit File
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 79
Following checks have to be passed:
Configuration data must still be correct
Tax amounts TTXY consistent with G/L
Tax amounts TTXY consistent tax system
Normal Update
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 80
Configuration data
Company code, country, jurisdiction structure
Necessary document data
Accounting document must exist (BKPF)
G/L tax data must exist (BSET)
No update to tax system
document flagged as Error
Check Configuration Data
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 81
Check amounts BSET - TTXY
Internal consistency
Per tax code and jurisdiction code
Reasons for inconsistency:
document in foreign currency
amounts manually overwritten
Force BSET to tax system
taxes copied from BSET without recalculation
document flagged as Forced
Consistency with General Ledger
Internal Consistency
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 82
Check TTXY - recalculated amounts
External consistency
Per TTXY entry
Reasons for inconsistency:
configured as exempt in SAP
Force TTXY to tax system
taxes copied from TTXY without recalculation
document flagged as Forced
Consistency with tax system
External Consistency
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 83
RFYTXU00
Not Updated
UFLAG <> U, F
Not Updated
UFLAG <> U, F
TTXI-UFLAG:
Update status
Error
UFLAG = E
Updated
UFLAG = U
Flagged for
forced update.
UFLAG = V
TTXI/TTXY
RFYTXU00: Normal Update
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 84
RFYTXF00
Error
UFLAG = E
Updated
UFLAG = F
Flagged for
forced update.
UFLAG = V
TTXI/TTXY
RFYTXF00: Forced Update
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 85
RFYTXU00
TTXI
RFYTXD00
RFYTXF00
Display document
RFYTXD00: Display List
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 86
Tax Postings SD/MM/FI
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 87
The two stages in the life of a Tax Document
I) Application SD/MM/FI:
Calculate taxes,
create External Tax Document.
II) RW interface Post:
1. Fill External Tax Document
with posting data.
2. Update external system with
External Tax Document.
FV64A300
FV64A500/510
CL_XTAX_RULES_POSTING
Methods:
- map_document_posting_data
- map_item_posting_data
CL_XTAX_RULES_RFC
Methods:
- trfc_update_taxes_doc
- trfc_force_taxes_doc
After
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 88
Application
RW Interface
BSET
Tax Interface:
Calculation
Tax Interface:
Posting
Actual Tax Data/
Tax Parameters
Compressed
FI Tax data
Tax System
Taxes for
reporting
Tax Data
I)
II)
FI Tax
data
Tax Data/
Parameters
NO Update Programs!!!
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 89
Update occurs during document post to accounting
Update is done through Transactional RFC (tRFC)
Determination of Normal vs. Forced update is done
prior to updating the external tax system (tRFC).
Part 6: On-line Update
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 90
Remote Function Call in background task
CL_XTAX_RULES_RFC
method:
trfc_update_taxes_doc
trfc_force_taxes_doc
Assigned to a Transactional ID (TID)
One unique TID for each commit work (~one LUW)
Usually, but not always, one accounting document per commit work
Each TID is assigned to a queue
Queue name: TIF_UPDATE_AUDIT_FILE
View documents still in the queue with transaction: SMQ1
Transactional RFC (tRFC)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 91
View Document Update Status
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 92
View tax documents in tRFC queue:
Transaction: SMQ1
tRFC Queue
Queue name: TIF_UPDATE_AUDIT_FILE
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 93
View the RFC call which is holding up the queue:
Document Holding the Queue
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 94
View External Tax Documents and its update status:
Part 7: External Tax Document
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 95
Update Status
Green Light:
Tax data sent to the external tax system audit file
Yellow Light:
Tax data waiting to be sent (no error, in the tRFC queue)
Red Light:
Tax data could not be sent to the external tax system
Error has occurred during tRFC
This document will hold up the queue
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 96
What Is Forced Update?
Updating the audit file with GL tax rates/amounts
Original input data is being updated without loss of info
- Ship-to, Ship-from, POA, POO Jurisdiction Code
- Material number, Product Code
- Credit indicator (per document item!)
External tax system output data is not being updated
- TXJCD_IND, EXMATFLAG, EXCUSFLG
- TAXBAS, EXAMT
No major harm when document is force updated!
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 97
Why Forced Update?
When is a document being Force Updated?
GL tax amounts differs from External System tax amounts
AND/OR
External System tax amounts differs during recalculation
Causes for Forced Update?
Internal Consistency and/or External Consistency fail
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 98
Consistency Check Rules
Internal Consistency fails if:
A. Document Currency differs from Local Currency
B. Manually entered tax amounts/rates
External Consistency fails if:
A. Default Reason:
1. Tax amounts/rates were copied from reference document
2. Tax Code property has relevant to tax indicator = 2 .
3. Tax base amount is zero.
4. Tax rates/amounts are manually set to 0.
5. Non-taxable transaction (OBCL).
B. No Default Reason => Configuration has been changed
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 99
Exercises 3
Customer needs to know why a document is holding the
tRFC queue
1. Reproduce the problem by resetting the Update Status:
- reset field etxdch-docstatus from updated to hasgldata:
- run program..zfytxreset (in U9B only)
- verify that field etxdch-docstatus is now equal to hasgldata.
2. Note the Document Number and TID which is holding up the
queue with transaction SMQ1, queue name:tif_update_audit_file.
- DO NOT execute this procedure in a Production System!!!
- This procedure should ONLY BE DONE by
SAP Regional/Development Support team.
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 100
Exercises 3 continuation
3. Set break-point in methods:
- TRFC_UPDATE_TAXES_DOC
- TRFC_FORCE_TAXES_DOC
from class: CL_XTAX_RULES_RFC
4. Resend the document by running RFYTXUPDATE
Customers should not use RFYTXUPDATE.
This program is NOT SUPPORTED by SAP!!!!
5. At the break-point:
- Verify the RFC name (update or force?)
- Simulate executing a Single Test on the same RFC Function
name with SE37. Copy the input parameters (copy/paste)
- Execute Single Test and verify that error has been returned!
- Save the test in the test data directory
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 101
Solve Customer Problems
By contacting the appropriate
Tax Partner Customer Support team
And discussing why an error or an undesired tax result
has been returned by the tax system
Using the Single Test input data simulation for:
RFC_CALCULATE_TAXES_DOC
RFC_UPDATE_TAXES_DOC
RFC_FORCE_TAXES_DOC
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 102
Part 8: User-exits
CL_XTAX_RULES_CALCULATION
Method: handle_user_exit
1. Old user-exit is processed before the new user-exit
is called
2. Old user-exit and new user-exit change only those fields
in structure TAX_ALLOWED_FIELDS (see via SE12)
3. It is recommended to enhance the new user-exit
instead of the old user-exit.
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 103
New User-exit
Tax interface enhancement FYTX0002
It is possible to enhance:
Function Module: EXIT_SAPLFYTX_USER_001
Pricing input structure: CI_TAX_INPUT_USER
Input parameters:
i_t007A, i_ttxd, i_tax_header_input, i_tax_item_input
i_input_user (includes fields in CI_TAX_INPUT_USER)
Output parameter:
ch_user_changed_fields (type TAX_ALLOWED_FIELDS)
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 104
Part 9: Jurisdiction in CAM
Note 157139, 204313
=> All the previous messages are customizable for different modes
(on-line, batch, BDC mode A, E, N)
Note 207323
=> Do not call Jurisdiction_determine_check when
field is Hidden. Function will be called if field is display only.
CAM jurisdiction functions: Non-CAM jurisdiction functions:
jurisdiction_determine_check determine_txjcd_externally
jurisdiction_help_value f_values_txjcd
CAM is used by customer, vendor, plant, etc.
everything that has an address screen except for Cost Center.
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 105
Jurisdiction Code Function
FM: Jurisdiction_determine_check
IF input field TXJCD is blank
if Country is blank => Message E803(FF) input incomplete
if tax procedure uses external system
no, do nothing
yes, if RFC connection error => E217(F2) rfcdest not found
else if external system returns error OR no jurisdiction returned
=> E792(FF) taxjurcode not found
else if multiple jurisdiction code has been returned
AND in batch mode (NO_DI ALOG i s X )
=> E792(FF) taxjurcode not unique in no dialog
ELSE
if external system is active, check if txjcd match with input address
else check if txjcd is an entry in TTXJ
if one of these checks fail => E832(F2) - invalid txjcd
SAP Labs, Inc. May 2000 - Tax Interface Workshop rel. 46x (Irene Oei) / 106
Part 10: Notes for 46B
Note 216368 Error when force updating the audit file (tRFC) !!!!
Note 205145 For AP/AR transactions, document number not updated.
Note 194207 pricing is executed only for group condition for VF02
Note216364 Resend documents to external tax system.be carefull!!!
Note 188732 Incomplete customizing for RVAXUD
Note 194493 Test tRFC (Create Z program)
Note 195112 Customizing error: RFC destination is blank
Note 212982 - Interface Version TAXDOC00 is mandatory!!!
It will be forced in hotpackage
Note 302998 User-exit hints
Note 203912 External tax system returns vague error message
Notes up to May 10
th
:

Вам также может понравиться