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 sample

Former Member
0 Likes
1,245

Hi,

I need to calculate the taxes in PO (MM)..Now it was not even stored in konp.

i got a solution that i need to pass values to calculate_tax_item FM..can any one give me a sample values that need to be passed to CALCULATE_TAX_ITEM.

can any one help me with sample code.

8 REPLIES 8
Read only

Former Member
0 Likes
981

HI.

use this code.

if taxcode is not initial.

CALL FUNCTION 'CALCULATE_TAX_ITEM'

EXPORTING

i_taxcom = t_taxcom

TABLES

t_xkomv = it_komv

EXCEPTIONS

mwskz_not_defined = 1

mwskz_not_found = 2

mwskz_not_valid = 3

steuerbetrag_falsch = 4

country_not_found = 5

OTHERS = 6.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards.

Jay

Read only

0 Likes
981

thanks,but what all the data we want to pass to the i_taxcom.

whether all the values or any particular values

Read only

0 Likes
981

Minimum These

taxcom-bukrs

taxcom-budat

taxcom-waers

taxcom-kposn

taxcom-mwskz

taxcom-txjcd

taxcom-shkzg

taxcom-xmwst

taxcom-wrbtr

taxcom-lifnr

taxcom-land1

taxcom-ekorg

taxcom-hwaer

taxcom-llief

taxcom-bldat

taxcom-matnr

taxcom-werks

taxcom-bwtar

taxcom-matkl

taxcom-meins

taxcom-mglme

taxcom-mtart

Regards,

Prashant

Read only

0 Likes
981

thanks for ur help,

I am trying the same buut the values are not proper.I dont know why its coming like this.Every value is retturing properly except the amount values.

Read only

former_member203501
Active Contributor
Read only

Former Member
0 Likes
981

Hi

Check This Link

Ranga

Read only

Former Member
0 Likes
981

Hi Mahesh,

refer to the thread below, hope it will help you:

With luck,

Pritam.

Read only

Former Member
0 Likes
981

Hi Mahesh,

I am stuck with the same issue can you please gimme the solution for FM CALCULATE_ITEM_TAX.

This function module is giving the wrong answer.

Have gone through the number of links but none of them gave the solution

Any help would be appreciable.

Thanks & Regards,

Akshay Ruia