‎2007 Jun 14 11:37 AM
Hi,
We're using BAPI BAPI_ACC_DOCUMENT_POST to post to G/L.
The G/L posting works fine, postings are made.
We're expecting a CO-posting to Cost Element too. This is not the case.
This is how we filled the BAPI structures/tables (currencyamount is also filled):
documentheader:
BUS_ACT BKPF
USERNAME myusername
HEADER_TXT text
COMP_CODE 1
DOC_DATE 20070614
PSTNG_DATE 20070614
DOC_TYPE AB
REF_DOC_NO 123456
COMPO_ACC FI
accountgl:
ITEMNO_ACC 0000000001
GL_ACCOUNT 0000012345
ITEM_TEXT0 itemtext
ALLOC_NMBR 123456
COSTCENTER 0000000999
Do we need to fill more fields (and which/how)?
Any help would be welcome.
Best regards,
Mark
‎2007 Jun 14 11:58 AM
Hi,
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = st_bapiache09
IMPORTING
obj_key = w_awkey
TABLES
accountgl = t_bapiacgl09
accountpayable = t_accountpayable
accountreceivable = t_accountreceivable
currencyamount = t_bapiaccr09
extension1 = t_extension
return = t_bapiret2
The posting key is automatically assigned by the BAPI, u can't transfer it.
You can post upto 998 entries the 99th entry should be posted in G/L account as nullifying entry. This 99th entry should contain the total of all the 998 entries
<b>include LACC9F20</b>
Further Information
You can find further information in the SAP Library under "Financials -> Accounting - General (AC) -> Interfaces to Accounting (AC)".
<b>Reward points</b>
Regards
‎2007 Jun 14 12:11 PM
Hi,
The G/L posting is ok, there's no CO-posting. The total number of lines to be abel to post are no problem/issue.
What fields are required to create te CO-posting (cost element)?
Best regards,
Mark
‎2007 Jun 14 12:14 PM
Hi,
You need to populate the structuure criteria & pass it to the FM.
I hope this helps,
Regards
RBC
‎2007 Jun 14 12:29 PM
Hi Raju,
How do I fill this structure?
I thought this was only neccessary for CO-PA. We do not use CO-PA.
Best regards,
Mark
‎2007 Jun 14 1:03 PM
Hi,
I am sorry, you are right it should be done only for CO-PA.
Sorry for misguiding you.
Regards
Raju Chitale
‎2007 Jun 19 3:39 PM
Hi,
The answer is :
clear field COMPO_ACC in structure documentheader.
Best regards.
Mark