Skip to Content
0
Former Member
Nov 08, 2011 at 11:52 PM

Posting Tax Amount in BAPI_ACC_DOCUMENT_POST (Tcode FB60 - Vendor Invoice)

1887 Views

Where do I need to populate the Tax amount in BAPI_ACC_DOCUMENT_POST inorder to create Vendor Invoice (Non PO) - FB60.

I have populated Tax information GL A/c, Condition key, Account key, Tax Code in u2018ACCOUNTTAXu2019 table and Tax amount $7 in 'CURRENCYAMOUNT' table but got below errors:

u2018Balance in transaction currencyu2019 - when we have $-107in Vendor line, $100 in GL line & $7 in Tax line. (It showing difference $7).

The tax amount must not be greater than the tax baseu2019 - When we have $-107 in Vendor line, $107 in GL line & $7 in Tax line.

Here is the code, please check and suggest me:

Header Details:

it_documentheader-obj_type = u2018BKPFFu2019.

it_documentheader-doc_date = u201811/08/2011u2019.

it_documentheader-pstng_date = u201811/08/2011u2019.

it_documentheader-comp_code = u20180001u2019.

it_documentheader-ref_doc_no = u2018TESTQ108u2019.

it_documentheader-doc_type = u2018KRu2019.

it_documentheader-obj_key = u2018$u2019.

it_documentheader-username = sy-uname.

it_documentheader-bus_act = u2018RFBUu2019.

it_documentheader-fisc_year = u20182011u2019.

Vendor Line u2013 Accounts Payable

lv_item_no = 1.

it_accountpayable-itemno_acc = u20181u2019.

it_accountpayable-vendor_no = u20187800988u2019.

it_accountpayable-comp_code = u20180001u2019.

it_accountpayable-pmnttrms = u2018DUBPu2019.

it_accountpayable-tax_code = u2018I1u2019.

it_accountpayable-taxjurcode = u2018000003749u2019.

it_accountpayable-item_text = u2018Test123u2019.

Populate currency amount for account payable data

it_currencyamount-itemno_acc = u20181u2019.

it_currencyamount-curr_type = '00'.

it_currencyamount-currency = u2018USDu2019.

it_currencyamount-amt_doccur = -107.

it_currencyamount-amt_base = 100.

Append it_currencyamount.

G/L Account data

it_accountgl-acct_type = u2018Su2019. " GL

it_accountgl-itemno_acc = u20182u2019.

it_accountgl-gl_account = u2018623000u2019.

it_accountgl-item_text = u2018Test123u2019.

it_accountgl-costcenter = u20181099u2019.

it_accountgl-profit_ctr = u20181u2019.

it_accountgl-comp_code = u20180001u2019.

it_accountgl-tax_code = u2018I1u2019.

it_accountgl-taxjurcode = u2018000003749u2019.

Append it_accountgl.

it_currencyamount-itemno_acc = u20182u2019.

it_currencyamount-curr_type = '00'.

it_currencyamount-currency = u2018USDu2019.

it_currencyamount-amt_doccur = 100.

Append it_currencyamount.

Tax Line Details:

it_accounttax-itemno_acc = '3'.

it_accounttax-gl_account = '0000210000'.

it_accounttax-acct_key = 'NVV'.

it_accounttax-cond_key = 'XP1I'.

it_accounttax-tax_code = 'I1'.

Append it_accounttax.

it_currencyamount-itemno_acc = '3'.

it_currencyamount-curr_type = '00'.

it_currencyamount-currency = u2018USDu2019.

it_currencyamount-amt_doccur = 7.

it_currencyamount-amt_base = 100.

Append it_currencyamount.