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: 

BAPI_ACC_DOCUMENT_POST net taxes

Former Member
0 Kudos

Hi All,

I'm receiving invoice file from vendors which will have sales tax on each invoice. The invoice will post with the vendor tax and call vertex to check if the correct tax is on the invoice. Tolerances within vertex will allow the invoice to post or fail.

I've done the following to try to post tax, but I'm not having luck. I'm on S4 Hana.

Invoice structure:

Vendor Line 108.75 (inclusive of tax)

GL Line 1: 100.00

Tax: 8.75

Populating Bapi as follows:

ACCOUNTGL

Itemno_acc: 2

GL Acc: XXXXX

Tax Code: XX

Tax Jurisd: Xxxxx

Itemno_Tax: 1

ACCOUNTS PAYABLE

Itemno_acc: 1

Vendor: XXX

Tax Code: XX

Tax Jurisdiction: XXXX

ACCOUNT TAX:

Itemno_ACC: 7 line items numbering starting with (3, 4, 5, 6, 7, 8, 9)

I used FM calculate net tax and got all the values for Cond, Acc, tax rate, jurisdiction..etc

Itemno_tax: 1

CURRENCY AMOUNT:

Itemno_acc

-1 Vendor amount -108.75

-2 GL amount: 100.00

-3-9 are the taxes that add up to 8.75

Amt_Base is filled for all lines

Tax_Amount is filled for lines 3-9

The BAPI fails to post due to inconsistent amounts -8.75

Can I not put net amount for GL account line?

If I put gross amount for GL line in CURRENCYAMOUNT, then it posts, but my base amount is the gross amount and not the net amount. Furthermore in BSET, the vendor tax does not show. Anyone have any luck with posting vendor tax in the BAPI. Also, the tax should post in the GL line item, not a separate GL account for tax since it is sales tax.

Any help would be appreciated!

Thanks!!

1 REPLY 1

Jelena
Active Contributor
0 Kudos

Have you tried Google? Google -> "BAPI_ACC_DOCUMENT_POST tax" finds a blog with the code like yours and the comments in it state that the solution did not work due to the same error. (No one shared a solution though.) There are some old SAPFANS posts with some workarounds on the first page of Google search.

Otherwise search for the SAP notes and reach to SAP Support. At minimum, they need to document / explain this.