Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with BAPI BAPI_ACC_DOCUMENT_REV_POST

tecsap_tec
Explorer
0 Likes
1,482

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.

1 ACCEPTED SOLUTION
Read only

ThangaPrakash
Active Contributor
0 Likes
1,053

Hello,

Try with function module "TB_FI_DOCUMENT_REVERSE".

Regards,

TP

4 REPLIES 4
Read only

Abhijit74
Active Contributor
0 Likes
1,053

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

Read only

0 Likes
1,053

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.

Read only

ThangaPrakash
Active Contributor
0 Likes
1,054

Hello,

Try with function module "TB_FI_DOCUMENT_REVERSE".

Regards,

TP

Read only

0 Likes
1,053

Thank you for your response.

The function module works perfectly for all my FI documents.