Application Development and Automation 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: 
Read only

VAT error when posting with BAPI_ACC_INVOICE_RECEIPT_POST

Former Member
0 Likes
1,134

Hi Everyone

We are using BAPI_ACC_INVOICE_RECEIPT_POST to do vendor invoice postings. This BAPI has an ALE message ACC_INVOICE_RECEIPT which we are using for an inbound IDOC.

The problem is that when we do vendor invoice postings with BAPI_ACC_INVOICE_RECEIPT_POST, the base amount (bseg-fwbas) and the document amount (bseg-wrbtr) are stored as exactly the same amount for any tax related GL account. For example, we use a GL account for tax calculations. We specify the relevant tax code for the GL account.

When you do a posting via transaction F-02 you can tick a checkbox called DETERMINE TAX BASE for any tax related line items. When this checkbox is checked, the base amount is stored correctly in table bseg.

I know there is an ACCOUNTTAX table in BAPI_ACC_INVOICE_RECEIPT_POST table parameters, but I do not know whether it should be filled in or how it should be filled in.

Have anyone ever experienced this kind of error when using BAPI_ACC_INVOICE_RECEIPT_POST for vendor invoice postings?

This error is also occuring when I use BAPI_ACC_DOCUMENT_POST.

Can anyone help me with this problem?

Edited by: Sephiroth on Jul 7, 2009 9:38 AM

Is there no one who can help me with this problem? Points will be awarded.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
873

NB: Don't promise points, and the Abap objects forum is not the best forum for this question. Try

nevertheless, look at this OSS FAQ [Note 626235 - Tax postings with accounting BAPIs|https://service.sap.com/sap/support/notes/626235]

Regards,

Raymond

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
874

NB: Don't promise points, and the Abap objects forum is not the best forum for this question. Try

nevertheless, look at this OSS FAQ [Note 626235 - Tax postings with accounting BAPIs|https://service.sap.com/sap/support/notes/626235]

Regards,

Raymond

Read only

0 Likes
873

Hi Raymond

Thank you for your response and thank you very much for the SAP note. It helped a lot. Sorry about the mistakes. I am new to this forum.

I still have one small problem. Is it possible to specify in BAPI_ACC_INVOICE_RECEIPT_POST that the tax base amount must be calculated automatically? I know in the FI transaction, which is used for vendor invoice postings, is there a checkbox called DETERMINE TAX BASE. When this check box is checked, the tax base amount does not need to be specified. In the BAPI, I currently specify the base amount as a parameter, but in order to this, the base amount need to be calculated manually. This manual calculation can become a problem if you have a lot of invoices that must be posted.

We are using BAPI_ACC_INVOICE_RECEIPT_POST in an IDOC. We are using the message type ACC_INVOICE_RECEIPT. That is why we need to be able to determine the tax base amount automatically.

Any assistance will be appreciated.

Sephiroth

Read only

0 Likes
873

I fear that you have to calculate the tax basis amount in your programs, look at OSS [Note 367175 - No tax calculation function in FI/CO BAPIs|https://service.sap.com/sap/support/notes/367175]

Solution

A solution does not exist.

The tax data must be determined before the BAPI is called and in the tax line items they must be passed on to the BAPI/IDoc.

Regards,

Raymond

Read only

0 Likes
873

Hi Raymond

Yes I just saw that note as well. This is a problem........

Thank you for your assistance. I appreciate it.

I will now travel into the realm of the unknown to explore the different alternatives for tax base amount calculations. This is going to be a long, hard and confusing day........

Enjoy the rest of your day.

Sephiroth

Read only

0 Likes
873

Gentleman,

Did you manage to solve your issues with tax calculation? Can you please describe them here?

Thanks

AP