Application Development 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: 

how to reset the Calculate_tax_item function module

Former Member
0 Kudos
449

Hi expert,

I am using calculate_tax_item function module for calculating tax for purchase order in item wise. If the purchase order having only one item means its showing result correctly...but if the purchase order having two item means it takes 1st item also after i refreshed that internal table... i don't know how to reset that function module but option is there to reset...its not working after i gave reset = 'X'. Guide me to solve this issue...

Regards,

Rathish

1 ACCEPTED SOLUTION

Former Member
0 Kudos
165

Use FM 'REFRESH_TAX_TABLES' which belongs to the same Function Group 'TAX1' to which FM 'CALCULATE_TAX_ITEM' belongs. Call FM 'REFRESH_TAX_TABLES' before calling FM 'CALCULATE_TAX_ITEM' so that all the internal tables used by the Function Group are refreshed and new set of item details are used.

4 REPLIES 4

Former Member
0 Kudos
165

Hi,

Refer the below link

http://wiki.sdn.sap.com/wiki/display/Snippets/FunctionModuletoCalculateTaxinPurchaseorderbasedoncondition+type

0 Kudos
165

i wrote on that way of coding but my problem is calculate_tax_item function module having buffer of previous values so my result went wrong..i used refresh to clear the entries in internal table but when looping for second item in purchase order i get the first item also with second item in internal table..

Former Member
0 Kudos
166

Use FM 'REFRESH_TAX_TABLES' which belongs to the same Function Group 'TAX1' to which FM 'CALCULATE_TAX_ITEM' belongs. Call FM 'REFRESH_TAX_TABLES' before calling FM 'CALCULATE_TAX_ITEM' so that all the internal tables used by the Function Group are refreshed and new set of item details are used.

0 Kudos
165

thank you very much siddharth