Sunday, 20 December 2009

ERS Invoice Posted 2 times. How to prevent it

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
invoiced.

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
do.

Note 216997 gives you a little program to see how many items got posted
twice.

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
ERS job.

No comments:

Post a Comment