Sei sulla pagina 1di 18

Importing Quality Results into Quality Plans

Oracle Support
January 2017
Table of Contents:

Section Topic Page

1.0 Importing Quality Results Using the Quality Interface …….……………………. 1

1.1 Quality Views ………..………………………………………………………………... 1

1.2 Element Names Used in an Import View and Plan ………………………………………….. 2

1.3 Quality Import Manager Functions. .………………………………………………………… 3

1.4 Using the Quality Import Manager…………………………………………………………..... 3

2.0 An Example ………………………………………………………………………………………. 3

2.1 Elements in an Example Collection Plan ……………………………………………………… 3

2.1.1 Seeded Columns Found In Every Import View ……….…………………………….. 3

2.1.2 Other Elements (Data) Specific to the M1_INPROCESS_COLLECTION_PLAN . 5

2.2 Inserting a Row into a Plan Using SQL (An Example) ……………………………. 5

2.3 Running the Collection Import Manager (An Example) …………………………… 6

2.4 Viewing Results ………………………………………………………………………… 8

2.5 Updating Existing Data Using Matching Elements – A Detailed Explanation …….. 8

2.6 Updating an Element to Null …………………………………………………………… 11

2.7 Error Handling …………………………………………………………………………. 13

3.0 A Script to List All Errors for a Plan Import …………………………………………. 13

4.0 Diagnostics………………………………………………………………………………... 13

4.1 Tracing and Logs ………………………………………………………………………… 14

4.2 FND Logs …………………………………………………………………………………. 15

5.0 Patches for the Quality Import Manager …………………………………………….… 16

6.0 Limitations of the Quality Import Manager……………………………………………. 17


1.0 Importing Quality Results Using the Quality Interface

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.

1.1 Quality Views

Each Quality Collection Plan has two Quality Views with view names in the following format:

Q_<Quality Plan Name>_V (Result View)

Q_<Quality Plan Name>_IV (Import View).

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 M1_INPROCESS_COLLECTION_PLAN is 28 characters long.

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.

Element Name Input View Column Name


Asset Num ASSET_INSTANCE_NUMBER
Asset Serial Number ASSET_NUMBER
Collection Number COLLECTION_ID
Collection Plan Name NAME
Collection Plan Type PLAN_TYPE
Component Item COMP_ITEM
Component Locator COMP_LOCATOR
Component Lot Number COMP_LOT_NUMBER
Component Revision COMP_REVISION
Component Serial Number COMP_SERIAL_NUMBER
Component Subinventory COMP_SUBINVENTORY
Component UOM COMP_UOM
Created By QA_CREATED_BY_NAME
Customer CUSTOMER_NAME
Entry Date QA_CREATION_DATE
Job JOB_NAME
Last Update Date QA_LAST_UPDATE_DATE
Last Updated By QA_LAST_UPDATED_BY_NAME
Nonconform Priority NONCONFORM_PRIORITY
Organization ORGANIZATION_ID
PO Receipt Number RECEIPT_NUM
PO Release Number PO_RELEASE_NUM
PO Shipment PO_SHIPMENT_NUM
Party PARTY_NAME
Process Batch Number PROCESS_BATCH_NUM
Process Batch Step Num PROCESS_BATCHSTEP_NUM
Receiving Trans Num RCV_TRANSACTION_ID
Sales Order Number SALES_ORDER
Service Task Number JTF_TASK_NUMBER
Supplier VENDOR_NAME
Transfer License Plate XFR_LICENSE_PLATE_NUMBER

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.

1.4 Using the Quality Import Manager

To launch the Quality Import Manager:

Responsibility = Quality (QA)


Navigation = Quality-> Launch Manager

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

For demonstration purposes, the M1_INPROCESS_COLLECTION_PLAN plan which is seeded in the


Vision Instance will be used. Most customers have access to a Vision Instance. Therefore customers can
replicate these examples internally

2.1 Elements in an Example Collection Plan

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.

2.1.1 Seeded Columns Found In Every Import View

Name
------------------------
TRANSACTION_INTERFACE_ID – Populated by Collection Import Manager

QA_LAST_UPDATED_BY_NAME – standard user id column (not mandatory)

QA_CREATED_BY_NAME - standard user id column (not mandatory)

COLLECTION_ID – Leave blank

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

ORGANIZATION_CODE - three Character org code. Definitely should be populated in


capital letters

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.

