Pages

Monday, May 14, 2012

Item Interface

Overview:

Oracle provides flexible tools in the form of Interface programs to import the master and transactional data like Customers, Invoices, and Sales Orders etc from external systems into Oracle Applications.

Conversion/Interface Strategy:

  1. Data Mapping

    During the data mapping process, list of all the data sets and data elements that will need to be moved into the Oracle tables as part of conversion are identified. Data mapping tables are prepared as part of this activity that show what are the data elements that are needed by the target system to meet the business requirements and from where they will be extracted in the old system.

  2. Download Programs

    After the conversion data mapping is complete, download programs are developed that are used to extract the identified conversion data elements from the current systems in the form of an ASCII flat file. The structure of the flat file must match the structure of the Oracle standard interface tables. These flat files generated may be in text form or a comma or space delimited, variable or fixed format data file.


  3. Upload Program

    Once the data has been extracted to a flat file, it is then moved to the target file system and the data from the file is loaded into user defined staging tables in the target database using SQL Loader or UTL_FILE utilities. Then programs are written and run which validate the data in the staging tables and insert the same into the Oracle provided standard Interface tables.

  4. Interface Program

    Once the interface tables are populated, the respective interface program (each data element interface has a specific interface program to run) is submitted. The interface programs validate the data, derive and assign the default values and ultimately populate the production base tables.
The Item import Interface(IOI) reads data from following tables for importing items and item details. The MTL_SYSTEMS_ITEM_INTERFACE table is used for new item numbers
and all item attributes. This is the main item interface table, and can be
the only table used to import items.



MTL_ITEM_REVISIONS_INTERFACE is used if Item revisions history is also loaded with items. Item categories can be imported using MTL_ITEM_CATEGORIES_INTERFACE.

The import error can be tracked using MTL_INTERFACE_ERRORS table. The transaction_id and request_id populated by the import program can be used to link interface table and error table.

Required Data:

ITEM_NUMBER or SEGMENT Columns



Every row in the item interface table must identify the item and organization. To identify the item when importing it, you may specify either the ITEM_NUMBER or SEGMENTn columns—the Item Interface generates the INVENTORY_ITEM_ID for you.


ORGANIZATION_ID or ORGANIZATION_CODE


You need to specify either the ORGANIZATION_ID or ORGANIZATION_CODE that identifies the organization.


DESCRIPTION


When you import a new item, you are also required to specify the DESCRIPTION.

TRANSACTION_TYPE & PROCESS_FLAG

There are two other columns the Item Interface uses to manage processing. They are TRANSACTION_TYPE, which tells the Item Interface how to handle the row, and PROCESS_FLAG, which indicates the current status of the row.


Always set the TRANSACTION_TYPE column to CREATE, to create an item record (true when both importing a new item and assigning an already existing item to another organization). This is the only value currently supported by the Item Interface. The Item Interface uses the PROCESS_FLAG to indicate whether processing of the row succeeded or failed. When a row is ready to be processed, give the PROCESS_FLAG a value of 1 (Pending), so that the Item Interface can pick up the row and process it into the production tables.


Meaning of PROCESS_FLAG Values:

CodeCode Meaning
1Pending
2Assign complete
3Assign/validation failed
4Validation succeeded; import failed
5Import in process
7Import succeeded

Note:

When more than one of these columns has been entered and they conflict, ITEM_NUMBER overrides SEGMENTn and ORGANIZATION_ID overrides ORGANIZATION_CODE. It is strongly recommended that you use SEGMENT column instead of ITEM_NUMBER.
For performance purpose, it is advised to batch set of records using set_process_id column and then run import program for that set_process_id. The item import (IOI) program can be run in parallel if separate set_process_ids are passed while submitting.

Derived Data:

Many columns have defaults that the Item Interface uses when you leave that column null in the item interface table

Validations:

1] Validation for organization code (standard table: 
    ORG_ORGANIZATION_DEFINITIONS)

2] Validation for Item_number (standard table: mtl_system_items_b)

