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: 

Automatic Tax calculation option in BAPI_ACC_DOCUMENT_POST

Former Member
0 Kudos

Hi all,

I am using the FM BAPI_ACC_DOCUMENT_POST to post an invoice through FB01.

I need to check the "Calculate Tax" field in the header of the FB03.

I am unable to find any field corresponding in the structures of the BAPI to the field XMWST in BKPF for the same purpose.

Is there any way to check the field or to automate the tax calcalution with the BAPI usage? Your ideas and inputs are appreiciated.

Thanks,

Stock.

3 REPLIES 3

Sougata
Active Contributor
0 Kudos

I'm afraid the answer is no because the BAPI technology does not process transaction in a screen by screen sequence like BDC.

You will need to fill table parameter ACCOUNTTAX separately providing details like item no. corresponding to line item no., GL a/c, tax code etc. Every line of this table will have to correspond to the (line)item table that you've filled as doc line item. Also, read the FM doco of the parameter ACCOUNTTAX within this FM.

Cheers,

Sougata.

Former Member
0 Kudos

Hi Sougata,

I tried with using the BAPI structure ACCOUNTTAX with the way you have mentioned. But none of its fields corresponds to the CAlculate tax option.

Is there any way using the BAPI ? else i am planning use ther approach of using the RFBIBL00 program. then another ques. is, when used the direct input update option for the RFBIBL00, how do we retrieve the Doc. numbers created by the program as i am running it in background?

Regards,

Stock

Sougata
Active Contributor
0 Kudos

Stock,

I think you misunderstood me.

I said you cannot use the checkbox "Calculate tax" using any BAPI because the BAPIs don't go through screens like BDCs do. But it should be alright if you append the tax lines one by one to the Table parameter ACCOUNTTAX and use this BAPI. I've used this before many times and it works fine.

Please reward points for helpful answers.

Regards,

Sougata.