Here I am trying to describe R12 SLA(Sub Ledger Accounting) Procedure.
1) All accounting performed before transfer to the GL. Accounting data generated and stored in “Accounting Events” tables prior to transfer to GL


2) Run “Create Accounting” to populate accounting events (SLA) tables. User can “View Accounting” only after “Create Accounting” is run. Create Accounting process


– Applies accounting rules

 Loads SLA tables, GL tables
 Creates detailed data per accounting rules, stores in SLA “distribution links” table

3) Below are the key tables for SLA in R12


XLA_AE_HEADERS xah

XLA_AE_LINES xal


XLA_TRANSACTION_ENTITIES xte


XLA_DISTRIBUTION_LINKS xdl


GL_IMPORT_REFERENCES gir


Below are the possible joins between these XLA Tables

xah.ae_header_id = xal.ae_header_id



xah.application_id = xal.application_id


xal.application_id = xte.application_id


xte.application_id = xdl.application_id


xah.entity_id = xte.entity_id


xah.ae_header_id = xdl.ae_header_id


xah.event_id = xdl.event_id


xal.gl_sl_link_id = gir.gl_sl_link_id


xal.gl_sl_link_table = gir.gl_sl_link_table


xah.application_id = (Different value based on Module)



xte.entity_code =

‘TRANSACTIONS’ or


‘RECEIPTS’ or


‘ADJUSTMENTS’ or


‘PURCHASE_ORDER’ or


‘AP_INVOICES’ or


‘AP_PAYMENTS’ or


‘MTL_ACCOUNTING_EVENTS’ or


‘WIP_ACCOUNTING_EVENTS’



xte.source_id_int_1 =


‘INVOICE_ID’ or


‘CHECK_ID’ or


‘TRX_NUMBER’


XLA_DISTRIBUTION_LINKS table join based on Source Distribution Types

xdl.source_distribution_type = ‘AP_PMT_DIST’


and xdl.source_distribution_id_num_1 = AP_PAYMENT_HIST_DISTS.payment_hist_dist_id


—————


xdl.source_distribution_type = ‘AP_INV_DIST’


and xdl.source_distribution_id_num_1 = AP_INVOICE_DISTRIBUTIONS_ALL.invoice_distribution_id


—————


xdl.source_distribution_type = ‘AR_DISTRIBUTIONS_ALL’


and xdl.source_distribution_id_num_1 = AR_DISTRIBUTIONS_ALL.line_id


and AR_DISTRIBUTIONS_ALL.source_id = AR_RECEIVABLE_APPLICATIONS_ALL.receivable_application_id


—————


xdl.source_distribution_type = ‘RA_CUST_TRX_LINE_GL_DIST_ALL’


and xdl.source_distribution_id_num_1 = RA_CUST_TRX_LINE_GL_DIST_ALL.cust_trx_line_gl_dist_id


—————


xdl.source_distribution_type = ‘MTL_TRANSACTION_ACCOUNTS’


and xdl.source_distribution_id_num_1 = MTL_TRANSACTION_ACCOUNTS.inv_sub_ledger_id


—————


xdl.source_distribution_type = ‘WIP_TRANSACTION_ACCOUNTS’


and xdl.source_distribution_id_num_1 = WIP_TRANSACTION_ACCOUNTS.wip_sub_ledger_id


—————


xdl.source_distribution_type = ‘RCV_RECEIVING_SUB_LEDGER’


and xdl.source_distribution_id_num_1 = RCV_RECEIVING_SUB_LEDGER.rcv_sub_ledger_id.

Hope this will help you.
Receivables overview:

Accounts receivable is an asset account in the general ledger that documents money owed to a business by customers who have purchases goods or services on credit.
Accounts receivable can be contrasted with accounts payable, a liability account in the GL that documents money the business owes for the purchase of goods or services.
Accounts receivable, accounts payable and payroll are usually listed as the top three mission-critical business processes in a disaster recovery plan .

Receivables Workbenches:

