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

BAPI_ACC_DOCUMENT_POST Tax (NVV)

Former Member
0 Likes
3,811

Dear Experts,

I'm currently using BAPI_ACC_DOCUMENT_POST to post accounting documents.I calculated my taxes via function module CALCULATE_TAX_FROM_GROSSAMOUNT and each accountgl table was filled for each currencyamount table before passing into the BAPI. The taxes were

appended as extra line items after I have posted.

In order for the taxes to be displayed on FB03, I populated the accounttax instead.

If the tax only has VST, the posting is successful.

However, the taxes for my postings have both VST

and NVV (input sales tax). Problem comes in when I'm trying to post both VST and NVV via the BAPI.

Lets say I have to post $100 with tax code IP to GL account 000475100.

Tax code IP has VST and NVV.

-----ACCOUNTPAYABLE--


accountpayable-itemno_acc = 1.

accountpayable-vendor_no = 0000213664.

APPEND accountpayable.

CLEAR accountpayable.

----ACCOUNTGL--


accountgl-itemno_acc = 2.

accountgl-gl_account = 0004751000.

APPEND accountgl.

CLEAR accountgl.

-----ACCOUNTTAX--


accounttax-itemno_acc = 3.

accounttax-gl_account = '0001863140'. "tax gl acct

accounttax-cond_key = 'MWVS'.

accounttax-ACCT_KEY = 'VST'.

accounttax-TAX_CODE = 'IP'.

APPEND accounttax.

CLEAR accounttax.

accounttax-itemno_acc = 4.

accounttax-cond_key = 'MWVN'.

accounttax-ACCT_KEY = 'NVV'.

accounttax-TAX_CODE = 'IP'.

APPEND accounttax.

CLEAR accounttax.

----CURRENCYAMOUNT--


currencyamount-itemno_acc = 1.

currencyamount-amt_doccur = -100

APPEND currencyamount.

currencyamount-itemno_acc = 2.

currencyamount-amt_doccur = 93.45

APPEND currencyamount.

currencyamount-itemno_acc = 3.

currencyamount-amt_doccur = 4.78. "VST

currencyamount-amt_base = 93.45. "net amt

APPEND currencyamount.

currencyamount-itemno_acc = 4.

currencyamount-amt_doccur = 1.77. "NVV

currencyamount-amt_base = 93.45. "net amt

APPEND currencyamount.

When i passed the tables to the bapi, I get error 'Balance in

transaction currency'. I do not understand as my currencyamount table

is balanced.

I have implemented OSS 838350 and 979102.

I've also looked through OSS 626235 but do not understand.

Please help me.

Thanks.

Regards,

Hwee Ling

Dear Experts,

I'm currently using BAPI_ACC_DOCUMENT_POST to post accounting documents.I calculated my taxes via function module CALCULATE_TAX_FROM_GROSSAMOUNT and each accountgl table was filled for each currencyamount table before passing into the BAPI. The taxes were

appended as extra line items after I have posted.

In order for the taxes to be displayed on FB03, I populated the accounttax instead.

If the tax only has VST, the posting is successful.

However, the taxes for my postings have both VST

and NVV (input sales tax). Problem comes in when I'm trying to post both VST and NVV via the BAPI.

Lets say I have to post $100 with tax code IP to GL account 000475100.

Tax code IP has VST and NVV.

-----ACCOUNTPAYABLE--


accountpayable-itemno_acc = 1.

accountpayable-vendor_no = 0000213664.

APPEND accountpayable.

CLEAR accountpayable.

----ACCOUNTGL--


accountgl-itemno_acc = 2.

accountgl-gl_account = 0004751000.

APPEND accountgl.

CLEAR accountgl.

-----ACCOUNTTAX--


accounttax-itemno_acc = 3.

accounttax-gl_account = '0001863140'. "tax gl acct

accounttax-cond_key = 'MWVS'.

accounttax-ACCT_KEY = 'VST'.

accounttax-TAX_CODE = 'IP'.

APPEND accounttax.

CLEAR accounttax.

accounttax-itemno_acc = 4.

accounttax-cond_key = 'MWVN'.

accounttax-ACCT_KEY = 'NVV'.

accounttax-TAX_CODE = 'IP'.

APPEND accounttax.

CLEAR accounttax.

----CURRENCYAMOUNT--


currencyamount-itemno_acc = 1.

currencyamount-amt_doccur = -100

APPEND currencyamount.

currencyamount-itemno_acc = 2.

currencyamount-amt_doccur = 93.45

APPEND currencyamount.

currencyamount-itemno_acc = 3.

currencyamount-amt_doccur = 4.78. "VST

currencyamount-amt_base = 93.45. "net amt

APPEND currencyamount.

currencyamount-itemno_acc = 4.

currencyamount-amt_doccur = 1.77. "NVV

currencyamount-amt_base = 93.45. "net amt

APPEND currencyamount.

When i passed the tables to the bapi, I get error 'Balance in

transaction currency'. I do not understand as my currencyamount table

is balanced.

I have implemented OSS 838350 and 979102.

I've also looked through OSS 626235 but do not understand.

Please help me.

Thanks.

Regards,

Hwee Ling

4 REPLIES 4
Read only

Former Member
0 Likes
2,285

Hello experts,

Do you know how to solve this case as i am facing the exact same issue

Thank you in advance,

Read only

Former Member
0 Likes
2,285

Hello,

NVV amounts are statistical, hence the NVV portion of the amount must be included as part Itemno_acc 2.

CURRENCYAMOUNT

currencyamount-itemno_acc = 1.

currencyamount-amt_doccur = -100

APPEND currencyamount.

currencyamount-itemno_acc = 2.

currencyamount-amt_doccur = 95.22  (Base amount + NVV amount as NVV Amount is statistical)

APPEND currencyamount.

currencyamount-itemno_acc = 3.

currencyamount-amt_doccur = 4.78. "VST

currencyamount-amt_base = 93.45. "net amt

APPEND currencyamount.

currencyamount-itemno_acc = 4.

currencyamount-amt_doccur = 1.77. "NVV

currencyamount-amt_base = 93.45. "net amt

APPEND currencyamount.

Read only

SujeetMishra
Active Contributor
0 Likes
2,285

Hi,

Please read below SAP Note:

Note: 367175 No Tax Calculation function in FI/CO BAPIs

          487064 Direct posting to tax account with AC BAPIs

          1548302 Posting direct tax items using BAPI

Regards,

Sujeet

Read only

nico_dewaele
Active Contributor
0 Likes
2,285

Chelsea,

how did you solve this?

kr

Nico