Our config is OK, we have "check double invoice on" and zero tolerance. The
root cause of the problem is deeper than that.
Table EKRS stores ERS items which have been goods receipted and are to be
When an ERS is run it reads table EKRS to see what to invoice but does not
lock the items to be processed.
Therefore, if another ERS starts with overlapping selections ( as in my case
)while the first one is still running everything gets posted twice. As the
performance of ERS (or any SAP transaction involving purchasing documents
with history) is so appalling this can easily happen.
OSS note 175827 explains the cause and offers the helpful advice "make sure
you don't run two at once" i.e. make sure your users never make mistakes.
SAP never make mistakes so they have little tolerance for those of us that
Note 216997 gives you a little program to see how many items got posted
Another note explains that if you try to manually reverse items posted twice
and accidentally put a wrong number in and reverse one only posted once it
has all sorts of dire consequences most notably that EKRS does not get
updated so you can't re-invoice it again.
None of the notes actually offer a solution. In the 564 "program error" OSS
notes relating to ERS I noticed references to user exits. I am going to see
if I can use one of those to lock the relevant EKRS entries for a running