cancel
Showing results for 
Search instead for 
Did you mean: 

Formula in sample-drawing procedure

Former Member
0 Kudos

Hi All,

We require container based sampling. If the sample container size is >=10 it should be 100% else it should be sqrt N1. I'm able to achieve this either 100% or sqrt N1 but not both in one sampling procedure.

Is there any possibility that a formula with a condition IF >=10 then 100% Sampling else sqrt(N+1) can we written in sample-drawing procedure QPV3.

In sample-drawing item view of QPV2, can we write a formula with our required condition in the formula field of primary samples?

Please do the needful

Thanks & Regards,

Praveen

Edited by: praveengaddipati on Feb 20, 2012 1:27 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member42743
Active Contributor
0 Kudos

I think you meant if <= 10 it is 100% inspection and with more than ten containers, you do SQRT N +1

I had a similar issue and had to set up a sampling scheme for this. I used Excel to create my 'table' for the various values and than just loaded them into a sampling scheme manually. It took some time but it works fine and once created you would not make changes to this. I did this for up to 1000 containers in our case. We would never receive in more than 1000 containers in our business. I don't know about yours.

FF

Former Member
0 Kudos

Hi,

Correction. It's <=10. Yeah even i tried the same using sampling scheme and got the desired result but just like you said i need to update manually. Can you brief me what all you have done for this?

Thanks,

Praveen

Edited by: praveengaddipati on Feb 20, 2012 5:28 PM

former_member42743
Active Contributor
0 Kudos

I'm not sure what you mean by updating manually or what you want to know.

In the sampling scheme I would basically do the following

Lot Qty. Sample Size

1 1

2 2

3 3

4 4

5 5

6 6

7 7

8 8

9 9

10-12 4

13-20 5

21-30 6

31-42 7

etc

I figured this out in Excel by using the following formula:

=ROUND(SQRT(A4),0)+1

FF

Former Member
0 Kudos

Hi,

Thanks for your reply. It's very helpful. I need to use excel too as there is no chance of containers being less than 1000 as per client.

Thanks,

Praveen

former_member42743
Active Contributor
0 Kudos

Ok.. if there is no chance of the container number being less than 1000 than why are you bothering with the first 10?

Why not create a new sample determination rule and create your own FM for it. I would suggest copying the one used for a percentage inspection. QDRS_PERCENTAGE_SAMPLE. Copy this FM and modify it to perform your SQRT N + 1 calculation. Assign to the percentage sampling type.

When you create a new sampling procedure and select percentage sample it should ask you to select sample determination rule 40 or your Z1 rule.

FF

Former Member
0 Kudos

Hi,

Requirement is for below 10 it should be 100% else SQRT(N1) calculation. Can you brief me how to modify FM to perform SQRT(N1) caluculation and how it would help my requirement?

Thanks,

Praveen

Edited by: praveengaddipati on Feb 22, 2012 5:42 AM

former_member42743
Active Contributor
0 Kudos

You need an ABAP'er to work with to create the new FM. I'm not one!

But in the FM I indicated, your ABAP'er should be able to find where the calculation is performed. He/she should find a variable that contains the inspection lot size. You basically substitute your logic. You should be able to put in an If-then statement to handle the 100% inspection when <= 10. Use the SQRT N+1 for lot size >10.

Once you have your FM ready, it is simply a matter of doing the config.

FF

Former Member
0 Kudos

Thanks for the reply. Would do the same and revert.

Regards,

Praveen