‎2008 Jan 11 10:02 PM
Hello Friends,
I'm seeing an issue with BAPI_ACC_DOCUMENT_POST...
It is creating more than one document for the given data but returning only one Doument number since return parameter is not a table, it is a import parameter.
How I can find all the documents that were created when this BAPI is executed? Is this a bug in the BAPI? If so do you have any solution or do you recommand any other BAPI.
Thanks in Advance
Regards,
Satya.
‎2008 Jan 11 10:04 PM
It only creates one document per BAPI call. Are you calling it in a LOOP?
Rob
‎2008 Jan 11 10:04 PM
It only creates one document per BAPI call. Are you calling it in a LOOP?
Rob
‎2008 Jan 14 3:04 PM
Thank you for your respose.
No...I'm calling this BAPI only one time. For example when I pass 21 line items to GL table and currecny table...(which consists of two different currencies)..BAPI is creating two documnets. However in the return we can see only one document...But if go to FB03 and look for subsequent number that is also being available.
Thanks a lot for your help.
‎2008 Jan 15 9:21 AM
In some circumstances this BAPI can create more than one document, for example, when posting a cross-company document. It will post one document for the first company code and one document for the second company code. These will be linked in the database so it is possible to determine both document numbers once the BAPI has finished processing.
‎2008 Jan 15 2:47 PM
‎2008 Jan 15 2:52 PM
How can I find out the linkage...Is that BKPF table? Thank you for help.
‎2008 Jan 15 5:10 PM
If field BKPF-BVORG is populated then you are performing cross-company postings. This field is used to link all docs that are posted cross-company and it is possible for there to be two or more docs. This is standard SAP functionality.
Table BVOR stores all documents that belong to the key specified in BKPF-BVORG.
Hope this helps.
‎2008 Jan 16 4:14 PM
Your reply sloves our issue...Thanks for your help. Poins assisgned as an appriciation.
‎2008 Feb 29 3:16 PM
hi satya ,
my problem , I am using BAPI_ACC_DOCUMENT_POST for posting cutomer incoming payment.The return is giving the successful message that is S RW 605 document successfully posted, but it is not updated in databse. I used BAPI_TRANSACTION_COMMIT also after BAPI_ACC_DOCUMENT_POST. If you send your code, I will try to resolve my issue.
Thanks in advance
Kumar
‎2008 Feb 29 9:06 PM
Here is the code:
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 =
ACCOUNTPAYABLE = ACCOUNTPAYABLE
CURRENCYAMOUNT = CURR
RETURN = RETURN.
READ TABLE RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Assign some points if it useful.
‎2008 May 10 10:01 AM
Hi,
I have tried BAPI_ACC_DOCUMENT_POST for cross company scenario.but got an error inconsistent fico interface, as the document header company code will be different from for some line item company codes?how did u ue this for cross company scnario?
and how abt the line items for clearing the post.do we need to select the account and create an item and pass or BAPI does internally automatically.
Please reoly, bit urgent, having delivery
Thanks in advance.
‎2008 Jun 12 5:57 PM
For cross-company postings, we needed to set the header company code equal to the company code of the first line item. I believe there is an OSS note that discusses this.
‎2008 Feb 27 3:56 PM
‎2008 Feb 27 11:09 PM
My issue was resloved....Do you have same isse? which code do you want me to send? BVOR access code?
‎2008 Feb 28 4:14 PM
or try the FM
call function 'FI_ACCBELNR_GET'
tables
t_belnr = it_belnr.
after BAPI_ACC_DOCUMENT_POST
but I never tried it for cross company code postings
‎2008 Jun 12 6:00 PM
To get a list of related posted documents, this is how SAP does it, and us as well:
Get a list of all related documents, just like SAP does it:
call function 'AC_DOCUMENT_RECORD'
EXPORTING
i_awtyp = bkpf-awtyp
i_awref = bkpf-awkey+0(10)
i_aworg = bkpf-awkey+10(10)
i_awsys = bkpf-awsys
x_dialog = ' '
i_bukrs = bkpf-bukrs
TABLES
t_documents = gt_documents
EXCEPTIONS
NO_REFERENCE = 1
NO_DOCUMENT = 2.