Hello everyone,
I would like to ask you for support with clearing of obsolete GR/IR using MIRO transaction.
I was looking for the best approach for clearing and decided to use BAPI to create script based on module BAPI_INCOMINGINVOICE_CREATE. This topic was discussed on the forum and I have found very useful script and instruction, but I'm still struggling some problems during the run.
As a base I have used script shared by Sigrid and extended it by data from GLACCOUNTING area. Unfortunately it gives me error message "Enter a reference to a valid goods receipt (line 000001)".
I found out this may be caused by missing fields:
ITEMDATA – REF_DOC
ITEMDATA – REF_DOC_YEAR
ITEMDATA – REF_DOC_IT
I have added and filled required fields, but something is still causing the problem. Maybe I'm still missing something, created loop is wrong or some conditions are required to enable posting of the clearing document.
I will appreciate any comments and advise on this topic.


Kind regards,
Katarzyna
------------------------------
Katarzyna Szymczewska | Accounting and Reporting Senior Data Analyst
Owens Illinois | 123
------------------------------