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 not calculating TAX

Former Member
0 Kudos
2,028

Hi,

I am using BAPI_ACC_DOCUMENT_POST for posting the FI document for RC type. I tried posting it normally and it posted correctly. But when i give some ACCOUNT TAX information, it is not calculating.

Here is how I am filling the details.

Header:

BUS_ACT = RFBU.

USERNAME = SY_UNAME.

HEADER_TEXT = TEXT.

COMP_CODE = BUKRS.

DOC_DATE = 12/12/2011

PSTNG_DATE = 12/05/2011.

FIS_PERIOD = 00

REF_DOC_NO = 9700000036.

AC_DOC_NO = 9700000036.

Account GL Table:.

ITEMNO_ACC = 10.

GL_ACCOUNT = 412010.

DOC_TYPE = RC.

COMP_CODE = RECN.

FIS_PERIOD = 00.

PSTNG_DATE = 12/05/2011

TAX_CODE = TN

TAXJURCODE = TN3707600

COST CENTER = 107

Account Receivable:

ITEMNO_ACC = 20.

CUSTOMER = 1126045

COMP_CODE = RECN

BLINE_DATE = 12/12/2011.

PYMT_METH = B

CURRENCY AMOUNT : 2 LINE ITEMS

1ST LINE ITEM

ITEMNO_ACC = 10

CURRENCY = USD

AMT_DOCCUR = 500.00-

DISC_BASE = 500.00-.

2ND LINE ITEM

ITEMNO_ACC = 20

CURRENCY = USD

AMT_DOCCUR = 500.00

AMT_BASE = 500.00.

I did not enter the account tax table as I am not sure how to enter the date. But I know that the tax rate is 9.25% and for 500 the tax would be 42.33. I need to make sure that the BAPI posts the document as it posts from FB01 when we check the check box 'calculate tax'. Right now, with these details it is posting the data but not calculating the tax.

Please help.

Regards

Guru

Edited by: GuruCharan on Dec 15, 2011 6:28 PM

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos
482

I did not enter the account tax table as I am not sure how to enter the date.

First read [Note 367175 - No tax calculation function in FI/CO BAPIs|https://service.sap.com/sap/support/notes/367175] and [Note 487064 - Direct posting to tax account with AC BAPIs|https://service.sap.com/sap/support/notes/487064]

Regards,

Raymond

0 Kudos
482

Raymond,

Thanks for the reply. I did read the notes you have suggested. They are quite informative but unfortunately -

Note 367175 is related to the other BAPI`s. My issue is with the BAPI_ACC_DOCUMENT_POST.

Note 487064 is related to the error when the tax amount is greater than the base amount.

Since I am using the Acc document post BAPI, please help me understand how to fill in the data for ACCOUNT TAX table or post the document from the BAPI along with the tax as it does in FB01.

Thanks Again,

Regards,

Guru.

0 Kudos
482

Hi

Please, see this [post|;. You have coding about you can do it.

Regards

Eduardo

Edited by: E_Hinojosa on Dec 16, 2011 11:21 AM