Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Oracle Support
January 2017
Table of Contents:
2.2 Inserting a Row into a Plan Using SQL (An Example) ……………………………. 5
2.5 Updating Existing Data Using Matching Elements – A Detailed Explanation …….. 8
4.0 Diagnostics………………………………………………………………………………... 13
The Quality interface is a two step process which allows population of Quality collection plans without
using the Quality Workbench and/or the Quality Forms. The first step involves insertion of data into an
import view, one input view per plan. The second step involves running the Quality Collection Import
Manager concurrent request.
1. There are two views for each collection plan, an import view and result view. Using Structured
Query Language (SQL), data can be inserted into an import view using a column which indicates
a Quality Plan update or new data insertion. Data from the Import view is stored in the Collection
Import Interface Table (QA_RESULTS_ INTERFACE).
2. The Quality Collection Import Manager ‘reads’ data stored in the stored in the Collection Import
Interface Table (QA_RESULTS_ INTERFACE), validates the data and inserts valid date into the
actual quality plan. Data with errors remains in the Collection Import Interface Table
(QA_RESULTS_ INTERFACE). Data with errors can be corrected using the forms.
Each Quality Collection Plan has two Quality Views with view names in the following format:
The Quality Plan Name is part of the view names. Spaces imbedded in the Quality Plan Name are replaced by
underscores in the view name.
Because view names cannot exceed 30 characters (a RDBMS limitation on view names), a maximum of 25
characters from the plan name are used in the view name. Therefore, the first 25 characters of the plan name must
be distinctive from the all other plan names.
The following example uses the seeded M1_INPROCESS_COLLECTION_PLAN to show the Quality Plan
Name truncation.
The Q_ and _V and/or _IV characters will be concatenated onto the plan name.
For the Import View, Q_ M1_INPROCESS_COLLECTION_P_IV, the Quality Plan Name is truncated to 25
characters because the Q_ and _IV characters are concatenated onto the start and end of the plan name,
making a total of 30 characters.
For the Result View, Q_M1_INPROCESS_COLLECTION_PL_V, the Quality Plan Name is truncated to 26
characters because the Q_ and _V characters are concatenated onto the start and end of the plan name to
make a total of 30 characters.
1
1.2 Element Names Used in an Import View and Plan
The element names used in the plan almost directly correspond to the column names used in the Import Views.
Because the Import View is directly used by users, some element names in the import view have column names that
do not directly correspond to the plan. For example, the columns in the Import view named JOB_NAME and
CUSTOMER_NAME correspond to the elements JOB and CUSTOMER in the plan. It should be noted that and the
Result View column names and the elements in the plan have the same name.
Although it is best to describe the input view (ie desc Q_M1_INPROCESS_COLLECTION_P_IV ) to see the
input view column names, the following table shows names which are changed from the element name.
2
1.3 Quality Import Manager Functions
The Collection Import Manager concurrent request validates data found in the Collection Import
Interface Table (QA_RESULTS_ INTERFACE) which was created by SQL inserts into the collection Plan’s
import view. The Collection Import Manager moves validated data into the Quality Data Repository
(QA_RESULTS table). Or, it updates existing data in the Quality Data Repository. Data with errors
remains in the Collection Import Interface Table.
The Import Manager has 3 parameters, Worker Rows, Transaction Type and Gather Statistics. It is
recommended to leave the Worker Rows and Gather Statistics parameters unchanged as both these
parameters become important only if you are inserting or updating large amounts of data. The
Transaction Type parameter should be set to insert or update, depending on your needs. [Do you want to
insert new rows or update existing rows?]
2.0 An Example
The M1_INPROCESS_COLLECTION_PLAN has two the associated views, the import view,
Q_M1_INPROCESS_COLLECTION_P_IV and result view,
Q_M1_INPROCESS_COLLECTION_PL_V. The Import View has the following seeded columns, many
of which are not in the plan.
Name
------------------------
TRANSACTION_INTERFACE_ID – Populated by Collection Import Manager
SOURCE_CODE - optional
SOURCE_LINE_ID - optional
3
PROCESS_STATUS - Control Column representing the status of the import transaction. Must be
set to 1 to use the Interface. Not in the plan.
1 Pending
2 Running
3 Error
4 Completed
OPERATING_UNIT_ID optional
OPERATING_UNIT - optional
PLAN_NAME - Definitely should be populated. This field should contain the name of the
collection plan. The name must be written in capital letters.
INSERT_TYPE – This field determines whether the Collection Import Manager will insert new
records or update existing records in the Quality data repository. There are two values for this field:
• 1 Insert
• 2 Update
The default for the field is 1 Insert. When set to 1, or left blank, Collection Import inserts new records
into the Quality data repository. When set to 2, it updates existing records in the repository.
SPEC_NAME This field determines what specification will be used to validate the record. The value in
this field should be set to the name of a specification. If no specification is required, you should set this
field to NULL. If the field is null, the specification is enforced at the collection element level. If the
field is not null, the named specification is used at the row level.
Notice that, for an insert into the QA_RESULTS table, the columns PLAN_NAME,
ORGANIZATION_CODE, PROCESS_STATUS and INSERT_TYPE must be populated (at a
minimum).
For an update of the QA_RESULTS table, the MATCHING_ELEMENTS column must also be
populated. Using MATCHING_ELEMENTS is the only option for updating existing data in
Quality Data Repository (QA_RESULTS). [These is an update example later in the document]
ITEM
JOB_NAME
SERIAL_NUMBER
4
QUANTITY
QUANTITY_PASSED
QUANTITY_FAILED
PERCENT_PASSED
REASON_CODE
PERCENT_FAILED
EMPLOYEE
DEPARTMENT
COMMENTS
LOCATION
TEST_STATUS
The seeded M1_INPROCESS_COLLECTION_PLAN will be used as an example. To insert data into the
plan, data must be inserted into the Q_M1_INPROCESS_COLLECTION_P_IV Import View as a first
step.
The following shows an Example of Plan data being inserted into the
Q_M1_INPROCESS_COLLECTION_P_IV view. In this example, an in process inspection record is
added to the Quality Data Repository for assembly AS55888, job WE-AS55888-1.
5
2.3 Running the Collection Import Manager (An Example)
With a row inserted into the Q_M1_INPROCESS_COLLECTION_P_IV view, we need to validate the
row and insert it into the plan data which resides in the Quality Data Repository (QA_RESULTS) as a
second step in the process:
6
Help-> View Requests-> Find all my requests
Using MATCHING_ELEMENTS column, you can do ‘keyed updates’ of rows in the Quality Plan. For example, to
update the quantity passed (to 700) in the M1_INPROCESS_COLLECTION_PLAN for job = 242341,
assembly = XA7000, the following columns would be inserted into the
Q_M1_INPROCESS_COLLECTION_P_IV view
COLUMN VALUE
Matching_Elements ‘ITEM, JOB’
Item ‘XA7000’
Job_name ‘242341’
Quantity_passed 700
Insert_Type 2
8
The Insert_Type must be 2 to indicate an update of existing rows.
All required control columns must be updated. Example SQL to update QUANTITY_PASSED to 700 (from 500):
9
Next run the Quality Import Manager Request:
Also, when doing an update using MATCHING_ELEMENTS, an import view row can match one and
only one record in the plan. If the row in question has no match or has more than one match, the
Collection Import Manager will reject it. For example:
10
COLUMN VALUE
Matching_Elements ‘ITEM’
Item ‘XA7000’
Quantity_passed 500
The above combination would be rejected since ITEM XA7000 is used for many rows in the plan. ITEM
XA7000 has more than one match in the plan. The error message for the combination is ‘More than one
row matched the specified condition’
If any of the elements in the Quality Plan Interface view (the Q_<Plan Name>_IV view) is set to NULL (ie.
Quantity_passed was set to NULL), the element will not be updated in the Quality plan. However, the following
‘work around’ can be used to set elements in the Quality Plan Interface view table values to null:
11
Notice the following about the above SQL:
1. There is no date column update in the above example. To update a date column use the following
in the SQL’s values clause for the date element:
to_char(null_var_date,'DD-MON-YYYY HH24:MI:SS')
12
2. JOB_NAME is used for the input view. But JOB is the column used in
MATCHING_ELEMENTS. JOB_NAME is regarded as ‘externally facing’, while JOB is the
actual column in the plan.
If an error occurs and the Import rejects some rows, the QLTTRAWB module: Collection Import Worker and
QLTTRAMB module: Collection Import Manager concurrent request logs will not show any indication of
an error. In addition the two concurrent requests have no ‘Interface Report’ to show errors.
Plan Import error messages are stored in the QA_INTERFACE_ERRORS table. The errored import rows
are stored in the QA_RESULTS_INTERFACE table. An example follows:
13
The following SQL will show all errors for a Collection Plan (Cut/Paste if you want to use the SQL):
qie.error_column "COLUMN",
qri.comment1
qa_interface_errors qie
For the collection Import, there are three types of diagnostics, request logs, FND logs and trace files
A. Set the profile MRP: Debug Mode = Yes for the user who will launch the Import Manager.
B. Responsibility = Sysadmin:
D. Check the enable trace box in the lower left corner and save
Unset the profile option and enable trace. Note the Request Id.
H. Go to the directory where database trace files are stored. Use the following query to find this
directory.
I. Search for the tracefile that contains the process_id obtained in step G.
For example, use ls –l *123456* if 123456 was the process_id obtained in step G.
J. Use the trace file that you found to create a tkprof output with explain plan:
On occasion, a FND log and trace will be required to “troubleshoot” Quality Import problems. To Enable
FND log messages for the import:
15
FND: Debug Log Enabled = No and MRP: Debug Mode = No
5. Upload both the log file and the output of the SQL.
For release 12.1.3, Patch 10212823, ‘This patch allows the user to nullify the user defined collection
elements through collection import’, MUST be applied.
As a recommended alternative for release 12.1.3, Patch 19784316, ‘This patch resolves the issues
wherein the Quality Results Collection import was failing on resubmission’, can be applied in lieu of Patch
10212823. Patch 19784316 code levels are newer than patch 10212823 code levels. And Patch 19784316
contains all the code fixes found in Patch 10212823. Therefore, Patch 1978431 is the recommended
alternative.
For release 12.2.N, the only publically released patches are the ORACLE E-BUSINESS SUITE 12.2.N
RELEASE UPDATE PACK patches. You can locate these large, major upgrade patches, on My Oracle
Support (MOS)
1. Child Collection Plan data can be imported. But, the child plan data will not be linked in any way
to the Parent Plan. Nor, can the imported child plan data ever be linked to the parent plan.
2. If a plan has actions that use Global Variables such as :Q_RES, the actions will not function/fire.
Please see Quality Collection Import Does Not Support :Q_RES Expressions (Doc ID 730082.1) .
3. If a plan has actions that sent notifications, the notifications will not be sent by the import.
4. If a plan has sequence numbers, the sequence numbers will not be incremented.
16