Hi all,
firstly to clarify the logic in the custom BAPI:
- Receive IL Data
- Loop through all Inspection Points and create a record of the Sample ID (placeholder for the results)
- If Sample is already there, then don't try to re-create it.
- Commit the above step
- Clear cache (it's more to try fix the problem rather than part of the logic)
- Loop through all the results for each sample and Record the results against the sample created in step 2
- Commit the above step
If anything fails, the rollback will rollback everything (except the sample place holders as these have already been commited).
I call the BAPI using the JCo action blocks and then depending on the success / fail status, call a commit / rollback action.
Sam, I'm not sure where the option is to Auto Commit - so can't confirm either way.
Image may be NSFW.
Clik here to view.
The key thing here is that the process works from SE37, so there's something different when the BAPI is called from MII - which is different to what I'd imagined it to be.