2006 Jul 10 6:07 AM
Hi All,
I am trying to create posting accounting posting using BAPI <b>BAPI_ACC_DOCUMENT_POST</b> for transaction FB60/FB70. I am getting error saying <b>FI/CO interface: Line item entered several times</b>. By debugging I found field in header <b>COMPO_ACC</b> checked before posting. Check fail for this field COMPO_ACC. As per BAPI documentation this field as to be left blank, it is blank as per my interface test. But I am getting above error of I dont populate and I am not sure do I have to populate this field in header. Have nay of you come across any such issue. Thanks in advance.
Regards,
Tim
2006 Jul 10 6:29 AM
Hi,
If you check the documentation of the above BAPI as given below,
"The field COMPO_ACC must remain empty for a general posting. If an SAP
component is transferred in this field, a posting will only be made in
this component. This function is only used for posting subsequently."
Check whether any SAP component is assigned to this, if so , assign the component value to it and try posting, this might help,
Rgds,
2006 Jul 10 6:29 AM
Hi,
If you check the documentation of the above BAPI as given below,
"The field COMPO_ACC must remain empty for a general posting. If an SAP
component is transferred in this field, a posting will only be made in
this component. This function is only used for posting subsequently."
Check whether any SAP component is assigned to this, if so , assign the component value to it and try posting, this might help,
Rgds,
2006 Jul 10 6:52 AM
Hi Sailatha ,
YES I read that documentation. But question is What component value to assign if its interface to post customer and vendor posting. Even the business person is not sure so I tried FI and GL, no use FI I get same error and GL I get some other error Combination of company code 0100 transaction RFBU not assigned to a ledger. So I not sure what value I should be using?.
Cheers,
Tim
2006 Jul 10 6:59 AM
Hi,
If you are not sure of the value to be passed and you dont get any help from your functional force, then you have to go by the trial & error method, if you go to the domain of field 'COMPO_ACC' i.e.COMPO, it has some values maintained, you may try to pass the values maintained for this at the domain level and see how it works, still there is any problem, you can always debug and check what value the system is expecting at run time,
Hope this helps,
Rgds,
2006 Jul 10 7:02 AM
Can you post your code for more clarity?
Thanks & Regards,
Govind.
2006 Jul 10 7:22 AM
Here is hoe code written to post document via RFC call ...
LOOP AT ZFI_BAPI_ACC_DOCUMENT_POST INTO ZGVS_ACC_DOCUMENT_POST
MOVE-CORRESPONDING: ZGVS_ACC_DOCUMENT_POST-DOCUMENTHEADER TO ZGV_DOCUMENTHEADER,
ZGVS_ACC_DOCUMENT_POST-CUSTOMERCPD TO ZGV_CUSTOMERCPD,
ZGVS_ACC_DOCUMENT_POST-CUSTOMERCPD TO ZGV_CUSTOMERCPD.
(header details in ZGVS_ACC_DOCUMENT_POST-DOCUMENTHEADER sample header details populated in above RFC call)
BUS_ACT = RFBU
USERNAME = RFCUSER
HEADER_TXT = 5100674 50447
COMP_CODE = 0100
DOC_DATE = 20.06.0512
PSTNG_DATE = 20.06.0705
DOC_TYPE = DR
REF_DOC_NO = 5100674 )
ZGV_ACCOUNTGL[] = ZGVS_ACC_DOCUMENT_POST-ACCOUNTGL[].
ZGV_ACCOUNTRECEIVABLE[] = ZGVS_ACC_DOCUMENT_POST-ACCOUNTRECEIVABLE[].
ZGV_ACCOUNTPAYABLE[] = ZGVS_ACC_DOCUMENT_POST-ACCOUNTPAYABLE[].
ZGV_ACCOUNTTAX[] = ZGVS_ACC_DOCUMENT_POST-ACCOUNTTAX[].
ZGV_CURRENCYAMOUNT[] = ZGVS_ACC_DOCUMENT_POST-CURRENCYAMOUNT[].
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
DOCUMENTHEADER = ZGV_DOCUMENTHEADER
CUSTOMERCPD =
CONTRACTHEADER =
IMPORTING
OBJ_TYPE = GV_OBJ_TYPE
OBJ_KEY = GV_OBJ_KEY
OBJ_SYS = GV_OBJ_SYS
TABLES
ACCOUNTGL = ZGV_ACCOUNTGL
ACCOUNTRECEIVABLE = ZGV_ACCOUNTRECEIVABLE
ACCOUNTPAYABLE = ZGV_ACCOUNTPAYABLE
ACCOUNTTAX = ZGV_ACCOUNTTAX
CURRENCYAMOUNT = ZGV_CURRENCYAMOUNT
CRITERIA =
VALUEFIELD =
EXTENSION1 =
RETURN = ZGVI1_RETURN
PAYMENTCARD =
CONTRACTITEM =
EXTENSION2 =
REALESTATE =
ACCOUNTWT =
.
IF ZGVI2_RETURN IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
ELSE.
LOOP AT ZGVI1_RETURN.
CLEAR GV_MESSAGE.
IF ZGVI1_RETURN-TYPE EQ 'E'.
MOVE-CORRESPONDING ZGVI1_RETURN TO RETURN.
CONCATENATE: TEXT-004 ZGV_DOCUMENTHEADER-REF_DOC_NO CO_SPACE RETURN-MESSAGE INTO GV_MESSAGE SEPARATED BY SPACE.
RETURN-MESSAGE = GV_MESSAGE.
APPEND RETURN.
ENDIF.
ROLLBACK WORK.
ENDLOOP.
ENDIF.
ENDLOOP.
2007 Jan 16 2:33 AM
2007 Jun 15 5:29 PM
I realize thei post is old, but it came up when I was trying to find an answer to the same problem and I was almost seduced by the above answer to do trial and error testing with the COMPO_ACC field... However I came across the following response in another thread and it was the correct answer for the same message for my situation. e.g. don't provide both a G/L and vendor line for the same line item.
>>> quote <<<
Re: BAPI_ACC_INVOICE_RECEIPT_POST Error
Posted: Nov 16, 2006 11:28 PM in response to: Aaron Morden Reply E-mail this post
Hi Aaron - I believe that for each line item you should only have only one of the accountgl or accountpayable tables populated but not both. So for the first line item remove the code for the accountgl since it appears it is a vendor item. The GL will be updated inherently.
Andy
>>> endquote <<<
Hope this helps someone else.
Bob