10-08-2008 7:30 AM
Hi All,
I need to fetch Tax rate based on Tax code available with me.
Can anybody tell me which table will have both these things.
Also is there any other field required to fetch Tax rate!
Thanks in advance.
Thanks,
Deep.
10-08-2008 10:22 AM
See if these function modules are of any help
FC_GET_TAXRATE
HR_KR_GET_TAX_RATE
OIUX1_GET_TAXRATE
search se37 for more
10-08-2008 10:18 AM
There are probably many different ways of doing this. Since it is tax you should probably look for a FM rather than go directly to these tables... but try table A003 (Tax Indicator) which can link to table KONP (Condition Type)
Hope that helps for starters
10-08-2008 10:21 AM
Hi,
Go to table A003. Enter KAPPL = 'TX', KSCHL = 'MWAS', ALAND = Country Code and Give MWSKZ = the Tax code.
You will get the value KNUMH. Go to table KONP and enter KNUMH there.
The tax rate will be there in the field KBETR.
Regards,
Omkaram.
10-08-2008 10:22 AM
See if these function modules are of any help
FC_GET_TAXRATE
HR_KR_GET_TAX_RATE
OIUX1_GET_TAXRATE
search se37 for more
10-08-2008 10:24 AM
Hi,
Use the FM to get the tax rates based on tax code: "CALCULATE_TAX_FROM_GROSSAMOUNT"
Below is sample code:
*Local data declarations
DATA : lv_taxded TYPE bset-fwste,
lv_taxtot TYPE bset-fwste,
lv_amt TYPE wrbtr,
lv_ref2 TYPE xref2,
ls_mwdat TYPE rtax1u15,
lt_mwdat TYPE TABLE OF rtax1u15.
Tax juris code for vendor
IF gs_item1-koart = gc_v. " vendor
gv_tjxcd = gs_item1-txjcd.
ENDIF.
CLEAR : lv_taxded, lv_taxtot , lv_amt , ls_mwdat.
REFRESH : lt_mwdat.
Fetch the tax amount based on the gross amount, tax code and juris code
CALL FUNCTION 'CALCULATE_TAX_FROM_GROSSAMOUNT'
EXPORTING
i_bukrs = gs_header1-bukrs
i_mwskz = gs_item1-mwskz
i_txjcd = gv_tjxcd
i_waers = gs_header1-waers
i_wrbtr = gs_item1-wrbtr
IMPORTING
e_fwste = lv_taxtot
e_fwast = lv_taxded
TABLES
t_mwdat = lt_mwdat
EXCEPTIONS
bukrs_not_found = 1
country_not_found = 2
mwskz_not_defined = 3
mwskz_not_valid = 4
account_not_found = 5
different_discount_base = 6
different_tax_base = 7
txjcd_not_valid = 8
not_found = 9
ktosl_not_found = 10
kalsm_not_found = 11
parameter_error = 12
knumh_not_found = 13
kschl_not_found = 14
unknown_error = 15
OTHERS = 16.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
Calculate the amounts.
lv_amt = gs_item-wrbtr - lv_taxded. " Tax deductable.
Get the GL Account, Condition,etc. for TAX amount
READ TABLE lt_mwdat INTO ls_mwdat INDEX 1.
IF sy-subrc EQ 0.
Do Nothing
ENDIF.
Regards
Shiva