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_INVOICE_RECEIPT_POST giving error

Former Member
0 Likes
885

Dear Experts,

I have written a code to upload mass data for transaction code FB60 using BAPI "BAPI_ACC_INVOICE_RECEIPT_POST".

When I am trying to upload the data it is giving me an error "Tax code 1M does not exist in company code 1000".

But when I am trying to insert the same data using transaction code FB60 it successfully posts the data.

Also I have observed that it is happening only when I am uploading tax data. If I try to upload without tax data the BAPI successfully posts the document.

Please help me resolve this issue.

Regards,

Ashish.

Dear Experts,

I have written a code to upload mass data for transaction code FB60 using BAPI "BAPI_ACC_INVOICE_RECEIPT_POST".

When I am trying to upload the data it is giving me an error "Tax code 1M does not exist in company code 1000".

But when I am trying to insert the same data using transaction code FB60 it successfully posts the data.

Also I have observed that it is happening only when I am uploading tax data. If I try to upload without tax data the BAPI successfully posts the document.

Please help me resolve this issue.

Regards,

Ashish.

4 REPLIES 4
Read only

former_member222709
Contributor
0 Likes
740

Hi Ashish,

I know you have checked, but, would recommend you to re-verify the data passed to the BAPI with the data passed manually using T. Code: FB60.

Also, the Tax related data are internally linked to the Document Type as well as posting codes which should match or else you will get an error. At times, there is a possibility that the error may be misleading or confusing, but, verify the data with the manual entry.

Regards,

Pranav.

Read only

Former Member
0 Likes
740

Dear Experts,

I debugged the BAPI and found that the error is raised from function module "FI_TAX_GET_TAX_ACC_BY_KSCHL".

In this function module it is picking data from table A053, but in my system this table is blank.

Please suggest...

Read only

eduardo_hinojosa
Active Contributor
0 Likes
740

Hi

See these notes:

SAP Note 487064 - Direct posting to tax account with AC BAPIs

SAP Note 367175 - No tax calculation function in FI/CO BAPIs

Regards

Eduardo

Read only

0 Likes
740

Dear Eduardo,

Thanks for your reply, but my issue won't get resolved by it.

I am already calculating tax in my program using function module "CALCULATE_TAX_FROM_NET_AMOUNT" and passing it to BAPI structure "ACCOUNTTAX" and for this tax lines only it is giving me an error.

The error is raised in include "LACC4F20" -> subroutine "FORM process_accit_tx" -> function module "FI_TAX_GET_TAX_ACC_BY_KSCHL".

Regards,

Ashish