Oracle Receivables provides four integrated workbenches that you can use to perform most of your day–to–day Accounts Receivable operations. You can use the Receipts Workbench to perform most of
your receipt–related tasks and the Transactions Workbench to process your invoices, debit memos, credit memos, on–account credits, chargebacks, and adjustments. The Collections Workbench lets you review customer accounts and perform collection activities such as recording customer calls and printing dunning letters. The Bills Receivable Workbench lets you create, update, remit, and manage your bills receivable.

Each workbench lets you find critical information in a flexible way, see the results in your defined format, and selectively take appropriate action. For example, in the Transactions Workbench, you can query transactions based on the bill–to or ship–to customer, currency, transaction number, or General Ledger date. You can then review financial, application, and installment information, perform adjustments, create a credit memo, or complete the transaction. All of the windows you need are accessible from just one window, so you can
query a transaction once, then perform several operations without having to find it again.

Receivables Setups in R12:
Overview of Setting Up:

During setup, you define business fundamentals such as the activities you process and their accounting distributions, your accounting structure, and various control features. Setup is also the time to define
comprehensive defaults that Receivables uses to make data entry more efficient and accurate. In addition, setup lets you customize Receivables to employ the policies and procedures that you use in your business.
You can set up Receivables a number of different ways. The following graphic shows the most complete setup scenario. If you use the Oracle Applications Multiple Organization Support feature to use multiple sets of books for one Receivables installation, please refer to the Multiple Organizations in Oracle Applications manual before proceeding. If you plan to use Oracle Cash Management with Oracle Receivables, additional setup steps are required.

Note: If you plan to use Multiple Reporting Currencies (MRC) with Receivables, additional setup steps are required. For more information, refer to the Multiple Reporting Currencies in Oracle Applications manual.

Related Product Setup Steps:

The following steps may need to be performed to implement Oracle Receivables. These steps are discussed in detail in the Setting Up sections of other Oracle product user guides.

Set Up Underlying Oracle Applications Technology 

The Implementation Wizard guides you through the entire Oracle Applications setup, including system administration. However, if you do not use the Wizard, you need to complete several other setup steps, including:

• performing system–wide setup tasks such as configuring concurrent managers and printers
• managing data security, which includes setting up responsibilities to allow access to a specific set of business data and complete a specific set of transactions, and assigning individual users to one or more of these responsibilities.
• setting up Oracle Workflow

General Ledger Setup Steps:

The following table lists steps and a reference to their location within the Applications Implementation Wizard (AIW).

  1. Define Chart of Accounts 
  2. Define Currencies 
  3. Define Calendars 
  4. Define Calendar Period Types 
  5. Define Ledger
  6. Assign Ledger to a Responsibility 


Define Chart of Accounts:
Define Segments: 
Navigation: General Ledger –> Setups –> Flexfields –> Key –> Segments.
Query With Accounting Flexfield and click on New.

Give your coa name and save.


Click on Segments.
Enter your segments names.


and save your work.

Assign Flexfield Qualifiers to Company and Accounting segments.
Select Company segment and then Click on Flexfield Qualifiers.
Select Balancing segment qualifiers and save.

 Select Accounting segment and then click on flexfield qualifiers.

Select Natural Account Segment and save.

Define Value sets:
Click on Value set.

Enter the value set Name and Size.


Save your work.

Like wise define value set for all reaming segments.
Assign Value sets to respective segments.


Save your Work.
Select Allow Dynamic inserts and Freeze Flexfield Defination and then click on Compile.

Wait until the following program are successfully completed.


Define Values:

Navigation: General Ledger –> Setups –> Flexfields –> Key –>Values.
Enter the below information and click on find button.


Enter the company values names and save your work.


Like wish define values for all reaming segments.

Define Currencies:
Navigation: General Ledger –> Setup –> Currencies –> Define.
Enter information and save.


Define Calendar Period Types:
Navigation: Setup –> Financials –> Calendars –> Types.
Enter the information and save.


Define Calendar:
Navigation: Setup –> Financials –> Calendars –> Accounting.



Save.
Define Ledger  :
See this post for how to define Ledger in R12.

Assign Ledger to a Responsibility:

Navigation: System Administrator –> Profile –> Systems.


Click on find.

Assign Ledger to GL Responsibility.


Save.

Oracle Inventory Setup Steps:

  • Define Operating Unit.
  • Define Inventory Organizations
  • Define Items 


Define Operating Unit:

