cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to determine tax code

Former Member
0 Kudos

I need to determine a Tax Code when I have a set of conditions and tax rates.

Business Scenario:

I have an invoice created with SD Tax Code and I need to post a Credit Memo in FI with exactly the same taxes.

From BSET table, it's possible to get the conditions and tax rates of all the taxes in the document.

Is there any function module that provides me the correct Tax Code when I input a combination of Condition and Rates??

Thank you very much!

Accepted Solutions (1)

Accepted Solutions (1)

Marssel700
Active Contributor
0 Kudos

Dear,

please check links bellow :

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

Regards

Answers (3)

Answers (3)

dau_hai2
Participant
0 Kudos

Hi Federico Ochoa,

I don''t get your point. If you have invoice, that mean you will be able to get tax codes of all lines item from table BSEG/BSET-MWSKZ.

Former Member
0 Kudos

I have an invoice posted from SD module, hence it has Tax Code (msksz) 'SD'

Now, I need to post a credit memo, not related to the sales order, in other words directly in FI module, with the exact same taxes as the invoice.

How can I determine, automatically, which is the correct Tax Code in FI to be used so as it has the same tax conditions as the invoice?

Former Member
0 Kudos

Hi Federico,

Try to use function module "GET_TAX_PERCENTAGE" with below parameters :

ALAND = [Country ID]

DATAB = 00.00.0000

MWSKZ = [Tax Code]

TXJCD = [Tax Procedure], you can get this field by using FTXP, and enter your tax code.

Good Luck !

Former Member
0 Kudos

Thank you Anto, but again I do have the tax percentage...

What I don't have if the tax code...

I need a function that, from some import parameters, it exports the tax code...

Former Member
0 Kudos

Hi Federico,

You just need to put condition record (KNUMH) that you got from BSET table in table KONP for retrieving relevant tax code.

Former Member
0 Kudos

Thank you Marissel. However, those links are not useful in my scenario.

One refers to tax code in purhcase order, and I need a sales taxes code.

The other is trying to get the tax rate from the tax code and my case is in the opposite direction.

I need to get the tax code that matches SD Tax Conditions and Tax Rates.

Any other suggestion? Thanks