Saturday, November 29, 2014

PO Base tables in Oracle Apps

PO Interface tables.

Below are the base tables for PO in Oracle Apps.
1.  PO_HEADERS_ALL 
This table stores header information of a Purchasing Document. You need one row for each document you create.
column 'SEGMENT1' in this table represents the Document number.
The following are the documents that use PO_HEADERS_ALL
RFQ’s, Quotations, Standard Purchase Order, Planned Purchase Order, Blanket Purchase Order and Contracts
Important columns of this table are below.
PO_HEADER_ID, SEGMENT1, TYPE_LOOKUP_CODE, VENDOR_ID, VENDOR_SITE_ID, CLOSED_CODE
PO_HEADER_ID is a unique system generated primary key and is invisible to the users.
SEGMENT1 is the document number
You can uniquely identify a row in PO_HEADERS_ALL using ORG_ID, SEGMENT1, and TYPE_LOOKUP_CODE, or using PO_HEADER_ID.
2.  PO_LINES_ALL
This table stores the line information of a Purchasing Document.
Important columns of this table:
PO_LINE_ID:                       Unique identifier of the Document Line
PO_HEADER_ID:               Unique identifier of the Document Header (with reference to PO_HEADERS_ALL, PO_LINE_ID)
LINE_TYPE_ID:                 Unique identifier of Line_Type (with reference to PO_HEADERS_ALL, PO_LINE_ID and PO_HEADER_ID)
LINE_NUMBER:                 Line Number
ITEM_ID:                             Unique Item Identifier
ORG_ID:                              Unique Identifier of the Operating Unit
CLOSED_CODE:                 Status of the Document.
3.  PO_LINE_LOCATIONS_ALL
This table contains the information related to purchase order shipment schedules and blanket agreement price breaks. You need one row for each schedule or price break you attach to a document line.
Below are the documents that use shipment schedules:
  1. RFQs
  2. Quotations
  3. Standard purchase orders
  4. Planned purchase orders
  5. Planned purchase order releases
  6. Blanket purchase orders
  7. Blanket purchase order releases
Each row includes the location, quantity, and dates for each shipment schedule. Oracle Purchasing uses this information to record delivery schedule information for purchase orders, and price break information for blanket purchase orders, quotations and RFQs.
The following are the important columns of this table:
LINE_LOCATION_ID:                  Unique Identifier of Document shipment schedule
PO_HEADER_ID:                         Unique Identifier of Document header. (with reference to PO_HEADERS_ALL.po_header_id.)
PO_LINE_ID:                                Unique Identifier of Document line (with reference to PO_LINES_ALL.po_line_id)
QUANTITY:                                    Quantity ordered for Purchase Orders, RFQs and Quotations
QUANTITY_RECEIVED:                Quantity received until today
QUANTITY_ACCEPTED:               Quantity accepted after inspection
QUANTITY_REJECTED:               Quantity rejected after inspection
QUANTITY_BILLED:                     Quantity invoiced by Oracle Payables
QUANTITY_CANCELLED:             Quantity cancelled
TAXABLE_FLAG:                           indicates whether the shipment is taxable
ORG_ID:                                        Operating unit unique identifier
SHIP_TO_ORGANIZATION_ID:     Unique identifier of Ship-to organization.
4.      PO_DISTRIBUTIONS_ALL
This table contains the information related to accounting distribution of a purchase order shipment line. You need one row for each distribution line you attach to a purchase order shipment. There are four types of documents using distributions in Oracle Purchasing:
  1. Standard Purchase Orders
  2. Planned Purchase Orders
  3. Planned Purchase Order Releases
  4. Blanket Purchase Order Releases
Each row includes the destination type, requestor ID, quantity ordered and deliver-to location for the distribution.
Important columns of this table:
PO_DISTRIBUTION_ID:               This is the primary key for this table. It is a unique Document Distribution identifier.
PO_HEADER_ID, PO_LINE_ID
LINE_LOCATION_ID:                  Unique Identifier of the Document Shipment Schedule (with reference to PO_LINE_LOCATIONS_ALL, LINE_LOCATION_ID)
CODE_COMBINATION_ID:        Unique Identifier of General Ledger Charge Account (with reference to GL_CODE_COMBINATIONS.CODE_COMBINATION_ID)
REQ_DISTRIBUTION_ID:            Unique Identifier of a Requisition distribution (with Reference to PO_REQ_DISTRIBUTIONS_ALL.DISTRIBUTION_ID).
5.      VENDORS_ALL
This table stores the general information about the suppliers.
6.      PO_VENDOR_SITES_ALL
This table stores information about the supplier sites. Each row includes the site address, supplier reference, purchasing, payment, bank, and general information.
7.      PO_RELEASES_ALL
This table stores information related to planned and blanket Purchase Order releases. Each row includes the buyer, date, release status, and release number. Each release must have at least one purchase order shipment.
8.      PO_VENDOR_CONTACTS
This table stores information about contacts related to Supplier site. Each row includes contact name and site.
9.      PO_ACTION_HISTORY
This table stores information about the approval and control history of a Purchasing Document. This table stores one record for each approval or control action an employee takes on a purchase order, purchase agreement, release or requisition.

Friday, November 28, 2014

Procure to pay process.


What are Interfaces?
The interfaces are mainly used to either transfer data from Oracle Applications to a flat file or data from legacy system to Oracle Applications.
 Used extensively at the time of Data Conversion from legacy/ old systems to a fresh implementation of Oracle Applications.
