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: 

ACCOUNTTAX structure in BAPI

former_member214084
Participant
0 Kudos

Hi Experts,

I am trying to write a mass upload program to park documents using BAPI_ACC_DOCUMENT_POST.

31     960000000(vendor)              1540.00-(ve)

40     406050(G/L)               P1     1400.00+(ve)

40     29500(tax acc)           P1      140 +(Ve)

From the above posting key 31 , end user will supply gross amount(1540) & tax amount(140)

                        posting key 40 (as per screen shot item 2 & 3 ) end user will supply net amount(1400) & tax code (p1) as single entry.

My question is when I am trying to post/park document with the below given structure it actually gives the success message but when see the parked document it looks as below screen shot . As in screen Debit- & Credit are not balanced instead I have no idea how it is getting 1680.00 as Debit?

I will be using FM to CALCULATE_TAX_FROM_NET_AMOUNT or CALCULATE_TAX_FROM_GROSS_AMOUNT with taxcode 'P1' as given with posting key 40 abecause for item '003' in screen user is not proving any details it could be worked out with to get GL etc from FM.

I have shared my current logic . Please correct my logic of where I am missing any essential field in BAPI structure.

lw_acc_vr-itemno_acc = '0000000001'.

lw_Acc_vr-vendor_no = '0096004547'.

lw_acc_vr-comp_code = '8720'.


lw_curr_amt-itemno_acc = '0000000001'.

lw_curr_amt-currency = 'AUD'.

lw_curr_amt-currency_iso = 'AUD'.

lw_curr_amt-amt_doccur = '-1540.00'.


****************************************************************

lw_acc_gl-itemno_acc = '0000000002'.

lw_acc_gl-gl_account = '0000406260'.

lw_acc_gl-item_text = 'tst_value_2'.

lw_acc_gl-doc_type = 'KR'.

lw_acc_gl-comp_code = '8720'.

lw_acc_gl-tax_code = 'P1'.

lw_acc_gl-orderid =   '000008267848'.


lw_curr_amt-itemno_acc = '0000000002'.

lw_curr_amt-currency = 'AUD'.

lw_curr_amt-currency_iso = 'AUD'.

lw_curr_amt-amt_doccur = '1400.00'.

*****************************************************************

lw_acc_tax-itemno_acc = '0000000003'.

lw_acc_tax-gl_account = '0000249500'.

lw_acc_tax-tax_code = 'P1'.

lw_acc_tax-tax_rate = '10.000'.


lw_curr_amt-itemno_acc = '0000000003'.

lw_curr_amt-curr_type = '00'.

lw_curr_amt-currency = 'AUD'.

lw_curr_amt-currency_iso = 'AUD'.

lw_curr_amt-amt_doccur = '140.00'.

lw_curr_amt-amt_base = '1400.00'.

3 REPLIES 3

0 Kudos

Hi Drashi,

we have the same issue. Did you find a solution for this problem?

Regards,

Michael

0 Kudos

Check if note 2242260 is relevant for you.

0 Kudos

Hi Michael ,

I just changed some of the structure data and it worked. just add two more fields in the currency structure DISC_BASE (-ve for vendor & +ve for GL entry) & TAX_AMT(-ve for vendor & +ve for GL entry)