cancel
Showing results for 
Search instead for 
Did you mean: 

How to close inspection characteristics when using BAPI?

Former Member
0 Kudos

Hi experts,

I am trying to use BAPI_INSPOPER_RECORDRESULTS to confirm measured values. This BAPI works fine, but I also would like to close the MIC after the last value.

I have defined user settings in QE01 t-code, but it is not taken into account when using BAPI.

Is there any way to close the MIC automatically in this scenario?

Could anyone please help me?

Thanks and regards,

Marcos

Accepted Solutions (1)

Accepted Solutions (1)

busyaban7
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi friends,

Thank you for your replies.

I tried your suggestions and now the BAPI is closing the MIC correctly.

I just set the parameter CLOSED = X in the CHAR_RESULTS.

Before we talk, I was using only SINGLE_RESULTS structure.

Thanks and regards,

Marcos

Answers (2)

Answers (2)

0 Kudos

Hi ,

How to force close using the same bapi any idea please ?

Former Member
0 Kudos

Hi Marcos,

You would need to set the status(force it) of the MIC after the last value to 5 - Processing is completed (QASR-SATZSTATUS)

Please check this posting:

Thanks,

Andy