How can be used?
Oracle provides flexible and flexible tools in the form of Interface programs.
When can be used?
To import the master and transactional data like Customers, Invoices, and Sales Orders etc from external systems into Oracle Applications.
What are the types of interfaces?
There are two major types of Interfaces:
 Inbound Interface : These interfaces are used to transfer data from external systems to Oracle Applications.
Outbound Interface :  These interfaces are used to transfer data from Oracle Applications to external systems.
Two other distinctions of Interfaces:
 Open Interface: If the interface logic is provided by Oracle Applications, it is called an Open Interface.
 Custom Interface: If the interface logic needs to be developed by the implementation team, it is called a Custom Interface.
What is the Diference between Interface and Application Program Interface (API)?
Interfaces are used to transfer the data from legacy system to Oracle Application system where as API is used to convert the data from one form to another form with in the Oracle Application Module.
What are the steps involved in Open interface logic?
First the data from the source application is loaded into a database table (called Interface table).
Then the provided validation program logic validates the records whether they are correct or not .
If the validation fails, the errors are transferred into another table (called Error Table).
If the validation succeeds, the correct records are transferred through a process into the destination application table.

Please describe difference between interface & sql loader?
SQL Loader is to just lift the data from xls or any format and shift the data to some interface table or staging table. Its a standard set of commands, which we use to lift and Shift the data from one place to another place as this is much faster.
interface on other side is a standard API provided by Oracle, which is combination of Interface table(s) and API to load the data into base tables.
SQL Loader is NOT a ideal solution to load data into base table.
What is  Source Application?
You obtain data from a source application to pass on to a destination application for further processing and/or storage.
 What are Source Data Issues we need to consider?
Type of file, Size, Frequency of upload, Record Length (Variable or fixed), Delimiter, Datatype for each field, Any unwanted data, Naming convention and uniqueness of file, Location of the file, Access on the file.
What is Destination Application?
You send data to a destination application so that the application can perform further processing and/or storage.
What is Interface Table?
For inbound interfaces, the interface table is the intermediary table where the data from your source application temporarily resides until it is validated and processed into the destination application.
What is Identifier columns?
Uniquely identify rows in the interface table provide foreign key reference to both the source and destination applications.
What is Control Columns?
Control columns track the status of each row in the interface table, as it is inserted, validated, rejected, processed, and ultimately deleted.
WHO columns are also control columns.
What is Data Columns?
Stores the data that is being converted.Required columns store the minimum information needed by the destination application to successfully process the interface row.
What are Derived Columns?
Derived columns are created by the destination application from information in the required columns.
What are Optional Columns?
Optional columns are not necessarily required by the destination application, but can be used by the destination application for additional value-added functionality beyond the basics.
What is  Error Table?
For inbound interfaces, the errors table stores all errors found by the validation and processing functions.
In some cases, the errors table is a child of the interface table. This allows each row in the interface table to have many errors, so that you can easily manage multiple errors at once.
In other cases, the errors are stored in a column within the interface table, which requires you to fix each error independently.
 What are the Steps to develop interface Program?
1] Identification(check if any existing open interface to carry out this functionality)
2] Creation of Pre-Interface table ( staging Tables:A table in the format of the data file)
3] Load data into Pre-Interface table(SQL*LOADER can be used to load the flat file into the pre-interface table/staging tables).
4] Validate data in the Pre-Interface table(Null check,Foriegn Key check,Duplicate Check,Business Rule validation)
5] Mapping the values:
Generated fields in Oracle Applications can be mapped in this step to either default values or sequences.
6] Load data into Interface table:
Once the data is as clean as you can get it, the data can be inserted into the Interface table.At such a time, certain columns, which are necessary in Applications but not found in legacy system, need to be populated accordingly like WHO columns.
7] Run the interface program
8] Check for Errors
9] Report on the Interface.
What is Migration?
Migration of data means moving the data from one system to another using Interface Programs/APIs where both the systems have same structure of data.
What is the process of Migrating of data?
Identify the data to be imported to new system (Business requirement).
Extract the data into flat file/Staging table and Load the data into Interface Table(using SQL* Loader/DB Link/Others) after validation(If loading the data using Interface).
What is Conversion?
Conversion of data means translating the data to suite target system (data should be formatted according to target system )  and then move the translated data using Interface Programs/APIs.
• Identify the data to be imported to new system (Business requirement).
• Extract into flat file/Staging table
• Translate/Convert/Format the data
• Load the data into Interface Table(using SQL* Loader/DB Link/Others) after validation(If loading the data using Interface) and then launch standard Interface concurrent program to load the data to Oracle Apps Base Tables
• If using API, fetch the data, validate it and then call API to import the data.
What is the difference between conversion/Migration?
Below are the parameter to be consider.
Frequency
• Conversions/Migration are a one time event
• interfaces are ongoing
Occurrence in the project timeline
• conversions/Migration executed before production
• interfaces executed during production
Manner of execution
• Conversions/Migration are batch
• Interfaces may be batch or real time
Complexity
• Conversion/Migration does have very complex, it’s totally depends upon the data mapping activity.
• Coordinating with other systems make interfaces more complex
Maintenance
• Maintenance of interface is bit cost intensive task.
What is the need of Migration/Conversion?
Migration/Conversion are required when we are upgrading to one version to another (e.g. Oracle Apps 11.5.7 to Oracle 11.5.10) or moving data from some legacy system to Oracle Apps. There will be bulk  of data (sometimes millions or even more than that) that needs to be moved from one system to another  and  before moving the data it should be validated and only valid records should be entered into Oracle Apps.