You are on page 1of 65

PHN H ORACLE ORDER MANAGEMENT (BN HNG)....................................................................................

3
1. Tng quan phn h .................................................................................................................................................. 3
1.1 Oracle Order Managment (phn h bn hng)..................................................................................................... 3
1.2 Mn hnh ng nhp EBS (E-Bussiness Suite)...................................................................................................... 3
1.3 Mn hnh sau khi ng nhp phn h Order Management.............................................................................. 4
2. Cc khi nim c bn .............................................................................................................................................. 4
2.1 Operating Units (n v kinh doanh) ..................................................................................................................... 5
2.2 Inventory Organizations (kho) ............................................................................................................................... 5
2.3 Subinventory (kho ph)........................................................................................................................................... 5
2.4 Items (mt hng hoc dch v)................................................................................................................................ 6
2.5 Sales Order (n hng bn) .................................................................................................................................... 6
2.6 Customers (khch hng).......................................................................................................................................... 6
2.7 Cc nghip v c th xy ra .................................................................................................................................... 6
2.8 Cc bng chnh m phn h ny bt buc phi c................................................................................................ 7
2.9 Thng tin thu sut v chi ph cho tng Sales Order Lines ................................................................................ 7
2.9.1 Thng tin thu sut cho tng Lines................................................................................................................. 7
2.9.2 Thng tin chi ph Freight cho tng Lines........................................................................................................ 7
2.10 Thng tin bng gi ca Sales Order Lines............................................................................................................. 7
3. Cc nghip v chi tit .............................................................................................................................................. 8
3.1 Nghip v Standard Sales Order (bn hng cho khch hng)............................................................................. 8
3.1.1 Tng quan nghip v....................................................................................................................................... 8
3.1.2 Cc bc nhp liu thc t trn ng dng Oracle E-Bussiness Suite ........................................................... 13
3.1.3 Diagram v m t lung d liu.................................................................................................................... 19
3.1.3.1 M hnh d liu bc Booked ............................................................................................................... 19
3.1.3.2 M hnh d liu bc Pick Released ..................................................................................................... 19
3.1.3.3 M hnh d liu bc Pick confirmed ................................................................................................... 19
3.1.3.4 M hnh d liu bc Ship confirmed ................................................................................................... 20
3.1.3.5 M hnh d liu bc Enter Invoiced .................................................................................................... 21
3.1.4 Gii thch mt s fields quan trng ............................................................................................................... 21
3.1.5 Script SQL chun .......................................................................................................................................... 28
3.1.5.1 Cu truy vn t bc nhp Sales Order n bc xut hng ra khi kho................................................. 28
3.1.5.2 Cu truy vn Sales Order chuyn sang ha n k ton phi thu khch hng ..................................... 29

1
Nguyn Vn Ti Technical Consultant
3.2 Nghip v Sales order RMA (Return Material Authorization: nhn n hng do khch hng tr li) ....... 29
3.2.1 Tng quan nghip v..................................................................................................................................... 29
3.2.2 Cc bc thc hin trn h thng Oracle E-Bussiness Suite ........................................................................ 29
3.2.2.1 To Sales Order loi RMA........................................................................................................................ 29
3.2.2.2 Nhn Sales Order loi RMA vo kho ....................................................................................................... 32
3.2.2.3 Nhp Sales Order loi RMA vo kho ....................................................................................................... 33
3.2.3 Diagram v m t lung d liu.................................................................................................................... 34
3.2.4 Gii thch mt s fields quan trng ............................................................................................................... 34
3.2.5 Cu SQL chun ............................................................................................................................................. 41
3.3 Nghip v iu chuyn hng ni b thng qua Internal Orders ....................................................................... 41
3.3.1 Tng quan nghip v..................................................................................................................................... 41
3.3.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite....................................................................... 41
3.3.2.1 To Requisition dng Internal................................................................................................................... 42
3.3.2.2 Import t Internal Requisition thnh Internal Order ................................................................................. 43
3.3.2.3 Xut hng cho Internal Order.................................................................................................................... 44
3.3.2.4 Nhn hng t Internal Requisition vo kho .............................................................................................. 44
3.3.3 Diagram v m t lung d liu.................................................................................................................... 45
3.3.4 Gii thch c th mt s field quan trng ...................................................................................................... 46
3.3.5 SQL chun..................................................................................................................................................... 46
3.3.5.1 To Internal Requisition............................................................................................................................ 46
3.3.5.2 Import t Internal Requisition thnh Internal Order ................................................................................. 46
3.3.5.3 Kho tin hnh xut hng cho Internal Order ............................................................................................. 47
3.3.5.4 Nhn v nhp hng vo kho t Internal Requisition ................................................................................. 47
3.4 Nghip v Sales Orders dng Bill Only (bn hng khng lin quan n mt hng) ....................................... 47
3.4.1 Tng quan nghip v..................................................................................................................................... 47
3.4.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite....................................................................... 48
3.4.2.1 Nhp Sales Order Bill-Only ...................................................................................................................... 48
3.4.2.2 Thc hin ng tc Book .......................................................................................................................... 49
3.4.3 Diagram v m t lung d liu.................................................................................................................... 50
3.4.4 Gii thch mt s fields quan trng ............................................................................................................... 50
3.4.5 SQL chun..................................................................................................................................................... 50
3.5 Nghip v Sales orders dng Ship Only (bn hng ch giao hng m khng c ha n) .............................. 50

2
Nguyn Vn Ti Technical Consultant
3.5.1 Tng quan nghip v..................................................................................................................................... 50
3.5.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite....................................................................... 50
3.5.3 Diagram v m t lung d liu.................................................................................................................... 55
3.5.4 Gii thch mt s fields quan trng ............................................................................................................... 56
3.5.5 SQL Chun.................................................................................................................................................... 56
3.5.5.1 Cu SQL t bc nhp Sales Orders n bc xut hng ra khi kho..................................................... 56
3.6 Quy trnh Drop-Ship (giao dch tay ba n hu hng) ......................................................................................... 57
3.6.1 Tng quan nghip v..................................................................................................................................... 57
3.6.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite....................................................................... 57
3.6.2.1 To Sales Order......................................................................................................................................... 57
3.6.2.2 Chy 2 request to Requisitions v Purchase Orders phn h Order Managment ............................ 59
3.6.2.3 Nhn Purchase Order, ng thi Sales Order s c chuyn thnh ha n k ton phi thu khch hng60
3.6.2.4 Thc hin Matching ha n k ton phi tr nh cung cp (AP) vi Receipt hoc Purchase Order ...... 61
3.6.3 Diagram v m t lung d liu.................................................................................................................... 61
3.6.4 Gii thch mt s fields quan trng ............................................................................................................... 62
3.6.5 SQL chun..................................................................................................................................................... 62
4. Ti liu tham kho ................................................................................................................................................. 65

PHN H ORACLE ORDER MANAGEMENT (BN HNG)


Ti liu ny dng cho nhng ngi lm k thut v mang tnh tham kho vi nhng ngi lm nghip
v. Nghin cu trn RDBMS 10.2.0.2.0, Oracle Applications : 12.0.6
1. Tng quan phn h
1.1 Oracle Order Managment (phn h bn hng)
Phn h bn hng qun l cc n hng bn gia n v kinh doanh vi khch hng bao gm thng tin
mt hng, s lng, gi c, chnh sch khuyn mi, v nhng thng tin qun l thm khc.
L mt phn trong Oracle Logistic, n hot ng vi phn h Oracle Inventory (phn h kho), phn h
Oracle Purchasing (phn h mua hng), phn h Oracle Receivables (phn h k ton phi thu).
1.2 Mn hnh ng nhp EBS (E-Bussiness Suite)

3
Nguyn Vn Ti Technical Consultant
1.3 Mn hnh sau khi ng nhp phn h Order Management

2. Cc khi nim c bn
i tng m phn h ny quan tm v c nhu cu qun l l:
- Operating Units (n v kinh doanh).
- Inventory Organizations (kho).
- Subinventory (kho ph).
- Items (mt hng) c cc thuc tnh km theo

4
Nguyn Vn Ti Technical Consultant
o S l
o Hn dng
o Tnh trng
o
- Customers (khch hng).
- Sales Order (n hng bn).
2.1 Operating Units (n v kinh doanh)
L mt t chc kinh doanh c t cch php l, c mt ngi i din lm ch v phi ng thu cho nh
nc (mt cng ty hoc mt chi nhnh ca cng ty).

select org.organization_id,
org.name ten_ou -- ten kho
from hr_all_organization_units org, -- bang luu thong tin don vi, kho
hr_organization_information hoi -- bang luu thong tin phan loai kho va don
vi kinh doanh
where org.organization_id = hoi.organization_id
and hoi.org_information1 = 'OPERATING_UNIT'

2.2 Inventory Organizations (kho)