3] Validation for Description

4] Validation for Primary Unit of Measure (standard table: 
    MTL_UNITS_OF_MEASURE)

5] Validation for Template Name (standard table: mtl_item_templates)

6] Validation for Item Type (standard table: FND_COMMON_LOOKUPS)

7] Validation for ENCUMBRANCE_ACCOUNT (standard table: 
    gl_code_combinations)

8] Validation for EXPENSE_ACCOUNT (standard table: gl_code_combinations)

Note: You can add more validation as per your business requirement.

Record Insertion:

Through your custom program you can insert the below columns in the interface table. Again the list is a sample one; you can add additional columns as your business requirement.
Columns inserted:
  • ORGANIZATION_ID                        –>Taken from ORG_ORGANIZATION_DEFINITIONS table
  • ORGANIZATION_CODE                  –>Taken from Staging table
  • LAST_UPDATE_DATE                      –>sysdate
  • LAST_UPDATED_BY                        –>fnd_global.user_id
  • CREATION_DATE                             –>sysdate
  • CREATED_BY                                    –>fnd_global.user_id
  • LAST_UPDATE_LOGIN                    –>fnd_global.login_id
  • DESCRIPTION                                   –>Taken from Staging table
  • SEGMENT1                                         –>Taken from Staging table
  • PRIMARY_UOM_CODE                    –>Taken from Staging table
  • PRIMARY_UNIT_OF_MEASURE      –>Taken from MTL_UNITS_OF_MEASURE
  • ITEM_TYPE                                         –>NULL
  • TEMPLATE_NAME                             –>Taken from Staging table
  • TEMPLATE_ID                                     –>Taken from mtl_item_templates        
  • MIN_MINMAX_QUANTITY              –>Taken from Staging table
  • MAX_MINMAX_QUANTITY             –>Taken from Staging table
  • LIST_PRICE_PER_UNIT                     –>Taken from Staging table
  • ITEM_CATALOG_GROUP_ID            –>Taken from Staging table
  • SET_PROCESS_ID                               –>1
  • PROCESS_FLAG                                  –>1
  • TRANSACTION_TYPE                         –>‘CREATE’

Standard Concurrent Program:

After you insert valid data into Interface table, you can go to Items > Import > Import Items and run the standard concurrent program. Here is the parameter form.

1] All Organizations:
  • Yes: Run the interface for all organization codes in the item interface table.
  • No: Run the interface only for the organization you are currently in. Item interface rows for organizations other than your current organization are ignored.
2] Validate Items:
  • Yes: Validate all items and their data residing in the interface table that have not yet been validated. If items are not validated, they will not be processed into Oracle Inventory.
  • No:  Do not validate items in the interface table.
3] Process Items:
  • Yes: All qualifying items in the interface table are inserted into Oracle Inventory.
  • No: Do not insert items into Oracle Inventory.
4] Delete Processed Rows:
  • Yes: Delete successfully processed items from the item interface tables.
  • No: Leave all rows in the item interface tables.
5] Process Set:
Enter a number for the set id for the set of rows you want to process. The program picks up the rows marked with that id in the SET_PROCESS_ID column. If you leave this field blank, all rows are picked up for processing regardless of the SET_PROCESS_ID column value.

Working with failed interface rows:

If a row fails validation, the Item Interface sets the PROCESS_FLAG to 3 (Assign/validation failed) and inserts a row in the interface errors table, MTL_INTERFACE_ERRORS. To identify the error message for the failed row, the program automatically populates the TRANSACTION_ID column in this table with the TRANSACTION_ID value from the corresponding item interface table.

The UNIQUE_ID column in MTL_INTERFACE_ERRORS is populated from the sequence MTL_SYSTEM_ITEMS_INTERFACE_S. Thus, for a given row, the sequence of errors can be determined by examining UNIQUE_ID for a given TRANSACTION_ID.

You should resolve errors in the sequence that they were found by the interface, that is, in increasing order of UNIQUE_ID for any TRANSACTION_ID.

