Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function module

Former Member
0 Likes
586

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.

4 REPLIES 4
Read only

Former Member
0 Likes
517

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.

Read only

0 Likes
517

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.

Read only

0 Likes
517

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

Read only

0 Likes
517

Thanks again

As you told, the structure i_mwdat and it_dtl couldn't match.

But now that problem was solved.