Inventory Organization c th l dng vt l (va tn ti trn ng dng Oracle EBS va tn ti ngoi
thc t) hoc l dng logic (ch tn ti trn EBS). Mi Inventory Oraganization thuc mt Operating
Unit no trn ng dng Oracle EBS.

select org.organization_id,
org.name ten_kho, -- ten kho
mp.organization_code ma_kho -- ma kho
from hr_all_organization_units org, -- bang luu thong tin don vi, kho
mtl_parameters mp, -- bang luu thong tin kho
hr_organization_information hoi -- bang luu thong tin phan loai kho va don
vi kinh doanh
where org.organization_id = hoi.organization_id
and org.organization_id = mp.organization_id
and hoi.org_information1 = 'INV'
2.3 Subinventory (kho ph)
Mi Subinventory thuc v mt Inventory Organization. Subinventory m nhn nhim v lun chuyn
hng trong ni b Inventory Organization. Trong c t nht mt Subinventory qun l hng ha, c t
nht mt Subinventory qun l hng ch.

select msei.organization_id,
msei.secondary_inventory_name ma_kho, -- m kho
msei.description ten_kho -- tn kho
from mtl_secondary_inventories msei

5
Nguyn Vn Ti Technical Consultant
2.4 Items (mt hng hoc dch v)
Items s c nh ngha trn mt Master Inventory Organization (kho ch), sau s c gn cho
nhng Inventory Organization c nhu cu qun l Items, mi Items c km thm cc thng tin lot
number (s l), expiration date (ngy ht hn), serial number (s seri), status (trng thi)

select msi.organization_id,
msi.inventory_item_id,
msi.segment1 item_code,
msi.description item_name
from mtl_system_items_b msi
2.5 Sales Order (n hng bn)
L n hng gm thng tin khch hng, mt hng cn bn gm s lng, n gi, thnh tin, thu xut,
trng thi ca n hng ti mt thi im,
2.6 Customers (khch hng)
L nhng khch hng m n hng c lin quan. C km theo nhng chnh sch km theo.

select cust.cust_account_id customer_id,


party.party_name customer_name,
cust.account_number customer_number,
cust.status status,
cust.primary_salesrep_id primary_salesrep_id,
party.tax_reference tax_reference,
cust.tax_code tax_code,
cust.price_list_id price_list_id
from hz_cust_accounts cust, hz_parties party
where cust.party_id = party.party_id;
2.7 Cc nghip v c th xy ra
- Standard Orders (bn hng cho khch hng).
o Sales order bn hng cho khch hng.
o Sales order dng RMA: l dng iu chnh cho mt Sales order trc hoc l nhn li
Sales order do khch hng tr li.
- Internal Orders (bn hng ni b Enterprise).
o iu chuyn ni b thng qua Internal Order.
o iu chuyn ni b Direct thng quan Internal Order.
- Sales Order dng Bill Only (c ra ha n m khng c xut kho)
- Sales Order ang Ship Only (ch c xut hng m khng ra ha n).
- Drop-ship (quy trnh bn hng tay n hu hng).
o Internal (ni b).
o External (vi nh cung cp v khch hng).

6
Nguyn Vn Ti Technical Consultant
2.8 Cc bng chnh m phn h ny bt buc phi c
Tn tables Din gii
OE_ORDER_HEADERS_ALL Thng tin header ca n hng.
OE_ORDER_LINES_ALL Thng tin chi tit ca n hng.
MTL_SYSTEM_ITEMS_B Bng lu thng tin cc Items.
HR_ALL_ORGANIZATION_UNITS Thng tin kho.
OE_TRANSACTION_TYPES_TL Thng tin loi n hng bn, loi ca chi tit n hng.

2.9 Thng tin thu sut v chi ph cho tng Sales Order Lines
2.9.1 Thng tin thu sut cho tng Lines

select oh.order_number,
ol.header_id, -- id cua sales order header id
ol.line_id, -- id cua sales order lines id
ol.ordered_quantity, -- so luong ordered
t.operand tax_rate -- thue suat
from ont.oe_price_adjustments t,
ont.oe_order_lines_all ol,
ont.oe_order_headers_all oh
where t.line_id = ol.line_id
and ol.header_id = oh.header_id
and t.list_line_type_code = 'TAX'
2.9.2 Thng tin chi ph Freight cho tng Lines

select oh.order_number,
ol.header_id, -- id cua sales order header id
ol.line_id, -- id cua sales order lines id
ol.ordered_quantity, -- so luong ordered
t.operand freight - tien chi phi
from ont.oe_price_adjustments t,
ont.oe_order_lines_all ol,
ont.oe_order_headers_all oh
where t.line_id = ol.line_id
and ol.header_id = oh.header_id
and t.list_line_type_code = 'FREIGHT_CHARGE'
2.10 Thng tin bng gi ca Sales Order Lines
Cu truy vn ly bng gi cho nhng dng Lines ca Sales Order

select ol.ordered_item,
ol.unit_list_price,
ol.unit_selling_price,
qll.operand
from qp_list_lines qll, -- Bng gi lines
qp_pricing_attributes qat, -- Thuc tnh ca bng gi
oe_order_lines_all ol -- Sales Order Lines
where qll.list_line_id = qat.list_line_id

7
Nguyn Vn Ti Technical Consultant
and ol.inventory_item_id = qat.product_attr_value
and ol.pricing_quantity_uom = qat.product_uom_code
and ol.price_list_id = qll.list_header_id

and qll.list_line_type_code = 'PLL'


and qat.product_attribute_context = 'ITEM'
and qat.product_attribute = 'PRICING_ATTRIBUTE1'
and qll.arithmetic_operator = 'UNIT_PRICE'
and ol.pricing_date between nvl(qll.start_date_active, ol.pricing_date)
and nvl(qll.end_date_active, ol.pricing_date)
3. Cc nghip v chi tit
3.1 Nghip v Standard Sales Order (bn hng cho khch hng)
3.1.1 Tng quan nghip v
- L nghip v son Sales order bn hng cho khch hng.
- Nghip v ny c lin quan n phn h Oracle Inventory (phn h kho) v Oracle Receivables (phn
h k ton phi thu).
- Tng quan quy trnh nhp liu:

Order Entry > Order Booking > Reservation > Pick Release > Pick Confirm/Move Order Transaction >
Ship Confirm > Inter AR Invoice > Close Order Lines > Close Order

8
Nguyn Vn Ti Technical Consultant
Tn cc bc trong Din gii
quy trnh
Bc 1: Order Entry - Bc ny ngha l: nhp n hng bn.
- D liu s pht sinh cc tables sau: oe_order_headers_all,
oe_order_lines_all
- Trng thi d liu bng oe_order_headers_all ti ct
flow_status_code = ENTERED, booked_flag = N
- Trng thi d liu bng oe_order_lines_all ti ct
flow_status_code = ENTERED, booked_flag = N, open_flag
=Y

9
Nguyn Vn Ti Technical Consultant
Bc 2: Order Booking - Bc ny ngha l t n hng
- D liu pht sinh v thay i cc tables sau:
oe_order_headers_alL, oe_order_lines_all,
wsh_delivery_details, wsh_delivery_assignments.
- Trng thi d liu nh sau:
o Wsh_delivery_details ct released_status = R (c
ngha l Ready to Release), source_line_id =
oe_order_lines_all.line_id
o Oe_order_headers_all c ct flow_status_code =
BOOKED v booked_flag = Y
o Oe_order_lines_all c ct flow_status_code =
AWAITING_SHIPPING v booked_flag = Y
o Wsh_delivery_assignments c delivery_detail_id =
wsh_delivery_details.delivery_detail_id, delivery_id th
NULL.
Bc 3: Reservation - Bc ny ngha l ginh hng.
- D liu pht sinh cc tables: mtl_demand,
mtl_reservations.
- Bc ny th tin trnh SCHEDULE ORDER PROGRAM
chy ngm ginh mt lng hng cn thit m bc 1
yu cu. Khi tin trnh ny chy thnh cng th d liu s c
updated vo 2 tables mtl_demand, mtl_reservations table.
Bc 4: Pick Release - Bc ny c ngha l s chn v ly i lng hng c php
ly trong kho phn phi cho nhng n hng hin ang c
nhu cu.
- Tin trnh chy trong h thng l: Release Sales Order hoc
Pick release SRS:
o Nu bc 3 khng thc thi th bc ny s thc thi.
o D liu pht sinh cc bng sau: wsh_new_deliveries,
wsh_delivery_assignments, wsh_delivery_details,
mtl_txn_request_headers, mtl_txn_request_lines,

