Setup of Quality Inspection (QI) Requests

A quality inspection (QI) request contains specifications that are associated with a particular item and lot. QI requests can be created: manually; automatically for lots reported as received in the procurement process or customer order return process; as manufactured in the production process; or after lot creation and lot reclassification. In addition, if the 'Quality plan. Open' (QMS009) has auto-reinspection enabled, the system generates reinspection QI requests. See Quality Reinspection Plan.

QI requests each have a test order to indicate the sequence in which a test should be executed in the lab to limit sample size and contamination.

When you manually add a specification that already exists in the QI request, the system enables the override of the data values of a specification test if the new specification is for an item. A completely new test is added to the QI request if the specification is assigned to a quality group.

There are several parts to a QI request:

  • Header (QMS300) includes the ID, the associated item and lot, and, optionally, the type of order such as manufacturing order (MO) or purchase order (PO).
    Note: The QMS300Fnc function program calls the logic for creating or updating a QI request. For more information, refer to the 'QMS300Fnc function program' section below.
  • QI Request Specification (QMS301/B) shows which specifications are attached to the lot.
  • Spec Tests (QMS302/B) are local to the specification in this QI request only.

After setup of the QI request is complete. you may specify test results in 'QI Test Results. Open' (QMS400). The 'Lot auto-approval' setting on the Quality Plan (QMS009) determines whether the system will automatically route to the corresponding Put-away program (depending if it is a PO, MO, or CO) for lot approval after specifying the test results. If the 'Lot auto-approval' check box is not selected in the Quality Plan, the lot approval must be specified by manually opening the applicable Put-away program. A Related option for Put-away is available on QMS400 when the 'Next action' field for the QI request is set to 2-'Reclassify'. See Lot Status Approval Process via Put-away.

The system determines whether updates to the Item Attributes (MIATTR) table are required based on the QI request origin, as well as the balance identity.

  • Standard QI request origin - If the lot has several balance IDs and the attribute is per balance ID, the system finds all those balance identities and inserts records in the MIATTR table for each one.

    If the lot has several balance IDs and the attribute is per balance ID, the system finds all those balance identities and inserts records in the MIATTR table for each balance ID. Lot level attributes are also updated.

  • Retest of lot QI request origin- When the balance ID is specified in the QI request header (QMS300), the system interprets that the retest is for a particular location. If the 'Controlling object' on the attribute is Balance identity, the system will find and update the Balance identity record in the MIATTR table. Lot level attributes are not updated.
    • When no Balance ID is specified in the QI request header (QMS300), it means that the retest is for the entire lot, for example, all locations will have the same test results.
    • If the 'Controlling object' for the attribute is Balance identity, the system retrieves all the records in the MIATTR table for all the balance IDs for the lot and updates all of them with the same test results.
  • Test at pre-shipment QI request origin - No updates to the MIATTR table are performed.
  • Agreement QI request origin - QI requests can be associated with Grower Agreements at agreement line level to ensure that all required tests are executed during the growing period at the area of origin.

The QMS700Fnc function program performs validations such as verifying that quality test dates not overlapping, the test type (qualitative, numeric qualitative, or quantitative) is appropriate, and value setup is correct.

Before you start

The setup conditions outlined in Managing Quality Control must be met.

Follow these steps