See my blog how to define Operating unit in R12.

Define Inventory Organization:

Navigation: Inventory –> Setup –> Organizations –> Organizations.
Click on New.


Enter information in the required fields.


Save your work and click on othres.

click on Accounting information.


Enter the required information and save.


Click on Others and select the inventory information.


Under Inventory Parameters tab enter the following information.



Under Costing Information tab enter the following information.


Under Revision and Lot Serial And LPN enter the required information.


Under the other accounts tab enter the required information.

Save your work.

Define Items:
Navigation: Inventory –> Items –> Master items.
Enter the name and description.

Go to Tolls and click on copy from.

Enter Finished good and then click on Apply and done button.

Receivable Setups:

  • Define System Options
  • Define Transaction Flexfield Structure
  • Define Sales Tax Location Flexfield Structure
  • Define AutoCash Rule Sets
  • Define Receivables Lookups
  • Define Invoice Line Ordering Rules
  • Define Grouping Rules
  • Define Application Rule Sets
  • Define Payment Terms
  • Define AutoAccounting
  • Open or Close Accounting Periods
  • Define Transaction Types
  • Define Transaction Sources
  • Define Collectors
  • Define Approval Limits
  • Define Remittance Banks
  • Define Receivables Activities
  • Define Receipt Classes
  • Define Receipt Sources
  • Define Payment Methods
  •  Define Statement Cycles
  • Define System Profile Options
  • Define Salespersons
  • Define Customer Profile Classes
  • Define Customers
  • Define Remit–To Addresses
Define System Options: 
Define your accounting, discount, tax, and invoice system options to control how Receivables works. System options determine your accounting method, set of books, accounting flexfields, whether you use header or line–level rounding, and control the default operation of the AutoInvoice and Automatic Receipt programs.
System options also control how Receivables calculates tax on your transactions. You must specify a tax method, choose a Location Flexfield Structure, indicate whether to compound tax, select the address validation to use, and define tax defaults and rounding options. As you can set up your system to calculate Sales Tax, Value Added Tax, or Canadian Tax, we recommend that you carefully review the appropriate implementing tax essay before defining your system options.
Navigation: Receivables –> Setups –> System –> System Options.

Enter the required information in respective fields.


Define Transaction Flexfield Structure:

Transaction flexfields are descriptive flexfields that AutoInvoice uses to identify transactions and transaction lines. Receivables lets you determine how you want to build your transaction flexfield structure and what information you want to capture.

There are four types of transaction flexfields:

