09-15-2007 10:16 PM
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
09-16-2007 7:22 AM
10-29-2007 7:15 PM
Hi Louis, I'm facing the same error message.. how did you solve it?
Thanks
/AD
11-23-2007 7:45 PM
my error was due to an internal table wasn't getting cleaned before the next call.
source: http://www.codemare.blogspot.com