cancel
Showing results for 
Search instead for 
Did you mean: 

How to realize sample inspection by order in SAPME

0 Kudos
382

SAPME have sample plan function, seems the sample is randomly selected. Is it possible to realize select sample SFC by order?

For example, select the last one SFC as sample SFC from every 100 SFCs of normal routing, then change sample SFC to inspection routing.

Accepted Solutions (0)

Answers (1)

Answers (1)

sergiy_katerinich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi!

You cannot turn off randomness in the standard implementation of Sample Plan.

As a workaround, you can consider creating a routing script (assigned to your "sampling" step) which will be re-directing outgoing SFCs to a specific step where your "sampled" SFCs will be accumulated. Such approach was used by some customers a while ago.

Regards,

Sergiy

0 Kudos

Dear Sergiy,

Thanks a lot for your information. Could you please share some sample routing script for how to re-directing outgoing SFCs to a specific step?

Best Regards,

Lilian

sergiy_katerinich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The easiest and straightforward way is a kind of randomization:

 // Sample 25% of the SFCs
r=new java.util.Random();
n=r.nextInt(100);
//print("n:"+n);
if (n<25) {
exit(1000);
} else {
exit(0);
}
More sophisticated approaches are also possible.
0 Kudos

Dear Sergiy,

Thank you very much for your sharing.

Best Regards,

Lilian