• Line Transaction Flexfield
• Reference Transaction Flexfield
• Link–To Transaction Flexfield
• Invoice Transaction Flexfield
You must define the Line Transaction Flexfield if you use AutoInvoice. You can use the Line Transaction Flexfield to reference and link to other lines because the Line Transaction Flexfield is unique for each
transaction line. AutoInvoice always uses the Line Transaction Flexfield structure for both the Link–to and Reference information when importing invoices. You must explicitly define the Link–to, Reference,
and Invoice Transaction Flexfield structures only if this information is to be displayed on a custom window.
Receivables gives you the option of displaying Invoice Transaction Flexfield information in the reference column of invoice lists of values.
Use the System Profile Option AR: Transaction Flexfield QuickPick Attribute to select the Invoice Transaction Flexfield segment that you want to display. For example, if you want to be able to reference the
order number for imported invoices when using an invoice list of values, you must assign the transaction flexfield segment that holds the order number to the AR: Transaction Flexfield QuickPick Attribute
profile option. The order number will now display in the reference column of invoice lists of values.
Line Transaction Flexfield:
Use columns INTERFACE_LINE_ATTRIBUTE1–15 and INTERFACE_LINE_CONTEXT to define the Line Transaction Flexfield. Line Transaction Flexfields are unique for each record in the interface table and therefore can be used as record identifiers.
Reference Transaction Flexfield:
Reference Transaction Flexfields have the same structure as the Line Transaction Flexfields.
Transactions 4 – 235 Reference Transaction Flexfields are used to apply a credit memo to an invoice or associate an invoice to a specific commitment. 
For example, to refer a credit memo to a specific invoice, use the REFERENCE_LINE_ATTRIBUTE1–15 and REFERENCE_LINE_CONTEXT columns of the credit memo to enter the Line Transaction Flexfield of the invoice. To refer an invoice to a specific commitment, use the REFERENCE_LINE_ATTRIBUTE1–15 and REFERENCE_LINE_CONTEXT columns of the invoice to enter the Line Transaction Flexfield of the commitment.
Link–To Transaction Flexfield:
Link–To Transaction Flexfields also have the same structure as the Line Transaction Flexfield. Use Link–To Transaction Flexfields to link transaction lines together in the interface table. For example, you might want to import tax and freight charges that are associated with specific transaction lines. If you want to associate a specific tax line with a specific transaction line, use the LINK_TO_LINE_ATTRIBUTE1–15 and LINK_TO_LINE_CONTEXT columns of the tax line to enter the Line Transaction Flexfield of the invoice.
Invoice Transaction Flexfields:
Create a new flexfield with a similar structure as the Line Transaction Flexfield, but only include header level segments. For example, if the Line Transaction Flexfield structure has four segments and the last two segments contain line level information, define your Invoice Transaction Flexfield using the first two segments only. Segments included in the Invoice Transaction Flexfield should be included in the AutoInvoice grouping rules.
Define Sales Tax Location Flexfield:
Receivables uses the customer shipping address to determine the sales tax rate on transactions for all customers in the country that you define in the Systems Option window as your home country. Proceed to the next step if you are not charging your customers tax based on their shipping address.
Following are the seeded Sales Tax Location Flexfield structures:
• Country
• State and City
• Province and City
• City
• Province
• State, County and City
Use the Key Flexfield Segments window to select the seeded Sales Tax Location Flexfield structure, or to set up a new structure, that you want Receivables to use to determine your sales tax rates and to validate
your customer addresses.
You can confirm that the required segments are enabled by navigating to the Segments Summary window. Navigate back to the Key Flexfield Segments window to freeze your flexfield structure by checking the
Freeze Flexfield Definition check box and then compiling the flexfield.
Note: When you define tax system options in the System Options window, use the list of values in the Location Flexfield Structure field to select the same Sales Tax Location Flexfield structure that you selected in the Key Flexfield Segments window.

Navigation: Receivables –> Setup –> Financials –> Flexfield –> Key –> Segments.

Query with Sales Tax Location Flexfield
 Enter the required information in respective filelds.


Save your work.
Like wise we can define other sales tax location flexfields,

Define AutoCash Rule Sets:

If you are using AutoCash, define your AutoCash rule sets before defining system parameters or customer profiles classes. AutoCash rules determine the sequence of application methods Receivables uses when applying receipts imported using AutoLockbox to open debit items.

Navigation: Receivables –> Setup –> Receipts –> Autocash rule sets.

Define Receivables Lookups:
Receivables provides several default lookups which are used throughout the application to provide validated default values and list of values choices. You can add or update these to customize your list of values and speed data entry. For example, you can define additional reasons for creating credit memos or enter the names of each freight carrier used by your business.

Navigation: Receivables –> Setup –> System –> Quickcodes –> Receivables.

Define lookups as you like.

Define Invoice Line Ordering Rules:

If you are using AutoInvoice, define invoice line ordering rules to specify how you want to order and number transaction lines after AutoInvoice groups them into invoices, debit memos, and credit memos. Receivables provides many attributes that you can use to define your line ordering rules.

Navigation: Receivables –> Setup –> Transactions –> Autoinvoice –> Line Ordering rule.

Define Grouping Rules:

If you are using AutoInvoice, define grouping rules to indicate how you want to group transaction lines imported by AutoInvoice. For example, to include specific transaction lines on a single transaction, certain attributes must be identical. Receivables provides many attributes that you can use to define your grouping rules.

Navigation: Receivables –> Setup –> Transactions –> Autoinvoice –> Grouping Rule.


Define Application Rule Sets:

Define Application Rule Sets to control how Receivables reduces the balance due for your open debit items when you apply payments using either the Applications window or Post QuickCash. You can define your own application rule sets, assign them to transaction types, and specify a default rule set in the System Options window.

Navigation: Receivables –> Setup –> Receipts –> Application Rule sets.