10
Nguyn Vn Ti Technical Consultant
mtl_material_transactions_temp,
mtl_serial_numbers_temp, mtl_serial_numbers,
mtl_material_transactions.
o Bc ny thc hin ng tc gom hng ch Sub transfer,
ti bc ny vn cha thc hin Transfer.
- Trng thi d liu nh sau:
o Wsh_new_deliveries c Inserted mt dng d liu vo,
c delivery_id = Wsh_delivery_assignments.delivery_id
v status_code = OP (c ngha l Open).
o Wsh_delivery_details c ct released_status = S (c
ngha l Released to Warehouse).
o Wsh_delivery_assignments c delivery_id =
wsh_new_deliveries.delivery_id
o Mtl_txn_request_lines c line_id =
wsh_delivery_detials.move_order_line_id.
Bc 5: Pick Confirm / - Bc ny thc hin ng tc Transfer (chuyn) hng gom t
Move order Transaction Sub-inventory (kho ph) ny sang Sub-inventory khc. Hay ni
ngoi thc t l bc gom hng t cc v tr khc nhau trong
kho li ti mt v tr chun b cho vic xut ra khi kho.
- D liu s pht sinh v cp nht cc tables sau:
mtl_material_transactions_temp, oe_order_lines_all,
mtl_material_transactions, mtl_transaction_accounts,
wsh_delivery_details, wsh_delivery_assignments,
mtl_onhand_quantities, mtl_serial_numbers_temp,
mtl_serial_numbers.
- Trng thi d liu tables:
o D liu b xa bng mtl_material_transactions_temp
v chuyn vo bng mtl_material_transactions.
Mtl_material_transactions.trx_source_line_id =
oe_order_lines_all.line_id.
o oe_order_lines_all ct flow_status_code = Picked.

11
Nguyn Vn Ti Technical Consultant
o wsh_delivery_details ct released_status = Y (ngha l
Staged/Pick Confirmed).
o Nu giao dch kho c loi l Sales order issue th s c 1
dng d liu Inserted vo 2 tables
mtl_serial_numbers_temp v mtl_serial_numbers.
- Bc ny c th b qua nu nh ta setup Pick Confirm = Yes
bc 4.
Bc 6: Ship confirm - Bc ny l bc xut hng ra khi kho, ngoi thc t ngha l
chuyn hng ln phng tin v chuyn n ni giao cho
khch hng.
- Tin trnh xut hng c chy ngm bn di v n pht sinh
d liu trong bng mtl_material_transactions.
- D liu pht sinh cc tables: oe_order_lines_all,
wsh_delivery_details, wsh_serial_numbers,
mtl_transaction_interface, mtl_material_transactions,
mtl_transaction_accounts, d liu c xa khi tables
mtl_demand, mtl_reservations, hng ha c lm gim
tables mtl_onhand_quantities, mtl_serial_numbers_temp,
mtl_serial_numbers.
- Trng thi d liu cc tables:
o D liu c xa khi bng Wsh_new_deliveries.
o Oe_order_lines_all c flow_status_code = Shipped
o Wsh_delivery_details c realeased_status = C (c ngha
l Shipped).
o Wsh_serial_numbers s c inserted thm 2 hoc nhiu
dng d liu c cng delivery_detail_id nu nh hng ha
c qun l theo s l.
o Mtl_material_transactions c ct picking_line_id =
wsh_delivery_details.delivery_detail_id.
o D liu s b xa khi Mtl_serial_numbers_temp v d
liu trn bng Mtl_serial_numbers c ct current_status

12
Nguyn Vn Ti Technical Consultant
= 4 (c ngha l Issued out of store).
Bc 7: Inter AR - Bc ny s chuyn thng tin ca Oe_order_headers_all v
Invoice Oe_order_lines_all v bng Interface tn
Ra_interface_lines_all. C mt tin trnh chy ngm tn l
Workflow Background Process (thuc phn h Inventory) v
Autoinvoice Master Program (thuc phn h Receivables).
- D liu c pht sinh cc tables:
o Ra_customer_trx_all, Ra_customer_trx_lines_all
(Ra_customer_trx_lines_all.interface_line_attribute6 link
vi Oe_order_lines_all.line_id).
Bc 8: Close Order - Hon thnh mt Lines ca Order
Lines - Trng thi d liu:
o Oe_order_lines_all c ct flow_status_code = Shipped
v open_flag = N.
Bc 9: Close Order - Bc cui cng ca quy trnh x l mt Order l ng Order
li.
- Trng thi d liu nh sau:
o Oe_order_lines_all c ct flow_status_code = Closed v
open_flag = N.
3.1.2 Cc bc nhp liu thc t trn ng dng Oracle E-Bussiness Suite

13
Nguyn Vn Ti Technical Consultant
Nhp n hng mc header

Nhp n hng mc lines

14
Nguyn Vn Ti Technical Consultant
Thc hin Book n hng ny, mc ch l gi thng ip xung kho bo cho kho bit n
hng ny cn nhng mt hng no, s lng bao nhiu,

Thc hin vic Released Sales Order, thng thng bc ny l t ng nu khng th c th


vo mn hnh Release Sales Orders (Order > Shipping > Release Sales Orders >)

15
Nguyn Vn Ti Technical Consultant
Qua mn hnh Shipping Transactions (Orders > Shipping > Transactions) tm v tin hnh
Released n hng va Booked.

Quan phn h Inventory thc hin vic gom hng v ly hng (Inventory > Move Order >
Transact Move Orders)

Tnh nng: Chn v gom hng

Tm theo Orders

G s Order Number + % Nhn Tab

Nhn

16
Nguyn Vn Ti Technical Consultant
Vo mn hnh Transact Move Order trong tin hnh cp hng cho Sales Order

Chn Sales Order cn cp hng

Nhn vo nt cp hng
cho Sales Order

Thc hin vic xut hng bng cch vo Shipping Transactions (Order > Shipping >
Transactions)
o To Delivery t ng

17
Nguyn Vn Ti Technical Consultant
o Thc hin xut hng ra khi kho bng chc nng Ship confirm

D liu ca Sales Order c Interfaced sang ha n AR v kt thc quy trnh bn hng

18
Nguyn Vn Ti Technical Consultant
3.1.3 Diagram v m t lung d liu
3.1.3.1 M hnh d liu bc Booked

3.1.3.2 M hnh d liu bc Pick Released


Bc ny l tm n ni cha hng, nu hng sn sng bn th ly ra khi ni cha.

3.1.3.3 M hnh d liu bc Pick confirmed

19
Nguyn Vn Ti Technical Consultant
bc ny h thng thc hin giao dch loi Sub-transfer t ni lu tr hng sang ni chun b xut
hng.

oe_order_headers_all
oh
oh.header_id =
ol.header_id
oe_order_lines_all
ol

wsh_delivery_assignments
wdd.source_line_id =
wda ol.line_id

wdd.delivery_detail_id =
wda.delivery_detail_id

wsh_delivery_details
wdd
wnd.delivery_id =
(wdd.released_status = 'S' -
wda.delivery_id
- Released to Warehouse)

wsh_new_deliveries wdd.move_order_line_id =
wnd wdd.transaction_id = mtrl.line_id
(wnd.status_code = 'OP' mmt.transaction_id
Open)
mtl_txn_request_lines
mtl_material_transactions mtrl
mmt
mtrh.header_id =
mmt.transfer_transaction_id = mtrl.header_id
mrc.transaction_id
mtl_txn_request_headers
mtl_material_transactions mtrh
mrc

3.1.3.4 M hnh d liu bc Ship confirmed


bc ny ta thc hin vic xut hng ra khi kho, tc l hng ha khng cn c quyn qun l
s lng hng ha na

20
Nguyn Vn Ti Technical Consultant
3.1.3.5 M hnh d liu bc Enter Invoiced
bc ny th Order c Interfaced sang ha n thuc phn h k ton phi thu. phn h k
ton phi thu th nhn vin k ton s in ha n ti chnh giao cho khch hng.

3.1.4 Gii thch mt s fields quan trng


OE_ORDER_HEADERS_ALL

21
Nguyn Vn Ti Technical Consultant
Tn fields Din gii
HEADER_ID ID ca sales order header.
ORDER_NUMBER S sales order.
ORDER_TYPE_ID ID ca loi sales order. Link ti bng oe_transaction_types_tl.
PRICE_LIST_ID ID ca bng gi mc header ca sales order, s default cho
bng gi ca mt hng mc lines ca sales order. Link n
bng qp_list_headers_all_b, qp_list_lines.
SHIP_TOLERANCE_ABOVE Gi tr gii hn trn cho vic xut kho.
SHIP_TOLERANCE_ABOVE Gi tr gii hn di cho vic xut kho.
FOB_POINT_CODE Phn bit loi xut sales order.

OE_ORDER_LINES_ALL

Tn fields Din gii


