Hello Scott,
SAP does not return accounting document information as part of the log messages, so it is not possible to capture that in the script.
I did try do MIRO via a BAPI (BAPI_INCOMINGINVOICE_CREATE) to see if that offered an enhanced output but no luck there as well.
In both cases, only the invoice number is returned.
You could however supply the invoice number to a query script as a next step which can return the associated accounting document.
I created a simple one that worked for the table BKPF and choose criteria - company code, fiscal year and reference key.
The reference key is constructed by concatenating the Invoice doc+Fiscal Year, remember to post-pad with spaces.
Hope that helps
Jayasri
------------------------------
Jayasri Varyani | Solutions Engineer
Winshuttle North America |
------------------------------