Define Payment Terms:

Define payment terms to determine the payment schedule and discount information for customer invoices, debit memos, and deposits. You can also define proxima payment terms to pay regular expenses such as telephone bills and credit card bills that occur on the same day each month and create split payment terms for invoice installments that have different due dates.

Navigation: Receivables –> Setup –> Transactions –> Payment terms.


Define AutoAccounting:

Define AutoAccounting to specify the general ledger accounts for transactions that you enter manually or import using AutoInvoice. AutoAccounting uses this information to create the default revenue, receivable, freight, tax, unearned revenue, unbilled receivable, finance charges, bills receivable accounts, and AutoInvoice clearing (suspense) accounts.

Navigation: Receivable –> Setup –> Transactions –> Auto Accounting.


Like wise we should also define reaming auto accounting types.

Open or Close Accounting Periods:

Navigation: Receivables –> Control –> Accounting –> Open/Close Periods.

Define Transaction Types:

Define the transaction types that you assign to invoices, debit memos, commitments, chargebacks, credit memos, on–account credits, and bills receivable. Receivables uses transaction types to default payment term,
account, tax, freight, creation sign, posting, and receivables information. Receivables provides two predefined transaction types: Invoice and Credit Memo.

Navigation: Receivables –> Setup –> Transaction –> Transaction Types.

Define Transaction Sources:

Define the transaction sources that you assign to invoices, debit memos, commitments, credit memos, on–account credits, and bills receivable. Receivables uses transaction sources to control your transaction and transaction batch numbering, provide default transaction types for transactions in batch, and to select validation options for imported transactions. Receivables provides the following predefined transaction sources: MANUAL–OTHER, DM Reversal, and Chargeback.
Navigation: Receivables –> Setup –> Transaction –> Sources.
 Define Collectors:

Define collectors to assign to your customers through credit profile class assignments. Collectors can use the Collections windows and Receivables collection reports to keep apprised of a customer’s past due items. Receivables provides a predefined collector called DEFAULT.

Navigation: Receivables –> Setup –> Collections –> Collectors.



 Define Approval Limits:

Define approval limits to determine whether a Receivables user can approve adjustments or credit memo requests. You define approval limits by document type, dollar amount, reason code, and currency.
Approval limits affect the Adjustments, Submit AutoAdjustments, and Approve Adjustments windows as well as the Credit Memo Request Workflow.

Navigation: Receivables –> Setup –> Transactions –> Approval Limits.


Define Remittance Banks:

Proceed to the next step if you already defined your remittance banks in Oracle Payables. Define all of the banks and bank accounts you use to remit your payments. You can define as many banks and bank accounts as you need and define multiple currency bank accounts to accept payments in more than one currency.

Define Receivables Activities

Define Receivables Activities to provide default accounting information when you create adjustments, discounts, finance charges, miscellaneous cash transactions, and bills receivable. Receivables also uses Receivables Activities to account for tax if you calculate tax on these activities.

Navigation: Receivables –> Setup –> Receipts –> Receivable Activities.

Like wise we should define reaming receivable actives also.

Define Receipt Classes:

Define receipt classes to specify whether receipts are created manually or automatically. For manual receipts, you can specify whether to automatically remit it to the bank and/or clear your accounts. For automatic receipts, you can specify a remittance and clearance method, and whether receipts using this class require confirmation.

Navigation: Receivables –> Setup –> Receipts –> Receipts Class.


Click on Bank accounts.
Enter information in respective fields.


Save your work.

Define Payment Method:

Define the payment methods to account for your receipt entries and applications and to determine a customer’s remittance bank information. When defining payment methods, you must enter a receipt class, remittance bank information, and the accounts associated with your payment receivables type. You can also specify accounts for confirmation, remittance, factoring, bank charges, and short–term debt.

Navigation: Receivables –> Setup –> Receipts –> Receipts Class.



Define Statement Cycles: 

Define statement cycles to control when you create customer statements. You assign statement cycles to customers in the Customer Profile Classes window.

Navigation: Receivables –> Setup –> Print –> Statement Cycle.


Define profile options: 

Define profile options to provide default values for some Receivables operations, specify how Receivables processes data, and control which actions users can perform.

