cancel
Showing results for 
Search instead for 
Did you mean: 

Error msg in BAPI_INSPOPER_RECORDRESULTS gives "Set either the acceptance or the Rejection Indicator"

Former Member
0 Kudos

Hi QM Guru,

i have created a Z program  to copy the result from one Insp. lot to other  by call of BAPI "BAPI_INSPOPER_RECORDRESULTS". when i try to copy the result from one insp. lot to other system give a error msg "Set either the acceptance or the rejection indicator". pleae Help..

Regards,

Payal Gupta

Accepted Solutions (0)

Answers (1)

Answers (1)

anand_rao3
Active Contributor
0 Kudos

I would suggest you should first try to do this manually. If the problem persists then there is no issue with the BAPI as it must have thrown the standard error message. For this case I think the sampling procedure is causing the issue. Check if the sampling scheme in the inspection lot (for which you are doing result recording) has the Acceptance and Rejection Number defined. For lot copying functionality to work it is better to have the same sampling procedures as that is used in reference inspection lot.

Anand

Former Member
0 Kudos

Hi Anand,

Manually its working fine but during Copy from one Insp. Lot to Other not Working...

Payal Gupta

busyaban7
Active Contributor
0 Kudos

Hi Payel,

Try using the below process for BAPI_INSPOPER_RECORDRESULTS -

Mechanism of work -  

InspLt1 => MIC1 =====> InspLt2 => MIC2 .....................[It can be MIC1 or any mapping reference MIC2]

Note: There should be a unique link between InspLt1 and InspLt2 as you normally can't generate external number range to copy inspection lots. Now, if the material & inspection plan linked to the As-Is Lot and To-Be lot is same and you are trying to copy inspection results, please ensure that the inspection plan 1 and inspection plan 2 are similar and you know, under which MIC the results has to be copied.

Process to follow -

i. For the target MIC2, at first check the tolerance ranges for upper limit [pwa-qpmk-toleranzun] and lower limit [pwa-qpmk-toleranzob].

ii. If you validate the user input value (qualitative/quantitative) within these two values, programmatically calculate the good result as c-a, and if outside tolerance then flag it as c-r.

iii. Then try to pass either of this calculated indicator back to "Set either the acceptance or the rejection indicator" for BAPI_INSPOPER_RECORDRESULTS.

Thanks,

Arijit

Former Member
0 Kudos

Hi Arijit / Rao,

Thanks for reply.. In same Insp. Lots its working fine and same other it give error msg.. wat is the reason for the same .. can you explain it????

Payal

busyaban7
Active Contributor
0 Kudos

Hi Payal,

You have not confirmed if your program already has the check for selecting the upper limit, lower limit for MIC and then do the comparison for input value by user and then set the flag as "A" or "R". This was your initial query and we are expecting a feedback form you on that.

Based on your second remark now, it seems for some case your result copy FM is working. It means there is already some logic implemented to do the requested functionality, which you off course need to check and feedback.

But I think, program alone may not solve this issue as there could be some issues with MIC record used in inspection plan [Example - If any upper/lower limit missing, or sampling procedure is not active but input structure have this information, DMR missing, but validation check is looking for it, etc], or any other master data you are using in the upload. So you really need to double check for each such cases, if there is a problem or not first form the functional side and then form ABAP side. 

For example -

a) Upper/Lower limit missing - If Upper limit is missing, and you are trying to compare the value, as Input (i ) > Upper Range (r) ===> Set "Reject". As this upper range is missing, you can't set the value for (i ). Similarly, if Input (i ) > Lower limit (l) ===> Set "Accept" but if lower limit is missing, then also you can't practically compute the criteria. So, in those cases, stick to standard SAP valuation...and I think both such cases are 'Accept", but please double check it by testing.

Similarly if the data record available in MIC, is not compatible with inputs send by the upload structure, there could be an issue too.

Thanks,

Arijit