‎2009 Jun 17 1:07 AM
Hi All
I am using BAPI_ACC_BILLING_POST() from C#.Net code for posting.
I am using this BAPI for FB70 transaction, i hope this is right?
I am getting this error: Error in document: BKPFF $. FI/CO interface: Inconsistent FI/CO line item data for updating.
I am stuck on this error.
I am using ECC 6.0.
This is my code:
BAPI_ACC_BILLING_POSTService srv = new BAPI_ACC_BILLING_POSTService();
NetworkCredential nc = new NetworkCredential("user", "password");
srv.Credentials = nc;
BAPIACHE01 documentHeader = new BAPIACHE01();
BAPIACAR01[] accountReceivable = new BAPIACAR01[1];
BAPIACGL01[] accountGl = new BAPIACGL01[1];
BAPIACTX01[] accountTax = new BAPIACTX01[1];
BAPIACCR01[] currencyAmt = new BAPIACCR01[3];
BAPIACPA00 customerPcd = new BAPIACPA00();
BAPIACKECR[] criteria = new BAPIACKECR[] { };
BAPIEXTC[] ext1 = new BAPIEXTC[] { };
BAPIBILLINGPOSTING.BAPIRET2[] bapiReturn = new BAPIBILLINGPOSTING.BAPIRET2[] {};
BAPIACCRSO[] salesAmt = new BAPIACCRSO[] { };
BAPIACSO00[] salesOrder = new BAPIACSO00[] { };
BAPIACKEVA[] valueField = new BAPIACKEVA[] { };
//Document Header
documentHeader.USERNAME = "223344";
documentHeader.HEADER_TXT = "TEST";
documentHeader.COMP_CODE = "2000";
documentHeader.FISC_YEAR = "2009";
documentHeader.DOC_DATE = "20090326";
documentHeader.PSTNG_DATE = "20090326";
documentHeader.DOC_TYPE = "DR";
// Fill up Accounts Receivable with Customer Details
accountReceivable[0] = new BAPIACAR01();
accountReceivable[0].ITEMNO_ACC = "0000000001";
accountReceivable[0].CUSTOMER = "22306";
accountReceivable[0].GL_ACCOUNT = "12000";
// Fill up Accouns GL
accountGl[0] = new BAPIACGL01();
accountGl[0].ITEMNO_ACC = "0000000002";
accountGl[0].GL_ACCOUNT = "51230";
//accountGl[0].TAX_CODE = "S1";
//accountGl[0].ACCT_KEY = "MWS";
accountGl[0].ORDERID = "4001462";
//Fill up Account Tax
accountTax[0] = new BAPIACTX01();
accountTax[0].ITEMNO_ACC = "0000000003";
accountTax[0].GL_ACCOUNT = "0000020905";
accountTax[0].TAX_CODE = "S1";
accountTax[0].ACCT_KEY = "MWS";
//accountTax[0].TAX_RATE = (decimal)10.000;//TODO: check for necessary
// Fill up currency amount for all the above
currencyAmt[0] = new BAPIACCR01();
currencyAmt[0].ITEMNO_ACC = "0000000001";
currencyAmt[0].CURRENCY = "AUD";
currencyAmt[0].AMT_DOCCUR = (decimal)330.0000;
//currencyAmt[0].AMT_BASE = (decimal)0.0000;
currencyAmt[1] = new BAPIACCR01();
currencyAmt[1].ITEMNO_ACC = "0000000002";
currencyAmt[1].CURRENCY = "AUD";
currencyAmt[1].AMT_DOCCUR = (decimal)-300.0000;
//currencyAmt[1].AMT_BASE = (decimal)0.0000;
currencyAmt[2] = new BAPIACCR01();
currencyAmt[2].ITEMNO_ACC = "0000000003";
currencyAmt[2].CURRENCY = "AUD";
currencyAmt[2].AMT_DOCCUR = (decimal)-30.0000;
currencyAmt[2].AMT_BASE = (decimal)300.0000;
string objSys = "";
string objType = "";
objKey = srv.BAPI_ACC_BILLING_POST(ref accountGl, ref accountReceivable, ref accountTax, ref criteria,
ref currencyAmt, customerPcd, documentHeader, ref ext1, ref bapiReturn,
ref salesAmt, ref salesOrder, ref valueField, out objSys, out objType);
Any help on this will be of great help.
thanks.
‎2009 Jun 17 2:28 AM
hello ,
can u paste complete list of RETURN table msgs .....
few things i observed in your coding block.
1. while passing customer no ( try to pass in its full length ) do u need to pass G/L account ? , i think system should take recon.account in that case.
2. while populating G/L , Cusomt ,Sales Order.....u need to pass in its full length values.
regards
Prabhu
‎2009 Jun 17 2:28 AM
hello ,
can u paste complete list of RETURN table msgs .....
few things i observed in your coding block.
1. while passing customer no ( try to pass in its full length ) do u need to pass G/L account ? , i think system should take recon.account in that case.
2. while populating G/L , Cusomt ,Sales Order.....u need to pass in its full length values.
regards
Prabhu
‎2009 Jun 17 6:06 AM
Thanks for replying.
I have made changes to the input parameters in various ways but l end up getting only one error in end.
I get two messages in Return Table
1. Error in document: BKPFF $(ID:RW, Number: 609)
2. FI/CO interface: Inconsistent FI/CO line item data for updating (ID:RW, Number: 016)
Below is my code after changes:
BAPIACHE01 documentHeader = new BAPIACHE01();
BAPIACAR01[] accountReceivable = new BAPIACAR01[1];
BAPIACGL01[] accountGl = new BAPIACGL01[1];
BAPIACTX01[] accountTax = new BAPIACTX01[1];
BAPIACCR01[] currencyAmt = new BAPIACCR01[3];
BAPIACPA00 customerPcd = new BAPIACPA00();
BAPIACKECR[] criteria = new BAPIACKECR[] { };
BAPIEXTC[] ext1 = new BAPIEXTC[] { };
BAPIBILLINGPOSTING.BAPIRET2[] bapiReturn = new BAPIBILLINGPOSTING.BAPIRET2[] { };
BAPIACCRSO[] salesAmt = new BAPIACCRSO[] { };
BAPIACSO00[] salesOrder = new BAPIACSO00[] { };
BAPIACKEVA[] valueField = new BAPIACKEVA[] { };
//Document Header
documentHeader.USERNAME = "abcdef";
documentHeader.HEADER_TXT = "TEST";
documentHeader.COMP_CODE = "2000";
documentHeader.FISC_YEAR = "2009";
documentHeader.DOC_DATE = "20090326";
documentHeader.PSTNG_DATE = "20090326";
documentHeader.DOC_TYPE = "DR";
// Fill up Accounts Receivable with Customer Details
accountReceivable[0] = new BAPIACAR01();
accountReceivable[0].ITEMNO_ACC = "0000000001";
accountReceivable[0].CUSTOMER = "0000022306"; //Added zeros as suggested
//accountReceivable[0].GL_ACCOUNT = "12000"; - Commented as suggested
// Fill up Account GL
accountGl[0] = new BAPIACGL01();
accountGl[0].ITEMNO_ACC = "0000000002";
accountGl[0].GL_ACCOUNT = "51230";
accountGl[0].ORDERID = "000004001462";
//Fill up Account Tax
accountTax[0] = new BAPIACTX01();
accountTax[0].ITEMNO_ACC = "0000000003";
accountTax[0].GL_ACCOUNT = "0000020905";
accountTax[0].TAX_CODE = "S1";
accountTax[0].ACCT_KEY = "MWS";
currencyAmt[0] = new BAPIACCR01();
currencyAmt[0].ITEMNO_ACC = "0000000003";
currencyAmt[0].CURRENCY = "AUD";
currencyAmt[0].CURR_TYPE = "10";
currencyAmt[0].AMT_DOCCUR = (decimal)-300.00;
currencyAmt[1] = new BAPIACCR01();
currencyAmt[1].ITEMNO_ACC = "0000000002";
currencyAmt[1].CURRENCY = "AUD";
currencyAmt[1].CURR_TYPE = "10";
currencyAmt[1].AMT_DOCCUR = (decimal)-30.00;
currencyAmt[1].AMT_BASE = (decimal)300.00;//base amount
currencyAmt[2] = new BAPIACCR01();
currencyAmt[2].ITEMNO_ACC = "0000000001";
currencyAmt[2].CURRENCY = "AUD";
currencyAmt[2].CURR_TYPE = "10";
currencyAmt[2].AMT_DOCCUR = (decimal)330.00;
i tried searching for some notes for this error for this BAPI_ACC_BILLING_POST, but i could not find any.
thanks
‎2009 Jun 17 7:09 AM
hello ,
do u think this mapping is correct one ?.
************* Header **********************************************************************
BAPIACHE01 documentHeader = new BAPIACHE01();
BAPIACAR01[] accountReceivable = new BAPIACAR01[1]; B
APIACGL01[] accountGl = new BAPIACGL01[1];
BAPIACTX01[] accountTax = new BAPIACTX01[1];
BAPIACCR01[] currencyAmt = new BAPIACCR01[3];
BAPIACPA00 customerPcd = new BAPIACPA00();
BAPIACKECR[] criteria = new BAPIACKECR[] { };
BAPIEXTC[] ext1 = new BAPIEXTC[] { };
BAPIBILLINGPOSTING.BAPIRET2[]
bapiReturn = new BAPIBILLINGPOSTING.BAPIRET2[] { };
BAPIACCRSO[] salesAmt = new BAPIACCRSO[] { };
BAPIACSO00[] salesOrder = new BAPIACSO00[] { };
BAPIACKEVA[] valueField = new BAPIACKEVA[] { };
//Document Header documentHeader.USERNAME = "abcdef";
documentHeader.HEADER_TXT = "TEST";
documentHeader.COMP_CODE = "2000";
documentHeader.FISC_YEAR = "2009";
documentHeader.DOC_DATE = "20090326";
documentHeader.PSTNG_DATE = "20090326";
documentHeader.DOC_TYPE = "DR";
**********************Line 1***********************************************************
// Fill up Accounts Receivable with Customer Details accountReceivable[0] = new BAPIACAR01();
accountReceivable[0].ITEMNO_ACC = "0000000001";
accountReceivable[0].CUSTOMER = "0000022306";
//Added zeros as suggested //
accountReceivable[0].GL_ACCOUNT = "0000012000";
- Commented as suggested
// Fill up Account GL accountGl[0] = new BAPIACGL01();
//base amount currencyAmt[2] = new BAPIACCR01();
currencyAmt[2].ITEMNO_ACC = "0000000001";
currencyAmt[2].CURRENCY = "AUD";
currencyAmt[2].CURR_TYPE = "10";
currencyAmt[2].AMT_DOCCUR = (decimal)330.00;
***************** Line nO 2 ******************************************************************
accountGl[0].ITEMNO_ACC = "0000000002"; a
ccountGl[0].GL_ACCOUNT = "0000051230";
accountGl[0].ORDERID = "000004001462";
//Fill up Account Tax accountTax[0] = new BAPIACTX01();
currencyAmt[1] = new BAPIACCR01();
currencyAmt[1].ITEMNO_ACC = "0000000002";
currencyAmt[1].CURRENCY = "AUD";
currencyAmt[1].CURR_TYPE = "10";
currencyAmt[1].AMT_DOCCUR = (decimal)-30.00;
currencyAmt[1].AMT_BASE = (decimal)300.00;
************ Line No 3************************************************************************
accountTax[0].ITEMNO_ACC = "0000000003";
accountTax[0].GL_ACCOUNT = "0000020905";
accountTax[0].TAX_CODE = "S1";
accountTax[0].ACCT_KEY = "MWS";
currencyAmt[0] = new BAPIACCR01();
currencyAmt[0].ITEMNO_ACC = "0000000003";
currencyAmt[0].CURRENCY = "AUD";
currencyAmt[0].CURR_TYPE = "10";
currencyAmt[0].AMT_DOCCUR = (decimal)-300.00; ---> No need of -Ve values.
sorry , i'm unable to put it in proper way,i dont know the reason.
Edited by: Prabhu Peram on Jun 17, 2009 2:10 PM
‎2009 Jun 22 6:56 AM
this is my new code and still I am having same error as below:
FI/CO interface: Inconsistent FI/CO line item data for updating
I am stuck on this, if i get to know what mistakes i am doing and what should i do to remove them.
BAPI_ACC_BILLING_POST.BAPI_ACC_BILLING_POSTService srv = new
BAPI_ACC_BILLING_POSTService();
NetworkCredential nc = new NetworkCredential("user", "pwd");
srv.Credentials = nc;
BAPIACHE01 documentHeader = new BAPIACHE01();
BAPIACAR01[] accountReceivable = new BAPIACAR01[1];
BAPIACGL01[] accountGl = new BAPIACGL01[1];
BAPIACTX01[] accountTax = new BAPIACTX01[1];
BAPIACCR01[] currencyAmt = new BAPIACCR01[3];
BAPIACPA00 customerPcd = new BAPIACPA00();
BAPIACKECR[] criteria = new BAPIACKECR[] { };
BAPIEXTC[] ext1 = new BAPIEXTC[] { };
BAPIRET2[] bapiReturn = new BAPIRET2[] { };
BAPIACCRSO[] salesAmt = new BAPIACCRSO[] { };
BAPIACSO00[] salesOrder = new BAPIACSO00[] { };
BAPIACKEVA[] valueField = new BAPIACKEVA[] { };
//Fill up document Header
documentHeader.OBJ_TYPE = "BKPFF";
documentHeader.OBJ_KEY = "$";
documentHeader.OBJ_SYS = "POS";
documentHeader.COMP_CODE = "2000";
documentHeader.USERNAME = "user";
//documentHeader.FISC_YEAR = "2009";
documentHeader.PSTNG_DATE = "20090326";
documentHeader.DOC_DATE = "20090326";
documentHeader.DOC_TYPE = "DR";
documentHeader.HEADER_TXT = "Hire";
//documentHeader.AC_DOC_NO = "123456";
// Fill up Accounts Receivable with Customer Details
accountReceivable[0] = new BAPIACAR01();
accountReceivable[0].ITEMNO_ACC = "1";
accountReceivable[0].CUSTOMER = "0000022306";
accountReceivable[0].GL_ACCOUNT = "0000012000";
accountReceivable[0].ITEM_TEXT = "Hire";
// Fill up Accouns GL
accountGl[0] = new BAPIACGL01();
accountGl[0].ITEMNO_ACC = "2";
accountGl[0].GL_ACCOUNT = "0000051230";
accountGl[0].TAX_CODE = "S1";
accountGl[0].ITEM_TEXT = "Hire";
//accountGl[0].ACCT_KEY = "MWS";
//accountGl[0].ORDERID = "4001462";
//Fill up Account Tax
accountTax[0] = new BAPIACTX01();
accountTax[0].ITEMNO_ACC = "3";
accountTax[0].GL_ACCOUNT = "0000020905";
accountTax[0].TAX_CODE = "S1";
//accountTax[0].ACCT_KEY = "MWS";
//accountTax[0].TAX_RATE = (decimal)10.00;
// Fill up currency amount for all the above
currencyAmt[0] = new BAPIACCR01();
currencyAmt[0].ITEMNO_ACC = "1";
currencyAmt[0].CURRENCY = "AUD";
currencyAmt[0].AMT_DOCCUR = 330;
currencyAmt[1] = new BAPIACCR01();
currencyAmt[1].ITEMNO_ACC = "2";
currencyAmt[1].CURRENCY = "AUD";
currencyAmt[1].AMT_DOCCUR = (decimal)-300.00;
currencyAmt[2] = new BAPIACCR01();
currencyAmt[2].ITEMNO_ACC = "3";
currencyAmt[2].CURRENCY = "AUD";
currencyAmt[2].AMT_DOCCUR = (decimal)-30.00;
currencyAmt[2].AMT_BASE = (decimal)300;
string objSys = "";
string objType = "";
objKey = srv.BAPI_ACC_BILLING_POST(ref accountGl, ref accountReceivable, ref accountTax, ref criteria,
ref currencyAmt, customerPcd, documentHeader, ref ext1, ref bapiReturn,
ref salesAmt, ref salesOrder, ref valueField, out objSys,out objType);
‎2009 Jun 30 5:38 AM
‎2009 Aug 07 12:17 PM
Hi,
I'm also facing with the same problem. With my program I can post the Customer & Vendor Account items but for GL account it is giving the following error :
E FI/CO interface: Inconsistent FI/CO document header data for updating
I'm using BAPI_ACC_DOCUMENT_POST.
I'm stuck here. I don't have any idea why this problem is occurring.
This is my first development in FICO
Regards
-Tom