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

tax base amount problem with BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
2,661

regarding bapi BAPI_ACC_DOCUMENT_POST

We are facing following problem regarding tax:

we have a document with 3 line items, one of them is a tax item. It's not clear how do we fill the ACCOUNTTAX structure. We tried to fill all three items into the ACCOUNTGL str. and the tax item into the ACCOUNTTAX. When we run the BAPI it posts the document. It looks correct when looking at the items in FB03. However when we look at the tax data it's not correct. The tax base amount is wrong and tax amount is 0. Has anybody solved this problem?

please reply ASAP.

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,170

hi Sunil,

ACCOUNTGL : mention only G/L line items here

ACCOUNTTAX : mention the VAT items here only but with the same item number like in currencyamount, the amounts are not important here, simply zero...

CURRENCYAMOUNT : mention all items here, in case of normal posting the amount comes to field AMT_DOCCUR, in case of VAT posting the amount of VAT comes to AMT_DOCCUR, the base amount comes to AMT_BASE

hope this helps

ec

Read only

0 Likes
1,170

hi eric,

thanks for your reply, however i got the solution for it yesterday,most of what you replied is right except CURRENCYAMOUNT table is to be filled twice for every line item, one for CURR_TYPE = 00 (document currency) and the other for 10 (company code currency) i.e the local currency it is because foreign currency translation is not supported for the tax items.

now i have a new problem iam trying to update the profitability segment(PS) fields using the table CRITERIA, bapi is posting the document but the PS fields are not updated it is also not giving any errors.

example code

T_CRITERIA-ITEMNO_ACC = 2.

T_CRITERIA-FIELDNAME = 'KNDNR'.

T_CRITERIA-CHARACTER = '0003000355'.

APPEND T_CRITERIA.

CLEAR T_CRITERIA.

T_CRITERIA-ITEMNO_ACC = 2.

T_CRITERIA-FIELDNAME = 'PRCTR'.

T_CRITERIA-CHARACTER = '0000809098'.

APPEND T_CRITERIA.

CLEAR T_CRITERIA.

T_CRITERIA-ITEMNO_ACC = 2.

T_CRITERIA-FIELDNAME = 'VKORG'.

T_CRITERIA-CHARACTER = '8001'.

APPEND T_CRITERIA.

am i missing something, there are only three fields in this table, do i need to pass anything else in some other table.

please reply.

thanks.

Read only

0 Likes
1,170

Hi Eric,

we also facing the same problem. we tried by passing to table accounttax.getting message documnet posted with key.but i couldn't find the entry in table with that key.are the tables bkpf & bseg where it stores in case of account tax also?

can you send us the example code to set flag .

Its so urgent for us.Please help us.

Thanks in advance.

salini

Read only

former_member404244
Active Contributor
0 Likes
1,170