Resubmitting an Errored Row:

During Item Interface processing, rows can error out either due to validation (indicated by PROCESS_FLAG = 3 in MTL_SYSTEM_ITEMS_INTERFACE and the corresponding error in MTL_INTERFACE_ERRORS) or due to an Oracle Error.

When an Oracle Error is encountered, the processing is stopped and everything is rolled back to the previous save point. This could be at PROCESS_FLAG = 1, 2, 3, or 4.

When you encounter rows errored out due to validations, you must first fix the row corresponding to the error with the appropriate value. Then reset PROCESS_FLAG = 1, INVENTORY_ITEM_ID = null, and TRANSACTION_ID = null. Then resubmit the row for reprocessing.

Useful Query:

01Select
02  SEGMENT1,
03   DESCRIPTION,
04   PROCESS_FLAG,
05   SET_PROCESS_ID,
06   INVENTORY_ITEM_ID,
07   ORGANIZATION_ID,
08   ORGANIZATION_CODE,
09   CREATION_DATE,
10   ITEM_TYPE,
11   UNIT_OF_ISSUE,
12   TEMPLATE_ID,
13   TEMPLATE_NAME,
14   EXPENSE_ACCOUNT,
15   ENCUMBRANCE_ACCOUNT,
16   PRIMARY_UOM_CODE,
17   PRIMARY_UNIT_OF_MEASURE,
18   MIN_MINMAX_QUANTITY,
19   MAX_MINMAX_QUANTITY,
20   TAX_CODE,
21   REQUEST_ID
22from
23    MTL_SYSTEM_ITEMS_INTERFACE
24order by CREATION_DATE;
25----------------------------
26Select
27   ORGANIZATION_ID,
28   UNIQUE_ID,
29   REQUEST_ID ,
30   TABLE_NAME ,
31   COLUMN_NAME,
32   ERROR_MESSAGE
33   CREATION_DATE,
34   MESSAGE_TYPE
35from
36    MTL_INTERFACE_ERRORS
37order by CREATION_DATE;

Base tables that would be affected by  MTL_SYSTEM_ITEMS_INTERFACE

MTL_SYSTEM_ITEMS_B
MTL_ITEM_REVISIONS_B
MTL_CATEGORIES_B
MTL_CATEGORY_SETS_B
MTL_ITEM_STATUS
MTL_ITEM_TEMPLATES

Required columns in MTL_ITEM_REVISIONS_INTERFACE table.

The table is only used if Item revision is to be loaded in the same run with IOI. If this table is not used then items are created with the default revision setup for an organization.

PROCESS_FLAG = 1

TRANSACTION_TYPE = 'CREATE'

SET_PROCESS_ID = any numeric value(Should be same for the item in MTL_SYSTEM_ITEMS_INTERFACE table)

ORGANIZATION_ID/ORGANIZATION_CODE = Master/Child Org.

REVISION 

EFFECTIVITY_DATE

IMPLEMENTATION_DATE

ITEM_NUMBER = Same as item_number in mtl_system_items_interface table.
Each row in the mtl_item_revisions_interface table must have the REVISION and 

EFFECTIVITY_DATE in alphabetical (ASCII sort) and chronological order.

Required columns for MTL_ITEM_CATEGORIES_INTERFACE table

TRANSACTION_TYPE = 'CREATE'

SET_PROCESS_ID = any numeric value(Should be same for the item in 

MTL_SYSTEM_ITEMS_INTERFACE table)

ORGANIZATION_ID/ORGANIZATION_CODE = Master/Child Org

ITEM_NUMBER/INVENTORY_ITEM_ID or both

CATEGORY_SET_NAME or CATEGORY_SET_NAME or both

CATEGORY_ID or CATEGORY_NAME or both

