Skip to Content

BAPI 'BAPI_ACC_DOCUMENT_POST' Gives me Error when adding more than one

Hi

I have created code that has a loop and adds GL Documents in SAP.

If I only add one document it works fine.

If I add more than one document, the first one goes through fine. The second and anything after fail. The ones that fail give the following error

"FI/CO interface: Line item entered several times"

Usually get this error if you define more than one row with the same row number, in other words they are not unique row n numbers.

But the first GL Document has row id 1 for the 1st row, row id 2 for the 2nd row.

the second GL Document has row id 1 for the 1st row, row id 2 for the 2nd row.

It should not conflict with each other as each document gets "commited" before I start with the next document.

The only thing I can think of is that after I commit the bapi it is not clearing the BAPI. Does one need to clear the BAPI before adding another GL Document??? How does one clear the BAPI???

Does anyone have a simple example using 'BAPI_ACC_DOCUMENT_POST' where you have a loop and add a GL Document a few times???

Any response is appreciated 😉

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 16, 2007 at 06:22 AM

    Solved it

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.