Professional Documents
Culture Documents
Oracle Apps Data Structure
Oracle Apps Data Structure
RA_CUSTOMERS
Column
Introduction
1256 Red Rock Consulting 1109
1257 Shell Rock Consulting 1110
View -
CAR_COMM_CUSTOMER_V
Oracle Applications has a very flexible architecture CUSTOMER_ID CUSTOMER_NAME CUSTOMER_NUMBER CUSTOMER_CLASS_CODE
containing valuable information but with flexibility comes 1000 Business World
1001 American Telephone and Telegraph
1005 AT&T Universal Card
1000 High Technology
1001 Telecom
1005 Telecom
complexity in the underlying data structure. 1006 Computer Service and Rentals
1007 General Technologies
1002 Imaging Innovations, Inc.
1006 Other
1007 High Technology
1002 High Technology
Relationship
Column/Field RA_ADDRESSES_ALL (RA)
ADDRESS_ID NUM
CUSTOMER_ID NUM
AR GL AP
FND FA CM
• There is a table name (e.g. ITEM) you would like to
use but unsure of the exact name. OE INV PO
Login to SQL*Plus and type
SELECT table_name Oracle Applications Data Structure
FROM all_tables
WHERE table_name LIKE ‘%ITEM%’
Oracle General Ledger
• There is a column (e.g. CUSTOMER_NAME) that you
Gl_code_combinations
would like to use but unsure which table the column
belongs to. ✚ Setup > Accounts > Combinations
Login to SQL*Plus and type
This table stores the valid account combinations.
SELECT table_name, column_name
FROM all_tab_columns The value in your chart of account segments are stored in
WHERE column_name = ‘CUSTOMER_NAME’ the columns segment1 to segment30 depending on your
application configuration.
• The columns org_id and organization_id are different.
Organisation_id refers to the inventory organisations
For example, say your chart of accounts is
in Oracle Inventory and org_id refers to the operating
Company – Cost Centre – Account
unit.
then segment1 = company, segment 2 = cost centre and
segment3 = account.
• Table names that ends with _all has the column However, this sequencing of segments is not guaranteed
org_id included. The org_id signifies the operating therefore, its best to check your configuration.
unit. Therefore, if you have multi-organisation
functionality, you will need to use the _all tables. Another important column is the account_type which
Note that not all tables will have _all suffix. signifies your account is an Asset, Liability, Revenue,
Expense or Owners Equity account.
• The majority of the entities describes in the following
are tables but you may find that there is a view that Gl_je_batches
combines all your requirements. These views will be
based on non _all tables. You need to type the ✚ Journals > Enter
following in SQL*Plus to see the data in these views.
This table stores the journal entry batches. Journal entries
exec dbms_application_info.set_client_info(org_id) are batched in General Ledger.
Org_id is the operating unit in hr_organization_units.
Some columns of interest includes :
• The following illustrates a simplified view of the • Name
Oracle Applications data schema. Each data schema
• Set_of_books_id (when you have more than one set of
is mapped to an application module. The apps
schema has a number of synonyms and views of all book, you’ll also need to link to gl_sets_of_books)
the Oracle Application modules. The fnd has all the • Status
schema all the Oracle Application foundation
• Default_period_name
information such as user profiles, responsibility and
value sets. • Posted_date
You need to login to the appropriate schema when • Posting_run_id
using query tools on a table. Therefore, consult your
Database Administrator regarding security to the Gl_je_headers
schema/schemas you need access.
✚ Journals > Enter
Ap_invoices_all • Period_name
• Amount
✚ Invoices > Entry > Invoices
• Payment_num
This table stores all the invoices you enter. For an invoice Ap_payment_distributions_all
to be approved, the total invoice amount must be stored in
ap_invoice_distributions_all and ✚ Payments > Entry > Payments
ap_payment_schedules_all.
This table stores accounting information for payments.
Some columns of interest includes : There is at least one CASH payment distribution for each
invoice payment. Additional rows may include
• Invoice_num DISCOUNT, GAIN and LOSS distributions where
• Invoice_date appropriate.
• Amount_paid
Some columns of interest includes :
• Invoice_currency_code
• Line_type_lookup_code
• Invoice_type_lookup_code
(CASH/DISCOUNT/GAIN/LOSS)
• Payment_status_flag
• Base_amount
Ap_invoice_distributions_all
Oracle Purchasing
✚ Invoices > Entry > Invoices
Po_vendors
Po_vendor_sites_all • Quantity_received
• Quantity_cancelled
✚ Supply Base > Suppliers
• Need_by_date
This table stores supplier sites information. • Ship_to_organization_id (link to
org_organization_definitions for the organization
Some columns of interest includes : code)
• Pay_site_flag Po_distributions_all
• Purchasing_site_flag ✚ Purchase Orders > Purchase Orders
• Address_line1 to address_line3
This table stores the accounting information on a purchase
• City
order shipment. This table is used for Standard and
• State Planned Purchase Orders and Planned and Blanket
• Area_code Purchase Order Release.
✚ Purchase Orders > Purchase Orders This table stores the receiving information. The three
receipt sources are Supplier, Inventory and Internal Order.
This table stores purchasing document lines. There is one receipt header per receipt source.
• Line_num • Receipt_num
• Item_description • Shipment_num
• Unit_price • Receipt_source_code
• Quantity • Ship_to_org_id
This view contains basic information on all inventory Some columns of interest includes :
organisations.
• Segment1 to segment20
Some columns of interest includes : • Description
• Organization_code • Invetory_item_flag
• Organization_name • Purchasing_item_flag
• Status • Revenue_amount
So_lines_all
Some columns of interest includes :
✚ Orders, Returns > Orders, Returns
• Amount_applied
• Line_applied This table stores the orders and returns line information.
• Tax_applied
The s1 to s30 and s1_date to s30_date relates to the order
• Application_type line cycle status.
• Display
Some columns of interest includes :
• Gl_date
• Set_of_books_id (when you have more than one set of • Line_type_code (DETAIL, PARENT, REGULAR,
book, you’ll also need to link to gl_sets_of_books) RETURN)
• Ordered_quantity
Ar_payment_schedules
• Cancelled_quantity
✚ Transactions > Transactions and Receipts > Receipts
• Selling_price
This table stores all transactions except adjustments and • Price_list_id (links to so_price_lists for price list)
miscellaneous cash receipts. This table is updated when a • Schedule_date
transaction occurs against an invoice, debit memo,
chargeback, credit memo, on-account credit, or receipt. • Promise_date
So_line_details
Some columns of interest includes :
✚ Orders, Returns > Orders, Returns
• Amount_due_original
• Status This table stores order scheduling information.
• Class (DEP, DM, PMT, GUAR, CM, CB, INV)
Some columns of interest includes :
• Due_date
• Amount_due_remaining • Released_flag
• Invoice_currency_code • Quantity
• Amount_applied • Schedule_date
• Amount_adjusted So_picking_batches_all
This table stores the orders and returns information. The header_count column indicates the number of picking
headers are contained in a picking batch.
The s1 to s30 and s1_date to s30_date relates to the order
cycle status. So_picking_headers_all
Some columns of interest includes : ✚ Shipping > Release Sales Orders or Shipping >
Release Sales Orders, SRS
• Order_category (I, P. S, R, RMA)
• Order_number This table stores the picking headers within a picking
batch.
• Purchase_order_num
• Original_system_source_code (for imported orders Some columns of interest includes :
from an external source)
So_picking_lines_all
• Requested_quantity
• shipped_quantity
• Date_requested
• Cancelled_quantity
So_picking_line_details
This table stores the location for the picking lines that have
been reserved.
• Requested_quantity
• Serial_number
Wsh_departure
• Name
• Planned_departure_date
• Actual_depature_date
Wsh_delivery
• Name
• Planned_departure_date
• Actual_depature_date
• Waybill
in v e n t o r y _ it e m _ id
j e _ b a t c h _ id o r g a n iz a t io n _ id s u b in v e n t o r y _ c o d e
o r g a n iz a t io n _ id
GL3 IN V2 IN V4 in v e n t o r y _ it e m _ id
g l_ j e _ h e a d e r s m t l_ s e c o n d a r y _ in v e n t o r ie s m t l_ s y s t e m _ it e m s
o r g a n iz a t io n _ id
s e c o n d a r y _ in v e n t o r y _ n a m e in v e n t o r y _ it e m _ id
j e _ h e a d e r _ id
o r g a n iz a t io n _ id
GL4 IN V5 IN V7
c o d e _ c o m b in a t io n _ id g l_ j e _ lin e s m t l_ o n h a n d _ q u a n t it y c s t _ it e m _ c o s t s
G eneral Ledger Inventory
b ill_ t o _ c u s t o m e r _ id
c u s t o m e r _ id s h ip _ t o _ c u s t o m e r _ id
AR1 AR4 AR7 O E1 h e a d e r _ id O E4
ra_ custom ers r a _ c u s t o m e r _ t r x _ a ll a r _ c a s h _ r e c e ip t s s o _ h e a d e r s _ a ll s o _ p ic k in g _ b a t c h e s _ a ll
b ill_ t o _ s it e _ u s e _ id
c u s t o m e r _ id c u s t o m e r _ t r x _ id c a s h _ r e c e ip t _ id h e a d e r _ id b a t c h _ id
s h ip _ t o _ s it e _ u s e _ id c u s t o m e r _ t r x _ id o r d e r _ h e a d e r _ id
AR2 AR5 AR8 O E2 O E5
r a _ a d d r e s s e s _ a ll r a _ c u s t o m e r _ t r x _ lin e s _ a ll a r _ r e c e iv a b le _ a p p lic a t io n s s o _ lin e s _ a ll s o _ p ic k in g _ h e a d e r s _ a ll
lin e _ id
a d d r e s s _ id c u s t o m e r _ t r x _ lin e _ id p a y m e n t _ s c h e d u le _ id lin e _ id p ic k in g _ h e a d e r _ id
o r d e r _ lin e _ id
AR3 A 1R 6 AR9 O E3 O E6 O E8
r a _ s it e _ u s e s _ a ll r a _ c u s t _ t r x _ lin e _ g l_ d is t _ a ll a r _ p a y m e n t _ s c h e d u le s s o _ lin e _ d e t a ils s o _ p ic k in g _ lin e s _ a ll w sh_departure
s it e _ u s e _ id
lin e _ d e t a il_ id
d e p a r t u r e _ id
p ic k in g _ lin e _ id p la n n e d _ d e p a r t u r e _ id
a c t u a l_ d e p a r t u r e _ id
O E7 O E9
s o _ p ic k in g _ lin e _ d e t a ils w s h _ d e liv e r ie s
R e c e iv a b le s O rder E ntry
v e n d o r _ id
A P1 in v o ic e _ id A P3 PO 1 PO 3 PO 7
a p _ in v o ic e s _ a ll a p _ p a y m e n t _ s c h e d u le s _ a ll po_vendors p o _ h e a d e r s _ a ll r c v _ s h ip m e n t _ h e a d e r s
in v o ic e _ id v e n d o r _ id p o _ h e a d e r _ id s h ip m e n t _ h e a d e r _ id
in v o ic e _ id
A P2 A P4 PO 2 PO 4 PO 8
a p _ in v o ic e _ d is t r ib u t io n s _ a ll a p _ c h e c k s _ a ll p o _ v e n d o r _ s it e s _ a ll p o _ lin e s _ a ll r c v _ s h ip m e n t _ lin e s
v e n d o r _ s it e _ id
c h e c k _ id p o _ lin e _ id
A P5 PO 5
a p _ in v o ic e _ p a y m e n t s _ a ll p o _ lin e _ lo c a t io n s _ a ll
in v o ic e _ p a y m e n t _ id lin e _ lo c a t io n _ id
PO 6 p o _ d is t r ib u t io n _ id
A P6
a p _ in v o ic e _ d is t r ib u t io n s _ a ll P a y a b le s P u r c h a s in g p o _ d is t r ib u t io n s _ a ll
C r o s s A p p lic a t io n J o in s
GL1 c o d e _ c o m b in a t io n _ id = A R6, A R9 c o d e _ c o m b in a t io n _ id A P1 p o _ h e a d e r _ id = PO 3 p o _ h e a d e r _ id
PO 6
GL1 c o d e _ c o m b in a t io n _ id = PO 6 b u d g e t _ a c c o u n t _ id , a c c r u a l_ a c c o u n t _ id , A P6 p o _ d is t r ib u t io n _ id = PO 6 p o _ d is t r ib u t io n _ id
v a r ia n c e _ a c c o u n t _ id
GL 1 c o d e _ c o m b in a t io n _ id = IN V6 reference_ accounts A P1 v e n d o r _ id = PO 1 v e n d o r _ id
GL 1 c o d e _ c o m b in a t io n _ id = A P2, A P6 a c c t s _ p a y _ c o d e _ c o m b in a t io n _ id A P1 v e n d o r _ s it e _ id = PO 2 v e n d o r _ s it e _ id
GL 1 c o d e _ c o m b in a t io n _ id = A P6 d is t _ c o d e _ c o m b in a t io n _ id O E1 c u s t o m e r _ id = AR 1 c u s t o m e r _ id
IN V3 s o u r c e _ lin e _ id = O E3 lin e _ d e t a il_ id O E1 s h ip _ t o _ s it e _ u s e _ id = AR 2 s it e _ u s e _ id
a n d s o u rc e _ c o d e = 'O R D E R E N T R Y ' a n d s it e _ u s e _ c o d e = 'S H I P _ T O '
IN V3 p ic k in g _ lin e _ id = O E6 p ic k in g _ lin e _ id O E1 b ill_ t o _ s it e _ u s e _ id = AR2 s it e _ is e _ id
a n d s o u rc e _ c o d e = 'O R D E R E N T R Y ' a n d s it e _ u s e _ c o d e = 'B I L L _ T O '
IN V3 s h ip m e n t _ n u m b e r = PO 7 s h ip m e n t _ n u m AR5 in t e r f a c e _ lin e _ a t t r ib ute1 = O E1 order_num ber
a n d s o u rc e _ c o d e = 'R C V ' a n d in t e r f a c e _ c o n t e x t = 'O R D E R E N T R Y '
IN V3 t r a n s a c t io n _ s o u r c e _ id = PO 8 s h ip m e n t _ lin e _ id AR5 in t e r f a c e _ lin e _ a t t r ib ute6 = O E2 lin e _ id
a n d s o u rc e _ c o d e = 'R C V ' a n d in t e r f a c e _ c o n t e x t = 'O R D E R E N T R Y '
IN V4 o r g a n iz a t io n _ id = O E2 o r g a n iz a t io n _ id AR5 in t e r f a c e _ lin e _ a t t r ib ute7 = O E6 p ic k in g _ lin e _ id
IN V4 in v e n t o r y _ it e m _ id = O E2, PO 4, in v e n t o r y _ it e m _ id a n d in t e r f a c e _ c o n t e x t = 'O R D E R E N T R Y '
A R5
Reconciliation
Are you having problem reconciling your General Ledger to your subledger ? This process can take a long time to resolve if
you don’t know where to look.
The following SQL*Plus example displays the sum of the Trade Receipts from your Receivables subledger for a given period
name (i.e. ‘Apr-00’) by the General Ledger batch name. This example also assumes that you are entering receipts in batches.
You can even go further and look at the accounts for which these trade receipts have debited and credited by joining
ar_receivable_applications to the gl_code_combinations table via code_combination_id.
The gl_import_references table links the General Ledger journal tables to Receivables.
SELECT
Gb.name gl_batch_name,
B.name ar_batch,
NVL(SUM(DECODE(ra.status,'APP', ra.amount_applied,0)),0) +
NVL(SUM(DECODE(ra.status,'ACC', ra.amount_applied,0)),0) +
NVL(SUM(DECODE(ra.status,'UNAPP',ra.amount_applied,0)),0) +
NVL(SUM(DECODE(ra.status,'UNID', ra.amount_applied,0)),0) rec_amount
FROM ar_receivable_applications_all ra,
ar_cash_receipts_all cr,
ar_batches_all b,
ar_cash_receipt_history_all crh,
gl_je_batches gb
WHERE ra.cash_receipt_id = cr.cash_receipt_id
AND cr.cash_receipt_id = crh.cash_receipt_id
AND crh.batch_id = b.batch_id
AND (crh.batch_id, crh.cash_receipt_id, gb.je_batch_id) IN
(SELECT DISTINCT
ab.batch_id,
ac.cash_receipt_id,
b.je_batch_id
FROM
ar_batches_all ab,
ar_cash_receipt_history_all ah,
ar_cash_receipts_all ac,
gl_import_references i,
gl_je_headers h,
gl_je_batches b
WHERE h.je_header_id = i.je_header_id
AND b.je_batch_id = i.je_batch_id
AND i.reference_2 = ah.cash_receipt_id
AND ah.cash_receipt_id = ac.cash_receipt_id
AND ab.batch_id(+) = ah.batch_id
AND h.je_source = 'Receivables'
AND h.je_category = 'Trade Receipts'
AND h.je_batch_id = b.je_batch_id
AND h.period_name = 'Apr-00')
GROUP BY gb.name, b.name
ORDER BY 1, 2
/
Information Management
You schedule your orders but you are running low in stock for some items. The following example displays the reservation
information for the item parameter. Based on this information, you can then decide which orders can be rescheduled.
The table mtl_demand stores the reservation information and fnd_user contains user information. The majority of the tables
have the columns created_by, last_updated_by that represents the user who entered the transaction and the last user to have
updated the transaction, respectively.
Your customers have been returning products, but why ? Is it the product quality, is it the delivery ? How can the business
improve ?
You enter return reasons on Return Material Authorisations (RMAs) and the following example reviews the returns for a given
date range (where &&from_date and &&to_date are parameters in SQL*Plus) for when the RMAs have been created.
SELECT
l.transaction_reason_code reason_code,
c.customer_name cust_name,
SUBSTR(s.segment1, 1, 10) item,
h.order_number ord_no,
t.trx_number inv_no,
0 - NVL(l.ordered_quantity, 0) - NVL(l.cancelled_quantity, 0) rma_quantity,
NVL(tl.quantity_credited, 0) qty_credited,
NVL(tl.quantity_credited, 0) * NVL(unit_selling_price, 0) total_cr,
u.user_name creator_name,
h.creation_date creation_date
FROM fnd_user u,
mtl_system_items s,
ra_customers c,
ra_customer_trx_all t,
ra_customer_trx_lines_all tl,
so_headers_all h,
so_lines_all l
WHERE h.order_category = 'RMA'
AND h.cancelled_flag is null
AND tl.customer_trx_id = t.customer_trx_id(+)
AND tl.interface_line_attribute6(+) = l.line_id
AND c.customer_id = h.customer_id
AND u.user_id = h.created_by
AND l.inventory_item_id = s.inventory_item_id
AND l.warehouse_id = s.organization_id
AND h.header_id = l.header_id
AND h.creation_date between to_date('&&from_date', 'DD-MON-RRRR')
AND to_date('&&to_date', 'DD-MON-RRRR')
ORDER BY 1, 2
/
Alerts
You need to ensure that all orders entered for the day is booked in order to progress to the next step. Therefore, you may
setup an Oracle Alert based on the following SQL*Plus and email the output to the Sales Order Administrator. The following
SELECT
o.organization_code Org_name,
SUBSTR(msi.segment1, 1, 10) Item,
SUBSTR(msi.description, 1, 45) Item_desc,
sh.order_number Order_number,
sh.date_ordered Date_ordered,
SUBSTR(fu.user_name, 1, 12) Created_by,
NVL(sl.ordered_quantity, 0) - NVL(sl.cancelled_quantity, 0) Qty_ordered,
sl.selling_price*sl.ordered_quantity Ext_amount
FROM so_headers_all sh,
mtl_system_items msi,
so_lines_all sl,
fnd_user fu,
org_organization_definitions o
WHERE sh.header_id = sl.header_id
AND o.organization_id = msi.organization_id
AND sh.order_category IN ('R', 'RMA')
AND sl.inventory_item_id = msi.inventory_item_id
AND sl.warehouse_id = msi.organization_id
AND sh.created_by = fu.user_id
AND (sh.s1 = 5 or sh.s1 = 15)
AND sh.cancelled_flag is null
AND sh.creation_date BETWEEN TO_DATE('&&from_date, 'DD-MON-RR')
AND TO_DATE('&&to_date', 'DD-MON-RR')
ORDER BY
o.organization_code,
SUBSTR(msi.segment1, 1, 10),
SUBSTR(msi.description, 1, 45),
sh.order_number
/
Jenny Chan is an Applications Consultant with Red Rock Consulting based in Sydney, Australia. She has 9 years experience
within the Oracle environment, 5 of which have been working with Oracle Applications. You can reach her by email at
chanj@redrock.net.au and there are web pages of articles and tips at http://www.redrock.net.au.