LINE_ID ID ca sales order line.
INVENTORY_ITEM_ID ID ca Items, link ti mtl_system_items_b.
ORG_ID ID ca Operating Units. Link ti bng
hr_all_organization_units.
SHIP_FROM_ORG_ID ID ca kho m sales order mun xut hng.
SOLD_TO_ORG_ID ID ca customers m sales mun bn hng. Link ti
hz_cust_accounts hoc ar_customers.
ORDER_QUANTITY_UOM n v tnh th nht ca sales order lines.
ORDERED_QUANTITY S lng theo order_quantity_uom.
ORDERED_QUANTITY_UOM2 n v tnh th hai ca sales order lines.
ORDERED_QUANTITY2 S lng theo ordered_quantity_uom2.
SUBINVENTORY M kho ph.
UNIT_SELLING_PRICE n gi bn ca sales order lines.
PRICE_LIST_ID ID ca bng gi sales order lines. Link ti bng
qp_list_headers_all_b, qp_list_lines.
FOB_POINT_CODE M FOB.
FLOW_STATUS_CODE Trng thi ca sales order lines.

22
Nguyn Vn Ti Technical Consultant
SOURCE_DOCUMENT_ID Link n requisition header,
po_requisition_headers_all.requisition_header_id.
SOURCE_DOCUMENT_LINE_ID Link n po_requisition_lines_all.requisition_line_id.

MTL_TXN_REQUEST_HEADERS
Bng lu thng tin Move Orders mc header.
Tn fields Din gii
HEADER_ID ID ca move order header
REQUEST_NUMBER S move order header.
ORGANIZATION_ID ID ca kho,
HR_ALL_ORGANIZATION_UNITS.organization_id
DESCRIPTION Din gii ca move order.
FROM_SUBINVENTORY_CODE Hng gom t kho ph,
MTL_SECONDARY_INVENTORIES.secondary_inventory
_name
TO_SUBINVENTORY_CODE Hng chuyn n kho ph,
MTL_SECONDARY_INVENTORIES.secondary_inventory
_name.

MTL_TXN_REQUEST_LINES
Bng lu thng tin move order lines
Tn fields Din gii
LINE_ID ID ca move order line.
HEADER_ID ID ca move order header,
MTL_TXN_REQUEST_HEADERS.header_id
LINE_NUMBER Line number ca move order lines.
ORGANIZATION_ID ID ca kho,
HR_ALL_ORGANIZATION_UNITS.organization_id.
INVENTORY_ITEM_ID ID ca items,
MTL_SYSTEM_ITEMS_B.inventory_item_id

23
Nguyn Vn Ti Technical Consultant
FROM_SUBINVENTORY_CODE Hng ly t kho ph,
MTL_SECONDARY_INVENTORIES.secondary_subinve
ntory_name.
FROM_LOCATOR_ID Hng ly t v tr, HR_LOCATIONS_ALL.location_id
TO_SUBINVENTORY_CODE Chuyn n kho ph,
MTL_SECONDARY_INVENTORIES.secondary_subinve
ntory_name
TO_LOCATOR_ID Chuyn n v tr, HR_LOCATIONS_ALL.location_id
LOT_NUMBER S l ca Items.
SERIAL_NUMBER_START S seri ca Items.
SERIAL_NUMBER_END S seri ca Items.
UOM_CODE n v tnh th nht.
QUANTITY S lng theo UOM_CODE.
QUANTITY_DELIVERED S lng giao theo UOM_CODE.
SECONDARY_UOM_CODE n v tnh th hai.
SECONDARY_QUANTITY S lng theo SECONDARY_UOM_CODE.
SECONDARY_QUANTITY_DELIV S lng giao theo SECONDARY_UOM_CODE.
ERED
LINE_STATUS Trng thi ca lines.
PRIMARY_QUANTITY S lng theo
MTL_SYSTEM_ITEMS_B.primary_uom_code.
TO_ORGANIZATION_ID Chuyn n kho,
HR_ALL_ORGANIZATION_UNITS.organization_id
UNIT_NUMBER Unit number.

WSH_DELIVERY_DETAILS
Tn fields Din gii
DELIVERY_DETAIL_ID Kha chnh ca giao dch shipping transactions.
SOURCE_CODE OE: Sales Order
WIP: Sn xut
PO: Purchase Orders

24
Nguyn Vn Ti Technical Consultant
SOURCE_HEADER_ID Link n oe_order_headers_all.header_id hoc
po_headers_all.po_header_id, ty vo source_code.
SOURCE_LINE_ID Link n oe_order_headers_all.line_id hoc
po_headers_all.po_line_id, ty vo source_code.
SOURCE_HEADER_TYPE_ID ID ca sales order type, link n
oe_transaction_types_tl.transaction_type_id.
CUSTOMER_ID Kha ngoi n HZ_CUST_ACCOUNTS.cust_account_id
INVENTORY_ITEM_ID Kha ngoi n
MTL_SYSTEM_ITEMS_B.inventory_item_id
ITEM_DESCRIPTION Tn mt hng.
SHIP_TOLERANCE_ABOVE Gii hn di cho vic shipping transactions.
SHIP_TOLERANCE_BELOW Gii hn trn cho vic shipping transactions.
CANCELLED_QUANTITY S lng hy.
PICKED_QUANTITY S lng chuyn sang kho ch.
SHIPPED_QUANTITY S lng xut khi cng ty.
DELIVERED_QUANTITY S lng giao.
RECEIVED_QUANTITY S lng nhn.
RETURNED_QUANTITY S lng tr li trn purchase orders.
MOVE_ORDER_LINE_ID ID ca son hng mc line, link vi
mtl_txn_request_lines.line_id.
SUBINVENTORY M kho ph, link vi
mtl_secondary_inventories.secondary_inventory_name.
LOT_NUMBER S l ca Items.
SERIAL_NUMBER S seri ca Items.
RELEASED_STATUS Trng thi trong tng giai on ca shipping transaction
B: Backordered
C: Shipped
D: Cancelled
I: Interfaced
N: Not Ready

25
Nguyn Vn Ti Technical Consultant
R: Ready to
S: Released to Warehouse
X: Not Applicable
Y: Staged/Pick Confirmed
ORG_ID ID ca operating units, link vi
hr_all_organization_units, hoc view
hr_operating_units.
CANCELLED_QUANTITY2 S lng hy theo n v tnh th hai.
PICKED_QUANTITY2 S lng chuyn sang kho ch theo n v tnh th hai.
SHIPPED_QUANTITY2 S lng ra khi cng ty theo n v tnh th hai.
DELIVERED_QUANTITY2 S lng giao theo n v tnh th hai.
RECEIVED_QUANTITY2 S lng nhn theo n v tnh th hai.
RETURNED_QUANTITY2 S lng tr li theo purchase order n v tnh th hai.
UNIT_PRICE n gi.
UNIT_NUMBER S gom hng.
TRANSACTION_ID Lin quan n giao dch kho no.
LINE_DIRECTION I= Inbound, O= Outbound, D= Drop ship, IO= Internal
Sales Order.
PO_SHIPMENT_LINE_ID Lin kt vi lines ca Purchase Orders,
PO_LINES_ALL.po_line_id.
RCV_SHIPMENT_LINE_ID Tham chiu n line ca receipt,
rcv_shipment_lines.shipment_line_id.

WSH_NEW_DELIVERIES bng phn phi hng.


WSH_DELIVERY_ASSIGNMENTS bng lin kt gia delivery details vi mt delivery hoc
mt parent delivery details.
Tn fields Din gii
DELIVERY_ASSIGNMENT_ID Kha chnh
DELIVERY_ID ID ca delivery (phn phi hng),
WSH_NEW_DELIVERIES.delivery_id

26
Nguyn Vn Ti Technical Consultant
PARENT_DELIVERY_ID ID ca parent delivery,
WSH_NEW_DELIVERIES.delivery_id
DELIVERY_DETAIL_ID ID ca delivery details,
WSH_DELIVERY_DETAILS.delivery_detail_id.
PARENT_DELIVERY_DETAIL_ID ID ca parent delivery details,
WSH_DELIVERY_DETAILS.delviery_detail_id.

MTL_MATERIAL_TRANSACTIONS
Tn fields Din gii
TRANSACTION_ID ID ca giao dch
TRANSFER_TRANSACTION_ID ID giao dch hon i inter-organization dng direct,
MTL_MATERIAL_TRANSACTIONS.transaction_id
TRANSACTION_DATE Ngy giao dch.
TRANSACTION_TYPE_ID ID loi giao dch,
MTL_TRANSACTION_TYPES.transaction_type_id
TRANSACTION_SOURCE_TYPE_ID ID loi ngun giao dch,
MTL_TXN_SOURCE_TYPES.transaction_source_type_i
d
INVENTORY_ITEM_ID ID ca items,
MTL_SYSTEM_ITEMS_B.inventory_item_id
ORGANIZATION_ID ID ca inventory organizations,
HR_ALL_ORGANIZATION_UNITS.organization_id
SUBINVENTORY_CODE M ca subiventory,
MTL_SECONDARY_SUBINVENTORIES.secondary_su
biventory_name.
TRANSACTION_UOM n v tnh v s lng tng ng ca giao dch.
TRANSACTION_QUANTITY
PRIMARY_QUANTITY S lng theo n v tnh
MTL_SYSTEM_ITEMS_B.primary_unit_of_measure.
DISTRIBUTION_ACCOUNT_ID ID nh khon k ton,
GL_CODE_COMBINATIONS.code_combination_id

