Hi Marcos,
Please try using BAPI_INSPOPER_RECORDRESULTS and BAPI_TRANSACTION_COMMIT in sequence, to commit the results uploaded form BAPI.
Path: SM37 => Function Module => Execute => Test Sequences => 1) BAPI_INSPOPER_RECORDRESULTS, 2) BAPI_TRANSACTION_COMMIT
For 'Closing' the results uploaded, you can try developing the business logic by using the below fields from the structure -
CHAR_RESULTS or SAMPLE_RESULTS =>
i) CLOSED = "X" .... only for MIC status to be "5" and 'BLANK" for MIC status "2/3".
ii) EVALUATED = "E" ........only for those MIC's where the system status has to be "3" or "5".
NOTE: If Evaluated field is Blank, then Closed field can't be X.
iii) EVALUATION = "A" or "R" for the input result valuation.
NOTE: This field will only be filled in only if Evaluated field is filled-in. You can set this value programmatically by calculating the ranges and deriving it.
I believe there will surely be many threads on this topic. Please can you Google it a bit more.
Thanks,
Arijit

.jpg)








