2008 Jul 23 8:09 AM
hi,
I m using the funtion module Calculate_tax_from_net_amount to calculate the taxes..
wat is the value i have to pass in the parameter wrbtr..
the thing is i m not able 2 capture the correct condition value for the taxes by using this f.module.
watever i m passing 2 the wrbr parameter is being displayed inthe condition value field in table it_mwdat..
here is the code i m using.....
loop at it_ekko.
loop at it_ekpo where ebeln = it_ekko-ebeln.
CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
EXPORTING
i_bukrs = it_ekko-bukrs
i_mwskz = it_ekpo-mwskz
I_TXJCD = ' '
i_waers = it_ekko-waers
i_wrbtr = it_ekpo-netwr
I_ZBD1P = 0
I_PRSDT =
I_PROTOKOLL =
I_TAXPS =
I_ACCNT_EXT =
IMPORTING
E_FWNAV =
E_FWNVV =
E_FWSTE =
E_FWAST =
tables
t_mwdat = it_mwdat
EXCEPTIONS
BUKRS_NOT_FOUND = 1
COUNTRY_NOT_FOUND = 2
MWSKZ_NOT_DEFINED = 3
MWSKZ_NOT_VALID = 4
KTOSL_NOT_FOUND = 5
KALSM_NOT_FOUND = 6
PARAMETER_ERROR = 7
KNUMH_NOT_FOUND = 8
KSCHL_NOT_FOUND = 9
UNKNOWN_ERROR = 10
TXJCD_NOT_VALID = 11
OTHERS = 12
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear it_ekpo.
endloop.
clear it_ekko.
endloop.
2008 Jul 23 11:41 AM
here's a sample from a standard call:
CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
EXPORTING I_BUKRS = SAVE_BUKRS
I_MWSKZ = SAVE_MWSKZ
I_WAERS = SAVE_WAERS
I_WRBTR = TAXBASIS
IMPORTING E_FWNAV = SAVE_FWNAV
E_FWSTE = SAVE_FWSTE
TABLES T_MWDAT = MWDAT
EXCEPTIONS OTHERS = 4.
for conditions and taxrate use fm
RECP_FI_TAX_CALCULATE
A.
2008 Jul 23 11:42 AM
not sure how the tax codes and condition values have been configured by your functional consultants, but as far as i know, you might get about 4 amounts in the internal table o/p.
depending on the condition type, one value is for VAT.
for service tax there may be 3 values - service tax base, education cess and higher education cess. you need to add all three values to get the total service tax amount.
but again, all this depends on how the functional guys have configured it.
revert back with the o/p of the internal table for more clarity.
pk