27
Nguyn Vn Ti Technical Consultant
TRX_SOURCE_LINE_ID Xut kho cho sales order lines,
OE_ORDER_LINES_ALL.line_id
TRX_SOURCE_DELIVERY_ID Giao hng cho n c hng,
WSH_NEW_DELIVERIES.delivery_id.
RCV_TRANSACTION_ID ID ca giao dch nhn (nhp) hng,
RCV_TRANSACTIONS.transaction_id
TRANSFER_ORGANIZATION_ID Inter-organiations direct n kho,
HR_ALL_ORGANIZATION_UNITS.organization_id
TRANSFER_SUBINVENTORY Inter-organizations direct n subinventory,
MTL_SECONDARY_SUBINVENTORIES.secondary_su
biventory_name.
SECONDARY_UOM_CODE n v tnh th hai v s lng tng ng.
SECONDARY_TRANSACTION_QUAN
TITY
PARENT_TRANSACTION_ID iu chnh cho giao dch no,
MTL_MATERIAL_TRANSACTIONS.transaction_id
RESERVATION_ID ID ca giao dch ginh hng,
MTL_RESERVATIONS.reservation_id

3.1.5 Script SQL chun


3.1.5.1 Cu truy vn t bc nhp Sales Order n bc xut hng ra khi kho

select mmt.trx_source_line_id order_line_id,


wdd.released_status,
-- Giao dich gom hang
mmt.transaction_id,
mmt.primary_quantity,
mmt.subinventory_code,

-- Giao dich chuyen hang


mrc.transaction_id,
mrc.primary_quantity,
mrc.subinventory_code,

-- Giao dich xuat hang


mtx.transaction_id,
mtx.primary_quantity,
mtx.subinventory_code
from oe_order_headers_all oh, -- nhp liu cho order header
oe_order_lines_all ol, -- nhp liu cho order lines

28
Nguyn Vn Ti Technical Consultant
wsh_delivery_details wdd, -- booked
wsh_delivery_assignments wda, -- booked
mtl_txn_request_lines mtrl, -- move order lines : gom hng
mtl_txn_request_headers mtrh, -- move order headers : gom hng
mtl_material_transactions mmt, -- transact move order
mtl_material_transactions mrc, -- v tr ch xut
mtl_material_transactions mtx
where oh.header_id = ol.header_id
and wdd.source_line_id = ol.line_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wdd.move_order_line_id = mtrl.line_id
and mtrh.header_id = mtrl.header_id
and wdd.transaction_id = mmt.transaction_id
and mmt.transfer_transaction_id = mrc.transaction_id
and mtx.picking_line_id = wdd.delivery_detail_id
and wdd.released_status in ('S', 'C') -- Shipped, Closed

3.1.5.2 Cu truy vn Sales Order chuyn sang ha n k ton phi thu khch hng

select *
from oe_order_headers_all oh,
oe_order_lines_all ol,
ra_customer_trx_lines_all trxl,
ra_customer_trx_all trx
where oh.header_id = ol.header_id
and trxl.interface_line_attribute6 = to_char(ol.line_id)
and trxl.org_id = ol.org_id
and trx.customer_trx_id = trxl.customer_trx_id
and ol.line_type_id = 'Ty h thng m c loi Bill-Only'

3.2 Nghip v Sales order RMA (Return Material Authorization: nhn n hng do khch hng tr
li)
3.2.1 Tng quan nghip v
L loi n hng xut hng ra khi kho em i giao cho khch hng, nhng v l do g m
khch hng khng chu nhn hng, lc mnh s tin hnh nhn n hng tr li kho.
3.2.2 Cc bc thc hin trn h thng Oracle E-Bussiness Suite
3.2.2.1 To Sales Order loi RMA
c im ca Sales Order loi ny l khi nhn trn ng dng s thy s lng l m (nhng
Database vn lu s dng).
Ta copy t mt Sales Order m khch hng tr li

29
Nguyn Vn Ti Technical Consultant
Chn ci loi cho Sales Order mi c to ra, trong tnh hung ny mnh chn mt loi RMA
no .

30
Nguyn Vn Ti Technical Consultant
Chn l do

Bng thng bo kt qu ca vic Copy

31
Nguyn Vn Ti Technical Consultant
Thc hin vic Booked cho Sales Order RMA

3.2.2.2 Nhn Sales Order loi RMA vo kho


Qua phn h Inventory > Transactions > Receiving > Receipts thc hin vic nhn hng

32
Nguyn Vn Ti Technical Consultant
3.2.2.3 Nhp Sales Order loi RMA vo kho
Nhp cc thng tin cn thit ri nhn nt Save hon thnh vic nhp Sales Order RMA, nu
Save thnh cng th nhn hng thnh cng

Nu nhp hng vo kho thnh cng th s c 2 dng giao dch nh hnh di, vi Receive l giao
dch nhn hng v Deliver l giao dch nhp hng vo kho, thng thng bc Deliver c thng
qua bc kim tra cht lng

33
Nguyn Vn Ti Technical Consultant
3.2.3 Diagram v m t lung d liu

oe_order_headers_all
oe_order_lines_all oh
ol
rma.source_document_id =
rma.header_id = oh.header_id
ol.header_id
rsl.oe_order_line_id = oe_order_headers_all
ol.line_id rma mtl_material_transactions
rcv_shipment_lines mmt
rsl
rt.transaction_id =
rt.shipment_line_id = mmt.rcv_transaction_id(+)
rsh.shipment_header_id = rsl.shipment_line_id
rsl.shipment_header_id
rcv_transactions
rt
rcv_shipment_headers (rt.source_document_code = 'RMA')
rsh

3.2.4 Gii thch mt s fields quan trng


OE_ORDER_HEADERS_ALL
Bng lu thng tin n hng mc tng quan, thng tin chung.

Tn fields Din gii


HEADER_ID ID ca sales order header.
ORDER_NUMBER S sales order.
ORDER_TYPE_ID ID ca loi sales order. Link ti bng oe_transaction_types_tl.
PRICE_LIST_ID ID ca bng gi mc header ca sales order, s default cho
bng gi ca mt hng mc lines ca sales order. Link n
bng qp_list_headers_all_b, qp_list_lines.
SHIP_TOLERANCE_ABOVE Gi tr gii hn trn cho vic xut kho.
SHIP_TOLERANCE_ABOVE Gi tr gii hn di cho vic xut kho.
FOB_POINT_CODE Phn bit loi xut sales order.

OE_ORDER_LINES_ALL
Bng lu thng tin n hng mc chi tit

34
Nguyn Vn Ti Technical Consultant
Tn fields Din gii
LINE_ID ID ca sales order line.
INVENTORY_ITEM_ID ID ca Items, link ti mtl_system_items_b.
ORG_ID ID ca Operating Units. Link ti bng
hr_all_organization_units.
SHIP_FROM_ORG_ID ID ca kho m sales order mun xut hng.
SOLD_TO_ORG_ID ID ca customers m sales mun bn hng. Link ti
hz_cust_accounts hoc ar_customers.
ORDER_QUANTITY_UOM n v tnh th nht ca sales order lines.
ORDERED_QUANTITY S lng theo order_quantity_uom.
ORDERED_QUANTITY_UOM2 n v tnh th hai ca sales order lines.
ORDERED_QUANTITY2 S lng theo ordered_quantity_uom2.
SUBINVENTORY M kho ph.
UNIT_SELLING_PRICE n gi bn ca sales order lines.
PRICE_LIST_ID ID ca bng gi sales order lines. Link ti bng
qp_list_headers_all_b, qp_list_lines.
FOB_POINT_CODE M FOB.
FLOW_STATUS_CODE Trng thi ca sales order lines.
SOURCE_DOCUMENT_ID Link n requisition header,
po_requisition_headers_all.requisition_header_id.
SOURCE_DOCUMENT_LINE_ID Link n po_requisition_lines_all.requisition_line_id.

RCV_SHIPMENT_HEADERS
Receipt mc header.
Tn fields Din gii
SHIPMENT_HEADER_ID ID header ca receipt
RECEIPT_SOURCE_CODE Loi ngun nhn hng.
VENDOR_ID ID ca nh cung cp, PO_VENDORS.vendor_id.
ORGANIZATION_ID ID ca inventory organizations,
HR_ALL_ORGANIZATION_UNITS.organization_id

35
Nguyn Vn Ti Technical Consultant
SHIPMENT_NUM S vn chuyn.
RECEIPT_NUM S nhn hng.
BILL_OF_LADING S ha n.
SHIPPED_DATE Ngy vn chuyn.
COMMENTS Din gii ca receipt.
CUSTOMER_ID ID ca khch hng, AR_CUSTOMERS.customer_id
CUSTOMER_SITE_ID