Set up QI requests and associated specifications/tests

  1. Create a QI request:

    1. Start 'QI Request. Open' (QMS300).

    2. Select the Create option.

    3. On the A panel, specify the field values as required:

      • Facility
      • Item
      • Lot
      • Required date
      • Reference order category
      • Reference order number
      • Reference order line
      • Include future-dated spec

        Select the check box to include any specifications that have an effective date in the future when the QI request is manually created. Otherwise, the system will include only effective specifications based on the QI request date.

      • Auto-attach

        If this check box is selected, the QI request will include the specifications which have an enabled Auto-attach setting. A QI request of the Standard origin is created in this instance.

      • Re-test

        If this check box is selected, the QI request will include the specifications which have an enabled Re-test setting. A QI request of the Retest of lot origin will be generated manually for the specific item/lot/location/container against which you record test results. This setting is applicable when the stock is in inventory and the monitoring of quality is ongoing.

      • Test at pre-shipment

        The field options of 1, 2, or 3 may be selected to indicate whether a specification will be included on a QI request for testing prior to the shipment of the item. A selection of 1, 2, or 3 will result in a QI request of a Test at pre-shipment origin.

        Take note that the values displayed in the Warehouse, Location, Container, and Delivery Number fields are relevant to a QI request specification that is to be tested at pre-shipment.

        Also, the field value will be inherited from the Quality plan in the instance where the Default QI req as test at pre-ship setting is enabled and the QI request has the required balance identity and a Delivery Number.

  2. Change a QI request:

    1. Start 'QI Request. Open' (QMS300).

    2. On the B panel, select a QI request.

    3. Select the Change option to access the E panel and specify the various field values to update the item and lot information:

      • Request status
      • Approval status
      • Date approved
      • Time approved
      • Approved/Rejected by (the User ID of the person who approved or rejected the QI request)
      • Required date
      • Reference order category
      • Reference order number
      • QI request origin
      • QI request managed by (the User ID of the person who is responsible for executing the QI request)
      • Next action (the field indicates each step in the process of finalizing the QI request)
  3. Copy a QI request:

    1. Start 'QI Request. Open' (QMS300).

    2. Select the Copy option.

    3. On the C panel, you may update any of these fields:

      • Item to which to copy the QI request
      • Lot to which to copy the QI request
      • Test results check box is to be selected if the test results on a QI request should be copied as well
    4. Click Next to progress to the E panel where the desired details will be updated for the newly copied QI request.

    5. You have the option of including other existing tests in the set.

  4. Create the QI Request Specification:

    1. Start 'QI Request Specification. Open' (QMS301).

    2. On the B panel, specify these:

      • Facility
      • Item
      • Lot
      • Specification name
      • Effective date of the specification
    3. Select the Create option to access the E panel and specify the various field values:

      • Spec manager
      • Laboratory manager (the person responsible for ensuring that the analysis is performed)
      • Number of copies
      • Spec status
      • Overridden by (the person who overrides the approval status in the specification)
      • Overridden date
      • Quality reason (for changing the spec status)
  5. Create the QI Request Specification Test:

    1. Start 'Request Spec Test. Open' (QMS302).

    2. Click the Apply button to show all the current tests attached.

    3. On the B panel, for each test to be attached to the QI request, specify the:

      • Test template ID in the Test field
      • Effective date/time
    4. Select the Create option to add the tests to the grid.

    5. The values for the 'Spec approval rule' (SARL) and 'Spec approval basis' (QPLN) are defaulted from the corresponding 'Specification Test. Open' (QMS201) and are not editable at this level.
  6. Change the QI Request Specification Test:

    1. Start 'Request Spec Test. Open' (QMS302).

    2. Click the Change option.

    3. On the E panel, these fields may be updated in the instances where the Value setup is 0-'Expected value':

      • Required setting
      • Expected result
      • Test status
      • Overridden by (the person who overrides the approval status)
      • Overridden date/time
      • Quality reason
    4. On the E panel, these fields may be updated in the instances where the Value setup is 1-'Range of values':

      • Required setting
      • Test status
      • Overridden by
      • Overridden date/time
      • Expected limit range and corresponding Target value
      • External limit range and corresponding Target value
      • Alarm limit range and corresponding Target value
    5. On the E panel, these fields may be updated in the instances where the Value setup is 2-'Target value only':

      • Required setting
      • Test status
      • Overridden by
      • Overridden date/time
      • Quality reason
      • Expected limit range and corresponding Target value
      • External limit range and corresponding Target value
      • Alarm limit range and corresponding Target value
    6. On the F panel, update any of these fields, if necessary:

      • Test order
      • Test priority
      • Sampling required setting
      • Internal test required setting
      • Sample type
      • Destructive testing setting
      • Retain sample setting
      • Print test on COA (Certificate of Analysis) setting
      • Print result value setting
      • Print spec test value setting
      • Sample size
      • Sample U/M
      • Measurement method
      • Measurement instrument
      • Department
      • Industry standard
      • Defective quantity
  7. Specify the QI Request Test Results:

    1. Start 'QI Test Results. Open' (QMS400).

    2. On the B1 panel, specify any of the various field values as search criteria:

      • Sorting order
      • Facility
      • Request ID
      • Test
      • Specification
      • Test class
      • Laboratory
    3. Click Apply to retrieve the search results.

    4. On the grid displaying the tests, specify any of these field values:

      • Test result value
      • Tested by
      • Test date and Test time
      • Reason
      • Comments
    5. Highlight a test and select Options > Copy.

    6. On the C panel, specify a value in the 'No. of copies' field to manually generate multiple test sequences or copies of the same test. When you return to the grid on the B1 panel, the test sequence number is incremented.

    7. Click Next to save your changes.

      After saving each test result, the system identifies all components of any calculated tests and evaluates the equation using the Formula function program (CRS975) to determine if the result of the calculated test is ready be updated in the Test Results (QMSTRS) table.

QMS300Fnc function program

The QI request header function program (QMS300Fnc) calls the logic for creating and/or updating a QI request.

If there is more than one QI request with the same origin, the newer one replaces the previous QI request. Therefore the older request assumes a QI request status of 'Replaced'. In the case of reinspection QI requests, when multiple QI requests exist with the same QI request origin (example: Retest), the currently active QI request is not replaced by a future reinspection request.

