Draw Sample Devices from Lot
Application component: Device Management
App type: SAP GUI
Description:  The sample devices and spare sample devices are drawn from a lot using random numbers. These devices are then removed and inspected in order to assess the quality of the entire lot. Devices can remain installed for the inspection if the Installed Devs field (Certify Installed Devices) is selected in the device. You can determine: Whether warehouse devices should be taken into accountThis is possible for the total lot procedure at individual lot level or at drawing level. Whether you require a single drawing or a double drawingThis is only possible before the first drawing. If a certain number of devices fail in the first of a double drawing, the devices determined in the second drawing are used. For official lots, this number is specified by the calibration authority. For internal lots, it is specified by the utility company.   During lot device determination, all lot devices receive an internal identification number. If the internal identification number of a device matches the random number, that device is used as a sample lot. Once the fixed number of sample devices has been determined, the spare sample devices are selected in the same way. The following legal regulations are implemented in the IS-U system: Number of devices to be drawn according to the Germany calibration regulation of August 12, 1988 ((Federal Law Gazette 1988, no. 43, p. 1657ff) §14 Random number table for Germany according to DIN (German Industrial Standard) EN 60514 Part 6 / VDE 0418 Algorithm for Determining Random Numbers A maximum of two drawings a year  At the end of the drawing, a log is displayed that you should read line by line. It shows the stages of the drawing and a list of the sample devices and spare sample devices. The drawing is not completed until the log is saved. The devices are then selected as sample devices in their corresponding master records. The log can be printed out as proof for the calibration authority. If you want to use your own algorithm to draw sample devices you can do this using BAPI BAPI_ISULOT_INS_SAMPLE_DEVICES. 
Key features:  The random number table consists of 50 lines (j) and 50 columns (i), in which the numbers 0 to 9 are arranged randomly. To display the table, choose Environment  Display DIN table. The numbers are arranged in pairs so they can be read more easily. The table is accessed until all required random numbers have been determined. A random number does not produce a sample device or a spare sample device if: The random number is larger than the lot size The random number is zero The random number has already been determined The device has already been a sample device or a spare sample device (this can be changed in Customizing) The device is in the warehouse (if warehouse devices are not permitted during the drawing) The device is not allocated to the lot (due to a removal, for example) The device does not exist The device cannot be processed during the drawing (due to changes to the device by a different transaction)  Initial Access The first time you access the table is referred to as initial access and is used to determine the first random number. It consists of a starting line j and as many starting columns i as there are digits in the lot size. You can change this before the first random number is determined. Initial access is proposed automatically for every drawing and is determined based on the current time. Based on the minute as the starting column and the second as the starting line, two-digit random numbers are determined from the random number table and used as starting lines or starting columns. The following special features apply: If the current time produces a first starting line or starting column that is higher than 50, that number is subtracted from 100 and the difference is used. If the current time produces a first starting line or starting column of 0, the starting line or column 1 is used.  The two-digit numbers for the starting line or starting column are then found based on the starting line and starting column determined by the current time. The following conditions apply: If the first decimal place of a starting number is greater than four, it is ignored and the next random number is determined. If a number is repeated during generation of the starting columns, it is rejected and a further random number is determined.  If two drawings have the same starting numbers, they will also have the same random numbers. This allows you to repeat a drawing, for example, for devices that cannot be processed in the short-term (these devices are contained in the log). In this case, the drawing is not saved and the transaction is called again so that the device can be marked as a sample device when it can be processed again.  First Random Number The first random number is found where the starting line meets the starting columns. The start access is saved with the drawing date in the master record of the corresponding lot so that information about the inspection is available at any time.  Further Random Numbers The next random number is determined from the point where the line j + 1 meets the predetermined starting columns. If the line becomes j = 50 + 1, it is set back to 1. However, each of the predetermined starting columns is simultaneously increased by 1. If, as a result of this process, a column becomes i = 50 + 1, then it is set back to 1. Then line 2, line 3, and so on are accessed using the starting columns previously increased by 1. Example For a lot with 250 devices, a start access was randomly determined with the starting line j = 2 and the starting columns i = 1, 4, 3.Excerpt from the DIN-random number table:   Column I Line j 1 2 3 4 5 1 2 2 1 7 6 2 1 9 3 6 2 3 1 6 7 7 2 4 7 8 4 3 7  From this table, the first random number determined is 163, the second is 177, the third is 734, and so on. This third random number does not produce a sample device since the number is larger than the lot size. Using this algorithm, the random numbers are repeated after the table has been accessed 2500 times. Therefore, after the first 2500 times, the first starting column is increased by 1, the second by 2, the third by 3, and so on. After an additional 2500 times - if the start access has already been increased - the first column is increased again by 1, the second by 2, and so on. However, the contents of the table are never changed.