RCV_SHIPMENT_LINES
Receipt mc lines.
Tn fields Din gii
SHIPMENT_LINE_ID ID ca receipt lines.
SHIPMENT_HEADER_ID ID ca receipt header.
LINE_NUM Line numbers ca receipt.
CATEGORY_ID ID ca nhm items,
MTL_CATEGORIES_B.category_id
QUANTITY_SHIPPED S lng chuyn.
QUANTITY_RECEIVED S lng nhn.
UNIT_OF_MEASURE n v tnh.
ITEM_DESCRIPTION Tn ca Items, mc nh theo
MTL_SYSTEM_ITEMS_B.description.
ITEM_ID ID ca items,
MTL_SYSTEM_ITEMS_B.inventory_item_id.
SOURCE_DOCUMENT_CODE Loi ngun ly d liu.
PO_HEADER_ID ID ca purchase orders header,
PO_HEADERS_ALL.po_header_id.
PO_RELEASE_ID ID ca hp ng,
PO_RELEASES_ALL.po_release_id.
PO_LINE_ID ID ca purchase order lines,
PO_LINES_ALL.po_line_id.

36
Nguyn Vn Ti Technical Consultant
PO_LINE_LOCATION_ID ID ca l trnh giao hng,
PO_LINE_LOCATIONS_ALL.line_location_id
PO_DISTRIBUTION_ID ID ca purchase order distributions,
PO_DISTRIBUTIONS_ALL.po_distribution_id
REQUISITION_LINE_ID ID ca requisition lines,
PO_REQUISITION_LINES_ALL.requisition_line_id.
REQ_DISTRIBUTION_ID ID ca requisition distributions,
PO_REQ_DISTRIBUTIONS_ALL.distribution_id
FROM_ORGANIZATION_ID Nhn hng t inventory organizations,
HR_ALL_ORGANIZATION_UNITS.organization_id
DESTINATION_TYPE_CODE Loi chuyn n.
TO_ORGANIZATION_ID Chuyn n inventory organizations,
HR_ALL_ORGANIZATION_UNITS.organization_id
.
TO_SUBINVENTORY Chuyn n subinventory,
MTL_SECONDARY_INVENTORIES.secondary_sub
inventory_name.
COMMENTS Din gii ca receipt lines.
OE_ORDER_HEADER_ID ID ca sales order header dng RMA.
OE_ORDER_LINE_ID ID ca sales order lines dng RMA.
SECONDARY_QUANTITY_SHIPPED S lng chuyn theo n v tnh th hai.
SECONDARY_QUANTITY_RECEIVED S lng nhn theo n v tnh th hai.
SECONDARY_UNIT_OF_MEASURE n v tnh th hai.
MMT_TRANSACTION_ID ID ca giao dch kho, ch c trong nghip v xut
Inter-organizations c thng qua receipt,
MTL_MATERIAL_TRANSACTIONS.transaction_id
APPROVAL_STATUS Trng thi duyt.

RCV_TRANSACTIONS
Bng lu thng tin giao dch nhn v nhp hng vo kho.

37
Nguyn Vn Ti Technical Consultant
Tn fields Din gii
TRANSACTION_ID ID ca giao dch.
TRANSACTION_TYPE Loi giao dch (nhn hng hay nhp hng).
TRANSACTION_DATE Ngy giao dch.
QUANTITY S lng theo unit_of_measure.
UNIT_OF_MEASURE n v tnh th nht.
SHIPMENT_HEADER_ID ID ca receipt header.
SHIPMENT_LINE_ID ID ca receipt lines.
SOURCE_DOCUMENT_CODE Ngun nhn hng.
DESTINATION_TYPE_CODE Mc ch ca nhn hng.
PRIMARY_QUANTITY S lng theo
MTL_SYSTEM_ITEMS_B.primary_unit_of_measure.
PRIMARY_UNIT_OF_MEASURE n v tnh chnh ca items.
UOM_CODE M n v tnh th nht.
PARENT_TRANSACTION_ID iu chnh cho giao dch no.
PO_HEADER_ID Nhn (nhp) t ID ca purchase orders header.
PO_RELEASE_ID Nhn (nhp) t ID ca hp ng con,
PO_RELEASES_ALL.po_release_id
PO_LINE_ID Nhp (nhp) t ID ca purchase order lines,
PO_LINES_ALL.po_line_id.
PO_LINE_LOCATION_ID Nhn (nhp) t ID ca l trnh giao hng,
PO_LINE_LOCATIONS_ALL.line_location_id.
PO_DISTRIBUTION_ID Nhn (nhp) t ID ca purchase orders distributions,
PO_DISTRIBUTIONS_ALL.po_distribution_id.
REQUISITION_LINE_ID Nhn (nhp) t ID ca requsition lines,
PO_REQUSITION_LINES_ALL.requisition_line_id.
CURRENCY_CODE Loi tin ca giao dch.
VENDOR_ID ID ca nh cung cp, PO_VENDORS.vendor_id.
ORGANIZATION_ID Nhn (nhp) hng vo inventory organizations,
HR_ALL_ORGANIZATION_UNITS.organization_id.

38
Nguyn Vn Ti Technical Consultant
SUBINVENTORY Nhn (nhp) hng vo subiventory,
MTL_SECONDARY_INVENTORIES.secondary_subiv
entory_name.
COMMENTS Din gii ca giao dch.
REQ_DISTRIBUTION_ID ID ca requisition distributions,
OE_ORDER_HEADER_ID Nhn (nhp) t ID ca sales order header RMA (sales
order do customers tr li),
OE_ORDER_HEADERS_ALL.header_id
OE_ORDER_LINE_ID Nhn (nhp) t ID ca sales order lines RMA,
OE_ORDER_LINES_ALL.line_id
QUANTITY_BILLED S lng ra ha n.
MATCH_FLAG C bo hiu chuyn sang ha n Payables
AMOUNT_BILLED S tin trn ha n Payables.
SECONDARY_QUANTITY S lng theo n v tnh secondary_unit_of_measure
SECONDARY_UNIT_OF_MEASURE n v tnh th hai.
MTL_MATERIAL_TRANSACTIONS
Bng lu thng tin giao dch kho
Tn fields Din gii
TRANSACTION_ID ID ca giao dch
TRANSFER_TRANSACTION_ID ID giao dch hon i inter-organization dng
direct,
MTL_MATERIAL_TRANSACTIONS.transacti
on_id
TRANSACTION_DATE Ngy giao dch.
TRANSACTION_TYPE_ID ID loi giao dch,
MTL_TRANSACTION_TYPES.transaction_typ
e_id
TRANSACTION_SOURCE_TYPE_ID ID loi ngun giao dch,
MTL_TXN_SOURCE_TYPES.transaction_sour
ce_type_id

39
Nguyn Vn Ti Technical Consultant
INVENTORY_ITEM_ID ID ca items,
MTL_SYSTEM_ITEMS_B.inventory_item_id
ORGANIZATION_ID ID ca inventory organizations,
HR_ALL_ORGANIZATION_UNITS.organizati
on_id
SUBINVENTORY_CODE M ca subiventory,
MTL_SECONDARY_SUBINVENTORIES.sec
ondary_subiventory_name.
TRANSACTION_UOM n v tnh v s lng tng ng ca giao dch.
TRANSACTION_QUANTITY
PRIMARY_QUANTITY S lng theo n v tnh
MTL_SYSTEM_ITEMS_B.primary_unit_of_me
asure.
DISTRIBUTION_ACCOUNT_ID ID nh khon k ton,
GL_CODE_COMBINATIONS.code_combinati
on_id
TRX_SOURCE_LINE_ID Xut kho cho sales order lines,
OE_ORDER_LINES_ALL.line_id
TRX_SOURCE_DELIVERY_ID Giao hng cho n c hng,
WSH_NEW_DELIVERIES.delivery_id.
RCV_TRANSACTION_ID ID ca giao dch nhn (nhp) hng,
RCV_TRANSACTIONS.transaction_id
TRANSFER_ORGANIZATION_ID Inter-organiations direct n kho,
HR_ALL_ORGANIZATION_UNITS.organizati
on_id
TRANSFER_SUBINVENTORY Inter-organizations direct n subinventory,
MTL_SECONDARY_SUBINVENTORIES.sec
ondary_subiventory_name.
SECONDARY_UOM_CODE n v tnh th hai v s lng tng ng.
SECONDARY_TRANSACTION_QUANTITY
PARENT_TRANSACTION_ID iu chnh cho giao dch no,

40
Nguyn Vn Ti Technical Consultant
MTL_MATERIAL_TRANSACTIONS.transacti
on_id
RESERVATION_ID ID ca giao dch ginh hng,
MTL_RESERVATIONS.reservation_id

3.2.5 Cu SQL chun

