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: 

FF_5 User Exit to calculate tax automatically.

Former Member
0 Kudos
1,808

Hi Guys,

The postings in FF_5 are done through transaction FB01 in the background. There is no way the user can enable the Calculate tax automatically (BSEG-XMWST)check box in the background. I would like to know if there are any appropriate user exit or BTE to use to enable me to tick that check box for certain conditions, e.g. specific GL accounts (BSEG-HKONT) and document types (BKPF-BLART). I tried BTE's 1020 and 1120, but they are not working. I'm guessing they are implemented too far into the process that they are not effective.

Please assist.

Regards,

Darlington

1 ACCEPTED SOLUTION

Former Member
0 Kudos
844

Hi Guys,

I managed to resolve this issue by exporting a variable to memory if my conditions to make  XBKPF-XMWST = 'X' are satisfied, in BTE 1011.

I then created an enhancement in include MF05ATAX_STEUER_SCHLUSSPRUEFUN, form steuer_schlusspruefung where i import the same variable from memory and then modified the internal table XBKPF with XMWST = 'X'. Am not sure what the consequences of this less than orthodox method are but at least it works!

During my investigations, I even changed table GB01 through view VWTYGB01 so that XMWST can be substituted, but my substitutions ( both in GGB1 substitutions and in the substitution structure BKPF_SUBST enhanced by adding XMWST to it, for use in BTE 1120.) did not work.

Thanks for all your contributions.

7 REPLIES 7

former_member585060
Active Contributor
0 Kudos
844

Hi,

Have you tried FI Substitutions?

Transaction :- GGB1 in that Financial Accounting.

Thanks & Regards

Bala Krishna

0 Kudos
844

Thank you both for your prompt replies.

Bala, I have never implemented these substitutions that way before. I tried to do them in the BTE 1120 in structure BKPF_SUBST, but its not working. I even put a break point and checked in the form open_fi_feldsubstitution of include MF05AFF0_FCODE_BEARBEITUNG and see that the actual substitution is done to the structure XBKPF in the debugger, i.e. XBKPF-XMWST = 'X', but when I proceed, the tax is not calculated and gives error >>>>>>>>>> Error: (FF 707) Tax entered incorrect (code V2 , amount 0,00 ), correct 2,38 ZAR, for instance.

The code in the BTE 1120 is as follows:

   loop at t_bkpfsub.
    t_bkpfsub-xmwst = 'X'.
    modify t_bkpfsub index sy-tabix.
  endloop.

Ram, is there a user exit that you can think of?

Regards,

Darlington

0 Kudos
844

Hi Bala,

I have read up on substituions and have tried one of my own substituting constant value 'X' for BKPF-XMWST, but it does not work. I tried with other fields e.g. BKPF-BKTXT (header text) and it works.

Any specific reason why it doesn't work for the calculate tax automatically indicator?

Regards,

Darlington

Former Member
0 Kudos
844

First, you have check whether the repective values are comming to the userexit for calculation. if not, check proper userexit and write the logic. It will work fine definitely.Right now, I don't have login credetials, otherwise I would have to give you proper userexit.

All the best.

Former Member
0 Kudos
844

Hi Guys,

Has anyone faced the above scenario? Please assist wherever you can.

Thanks,

Darlington

Former Member
0 Kudos
845

Hi Guys,

I managed to resolve this issue by exporting a variable to memory if my conditions to make  XBKPF-XMWST = 'X' are satisfied, in BTE 1011.

I then created an enhancement in include MF05ATAX_STEUER_SCHLUSSPRUEFUN, form steuer_schlusspruefung where i import the same variable from memory and then modified the internal table XBKPF with XMWST = 'X'. Am not sure what the consequences of this less than orthodox method are but at least it works!

During my investigations, I even changed table GB01 through view VWTYGB01 so that XMWST can be substituted, but my substitutions ( both in GGB1 substitutions and in the substitution structure BKPF_SUBST enhanced by adding XMWST to it, for use in BTE 1120.) did not work.

Thanks for all your contributions.

ANILHM
Discoverer
574

ANILHM_0-1723211631299.png

This i did for tax code to get calculate automatically