2020 Dec 16 8:59 AM
error bapi BAPI_ACC_DOCUMENT_POST gives me error: "Tax insertion for 'xxxx'> impossible due to tax base 0" the problem is that I fill it in the currencyamount table, but even looking in debug I find the fwbas field equal to 0 like the following screenshot, what am I wrong?


2020 Dec 16 9:14 AM
Hello mark.fryu
Refer to the note 1801684 - Posting via BAPI issues error message FF 848 that describes your problem and explains the tax entry logic of the BAPI.
Also look at the note 626235 - Tax postings with accounting BAPIs
Best regards
Dominik Tylczynski
2020 Dec 20 8:46 AM
Hi mark.fryu ,
In my case I want to create GL line as Tax item. I solved it by implement BADI ACC_DUCUMENT to force the line to be Tax Item ( ACCIT-TAXIT = 'X' ) at this point I assign value to Base Amount (ACCCR-FWBAS) also.
Step.
1.CALL BAPI_ACC_DOCUMENT_POST and pass value in parameter "EXTENSION2"
1.1 Value ACCIT-TAXIT = 'X'
EXTENSION2-STRUCTURE = 'ACCIT'. "Structure name that need to change
EXTENSION2-VALUEPART1 = '000001'. "Item that you need to change
EXTENSION2-VALUEPART2 = 'TAXIT'. "Field name that need to change
EXTENSION2-VALUEPART3 = 'X'. "Value that you need to set
1.2. Value ACCCR-FWBAS = Your base amount eg. 1000
EXTENSION2-STRUCTURE = 'ACCCR'. "Structure name that need to change
EXTENSION2-VALUEPART1 = '000001'. "Item that you need to change
EXTENSION2-VALUEPART2 = 'FWBAS'. "Field name that need to change
EXTENSION2-VALUEPART3 = '10000'. "Value that you need to set
2.Implement BADI "ACC_DOCUMENT_POST" tcode SE19.
At Method CHANGE you can implement the logic to assign value from parameter "EXTENSION2".
3.You can test the result now.
Enjoy !.
Sayan.