select *
from oe_order_headers_all rma, -- Sales Order RmA
oe_order_headers_all oh, -- Standard Sales Order
oe_order_lines_all ol,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh,
rcv_transactions rt,
mtl_material_transactions mmt
where rma.header_id = ol.header_id
and rma.source_document_id = oh.header_id -- RMA is copied from OH
and rsl.oe_order_line_id = ol.line_id
and rsh.shipment_header_id = rsl.shipment_header_id
and rt.shipment_line_id = rsl.shipment_line_id
and rt.transaction_id = mmt.rcv_transaction_id(+)
and rma.order_category_code = 'RETURN' -- Sales order RMA
and rt.source_document_code = 'RMA' -- Receipt Source is RMA

3.3 Nghip v iu chuyn hng ni b thng qua Internal Orders


3.3.1 Tng quan nghip v
L khi 2 cng ty trong cng mt tp on c nhu cu hng ha ca nhau, th c th dng nghip v
ny iu chuyn hng t cng ty ang c hng sang cng ty ang c nhu cu bn hng nhng
ht hng.
c im ca Sales Order dng Internal ny l khng c ha n ti chnh.
3.3.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite

41
Nguyn Vn Ti Technical Consultant
3.3.2.1 To Requisition dng Internal
To Internal Requisitions nh hnh bn di. ng dn vo l Oracle Purchasing > Requisitions

42
Nguyn Vn Ti Technical Consultant
3.3.2.2 Import t Internal Requisition thnh Internal Order

43
Nguyn Vn Ti Technical Consultant
Thc hin Import thnh Internal Order

3.3.2.3 Xut hng cho Internal Order


Thc hin xut kho ging nh Standard Sales Order
3.3.2.4 Nhn hng t Internal Requisition vo kho
Tm Internal Requisitions

44
Nguyn Vn Ti Technical Consultant
Sau khi tm xong th tin hnh nhn v nhp hng vo kho. ng dn l Oracle Inventory >
Receipt hoc Oracle Inventory > Receiving Transactions

Check vo

Nhp thng tin Headers v Save li

3.3.3 Diagram v m t lung d liu

45
Nguyn Vn Ti Technical Consultant
3.3.4 Gii thch c th mt s field quan trng
3.3.5 SQL chun
3.3.5.1 To Internal Requisition

select *
from po_requisition_headers_all prh,
po_requisition_lines_all prl,
po_req_distributions_all prd
where prh.requisition_header_id = prl.requisition_header_id
and prl.requisition_line_id = prd.requisition_line_id
and prh.type_lookup_code = 'INTERNAL'

3.3.5.2 Import t Internal Requisition thnh Internal Order

select *
from po_requisition_headers_all prh,
po_requisition_lines_all prl,
po_req_distributions_all prd,
oe_order_lines_all ol,
oe_order_headers_all oh
where prh.requisition_header_id = prl.requisition_header_id
and prl.requisition_line_id = prd.requisition_line_id(+)
and prl.requisition_line_id = ol.source_document_line_id
and oh.header_id = ol.header_id

46
Nguyn Vn Ti Technical Consultant
and prh.type_lookup_code = 'INTERNAL'

3.3.5.3 Kho tin hnh xut hng cho Internal Order

select *
from po_requisition_headers_all prh,
po_requisition_lines_all prl,
po_req_distributions_all prd,
oe_order_lines_all ol,
oe_order_headers_all oh,
mtl_material_transactions mmt
where prh.requisition_header_id = prl.requisition_header_id
and prl.requisition_line_id = prd.requisition_line_id(+)
and prl.requisition_line_id = ol.source_document_line_id
and oh.header_id = ol.header_id
and ol.line_id = mmt.trx_source_line_id

and prh.type_lookup_code = 'INTERNAL' -- Internal Requisition


and mmt.picking_line_id is not null -- Da Shipped

3.3.5.4 Nhn v nhp hng vo kho t Internal Requisition

select *
from po_requisition_headers_all prh, -- Requisition header
po_requisition_lines_all prl, -- Requisition lines
oe_order_lines_all ol, -- Order lines
oe_order_headers_all oh, -- Order header
mtl_material_transactions mmt, -- Material transactions: pick & issues
rcv_shipment_lines rsl, -- Receipt lines
rcv_shipment_headers rsh, -- Receipt header
rcv_transactions rt, -- Receiving
mtl_material_transactions dev -- Material transactions: receipt
where prh.requisition_header_id = prl.requisition_header_id -- Step 1: create
internal requisition
and prl.requisition_line_id = ol.source_document_line_id -- Step 2: import to
internal order
and ol.header_id = oh.header_id -- Step 3: create internal order success
and ol.line_id = mmt.trx_source_line_id -- Step 4: to pick quantity or to
ship quantity
and rsl.requisition_line_id = prl.requisition_line_id -- Step 5: receipt
internal requisition
and rsl.shipment_header_id = rsh.shipment_header_id -- Step 6: receipt
success
and rsl.shipment_line_id = rt.shipment_line_id -- Step 7: receiving
and rt.transaction_id = dev.rcv_transaction_id -- Step 8: deliver
and prh.type_lookup_code = 'INTERNAL' -- Internal Requisition
and mmt.picking_line_id is not null -- Shipped
3.4 Nghip v Sales Orders dng Bill Only (bn hng khng lin quan n mt hng)
3.4.1 Tng quan nghip v

47
Nguyn Vn Ti Technical Consultant
L nghip v khi to mt Sales order loi Bill only xong, ngi dng tin hnh Booked th Sales
order ny t ng c Interfaced sang ha n bn phn h Receivables m khng c lin quan n
kho.
3.4.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite
3.4.2.1 Nhp Sales Order Bill-Only
bit mt Sales Order Lines l Bill-only th da vo Type ca Sales Order Headers v Type
ca Sales Order Lines tm trong bng oe_workflow_assignments
o Trn ng dng Oracle EBS s thy Process Name l: Line Flow - Generic, Bill Only
o Trn Database th Process Name l: R_BILL_ONLY
Nhp n hng mc header

Nhp n hng mc lines, Sales order lines phi chn Type l Bill-only

48
Nguyn Vn Ti Technical Consultant
3.4.2.2 Thc hin ng tc Book

49
Nguyn Vn Ti Technical Consultant
3.4.3 Diagram v m t lung d liu

3.4.4 Gii thch mt s fields quan trng


3.4.5 SQL chun

select *
from oe_order_headers_all oh,
oe_order_lines_all ol,
ra_customer_trx_lines_all trxl,
ra_customer_trx_all trx,
oe_workflow_assignments wf
where oh.header_id = ol.header_id
and trxl.interface_line_attribute6 = to_char(ol.line_id)
and trxl.org_id = ol.org_id
and trx.customer_trx_id = trxl.customer_trx_id
and oh.order_type_id = wf.order_type_id
and ol.line_type_id = wf.line_type_id
and wf.process_name = 'R_BILL_ONLY'

3.5 Nghip v Sales orders dng Ship Only (bn hng ch giao hng m khng c ha n)
3.5.1 Tng quan nghip v
Sales order loi Ship only vn theo quy trnh ca Standard orders nhng khng c bc Interface
sang ha n bn phn h Receivables.
3.5.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite
bit mt Sales Order Lines l Bill-only th da vo Type ca Sales Order Headers v Type
ca Sales Order Lines tm trong bng oe_workflow_assignments
o Trn ng dng Oracle EBS s thy Process Name l: Line Flow - Generic, Ship Only,
tng ng vi Process Name ny th ngi ta c th c tn cho cc Line Type Name
khc nhau.
o Trn Database th Process Name l: R_NO_INVOICE_LINE
Nhp n hng mc header, chn loi Ship-only

50
Nguyn Vn Ti Technical Consultant
Nhp n hng mc lines, nhp Line Type l Ship-only.

51
Nguyn Vn Ti Technical Consultant
Thc hin Book n hng ny, mc ch l gi thng ip xung kho bo cho kho bit n
hng ny cn nhng mt hng no, s lng bao nhiu,

Thc hin vic Released Sales Order, thng thng bc ny l t ng nu khng th c th


vo mn hnh Release Sales Orders (Order > Shipping > Release Sales Orders >)

52
Nguyn Vn Ti Technical Consultant
Qua mn hnh Shipping Transactions (Orders > Shipping > Transactions) tm v tin hnh
Released n hng va Booked.

Quan phn h Inventory thc hin vic gom hng v ly hng (Inventory > Move Order >
Transact Move Orders)

Tnh nng: Chn v gom hng

Tm theo Orders

G s Order Number + % Nhn Tab

Nhn

53
Nguyn Vn Ti Technical Consultant
Vo mn hnh Transact Move Order trong tin hnh cp hng cho Sales Order

Chn Sales Order cn cp hng

Nhn vo nt cp hng
cho Sales Order

Thc hin vic xut hng bng cch vo Shipping Transactions (Order > Shipping >
Transactions)
o To Delivery t ng