There are several operations in the QI request header function program (QMS300Fnc):

  • AutoCreateQIRequest - this function may be called from either the A panel of QMS300 or externally.
    Note: If this function program results in the QI request having both the 'Re-test' and 'Auto-attached' settings as not enabled, the system will issue a warning message that indicates no specifications were found to attach. If you disregard the warning, the system creates a QI request without specifications and you will have to add the specifications manually.
  • MaintainQIRequest - this function performs update operations when called from the E panel where the changes will be stored in the QI Request Header (QMSRQH) table. The QI request ID is generated using the Company System Number (CSYNBR) table with a prefix of 'QI'. It follows logic similar to the AutoCreateQIRequest operation, with the exception of the Lot (BANO) setting not being required if the Item is not lot-controlled but has the Item's 'Quality inspected' (QIRQ) setting = TRUE. If 'Approval status' is changed to 'Approved' and the Item's 'Lot approval' (QLTA) setting = TRUE, the system will issue a message saying the lot status will not be impacted by the QI request approval status change.

    In addition, for specifications where the Blending (SBLN) setting is selected, the Reclassification interface program (MMMNGRCL) calls the MaintainQIReq operation in the QMS300Fnc function program in order to enable the Blending setting for any related QI requests.

  • CopyQIRequest - this function performs copy operations of QI requests for different lots of the same item. The QI request ID is generated using the Company System Number (CSYNBR) table with a prefix of 'QI'. If the 'Copy test results' setting is enabled, a new QI request ID is generated for each lot and the records with their actual values are stored in the QI request tables, including QI Request Header (QMSRQH), QI Request Specification (QMSRQS), QI Request Test (QMSRQT) and Test Results (QMSTRE) . However, if the 'Copy test results' setting is not enabled, all the records are copied in the QI request tables and the system inserts new records with the same number of test sequences in Test Results (QMSTRE) as the original QI request. Only the QI request ID will be generated in the Test Results (QMSTRE) table, but the actual values will be empty.
  • DeleteQIRequest - this function deletes all tables that impact the QI request, such as the QI Request Header (QMSRQH), QI Request Specification (QMSRQS), QI Request Test (QMSRQT), and Test Results (QMSTRE) tables.

API transactions

The QMS300MI component transactions that exist for QI requests include:

  • AddQIRequest - adds a new QI request.
  • DltQIRequest - deletes QI request.
  • GetQIRequest - gets a QI request.
  • GetQIRqByREPN - gets a QI request by receiving number.
  • GetQIRqByRefOrd - gets a QI request by reference order.
  • LstQIReqByAprDt - lists QI requests by approved date.
  • LstQIReqByDelNo - lists QI requests by delivery number.
  • LstQIReqByGrwAg - lists QI requests by growers agreement.
  • LstQIReqByOrCat - lists QI requests by order category.
  • LstQIReqByOrg - lists QI requests by origin.
  • LstQIReqByReqDt - lists QI requests by required date.
  • LstQIReqByStat - lists QI requests by request status.
  • LstQIRequest - lists QI requests.
  • SearchQIRequest - searches QI request.
  • UpdQIRequest - updates a QI request.

These are the additional QI request-related API transactions:

  • AddSpecToQIReqt (QMS301 component) - adds a specification to the QI request.
  • DelSpecToQIReqt (QMS301 component) - deletes a specification of the QI request.
  • GetSpecQIReqt (QMS301 component) - gets a specification of the QI request.
  • LstSpecQIReqt (QMS301 component) - lists a specification of the QI request.
  • UpdSpecToQIReqt (QMS301 component) - updates a specification of the QI request.
  • AddTesttoQIReq (QMS302MI component) - adds test to the QI request.
  • DltTestQIReq (QMS302MI component) - deletes test to the QI request.
  • GetTestQIReq (QMS302MI component) - gets test to the QI request.
  • LstTestQIReq (QMS302MI component) - lists test to the QI request.
  • UpdTesttoQIReq (QMS302MI component) - updates test to the QI request.
  • AddResultSeq (QMS400MI component) - adds test result sequence.
  • CalcSettlement (QMS400MI component) - calculates settlement.
  • DltTestResults (QMS400MI component) - deletes test result.
  • GetTestResults (QMS400MI component) - retrieves the details of the test results.
  • LstTestResults (QMS400MI component) - lists the details of the test results.
  • SearchQITestRes (QMS400MI component) - searches the test results.
  • UpdCalcTests (QMS400MI component) - updates calculated tests.
  • UpdSingCalcTst (QMS400MI component) - updates single calculated test.
  • UpdTestResult (QMS400MI component) - updates test result.