MATCHING_ELEMENTS - This is a comma-separated list of column names. Collection Import uses


these column names as search keys when it updates existing records in the Quality data repository. If
an existing record has the same data in the columns listed by Matching Elements, the record is updated
so that it is identical to the corresponding row in the Collection Import Interface table. If any of the
record's columns in the table is set to NULL, they will not be updated in the Quality data repository.
Also, an import row in the table can match one and only one record in the repository; if the row in
question has no match or has more than one match, Collection Import will reject it.

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]

2.1.2 Other Elements (Data) Specific to the M1_INPROCESS_COLLECTION_PLAN

ITEM
JOB_NAME
SERIAL_NUMBER

4
QUANTITY
QUANTITY_PASSED
QUANTITY_FAILED
PERCENT_PASSED
REASON_CODE
PERCENT_FAILED
EMPLOYEE
DEPARTMENT
COMMENTS
LOCATION
TEST_STATUS

2.2 Inserting a Row into a Plan Using SQL (An Example)

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:

Responsibility = Quality (QA)


Navigation = Quality-> Launch Manager

6
Help-> View Requests-> Find all my requests

2.4 Viewing Results


7
Responsibility = Quality (QA)
Navigation = Results-> Inquiries-> View Quality Results
Query Plan = M1 INPROCESS COLLECTION PLAN
Row Successfully added (inspection result) for job WE-AS55888-1.

2.5 Updating Existing Data Using Matching Elements – A Detailed Explanation

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:

Quantity Passed for Item / Job XA7000 / 242341 is updated to 700

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’

2.6 Updating an Element to Null

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:

Column Type In View Value to be Used


Number fnd_api.g_null_num
Character or Varchar fnd_api.g_null_char
Date fnd_api.g_null_date

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.

2.7 Error Handling

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.

Errors are only listed in the ‘Update Quality Import’ Form.

Responsibility = Enterprise Asset Management (EAM)


Navigation = Import-> Update Collection Import

Example for M1 INPROCESS COLLECTION PLAN

3.0 A Script to List All Errors for a Plan Import

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):

SELECT qri.plan_name "PLAN NAME",

qie.error_message "ERROR MESSAGE",

qie.error_column "COLUMN",

qri.comment1

FROM qa_results_interface qri,

qa_interface_errors qie

WHERE qri.transaction_interface_id = qie.transaction_interface_id

AND qri.plan_name = '&YOUR_PLAN_NAME';

4.0 Creating Diagnostics for the Quality Import Manager

For the collection Import, there are three types of diagnostics, request logs, FND logs and trace files

4.1 Creating Traces and Logs

To set up a trace file for the Collection Import:

A. Set the profile MRP: Debug Mode = Yes for the user who will launch the Import Manager.

B. Responsibility = Sysadmin:

Navigation = Concurrent: Program: Define:

C. Query for short name = QLTTRAMB

D. Check the enable trace box in the lower left corner and save

E. Launch/submit the Import Manager.


14
Responsibility = Quality (QA)

Navigation = Import-> Launch Manager

Unset the profile option and enable trace. Note the Request Id.

G. Find the process_id of this request using the following query.

select oracle_process_id from fnd_concurrent_requests where request_id = &request_id;

H. Go to the directory where database trace files are stored. Use the following query to find this

directory.

select value from v$parameter where name= 'user_dump_dest';

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:

tkprof <file>.trc <file>.prf sys=no explain=apps/<password>

4.2 Creating FND Logs

On occasion, a FND log and trace will be required to “troubleshoot” Quality Import problems. To Enable
FND log messages for the import:

1. Set the profile MRP: Debug Mode = Yes


2. Set up following FND profiles at site level.

FND: Debug Log Level = Statement


FND: Debug Log Enabled = Yes
FND: Debug Log Module = %

3. Launch the concurrent request


Note the request_id of the report.

Then provide the output of the following in excel sheet:

SELECT * FROM fnd_log_messages


WHERE transaction_context_id =
(SELECT transaction_context_id
FROM fnd_log_transaction_context
WHERE transaction_id = &request_id) -- substitute the request_id of the import manager

4. After that Set up following FND profile at site level

15
FND: Debug Log Enabled = No and MRP: Debug Mode = No

5. Upload both the log file and the output of the SQL.

5.0 Patches for the Quality Import Manager

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)

6.0 Limitations of the Quality Import Manager

Several functions cannot be performed by the Quality Import Manager:

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

Potrebbero piacerti anche