on ‎2011 Apr 21 1:35 PM
Hello Gurus,
I have a issues with FI Document posting BAPI_ACC_DOCUMENT_POST. The document get posted successfully. But the tax calculation is not correct.
I have one positive entry (i.e. credit) for tax code V1. And two negative (i.e. debit) entries for V1. But when i have a look at tax data I see that the tax calculation of the negative posting has not been considered. It only considered the tax for positive posting.
I debugged an saw that this tax data values are stored in table BSET with Credit / Debit limit indicator 'S'. I could see that in this case there is only one entry for "S" in BSET and no entry for 'H'. Thus the input tax for Debit is not taken into consideration.
Please let me know how to rectify this. Can this be solved bu coding or is it some customization issue. What I could infer after debugging is that for V1 only values of 'S' are considered but not sure.
Request clarification before answering.
Abhishek,
I don't quite follow what you're saying here -
and no entry for 'H'. Thus the input tax for Debit is not taken into consideration.
Last time I checked, H denoted Credit. However, I take the liberty of assuming that that was just a typo!
Now, coming to your actual concern, there's no limitation on credit or debit indicator for a given tax code. The same tax code can have debit as well as credit line items for tax calculation, and there's no separate configuration required to make this work.
However, when a particular line item does not have tax calculated for it, I'd first suspect the G/L account master data - check whether the account is tax relevant. Another thing you might want to try is to use a standard transaction rather than merely the BAPI, and do everything else the same as you're doing today for the BAPI - this would help check if there's something wrong in the code that you've put for the BAPI.
Will add if I can think of anything else.
Rgds
Gulshan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gulshan,
Thanks for ur reply. Yes that was a Typo error for 'H'.
the problem I am facing is that when IDOC is send BAPI_ACC_DOCUMENT_POST is used the post the doc. But the tax data is not calculated for Negative tax posting. So if I click Environment --> Tax data then I can see that SAP has calculated tax only for positive tax postings and not for negative tax postings. This tax data are stores in table BSET. But I could not figure out why it happens for BAPI processing. If i create similar document manually it works fine. I have not done any coding. I have to figure out the root cause of negative tax not being considered.
Please advice.
Hi Narra,
Finally we bypassed the SAP Tax calculation. See table TAX_APPLI to bypass tax calculation for BKPF-AWKEY. You pass AWKEY to BAPI in header using this Tax Calculation is bypassed. If you have any Y/Z AWKEY maintain TAX_APPLI-XBYPASS = 'X' or you can use SAP Std AWKEY like 'IDOC' where bypass is already switched on (hopefully also in your system).
In this case SAP will do basic check but will not calculate taxes.
You have to explicitly do tax calculation before calling BAPI. Pass this tax data to relevant table of BAPI.
Before calling 'BAPI_ACC_DOCUMENT_POST' if you like you can also call 'BAPI_ACC_DOCUMENT_CHECK'. This BAPI will do basic check on data you are about to pass for posting. If there is no error for 'BAPI_ACC_DOCUMENT_CHECK' then call 'BAPI_ACC_DOCUMENT_POST' and in case of any error do the error handling.
Do let us know if it helps solve problem at your end or if you have any further error.
Thanks,
Abhishek
| User | Count |
|---|---|
| 39 | |
| 23 | |
| 20 | |
| 6 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.