54
Nguyn Vn Ti Technical Consultant
o Thc hin xut hng ra khi kho bng chc nng Ship confirm

3.5.3 Diagram v m t lung d liu

55
Nguyn Vn Ti Technical Consultant
3.5.4 Gii thch mt s fields quan trng
3.5.5 SQL Chun
3.5.5.1 Cu SQL t bc nhp Sales Orders n bc xut hng ra khi kho

select mmt.trx_source_line_id order_line_id,


wdd.released_status,
-- Giao dich gom hang
mmt.transaction_id,
mmt.primary_quantity,
mmt.subinventory_code,

-- Giao dich chuyen hang


mrc.transaction_id,
mrc.primary_quantity,
mrc.subinventory_code,

-- Giao dich xuat hang


mtx.transaction_id,
mtx.primary_quantity,
mtx.subinventory_code
from oe_order_headers_all oh, -- nhp liu cho order header

56
Nguyn Vn Ti Technical Consultant
oe_order_lines_all ol, -- nhp liu cho order lines
wsh_delivery_details wdd, -- booked
wsh_delivery_assignments wda, -- booked
mtl_txn_request_lines mtrl, -- move order lines : gom hng
mtl_txn_request_headers mtrh, -- move order headers : gom hng
mtl_material_transactions mmt, -- transact move order
mtl_material_transactions mrc, -- v tr ch xut
mtl_material_transactions mtx,
oe_workflow_assignments wf
where oh.header_id = ol.header_id
and wdd.source_line_id = ol.line_id
and wdd.delivery_detail_id = wda.delivery_detail_id
and wdd.move_order_line_id = mtrl.line_id
and mtrh.header_id = mtrl.header_id
and wdd.transaction_id = mmt.transaction_id
and mmt.transfer_transaction_id = mrc.transaction_id
and mtx.picking_line_id = wdd.delivery_detail_id
and oh.order_type_id = wf.order_type_id
and ol.line_type_id = wf.line_type_id
and wdd.released_status in ('S', 'C') -- Shipped, Closed
and wf.process_name = 'R_NO_INVOICE_LINE' -- Ship-Only
3.6 Quy trnh Drop-Ship (giao dch tay ba n hu hng)
3.6.1 Tng quan nghip v
Nghip v ny xy ra trong tnh hung c 2 cng ty mun thc hin giao dch mua bn vi nhau
nhng cha kh nng m bo cho vic thc hin giao dch ng nh mong mun ca h (v d
nh thiu kh nng thm nh hng ha hoc 2 cng ty ny cha t cch php l thc hin
giao dch mua bn vi nhau trn mt mt hng no ), trong tnh hung ny 2 cng ty ny thc
hin giao dch mua bn c vi nhau th cn thu thm mt cng ty th 3 c kh nng thc hin
giao dch mua bn lm trung gian mua bn cho 2 cng ty kia, cng ty th 3 s hng khon li
nhun v ng ra lm trung gian cho 2 cng ty kia.
3.6.2 Cc bc thc hin trn ng dng Oracle E-Bussiness Suite
3.6.2.1 To Sales Order
Nhp n hng mc header

57
Nguyn Vn Ti Technical Consultant
Nhp n hng mc lines: chn Source Type l External. Trong database th c
oe_order_lines_all.source_type_code = EXTERNAL

58
Nguyn Vn Ti Technical Consultant
3.6.2.2 Chy 2 request to Requisitions v Purchase Orders phn h Order Managment
Vo phn h Order Management chy Request chuyn Sales Order thnh Requisitions

Chy Request to ra Purchase Order

59
Nguyn Vn Ti Technical Consultant
3.6.2.3 Nhn Purchase Order, ng thi Sales Order s c chuyn thnh ha n k ton phi thu khch
hng
Vo phn h Inventory tm Purchase Order Receipt (nhn hng) (quy trnh Drop-Ship
khng c nhp kho)

Thc hin vic nhn hng: Check vo , sau nhn nt Save

60
Nguyn Vn Ti Technical Consultant
3.6.2.4 Thc hin Matching ha n k ton phi tr nh cung cp (AP) vi Receipt hoc Purchase Order

3.6.3 Diagram v m t lung d liu

61
Nguyn Vn Ti Technical Consultant
3.6.4 Gii thch mt s fields quan trng
3.6.5 SQL chun

select -- thong tin sales order header


oh.header_id,
oh.order_number,
oh.order_type_id,
oh.price_list_id,
oh.ship_tolerance_above, -- gioi hen tren cua gia tri duoc phep shipping
oh.ship_tolerance_above, -- gioi han duoi cua gia tri duoc phep shipping
oh.fob_point_code,

-- thong tin sales order lines


ol.line_id,
ol.inventory_item_id,
ol.org_id,
ol.ship_from_org_id,
ol.sold_to_org_id,
ol.order_quantity_uom,
ol.ordered_quantity,
ol.ordered_quantity_uom2,
ol.ordered_quantity2,
ol.subinventory,
ol.unit_selling_price,
ol.price_list_id,

62
Nguyn Vn Ti Technical Consultant
ol.fob_point_code,

-- thong tin requisition muc header


prh.requisition_header_id,
prh.segment1, -- so requisition
prh.type_lookup_code,
prh.start_date_active,
prh.end_date_active,
prh.description,
prh.cancel_flag,

-- thong tin requisition muc lines


prl.requisition_line_id,
prl.item_id,
prl.line_num,
prl.item_description,
prl.unit_meas_lookup_code,
prl.secondary_unit_of_measure,
prl.unit_price,
prl.quantity,
prl.quantity_cancelled,
prl.quantity_delivered,
prl.secondary_quantity,
prl.secondary_quantity_received,
prl.secondary_quantity_cancelled,
prl.source_type_code,
prl.source_organization_id,
prl.source_subinventory,
prl.destination_type_code,
prl.destination_organization_id,
prl.destination_subinventory,
prl.source_req_line_id,
prl.amount,

-- thong tin po headers


poh.po_header_id,
poh.type_lookup_code,
poh.segment1,
poh.vendor_id,
poh.fob_lookup_code,
poh.status_lookup_code,
poh.start_date_active,
poh.end_date_active,
poh.agent_id,
poh.terms_id,
poh.currency_code,
poh.rate,

-- thong tin po lines


pol.po_line_id,
pol.item_id,
pol.item_description,
pol.org_id,
pol.base_uom,
pol.base_qty,
pol.secondary_uom,
pol.secondary_qty,

63
Nguyn Vn Ti Technical Consultant
pol.unit_price,
pol.unit_meas_lookup_code,
pol.quantity,
pol.secondary_unit_of_measure,
pol.secondary_quantity,

-- thong tin receipt header


rsh.shipment_header_id,
rsh.receipt_source_code,
rsh.shipment_num,
rsh.receipt_num,
rsh.bill_of_lading,
rsh.shipped_date,
rsh.organization_id,
rsh.approval_status,

-- thong tin receipt lines


rsl.shipment_line_id,
rsl.from_organization_id,
rsl.to_organization_id,
rsl.to_subinventory,
rsl.mmt_transaction_id,
rsl.unit_of_measure,
rsl.quantity_shipped,
rsl.quantity_received,
rsl.source_document_code,
rsl.destination_type_code,
rsl.item_id,
rsl.item_description

from po_requisition_headers_all prh, -- requisition headers


po_requisition_lines_all prl, -- requisition lines
oe_drop_ship_sources odss, -- drop ship
oe_order_lines_all ol, -- sales order lines
oe_order_headers_all oh, -- sales order headers
po_lines_all pol, -- purchasing order lines
po_headers_all poh, -- purchasing order headers
po_line_locations_all pll, -- lo trinh giao hang
rcv_shipment_lines rsl, -- receipt lines
rcv_shipment_headers rsh
where odss.line_id = ol.line_id -- drop ship link voi so line
and odss.header_id = oh.header_id -- drop ship link voi so header
and odss.requisition_header_id = prh.requisition_header_id -- drop ship link
voi requisition header
and odss.requisition_line_id = prl.requisition_line_id -- drop ship link voi
requisition lines
and odss.po_line_id = pol.po_line_id -- drop ship link voi po lines
and odss.po_header_id = poh.po_header_id -- drop ship link voi po header
and pol.po_line_id = pll.po_line_id -- po line link voi linelocation
and pll.line_location_id = rsl.po_line_location_id -- line location link
receipt lines
and rsl.shipment_header_id = rsh.shipment_header_id -- receipt lines link voi
receipt header
and ol.source_type_code = 'EXTERNAL';

64
Nguyn Vn Ti Technical Consultant
4. Ti liu tham kho
Order managements:
http://www.oracleappshub.com/om/
http://eoracleapps.blogspot.com/2009/05/oracle-order-management-dropship-flow.html

65
Nguyn Vn Ti Technical Consultant

You might also like