We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-acct] BAPI 'BAPI_ACC_DOCUMENT_POST' Error While Posting

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Question from Saurabh on Jan 15 at 2:15 AM
Below Source Code I am facing Error

Error in document: BKPFF $
FI/CO interface: Inconsistent FI/CO document header data for updating

::::::

HEADER-USERNAME = sy-uname.
HEADER-HEADER_TXT = 'TEST BAPI FOR COPA POSTING'.
HEADER-COMP_CODE = '1000'.
*HEADER-AC_DOC_NO = docnum.
*HEADER-AC_DOC_NO = l_belnr.
HEADER-FISC_YEAR = '2015'.
HEADER-DOC_DATE = SY-DATUM." '20150114'.
HEADER-PSTNG_DATE = SY-DATUM." '20150114'.
HEADER-DOC_TYPE = 'SA'.
HEADER-BUS_ACT = 'RFBU'.


*CONCATENATE docnum HEADER-COMP_CODE sy-datlo(4) INTO HEADER-OBJ_KEY.
* ------
* Fill Line 1 of Document Item (Debit)
ACCTGL-itemno_acc = '0000000001'.
ACCTGL-gl_account = '0302002000'.
ACCTGL-stat_con = 'S'.
ACCTGL-pstng_date = sy-datlo.
ACCTGL-item_text = 'TEST POSTING DEBIT ITEM'.
ACCTGL-costcenter = 'DABACR156D ' ."'0000006300'.
*ACCTGL-orderid = '000001000005'.
ACCTGL-BUS_AREA = '1002'.
ACCTGL-PROFIT_CTR = 'DUMMY'.
APPEND ACCTGL.
CLEAR ACCTGL.

* -------
* Fill Line 2 of Document Item (Credit)
ACCTGL-itemno_acc = '0000000002'.
ACCTGL-gl_account = '0304011000'.
ACCTGL-stat_con = 'H'.
ACCTGL-pstng_date = sy-datlo.
ACCTGL-item_text = 'TEST POSTING CREDIT ITEM'.
ACCTGL-BUS_AREA = '1002'.
ACCTGL-PROFIT_CTR = 'DABPBI156'.
APPEND ACCTGL.
CLEAR ACCTGL.

* Fill Line 1 of Document Value.
CURRAMOUNT-itemno_acc = '0000000001'.
CURRAMOUNT-CURR_TYPE = '10'.
CURRAMOUNT-currency = 'INR'.
CURRAMOUNT-currency_iso = 'INR'.
CURRAMOUNT-amt_doccur = '200'.
APPEND CURRAMOUNT.
CLEAR CURRAMOUNT.


* Fill Line 2 of Document Value
CURRAMOUNT-itemno_acc = '0000000002'.
CURRAMOUNT-CURR_TYPE = '10'.
CURRAMOUNT-currency = 'INR'.
CURRAMOUNT-currency_iso = 'INR'.
CURRAMOUNT-amt_doccur = '200'.
APPEND CURRAMOUNT.
CLEAR CURRAMOUNT.

BREAK abap01.
* ------
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
DOCUMENTHEADER = HEADER
* IMPORTING
* OBJ_TYPE = OBJ_TYPE
* OBJ_KEY = OBJ_KEY
* OBJ_SYS = OBJ_SYS
TABLES
ACCOUNTGL = ACCTGL
* ACCOUNTRECEIVABLE = ACCOUNTRECEIVABLE
* ACCOUNTPAYABLE = ACCOUNTPAYABLE
CURRENCYAMOUNT = CURRAMOUNT
RETURN = RETURN
.
 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2015 Ziff Davis, LLC. and message author.
Ziff Davis, LLC. 28 E 28th Street New York, NY 10016
Saurabh  
 
View this online
Ask a new question
 
In the Spotlight
Become a blogger at Toolbox.com and share your expertise with the community. Start today.

_.____.__

11 comments:

Post a Comment

T r a n s l a t e to your language