‎2014 Mar 24 3:59 PM
Hi,
I am using the BAPI BAPI_ACC_DOCUMENT_REV_POST to reverse FI documens but the function module generates a short dump when I commit the transaction.
I first use the function module BAPI_ACC_DOCUMENT_REV_CHECK to simulate the reversal operation and it does not return any error. I then use BAPI_ACC_DOCUMENT_REV_POST which returns the number of the reversed document. But when I commit, a short dump is generated.
The type of the exception is INS_ERROR_IT and it occurs in the include LFLQPOF01(Form UPDATE_ITEM ). After debugging the program, I noticed that the standard is trying to insert a row in FLQITEMBS table which exists already.
What is surprising is that reversing the same document directly through FB08 is done correctly.
I started looking to SAP notes, but no succes to finding a suitable solution.
Does any one have a similar issue? Any tips?
Thank you all in advance.
‎2014 Mar 24 5:07 PM
Hello,
Try with function module "TB_FI_DOCUMENT_REVERSE".
Regards,
TP
‎2014 Mar 24 4:34 PM
Hello,
You can run the standard ACC_BAPI_TEST_DOCUMENT program and check if the same issue is coming. It will be then easier for you to find out what exactly happening.
Thanks & Regards,
Abhijit
‎2014 Mar 25 1:33 PM
Thank you for your response.
I did a test but the the program does not recognize the field "Reference key". It seems like I need to implement some notes to make it work.
‎2014 Mar 24 5:07 PM
Hello,
Try with function module "TB_FI_DOCUMENT_REVERSE".
Regards,
TP
‎2014 Mar 25 1:34 PM
Thank you for your response.
The function module works perfectly for all my FI documents.