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

Inconsistent FI/CO document header data for updating error in bapi

Former Member
11,514

E RW 609

Error in document: BKPFF $ BRD302

E RW 015

FI/CO interface: Inconsistent FI/CO document header data for updating

IF it_jvpost-a01 IS NOT INITIAL.
      IF it_jvpost-a01 LT 0.

        lv_itemno = lv_itemno + 1.


        wa_accountgl-itemno_acc = lv_itemno.  "Line Item No"
        wa_accountgl-gl_account = '6402100'.  "G/L Account"
        wa_accountgl-item_text = lv_ref.   "Item Text"
        wa_accountgl-comp_code = it_jvpost-rbukrs.   "Company Code"
        wa_accountgl-profit_ctr = it_jvpost-prctr.  "Profit Center"
        APPEND wa_accountgl TO it_accountgl.
        CLEAR : wa_accountgl.


        wa_currencyamount-itemno_acc = lv_itemno.  "Line Item No"
*      wa_currencyamount-curr_type = .  "Currency Type"
        wa_currencyamount-currency = 'EUR'.   "Currency"
        wa_currencyamount-amt_doccur = it_jvpost-a01. "Amount"
        APPEND wa_currencyamount TO it_currencyamount.
        CLEAR : wa_currencyamount.

        lv_itemno = lv_itemno + 1.

        wa_accountgl-itemno_acc = lv_itemno.  "Line Item No"
        wa_accountgl-gl_account = '2014060'.  "G/L Account"
        wa_accountgl-item_text = lv_ref.   "Item Text"
        wa_accountgl-comp_code = it_jvpost-rbukrs.   "Company Code"
        wa_accountgl-profit_ctr = it_jvpost-prctr.  "Profit Center"
        APPEND wa_accountgl TO it_accountgl.
        CLEAR : wa_accountgl.


        wa_currencyamount-itemno_acc = lv_itemno.  "Line Item No"
        wa_currencyamount-curr_type = '00'.  "Currency Type"
        wa_currencyamount-currency = 'EUR'.   "Currency"
        wa_currencyamount-amt_doccur = it_jvpost-a01 * -1. "Amount"
        APPEND wa_currencyamount TO it_currencyamount.
        CLEAR : wa_currencyamount.
      ELSE.
        wa_accountgl-itemno_acc = lv_itemno.  "Line Item No"
        wa_accountgl-gl_account = '2014060'.  "G/L Account"
        wa_accountgl-item_text = lv_ref.   "Item Text"
        wa_accountgl-comp_code = it_jvpost-rbukrs.   "Company Code"
        wa_accountgl-profit_ctr = it_jvpost-prctr.  "Profit Center"
        APPEND wa_accountgl TO it_accountgl.
        CLEAR : wa_accountgl.


        wa_currencyamount-itemno_acc = lv_itemno.  "Line Item No"
        wa_currencyamount-curr_type = '00'.  "Currency Type"
        wa_currencyamount-currency = 'EUR'.   "Currency"
        wa_currencyamount-amt_doccur = it_jvpost-a01. "Amount"
        APPEND wa_currencyamount TO it_currencyamount.
        CLEAR : wa_currencyamount.

        lv_itemno = lv_itemno + 1.

        wa_accountgl-itemno_acc = lv_itemno.  "Line Item No"
        wa_accountgl-gl_account = '6402100'.  "G/L Account"
        wa_accountgl-item_text = lv_ref.   "Item Text"
        wa_accountgl-comp_code = it_jvpost-rbukrs.   "Company Code"
        wa_accountgl-profit_ctr = it_jvpost-prctr.  "Profit Center"
        APPEND wa_accountgl TO it_accountgl.
        CLEAR : wa_accountgl.


        wa_currencyamount-itemno_acc = lv_itemno.  "Line Item No"
        wa_currencyamount-curr_type = '00'.  "Currency Type"
        wa_currencyamount-currency = 'EUR'.   "Currency"
        wa_currencyamount-amt_doccur = it_jvpost-a01 * -1. "Amount"
        APPEND wa_currencyamount TO it_currencyamount.
        CLEAR : wa_currencyamount.
      ENDIF.
    ENDIF.

i'm passing all the required data in the header but still i'm getting the error.

Am i missing anything else? i have even searched forum for this but didn't get any answer.

pls help me on this

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,228

Hi,

Check this SDN Wiki : [Accounting Document Interface |http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=195726664]

Regards

Vinod

1 REPLY 1
Read only

Former Member
0 Likes
2,229

Hi,

Check this SDN Wiki : [Accounting Document Interface |http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=195726664]

Regards

Vinod