Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Calculating Extended Withholding Tax and Sales Tax in an Invoice BAPI

Hi all,

I am trying to use a BAPI to process an invoice receipt, with the calculation of Extended Withholding Tax. I am running ECC 6.

After reading many of the posts on this subject, I have managed to get Extended Withholding Tax calculated correctly using BAPI_ACC_INVOICE_RECEIPT_POST, and populating the EXTENSION1 table that is passed to the BAPI. When I look up the posted document in FB03, it looks good at first glance, but when I click on the Tax Data button, I see that the sales tax amounts are not being stored in the BSET table correctly.

In another test, I have been able to post these invoice receipts using BAPI_ACC_DOCUMENT_POST, and it does populate BSET with the correct sales tax amounts, but it does not calculate the Extended Withholding Tax. All the reading that I have done on Extended Withholding Tax suggests that BAPI_ACC_DOCUMENT_POST does not calculate it, even with the EXTENSION1 table.

In both these examples, I am using function CALCULATE_TAX_FROM_GROSSAMOUNT to calculate the taxes, and feeding the output from that function into the BAPI call.

It seems to me as though the reason that BAPI_ACC_INVOICE_RECEIPT_POST does not populate BSET properly may be because the ACCOUNTTAX table definition for that BAPI (structure bapiactx01) does not have the ITEMNO_TAX field that the ACCOUNTTAX table definition for the other BAPI has (structure bapiactx09).

Does anybody have any suggestions on how I can process an invoice receipt via a BAPI, and calculate both the Extended Withholding Taxes, and the sales taxes, correctly?


Edited by: Gordon Tobias on Jun 7, 2011 5:39 PM

Not what you were looking for? View more on this topic or Ask a question