Navigation: Administrator –> Profile –> Systems.

During your implementation, you set a value for each Receivables user profile option to specify how Receivables controls access to and processes data. Receivables lets you govern the behavior of many of
the windows that use profile options.

Profile options can be set at the following levels:
• Site: This is the lowest profile level. Site level profile option values affect the way all applications run at a given site.
• Application: These profile option values affect the way a given application runs.
• Responsibility: These profile option values affect the way applications run for all users of a given responsibility.
• User: These profile option values affect the way applications run for a specific application user. The values you enter for options at the User level supersede the values that your system administrator has entered for you for these options.

Each of these user profile options affect the behavior of Receivables in different contexts. In Receivables, operations that profile options can affect include receipt application, the entry of adjustments, the creation
and remittance of automatic receipts and taxes, and posting to your general ledger.
You may also have additional user profile options on your system that are specific to applications other than Receivables.

To change profile options at the Site, Application, or Responsibility level, choose the System Administrator responsibility, then navigate to the Personal Profile Values window. Query the Profile Name field to
display the profile options with their current settings, make your changes, then save your work. You can change profile options at the user level in the Personal Profile Values window. To do this, navigate to the Personal Profile Values window, query the profile option to change, enter a new User Value, then save your work. Generally, your system administrator sets and updates profile values at each level.

Attention: For any changes that you make to profile options to take effect, you must either exit, and then reenter Receivables, or switch responsibilities.

   
Define Salespersons:

Define salespersons to allocate sales credits to invoices, debit memos, and commitments. If you do not want to assign sales credits for a transaction, you can enter No Sales Credit. If AutoAccounting depends on salesperson, Receivables uses the general ledger accounts that you enter for each salesperson along with your AutoAccounting rules to determine the default revenue, freight, and receivable accounts for transactions.

Define Customer Profile Classes:

Define customer profile classes to categorize customers based on credit, payment terms, statement cycle, automatic receipt, finance charge, dunning, and invoicing information. When you initially set up your customers, you assign each customer to a profile class. To customize the profile class for a specific customer, use the Customer Profile Classes window.

Navigation: Receivables –> Customers –> Profile Classes.

In Profile Class window enter the following information.



In Profile class Amount tab enter the following information.


Save your work.

Define Customers:

Define customers and customer site uses to enter transactions and receipts in Receivables. When you enter a new customer, you must enter the customer’s name, profile class and number (if automatic customer numbering is set to No). You can optionally enter customer addresses, contacts, site uses and telephone numbers. You must enter all the components of your chosen Sales Tax Location Flexfield when entering customer addresses in your home country.

Navigation: Receivables –> Customers –> Standard.

Define Remit–To Addresses: 

Define remit–to addresses to inform your customers where to send payments. Associate each remit–to address with one or more state, country, and postal code combinations.
For example, if you want your customers in California and Nevada to send their payments to a specific address, enter the remit–to address and associate the states CA and NV with this address. Remit–to addresses are assigned based on the bill–to address on the transaction.

Navigation: Setup –> Print –> Remit-to-addresses.

Click on Create Remit to addresses.


Enter the required information 


Click on Apply.

Enter the country name in the same page and then click on the GO.

Click on the Receipts form Create button.



Enter the following information and click on Apply button.

SELECT hca.account_number,rc.customer_name, hp.party_type,hp.party_name
 FROM hz_parties hp, hz_Cust_Accounts hca,ar.ra_customers rc
WHERE hp.party_id = hca.party_id
and rc.customer_id=hca.cust_Account_id
  AND hca.cust_account_id IN (
         SELECT   customer_id
             FROM ap_bank_account_uses_all bauses,
                  ap_bank_accounts_all bacct
            WHERE bauses.external_bank_account_id = bacct.bank_account_id
              AND primary_flag = ‘Y’
         GROUP BY customer_id)
          HAVING COUNT (DISTINCT (external_bank_account_id)) > 1)
Oracle inventory main reporting tables.
——————————————————————————–

MTL_MATERIAL_TRANSACTIONS
Base table for all transactions (etc RCV,Issuance,Sub Inv Transfer,Inter Org Transfer,Misl Transactions…).

