‎2007 Apr 15 4:49 AM
hi........
i hv used the function module 'CALCULATE_TAX_FROM_NET_AMOUNT' to calculate tax amount in INR. i am passing i_bukrs to '1000', i_mwskz to 'SJ', i_waers = ' INR', i_wrbtr = '0'. But it is giving run time error like illegel cal function.
will u plz tel me the solution.
let me know if any information required.
‎2007 Apr 15 5:50 AM
pls post ur code to know the declarations
also tr this...
select KNUMH (Condition number) from A003 (taxe code table) with the key fields ALAND and MWSKZ(tax code).
select KBETR (tax percentage) from KONP with key KNUMH (Condition number)that you have retrived in the previous step.
‎2007 Apr 15 6:01 AM
thanks for suggetion
below is the code which is giving run time error.
DATA : i_bukrs LIKE bapimmpara-selection,
i_mwskz LIKE bapimmpara-selection,
i_waers LIKE bapimmpara-selection,
i_wrbtr LIKE bapimmpara-selection.
LOOP AT it_dtl WHERE mwsk1 = 'SJ'.
CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
EXPORTING
i_bukrs = '1000'
i_mwskz = 'SJ'
I_TXJCD = ' '
i_waers = 'INR'
i_wrbtr = 0
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_dtl
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
ACCOUNT_NOT_FOUND = 11
TXJCD_NOT_VALID = 12
OTHERS = 13
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*
MODIFY it_dtl.
ENDLOOP.
i need tax amount in % by passing tax code(now i'm passing only service tax). suggest ans.
‎2007 Apr 15 6:20 AM
1. check if u had missed out any mandatory parameters
2. chk if these 2 structures are equal t_mwdat = it_dtl
3. pls post the dump analysis also
‎2007 Apr 16 7:51 AM
Thanks again
As you told, the structure i_mwdat and it_dtl couldn't match.
But now that problem was solved.