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 Code value

Former Member
0 Likes
3,579

Hi All,

I am using the BAPI BAPI_ACC_DOCUMENT_POST in my program to post the FB01 documents.

If i do not give any input in the table ACCOUNTGL (Field Name: TAX_CODE), the document is being posted with a tax code '20'.

If i give the input for Tax code with proper value, the document gets posted with the given tax code.

I have tested this scenario (for same GL account ) manually in transaction code FB01 without giving the Tax Code and system displays an error that tax code is mandatory for the given GL account.

I have checked in FS00 for the given GL account and found that tax code is being made mandatory and hence there will be error message in FB01.

Can any one help me why BAPI will consider the default tax code '20' (Exempt Input VAT 0 %)  even if the value is not given in the input???

Regards

Pavan

1 REPLY 1
Read only

Former Member
0 Likes
1,351

Hi Pavan,

I've recently faced the same situation and did some analysis on the BAPI:

BAPI_ACC_DOCUMENT_POST uses the AC interface to create accounting document (with FM AC_DOCUMENT_CREATE), while FB01 uses different logic.

Tax code substitution is built inside the AC interface using FM FI_TAX_INDICATOR_DEFAULT which derives the default tax code from company code master data (T001-MWSKV/T001-MWSKA) for items where the tax code is not provided but the field is set to mandatory in GL master.

BR,

Gábor