MTL_SYSTEM_ITEMS
Table contains all System items organization wise. It is Base table for items.
This table holds the definitions for inventory items, engineering items, and purchasing items. The flexfield code is MSTK. The primary key for an item is the INVENTORY_ITEM_ID and the ORGANIZATION_ID. The same item could be defined in more than one organization. Each row represents an item in an organization.

MTL_SYSTEM_ITEMS_TL
Table contains translated description of each master item.
The primary key is INVENTORY_ITEM_ID, ORGANIZATION_ID and LANGUAGE.

MTL_TRANSACTION_TYPES
Transaction types and names.

ORG_ACCT_PERIODS
Organization wise accounting periods.

GL_CODE_COMBINATIONS
Stores valid Accounting Flexfield segment value combinations for each accounting flexfield structure within your General Ledger. Primary key: CODE_COMBINATION_ID.

MTL_SECONDARY_INVENTORIES
This table is the definition table for the subinventory. Subinventories are assigned to items, indicating a list of valid places in which this item may be located. The primary key is SECONDARY_INVENTORY_NAME, ORGANIZATION_ID.

 MTL_ITEM_CATEGORIES
This table stores the item assignments to categories within a category set. For each assignment, this table stores the item, category set, and the category. Items can be assigned to multiple categories and category sets, but can be assigned to only one category in a given category set. This table is populated through either the Define Item or the Update Item/Org Attributes forms. It can also be populated by performing item assignments when a category set is defined. The primary key is INVENTORY_ITEM_ID, ORGANIZATION_ID, CATEGORY_SET_ID.
 
Oracle Purchasing main reporting tables.
——————————————————————————–
RCV_TRANSACTIONS
You can get data of all receiving transactions in this table.
Important columns
TRANSACTION_TYPE like  DELIVER,REJECT,ACCEPT,CORRECT,RETURN TO RECEIVING
TRANSFER, RETURN TO VENDOR, RECEIVE.
Also you can directly connect to shipment and purchase order tables for rcv_transactions
By  SHIPMENT_HEADER_ID and PO_HEADER_ID.
PO_HEADERS_ALL
Get purchase order header level information from this table.
Important Columns
TYPE_LOOKUP_CODE indicates purchase order type like RFQ, STANDARD.
PO_LINES_ALL
Get purchase order live level information from this table.
Important columns
ITEM_ID join with table MTL_SYSTEM_ITEMS column ITEM_ID to get item all information.
PO_VENDORS
Get vendor level information from this table.
Important columns
PO_VENDOR_SITES_ALL
Get vendor sites information from this table in detail.

 

SELECT   ooha.header_id order_header_id, ottt.NAME order_type_name,
         ooha.order_number, ooha.ordered_date,
         ooha.transactional_curr_code order_currency, hp.party_id,
         hp.party_number, hp.party_name customer_name,
         hca.cust_account_id customer_id, hca.account_number customer_number,
         oola.line_id order_line_id, oola.line_number, oola.inventory_item_id,
         msib.segment1 item_number, msib.description item_desc,
         oola.attribute15 superseded_item, oola.order_quantity_uom,
         oola.ordered_quantity, oola.unit_selling_price
    FROM oe_order_headers_all ooha,
         oe_order_lines_all oola,
         oe_transaction_types_tl ottt,
         mtl_system_items_b msib,
         mtl_parameters mp,
         org_organization_definitions ood,
         hz_parties hp,
         hz_cust_accounts hca
   WHERE ooha.header_id = oola.header_id
     AND ottt.transaction_type_id(+) = ooha.order_type_id
     AND ottt.LANGUAGE = USERENV (‘LANG’)
     AND hca.cust_account_id(+) = ooha.sold_to_org_id
     AND hp.party_id = hca.party_id
     AND ooha.org_id = oola.org_id(+)
     AND msib.inventory_item_id = oola.inventory_item_id
     AND msib.organization_id = mp.master_organization_id
     AND mp.organization_id = ood.organization_id
     AND mp.master_organization_id = mp.organization_id
     AND ood.operating_unit = fnd_profile.VALUE (‘ORG_ID’)
     AND ooha.order_number = :sales_order_number
ORDER BY ottt.NAME, ooha.order_number, oola.line_number;