For performance purpose, it is advised to batch set of records using set_process_id column and then run import program for that set_process_id. The item import(IOI) program can be run in parallel if seperate set_process_ids are passed while submitting. The IOI automatically separates Master records from Child, and  processes Master records first. However, as one IOI process is not aware of  other IOI processes running in parallel, do not split a given item's separate Organization records into two different SET_PROCESS_IDs that are being run in parallel.

Item import program can be run in 2 modes INSERT & UPDATE.
The method to update Item attribute columns to NULL is to use the following values:
· for Numeric fields: insert -999999
· for Character fields: insert '!'

Useful Metalink Note:

  1. FAQ for Item Import [ID 109628.1
  2. Error in Validating MTL_SYSTEM_ITEMS_INTERFACE [ID 1057175.6]
  3. A Guideline to IOI Error Messages and Solutions [ID 52746.1]
  4. How to Import Item Costs Using the Item Open Interface (IOI) [ID 191376.1]
  5. Item Import Performance Tips [ID 66496.1]
  6. INCOIN: Basic Steps for Researching Failed Item Imports [ID 552683.1]
  7. Troubleshooting Guide for INV_IOI_MASTER_CHILD Errors in Item Import [ID 429924.1]
  8. How To Prepare to Run Parallel Runs of the Item Import Interface INCOIN [ID 842767.1]
  9. Item Import Gives Error: “The Default Primary Unit of Measure Is Invalid” [ID 789927.1]
  10. Understanding Item Import and Debugging Problems with Item Import [ID 268968.1]
  11. How to create a Category Set and Assign Items to Categories [ID 423551.1]
  12. Item API Or Concurrent Manager, Which One Is Best For Item Creation? [ID 760498.1]

Composed from various web-sources & Oracle Meta link documents


Thanks & Regards,
S.Grace Paul Regan

Thursday, May 10, 2012

Cost Cutoff Date

Navigation: Inventory Super User> Setup> Organization> Parameters>Costing Tab.


What is the Cost Cutoff Date?

When the cost processors are run, users specify the cost cutoff date option and the cutoff date for all cost organization books that are being processed. The cost cutoff date is the last day on which the cost processor will process transactions for an accounting period.

What is the cost cutoff date option?

You can set the cutoff date option to User-Defined or Auto. The User-Defined option requires you to specify the cutoff date; while the Auto option saves you the effort of redefining the cutoff date which is automatically moved forward by the cost processor. Under the Auto option, the cost processor moves the cutoff date forward up to the last date of the earliest open cost period, and then it stops until the period is closed. After the period is closed, the cost processor advances the cutoff date into the next open period, and so on. However if a transaction is successfully preprocessed after the cutoff date, then the cutoff date for that cost organization book moves forward to the date of the last successfully preprocessed transaction; this could happen, for example, if the cutoff date option was originally set to User-Defined and subsequently changed to Auto.

 

What are backdated transactions?

One of the purposes of the cost cutoff date is to allow backdating of transactions. For example, if you set the cost cutoff date to October 31, you can still process October transactions that were entered in November for the period ending October 31 by backdating them to October 31 or earlier. However, when the cost cutoff date advances forward to a date past October 31, the transactions can no longer be backdated to October 31 or earlier, and they are processed with the forward date. If you set a cost cutoff date at October 31, the cost processor will queue up but not process any transactions with a date after October 31. If you subsequently need to backdate transactions to a date before October 31, you can process these transactions before any transactions with dates of November 1 and beyond. You can also backdate transactions to any date after October 31, with the assurance that these transactions will be processed in the correct order when the cost cutoff date moves forward.

What is the costing date of transactions?

The costing date of transactions is normally the same as the transaction date, except for backdated transactions. If there are any previously costed transactions (that is, the cost processor has processed transactions whose date is earlier than the date of the backdated transactions), then the costing date of the backdated transactions is set as the cost processor run date.

Note: The cost cutoff date only affects the accounted date of the transaction. It does not affect the inventory transaction date, or the inventory quantity reported for a given date.

Backdating of Transactions: Examples:

By setting the cost cutoff date for a cost accounting period, you can manage which transactions are processed in that period, including backdated transactions. The following examples illustrate how the cost processor sets the accounted date for backdated transactions. Assume that the current date is November 2, the cost cutoff date is October 31, and the following costed and uncosted transactions are in process:



Below, the inventory transaction is backdated to position A. The transaction will be costed with accounting date B before the transactions 2 and 3 are processed.



Below, the inventory transaction is backdated to position C. The transaction will be costed with accounting date C after the transactions 2 and 3 are processed.



Below, the inventory transaction is backdated to position D. The transaction will be costed with accounting date D after the cost cutoff is moved past October 31.


 

How to use Cost Cutoff Date?


This functionality was developed to allow businesses the option of changing labor rates and overhead rates at the beginning of the accounting period while transactions in the next period wait for these new costs to be completed.     This will allow period close, cost updates, and rate changes to occur without impacting or interrupting business operations.  When using the Cost Cutoff Date, all cost processing for the new accounting period is stopped for that organization.  This allows the accountants the opportunity to close the previous period.  Once the new costs are set, then the costing is started for the new period.  This occurs by changing the cost cutoff date to a date in the future.

If this field is left blank, then the old cost processing will occur.  If the field is populated, then no processing of costs will occur from that date onwards.  The cost cutoff date will use midnight as the start of the period and also inventory quantities are recorded at midnight.  With this new functionality.

This option is much useful with the Organization that a Standard Costing as their costing method.

The Standard Cost Update can now run in one organization while other organizations are still costing transactions.  Standard Cost Workers are launched based on organization, so this improves the speed of costing transactions. To use this Feature: For standard costing organizations if the start of the new costs is to be January 1 2012, that is the date that is entered. New standard costs can then be established prior to January 2012, in December 2011 for example. These costs will not impact the December costing activities as they will not be active until Jan 1 2012. No transactions that occur after the start of the day January 1, 2012 are costed.

This will allow the accountants to complete the costing for the December transactions, close the period, and run the reports for review. A standard cost update can be performed using the new cost type for January 2012.  This will update the cost of the costed items up to the end of the day (midnight) December 31, 2011.  The reports can then be re-run with the same quantity and newly updated costs. Still NO January 2012transactions will be costed.

This is true whether it takes a few days in the next period or a few weeks to finish the costing of the previous period.  The uncosted transactions will remain in the MTL_MATERIAL_TRANSACTIONS with costed_flag = N waiting for a cost worker to process them.  The Cost Manager will spawn no cost worker until the Cutoff Date is changed. To cost the January 2012 transactions once December 2011 is properly closed, the Cost Cutoff Date is changed. This can be changed to the start of the next period or next quarter or next year---whenever the rates need to be changed next.  Once changed the cost processing begins for the transactions that have been waiting.  For standard costs the processing of the transactions is immediate.

For Average, FIFO, and LIFO costing the process takes longer because of the need to process the transactions sequentially to keep the costs accurate.  For Average, FIFO, LIFO cost organizations , Rate Cost Types are created and the old rates are copied to that new cost type.  This rate will not be used for cost processing until the Cost Cutoff Date is changed.  The cost type and the cutoff date need to be changed to allow the new costs to be used and the transactions can be processed for the new period.   For Shipping transactions, the costs also use the cutoff date.  The shipment in the new period will be uncosted. If another organization receives the shipment, the receipt will also be uncosted.  This is due to the fact that the receiving transaction requires the accounting distribution from the sending organization.  In standard costing, once the cutoff date is changed, the shipments are costed immediately.  In Average FIFO LIFO costing, the first uncosted transactions will cause an error. Once the cost cutoff date is changed and the errored transaction reset, the transaction will be costed first for the shipment and then for the receipt.  All subsequent transactions will then be processed as well.
Important Note: If this functionality is not required or desired, the Cost Cutoff Date field must be BLANK. If there is a date entered in that field, no costing will occur on transactions for that organization from that date onwards..

Content: Extract from Metalink Note.
Thanks & Regards,
S.Grace Paul Regan