Apps Tables

Published on November 2016 | Categories: Documents | Downloads: 86 | Comments: 0 | Views: 1021
of 51
Download PDF   Embed   Report

Comments

Content


Distribution and Manufacturing Commonly used tables
Inv Po Om AP
Items Po Orders Payable Incoives
mtl_system_items_b po_headers_all oe_order_headers_all AP_INVOICES_ALL
mtl_item_revisions po_lines_all oe_transaction_types_all AP_INVOICE_DISTRIBUTIONS_ALL
Item Categories po_line_locations_all OE_ORDER_LINES_HISTORY Payments to Invoice
mtl_categories_b PO_HEADERS_ARCHÌVE and PO_LÌNES_ARCHÌVE (PO revisions) select · from oe_sets where header_id = AP_PAYMENT_DISTRIBUTIONS_ALL
mtl_category_sets_b po_distributions_all oe_order_lines_all AP_PAYMENT_HISTORY_ALL
mtl_item_categories :yers Agreements AP_PAYMENT_SCHEDULES_ALL
Item Costs po_agents oe_agreements_b AP_INVOICE_PAYMENTS_ALL
cst_item_costs Doc:ment and Line Types Order So:rces
cst_cost_types po_document_types_all_b oe_order_sources AR
Organization po_line_types_b Transaction types AR_VAT_TAX_ALL_B
hr_all_organization_units Releases oe_transaction_types_all / tl AR_CASH_RECEIPTS_ALL
org_organization_definitions po_releases_all Pricing AR_CASH_RECEIPT_HISTORY_ALL
hr_locations_all Req:isitions qp_list_headers_b AR_AGING_BUCKETS
mtl_parameters po_requisition_headers_all qp_list_lines AR_AGING_BUCKET_LINES_B
Transactions po_requisition_lines_all qp_pricing_attributes , oe_price_adjustments AR_MISC_CASH_DISTRIBUTIONS_ALL
mtl_material_transactions po_req_distributions_all Shipping AR_RECEIVABLES_TRX_ALL
mtl_transaction_types Vendors wsh_new_deliveries select · from ra_cust_trx_types_all
S:binventories po_vendors wsh_delivery_details RA_CUSTOMER_TRX_ALL
mtl_secondary_inventories po_vendor_sites_all wsh_delivery_assignments RA_CUSTOMER_TRX_LINES_ALL
Lot and Serial N:mbers po_vendor_contacts WSH_PACKED_CONTAINERS RA_CUST_TRX_LINE_GL_DIST_ALL
mtl_serial_numbers Receiving wsh_picking_batches C:stomers
mtl_lot_numbers rcv_transactions $_$RIAL_NUMBR$ ( shipped sl no's) hz_parties hz_loc_assignments
Location and On Hand Qty rcv_shipment_headers hz_cust_accounts
mtl_item_locations rcv_shipment_lines ( expected receipts) hz_cust_acct_sites_all
mtl_onhand_quantities hz_cust_site_uses_all
Req:isitions Interface Order Import hz_party_sites hz_contact_points CP
po_req:isitions_interface_all oe_headers_iface_all hz_locations
Interfaces po_req_dist_interface_all REJECT_FLAG GL
Transactions Interface INTERFACE_SOURCE_CODE ERROR_FLAG
mtl_transactions_interface DESTINATION_TYPE_CODE ORIG_SYS_DOCUMENT_REF GL_DAILY_RATES
SOURCE_CODE AUTHORIZATION_STATUS OPERATION_CODE GL_BALANCES
SOURCE_LINE_ID PREPARER_ID/NAME oe_lines_iface_all GL_ACCOUNT_HIERARCHIES
SOURCE_HEADER_ID QUANTITY ORDER_SOURCE_ID GL_BUDGET_ASSIGNMENTS
PROCESS_FLAG CHARGE_ACCOUNT_ID/SEGMENTS ORIG_SYS_DOCUMENT_REF GL_ENCUMBRANCE_TYPES
TRANSACTION_MODE DESTINATION_ORGANIZATION_ID ORIG_SYS_LINE_REF GL_JE_BATCHES
TRANSACTION_INTERFACE_ID DELIVER_TO_LOCATION_ID/CODE ORIG_SYS_SHIPMENT_REF GL_JE_HEADERS
INVENTORY_ITEM_ID DELIVER_TO_REQUESTOR_ID/Name INVENTORY_ITEM GL_JE_LINES
ITEM_SEGMENT1 to ITEM_ DISTRIBUTION_NUMBER REQUEST_DATE
SEGMENT20 DESTINATION_ORGANIZATION_ID DELIVERY_LEAD_TIME
TRANSACTION_QUANTITY INTERFACE_SOURCE_CODE DELIVERY_ID AP
TRANSACTION_UOM CHARGE_ACCOUNT_ID ORDERED_QUANTITY AP_INVOICES_INTERFACE
TRANSACTION_DATE ORDER_QUANTITY_UOM oe_price_adjs_interface AP_INVOICES_INTERFACE
TRANSACTION_SOURCE_ID REQUEST_ID ORIG_SYS_DOCUMENT_REF
DSP_SEGMENT1toDSP_ P:rchasing Doc:ments interface ORIG_SYS_LINE_REF AR
SEGMENT30 po_headers_interface ORIG_SYS_SHIPMENT_REF RA_CUSTOMERS_INTERFACE_ALL
TRANSACTION_SOURCE_NAME INTERFACE_HEADER_ID ORIG_SYS_DISCOUNT_REF RA_INTERFACE_DISTRIBUTIONS_ALL
TRANSACTION_TYPE_ID ACTION DISCOUNT_ID RA_INTERFACE_DISTRIBUTIONS_ALL
mtl_transactions_lot_interface DOCUMENT_TYPE_CODE DISCOUNT_LINE_ID RA_INTERFACE_DISTRIBUTIONS_ALL
LOT_NUMBER VENDOR_DOC_NUM DISCOUNT_NAME
LOT_EXPIRATION_DATE po_lines_interface OPERATION_CODE GL
TRANSACTION_QUANTITY INTERFACE_LINE_ID oe_credits_interface GL_DAILY_RATES_INTERFACE
TRANSACTION_INTERFACE_ID INTERFACE_HEADER_ID ORDER_SOURCE_ID GL_INTERCOMPANY_ACCTS_V
SERIAL_TRANSACTION_TEMP_ID po_interface_errors ORIG_SYS_DOCUMENT_REF GL_INTERFACE_CONTROL
mtl_serial_n:mbers_interface Receiving Interface ORIG_SYS_LINE_REF GL_INTERFACE_GROUPS_V
TRANSACTION_INTERFACE_ ID rcv_headers_interface ORIG_SYS_SHIPMENT_REF GL_INTERFACE_HISTORY
FM_SERIAL_NUMBER HEADER_INTERFACE_ID ORIG_SYS_CREDIT_REF GL_INTERFACE_SOURCES_V
Item Interface GROUP_ID PERCENT GL_INTERFACE
MTL_SYSTEM_ITEMS_INTERFACE PROCESSING_STATUS_CODE OE_LOTSERIALS_INTERFACE JE_SOURCE_NAME.
PROCESS_FLAG RECEIPT_SOURCE_CODE OPERATION_CODE STATUS
TRANSACTION_TYPE VENDOR_NAME ORDER_SOURCE_ID SET_OF_BOOKS_ID
SET_PROCESS_ID VENDOR_NUM ORIG_SYS_DOCUMENT_REF USER_JE_SOURCE_NAME
ORGANIZATION_CODE VENDOR_ID ORIG_SYS_LINE_REF USER_JE_CATEGORY_NAME
ITEM_NUMBER VALIDATION_FLAG ORIG_SYS_LOTSERIAL_REF ACCOUNTING_DATE
AnIl Kumar F 7
10/1/2011Ìnterfaces
Distribution and Manufacturing Commonly used tables
rcv_transactions_interface QUANTITY CURRENCY_CODE
INTERFACE_TRANSACTION_ID OPERATION_CODE Do Not Enter any value
MTL_INTERFACE_ERRORS GROUP_ID OE_RESERVTNS_INTERFACE TRANSACTION_DATE
MTL_ITEM_CATE_INTERFACE TRANSACTION_TYPE oe_actions_interface JE_BATCH_ID
MTL_ITEM_REVI_INTERFACE TRANSACTION_DATE ORIG_SYS_DOCUMENT_REF JE_HEADER_ID
PROCESSING_STATUS_CODE OPERATION_CODE JE_LINE_NUM
PROCESSING_MODE_CODE CHART_OF_ACCOUNTS_ID
TRANSACTION_STATUS_CODE Validations
QUANTITY - Set of books
UNIT_OF_MEASURE - Period name
ITEM_DESCRIPTION - Source name
RECEIPT_SOURCE_CODE - Journal entry name
VENDOR_ID - Currency code
VENDOR_NUM - Category name
VENDOR_NAME - Actual flag
AUTO_TRANSACT_CODE DOCUMENT_NUM - Encumbrance type ID
SOURCE_DOCUMENT_CODE HEADER_INTERFACE_ID - User conversion type
PO_HEADER_ID VALIDATION_FLAG - Accounting date
- Budget version ID
- Reversal period
GL_&DGET_INTERFACE
select * from org*acct*5eriods GL_&DGET_INTERIM
begin
fnd_client_info.set_org_context('539');
end;
select · from wf_item_attribute_values where item_key = '776773'
select · from fnd_responsibility_tl where R$!N$IBILITY_ID = 55295
AnIl Kumar F 7
10/1/2011Ìnterfaces
#054798
User ExIts
FN0 SFWÌNÌT
FN0 SFWEXÌT
FN0 FDF|AT_CUFFENCY
FN0 FLEXÌ07AL :p_org_Id := TD_NU|8EF(fnd_profIle.7ALUE('DFC_Ì0'));
FN0 FLEXS0L :cp_user_name := fnd_profIle.7ALUE('USEFNA|E')
FN0 SFWÌNÌT sets your profIle optIon values and allows Dracle
ApplIcatIon Dbject LIbrary user exIts to detect that they have been
called by an Dracle Feports program. FN0 SFWÌNÌT also allows your
report to use the correct organIzatIon automatIcally. FN0 SFWEXÌT
ensures that all the memory allocated for Dracle ApplIcatIon Dbject
LIbrary user exIts has been freed up properly.
FN0 FLEXÌ07AL are used to dIsplay flex fIeld InformatIon lIke prompt, value etc wIth dynamIc query
FN0 FLEXS0L
D| Feports
Cancelled Drders Feport
Feturns by Feason Feport
Cancelled Drders Feasons 0etaIl Feport
Drders by Ìtem Feport
Unbooked Drders Feport
logIn for PD - NUAN_A|E_SSP_A0|ÌN / welcome1
- Account combInatIons
- PerIods
- Unbalanced journal entrIes
- ForeIgn currency errors
- 8udget InformatIon
- Encumbrance InformatIon
- Dther mIscellaneous Items
select * from PD_FE0UÌSÌTÌDN_HEA0EFS_ALL WHEFE SEC|ENT1 ='5666'
select · from po_positio
select * from PD_FE0UÌSÌTÌDN_LÌNES_ALL WHEFE FE0UÌSÌTÌDN_HEA0EF_Ì0 = 56622
select * from PD_FE0_0ÌSTFÌ8UTÌDNS_ALL WHEFE FE0UÌSÌTÌDN_LÌNE_Ì0 = 605JJ
select * from PD_HEA0EFS_ALL WHEFE SEC|ENT1 = 'J26' AN0 TYPE_LDDKUP_CD0E = 'FF0' select · from po_control_
select * from PD_FF0_7EN0DFS WHEFE PD_HEA0EF_Ì0 = J2562 select · from po_control_
select * from PD_HEA0EFS_ALL WHEFE SEC|ENT1 = '517' AN0 TYPE_LDDKUP_CD0E = '0UDTATÌDN'
select * from PD_HEA0EFS_ALL WHEFE SEC|ENT1 = '4451' AN0 TYPE_LDDKUP_CD0E= 'STAN0AF0'
select * from PD_LÌNES_ALL WHEFE PD_HEA0EF_Ì0 = J2566
select * from PD_LÌNE_LDCATÌDNS_ALL WHEFE PD_LÌNE_Ì0 = J777J
select * from PD_0ÌSTFÌ8UTÌDNS_ALL WHEFE LÌNE_LDCATÌDN_Ì0 In( 72186)
select * from FC7_SHÌP|ENT_HEA0EFS WHEFE FECEÌPT_NU| = '9616' AN0 SHÌP_TD_DFC_Ì0 = 207
select * from FC7_SHÌP|ENT_LÌNES WHEFE SHÌP|ENT_HEA0EF_Ì0 = 5642J
select * from ap_InvoIces_all where InvoIce_num = 'AL·J46'
select * from ap_InvoIce_dIstrIbutIons_all where InvoIce_Id = 6J25J
select * from AP_ACCDUNTÌNC_E7ENTS_ALL WHEFE source_Id = 6J25J and source_table = 'AP_ÌN7DÌCES'
select * from ap_payment_schedules_all where InvoIce_Id = 6J25J
select * from ap_checks_all where check_number = 247J ··creatIon_date lIke sysdate
select * from AP_ÌN7DÌCE_PAY|ENTS_ALL where InvoIce_Id = 6J25J
select * from AP_ACCDUNTÌNC_E7ENTS_ALL WHEFE source_Id = 28599 and source_table = 'AP_CHECKS' ··ACCDUNTÌNC_E7ENT_Ì0 = 77429
Approval Croups : po_control_groups , po_control_rules
select · from po_control_functions
Approval AssIgnments : po_posItIon_controls
The 7acatIon Fules for Workflow NotIfIcatIons are stored In the table wf_routIng_rules.
The followIng query can be used to determIne whIch FoutIng Fules are actIve: select rule_Id, role ¨Forwarded From¨, begIn_date, end_date, actIon_ar
select · from po_Approval_list_lines / headers
Purchase Order Status:
select segment1 po#, revision_num r#,
substr(type_lookup_code,1,4) type, authorization_status auth_status,
closed_code, wf_item_type, wf_item_key, org_id
from po_headers_all
where segment1 = '&PO_NUMBER'

Requisition Status:
select segment1 req#,authorization_status auth_status,
closed_code, wf_item_type, wf_item_key, org_id
from po_requisition_headers_all
where segment1 = '&REQ_NUM'
ReIease Status:
select po.segment1 po#, rel.release_num rel#, po.revision_num po_r#,
po.authorization_status po_status, po.closed_code close_po,
po.wf_item_type po_type, po.wf_item_key po_key, po.org_id org,
rel.wf_item_type rel_type, rel.wf_item_key rel_key,
rel.po_release_id rel_id, rel.authorization_status rel_status, rel.hold_flag hold
from po_headers_all po, po_releases_all rel
where po.po_header_id = rel.po_header_id
and po.segment1 ÷ '&PONUM'
and rel.releasenum ÷ 'RELNUM'
order by 1,2
Purchase Order Action History:
select poah.sequence_num seq#, poah.action_date, poah.action_code,
poah.employee_id emp_id, fnd.user_name, substr(poah.object_type_code,1,3) type, poah.object_sub_type_code sub_type,
poah.object_revision_num rev, pohead.org_id
from po_action_history poah, fnd_user fnd, po_headers_all pohead
where poah.object_id = pohead.po_header_id
and pohead.segment1 = '&PO_NUMBER'
and pohead.org_id = '&ORG_ÌD'
and substr(poah.object_type_code,1,3) = 'PO'
and poah.employee_id = fnd.employee_id
and fnd.session_number != 0
order by 2,1
Requisition Action History:
select poah.sequence_num seq#, poah.action_date, poah.action_code,
poah.employee_id emp_id, fnd.user_name, substr (poah.object_type_code,1,3) type, poah.object_sub_type_code sub_type,
poah.object_revision_num rev, pohead.org_id, poah.note
from po_action_history poah, fnd_user fnd, po_requisition_headers_all pohead
where poah.object_id = pohead.requisition_header_id
and pohead.segment1 = '&REQ_NUMBER'
and substr(poah.object_type_code,1,3) = 'REQ'
and pohead.org_id = '&ORG_ÌD'
and poah.employee_id = fnd.employee_id
and fnd.session_number != 0
order by 9,2,1
Position Attached to Username:
SELECT pos.name position_name, pa.position_id,fnd.user_name
FROM PER_ALL_ASSÌGNMENTS_F pa, per_positions pos,per_jobs job, fnd_user fnd
WHERE pa.POSÌTÌON_ÌD = pos.POSÌTÌON_ÌD
and pa.job_ÌD = job.job_id
and sysdate between pa.EFFECTÌVE_START_DATE
and pa.EFFECTÌVE_END_DATE
and pa.primary_flag = 'Y'
and pa.assignment_type = 'E'
and pa.person_id = fnd.employee_id
and pa.PERSON_ÌD = (select employee_id
Irom Induser
where username ÷ '&username'
PequIstIons In Process
············································
select ··Item_key,substr(Item_key,1,length(Item_key)),
dIstInct b.segment1 ¨PD Number¨,b.creatIon_date,c.user_name,e.segment1 Item
,d.unIt_prIce,d.quantIty,d.Item_descrIptIon··,d.Item_Id··,a.actIvIty_status
from wf_Item_actIvIty_statuses a, po_requIsItIon_headers_all b,fnd_user c,po_requIsItIon_lInes_all
d,mtl_system_Items_b e
where a.Item_type='NUA|EFE0'
and ActIvIty_status In ( 'WAÌTÌNC','EFFDF','NDTÌFÌE0','0EFEFFE0','ACTÌ7E')
and b.created_by=c.user_Id
and b.FE0UÌSÌTÌDN_HEA0EF_Ì0=d.requIsItIon_header_Id
··and b.segment1='21166'
and d.0ESTÌNATÌDN_DFCANÌZATÌDN_Ì0=e.organIzatIon_Id
and e.Inventory_Item_Id=d.Item_Id
and (substr(Item_key,1,6)=to_char(b.requIsItIon_header_Id) or
substr(Item_key,1,5)=to_char(b.requIsItIon_header_Id) )
order by 2 desc
PequIstIon In Error.
select ··Item_key,substr(Item_key,1,length(Item_key)),
dIstInct b.segment1 ¨PD Number¨,b.creatIon_date,c.user_name,e.segment1 Item
,d.unIt_prIce,d.quantIty,d.Item_descrIptIon··,d.Item_Id··,a.actIvIty_status
from wf_Item_actIvIty_statuses a, po_requIsItIon_headers_all b,fnd_user c,po_requIsItIon_lInes_all
d,mtl_system_Items_b e
where a.Item_type='NUA|EFE0'
and ActIvIty_status = 'EFFDF'
and b.created_by=c.user_Id
and b.FE0UÌSÌTÌDN_HEA0EF_Ì0=d.requIsItIon_header_Id
··and b.segment1='21166'
and d.0ESTÌNATÌDN_DFCANÌZATÌDN_Ì0=e.organIzatIon_Id
and e.Inventory_Item_Id=d.Item_Id
and (substr(Item_key,1,6)=to_char(b.requIsItIon_header_Id) or
substr(Item_key,1,5)=to_char(b.requIsItIon_header_Id) )
order by 2 desc
PD ApprovaI Cropup whIth IImIts
SELECT h.NA|E operatIng_unIt_name,
d.NA|E job_name,
cf.control_functIon_name document_type,
g1.control_group_name approval_group_name
FFD| per_jobs d,
po_posItIon_controls_all f1,
po_control_groups_all g1,
hr_all_organIzatIon_unIts h,
po_control_functIons cf
WHEFE 1 = 1
AN0 h.TYPE = 'DU'
AN0 h.organIzatIon_Id = g1.org_Id
AN0 d.job_Id = f1.job_Id
AN0 f1.control_group_Id = g1.control_group_Id
AN0 cf.control_functIon_Id = f1.control_functIon_Id
DF0EF 8Y 1,2
select * from A|E_TFANS_APPFD7AL_HÌSTDFY where transactIon_Id = '125864' order by row_tImestamp
/************************************************************
Purpose · 0uery to compare the errored PD creatIon date
and Item last update date
7ersIon · 71.0
0ate · 08·AprIl·2009
Created 8y · Apps AssocIates
/***********************************************************/
SELECT poh.segment1 ¨PD#¨, pol.po_lIne_Id ¨PD_LÌNE_Ì0¨,
poh.creatIon_date ¨PD_CFEATÌDN_0ATE¨,
Ias.begIn_date ¨WF_EFFDF_0ATE¨, Ias.end_date ¨WF_EN0_0ATE¨,
mtl.segment1 ¨ÌTE|¨, mtl.last_update_date ¨ÌTE|_UP0ATE_0ATE¨,
mtl.organIzatIon_Id, fnd.user_name ¨UP0ATE0_8Y¨, Ias.actIvIty_status,
Ias.error_name, Ias.error_message, Ias.error_stack
FFD| wf_Item_actIvIty_statuses Ias,
po_headers_all poh,
mtl_system_Items mtl,
po_lInes_all pol,
po_dIstrIbutIons_all pod,
fnd_user fnd
WHEFE 1 = 1
AN0 Ias.Item_type = 'PDAPPF7'
AN0 poh.wf_Item_key = Ias.Item_key
AN0 poh.po_header_Id = pol.po_header_Id
AN0 pol.po_lIne_Id = pod.po_lIne_Id
AN0 mtl.organIzatIon_Id = pod.destInatIon_organIzatIon_Id
AN0 mtl.Inventory_Item_Id = pol.Item_Id
AN0 mtl.last_updated_by = fnd.user_Id
AN0 actIvIty_status = 'EFFDF'
DF0EF 8Y begIn_date 0ESC
/******************************************************************/
/************************************************************
Purpose · 0uery to compare the errored requIsItIon errored date
and Item last update date
7ersIon · 71.0
0ate · 06·AprIl·2009
Created 8y · Apps AssocIates
***********************************************************/
SELECT prh.segment1 "REQ#", prl.requisition_line_id "REQ_LINE_ID",
prh.creation_date "REQ_CREATIJN_DATE", prh.preparer_id "PREPARER ID",
pap.full_name "NAME", ias.begin_date "WF_ERRJR_DATE",
ias.end_date "WF_END_DATE", mtl.segment1 "ITEM",
mtl.last_update_date "ITEM_UPDATE_DATE", mtl.organization_id,
ias.activity_status, ias.error_name, ias.error_message,
ias.error_stack
FRJM wf_item_activity_statuses ias,
po_requisition_headers_all prh,
mtl_system_items mtl,
po_requisition_lines_all prl,
per_all_people_f pap
WHERE 1 = 1
AND ias.item_type = 'NUAMEREQ'
AND prh.wf_item_key = ias.item_key
AND prh.requisition_header_id = prl.requisition_header_id
AND mtl.organization_id = prl.destination_organization_id
AND mtl.inventory_item_id = prl.item_id
AND prh.preparer_id = pap.person_id
AND activity_status = 'ERRJR'
AND pap.effective_end_date = SYSDATE
union
SELECT prh.segment1 "REQ#", prl.requisition_line_id "REQ_LINE_ID",
prh.creation_date "REQ_CREATIJN_DATE", prh.preparer_id "PREPARER ID",
pap.full_name "NAME", ias.begin_date "WF_ERRJR_DATE",
ias.end_date "WF_END_DATE", mtl.segment1 "ITEM",
mtl.last_update_date "ITEM_UPDATE_DATE", mtl.organization_id,
ias.activity_status, ias.error_name, ias.error_message,
ias.error_stack
FRJM wf_item_activity_statuses ias,
po_requisition_headers_all prh,
mtl_system_items mtl,
po_requisition_lines_all prl,
per_all_people_f pap
WHERE 1 = 1
AND ias.item_type = 'NUAMEREQ'
AND prh.wf_item_key = ias.item_key
AND prh.requisition_header_id = prl.requisition_header_id
AND mtl.organization_id = prl.destination_organization_id
AND mtl.inventory_item_id = prl.item_id
AND prh.preparer_id = pap.person_id
AND activity_status = 'ERRJR'
AND pap.effective_end_date < SYSDATE
order by 3 desc


$PLAY WHAT PEDU$TDN AN PD APE LNKE
PeIatIon wIth PequIsItIon and PD )
SELECT
,r.segment1 ¨Feq Num¨
,p.segment1 ¨PD Num¨
from
,po_headers_all p
,po_dIstrIbutIons_all d
,po_req_dIstrIbutIons_all rd
,po_requIsItIon_lInes_all rl
,po_requIsItIon_headers_all r
WHEFE
p.po_header_Id = d.po_header_Id and
d.req_dIstrIbutIon_Id = rd.dIstrIbutIon_Id and
rd.requIsItIon_lIne_Id = rl.requIsItIon_lIne_Id and
rl.requIsItIon_header_Id = r.requIsItIon_header_Id
http:llrafIoracIe.bIogspot.coml200ºl03lqurIesonoracIepurchasIng.htmI
ÌNTEFNAL FE0UÌSÌTÌDNS THAT 0D NDT HA7E AN ASSDCÌATE0 ÌNTEFNAL SALES DF0EF
SELECT
,F0H.SEC|ENT1
,F0L.LÌNE_NU|
,F0L.FE0UÌSÌTÌDN_HEA0EF_Ì0
,F0L.FE0UÌSÌTÌDN_LÌNE_Ì0
,F0L.ÌTE|_Ì0
,F0L.UNÌT_|EAS_LDDKUP_CD0E
,F0L.UNÌT_PFÌCE
,F0L.0UANTÌTY
,F0L.0UANTÌTY_CANCELLE0
,F0L.0UANTÌTY_0ELÌ7EFE0
,F0L.CANCEL_FLAC
,F0L.SDUFCE_TYPE_CD0E
,F0L.SDUFCE_DFCANÌZATÌDN_Ì0
,F0L.0ESTÌNATÌDN_DFCANÌZATÌDN_Ì0
,F0H.TFANSFEFFE0_TD_DE_FLAC
FFD|
,PD_FE0UÌSÌTÌDN_LÌNES_ALL F0L
,PD_FE0UÌSÌTÌDN_HEA0EFS_ALL F0H
WHEFE
F0L.FE0UÌSÌTÌDN_HEA0EF_Ì0 = F0H.FE0UÌSÌTÌDN_HEA0EF_Ì0 and
F0L.SDUFCE_TYPE_CD0E = 'ÌN7ENTDFY' and
F0L.SDUFCE_DFCANÌZATÌDN_Ì0 Is not null and not exIsts
(select 'exIstIng Internal order'from DE_DF0EF_LÌNES_ALL LÌN where LÌN.SDUFCE_0DCU|ENT_LÌNE_Ì0 = F0L.FE0UÌSÌTÌDN_LÌNE_Ì0 and LÌN.SDUFCE_0D
DF0EF 8Y F0H.FE0UÌSÌTÌDN_HEA0EF_Ì0, F0L.LÌNE_NU|
············································································································
0ÌSPLAY WHAT FE0UÌSÌTÌDN AN0 PD AFE LÌNKE0
(FelatIon wIth FequIsItIon and PD )
SELECT
,r.segment1 ¨Feq Num¨
,p.segment1 ¨PD Num¨
from
,po_headers_all p
,po_dIstrIbutIons_all d
,po_req_dIstrIbutIons_all rd
,po_requIsItIon_lInes_all rl
,po_requIsItIon_headers_all r
WHEFE
p.po_header_Id = d.po_header_Id and
d.req_dIstrIbutIon_Id = rd.dIstrIbutIon_Id and
rd.requIsItIon_lIne_Id = rl.requIsItIon_lIne_Id and
rl.requIsItIon_header_Id = r.requIsItIon_header_Id
············································································································
PUFCHASE FE0UÌSÌTÌDN WÌTHDUT PD THAT |EANS A PF HAS NDT 8EEN AUTDCFEATE0 TD PD
(Purchase FequIsItIon wIthout a Purchase Drder)
SELECT
,prh.segment1 ¨PF NU|¨
,trunc(prh.creatIon_date) ¨CFEATE0 DN¨
,trunc(prl.creatIon_date) ¨LIne CreatIon 0ate¨
,prl.lIne_num ¨Seq #¨
,msI.segment1 ¨Ìtem Num¨
,prl.Item_descrIptIon ¨0escrIptIon¨
,prl.quantIty ¨0ty¨
,trunc(prl.need_by_date) ¨FequIred 8y¨
,ppf1.full_name ¨FE0UESTDF¨
,ppf2.agent_name ¨8UYEF¨
FFD|
,po.po_requIsItIon_headers_all prh
,po.po_requIsItIon_lInes_all prl
,apps.per_people_f ppf1
,(select dIstInct agent_Id,agent_name from apps.po_agents_v ) ppf2
,po.po_req_dIstrIbutIons_all prd
,Inv.mtl_system_Items_b msI
,po.po_lIne_locatIons_all pll
,po.po_lInes_all pl
,po.po_headers_all ph
WHEFE
prh.requIsItIon_header_Id = prl.requIsItIon_header_Id and
prl.requIsItIon_lIne_Id = prd.requIsItIon_lIne_Id and
ppf1.person_Id = prh.preparer_Id and
prh.creatIon_date between ppf1.effectIve_start_date and ppf1.effectIve_end_date and
ppf2.agent_Id(+) = msI.buyer_Id and
msI.Inventory_Item_Id = prl.Item_Id and
msI.organIzatIon_Id = prl.destInatIon_organIzatIon_Id and
pll.lIne_locatIon_Id(+) = prl.lIne_locatIon_Id and
pll.po_header_Id = ph.po_header_Id(+) and
pll.pl_lIne_Id = pl.po_lIne_Id(+) and
prh.authorIzatIon_status = 'APPFD7E0' and
pll.lIne_locatIon_Id Is NULL and
prl.closed_code Is NULL and
nvl(prl.cancel_flag,'N') ·· 'Y'
DF0EF 8Y 1,2
············································································································
ÌNFDF|ATÌDN FFD| PF to PD
(FequIsItIon moved from dIfferent stages tIll convertIng Into PF)
SELECT 0ÌSTÌNCT
,u.descrIptIon ¨Fequestor¨
,porh.segment1 as ¨Feq Number¨
,trunc(porh.CreatIon_0ate) ¨Created Dn¨
,pord.LAST_UP0ATE0_8Y
,porh.AuthorIzatIon_Status ¨Status¨
,porh.0escrIptIon ¨0escrIptIon¨
,poh.segment1 ¨PD Number¨
,trunc(poh.CreatIon_date) ¨PD CreatIon 0ate¨
,poh.AUTHDFÌZATÌDN_STATUS ¨PD Status¨
,trunc(poh.Approved_0ate) ¨Approved 0ate¨
FFD|
,apps.po_headers_all poh
,apps.po_dIstrIbutIons_all pod
,apps.po_req_dIstrIbutIons_all pord
,apps.po_requIsItIon_lInes_all porl
,apps.po_requIsItIon_headers_all porh
,apps.fnd_user u
WHEFE
porh.requIsItIon_header_Id = porl.requIsItIon_header_Id and porl.requIsItIon_lIne_Id = pord.requIsItIon_lIne_Id and
pord.dIstrIbutIon_Id = pod.req_dIstrIbutIon_Id(+) and
pod.po_header_Id = poh.po_header_Id(+) and
porh.created_by = u.user_Id
order by 2
············································································································
PD's WHÌCH 0DES NDT HA7E ANY PF's
SELECT
,prh.segment1 ¨PF NU|¨
,trunc(prh.creatIon_date) ¨CFEATE0 DN¨
,trunc(prl.creatIon_date) ¨LIne CreatIon 0ate¨
,prl.lIne_num ¨Seq #¨
,msI.segment1 ¨Ìtem Num¨
,prl.Item_descrIptIon ¨0escrIptIon¨
,prl.quantIty ¨0ty¨
,trunc(prl.need_by_date) ¨FequIred 8y¨
,ppf1.full_name ¨FE0UESTDF¨
,ppf2.agent_name ¨8UYEF¨
FFD|
,po.po_requIsItIon_headers_all prh
,po.po_requIsItIon_lInes_all prl
,apps.per_people_f ppf1
,(select dIstInct agent_Id,agent_name from apps.po_agents_v ) ppf2
,po.po_req_dIstrIbutIons_all prd
,Inv.mtl_system_Items_b msI
,po.po_lIne_locatIons_all pll
,po.po_lInes_all pl
,po.po_headers_all ph
WHEFE
prh.requIsItIon_header_Id = prl.requIsItIon_header_Id and
prl.requIsItIon_lIne_Id = prd.requIsItIon_lIne_Id and
ppf1.person_Id = prh.preparer_Id and
prh.creatIon_date between ppf1.effectIve_start_date and ppf1.effectIve_end_date and
ppf2.agent_Id(+) = msI.buyer_Id and
msI.Inventory_Item_Id = prl.Item_Id and
msI.organIzatIon_Id = prl.destInatIon_organIzatIon_Id and
pll.lIne_locatIon_Id(+) = prl.lIne_locatIon_Id and
pll.po_header_Id = ph.po_header_Id(+) and
pll.po_lIne_Id = pl.po_lIne_Id(+) and
prh.authorIzatIon_status = 'APPFD7E0' and
pll.lIne_locatIon_Id Is NULL and
prl.closed_code Is NULL and
nvl(prl.cancel_flag,'N') ·· 'Y'
DF0EF 8Y 1,2
············································································································
ALL PD's WÌTH APPFD7AL, ÌN7DÌCE, E PAY|ENT 0ETAÌLS
SELECT
,a.org_Id ¨DFC Ì0¨
,E.SEC|ENT1 ¨7EN0DF NU|¨
,e.vendor_name ¨SUPPLÌEF NA|E¨
,UPPEF(e.vendor_type_lookup_code) ¨7EN0DF TYPE¨
,f.vendor_sIte_code ¨7EN0DF SÌTE CD0E¨
,f.A00FESS_LÌNE1 ¨A00FESS¨
,f.cIty ¨CÌTY¨
,f.country ¨CDUNTFY¨
,to_char(trunc(d.CFEATÌDN_0ATE)) ¨PD 0ate¨
,d.segment1 ¨PD NU|¨
,d.type_lookup_code ¨PD Type¨
,c.quantIty_ordered ¨0TY DF0EFE0¨
,c.quantIty_cancelled ¨0TY CANCELLE0¨
,g.Item_Id ¨ÌTE| Ì0¨
,g.Item_descrIptIon ¨ÌTE| 0ESCFÌPTÌDN¨
,g.unIt_prIce ¨UNÌT PFÌCE¨
,(N7L(c.quantIty_ordered,0)·N7L(c.quantIty_cancelled,0))*N7L(g.unIt_prIce,0) ¨PD LIne Amount¨
,(select decode(ph.approved_FLAC, 'Y', 'Approved') from po.po_headers_all ph where,ph.po_header_Ì0 = d.po_header_Id) ¨PD Approved:¨
, a.InvoIce_type_lookup_code ¨ÌN7DÌCE TYPE¨
,a.InvoIce_amount ¨ÌN7DÌCE A|DUNT¨
,to_char(trunc(a.ÌN7DÌCE_0ATE)) ¨ÌN7DÌCE 0ATE¨
,a.InvoIce_num ¨ÌN7DÌCE NU|8EF¨
,(select decode(x.|ATCH_STATUS_FLAC, 'A', 'Approved') from ap.ap_InvoIce_dIstrIbutIons_all x where
,x.InvoIce_dIstrIbutIon_Id = b.InvoIce_dIstrIbutIon_Id) ¨ÌnvoIce Approved:¨
,a.amount_paId
,h.amount
,h.check_Id
,h.InvoIce_payment_Id ¨Payment Ìd¨
,I.check_number ¨Cheque Number¨
,to_char(trunc(I.check_0ATE)) ¨Payment 0ate¨
FFD|
,AP.AP_ÌN7DÌCES_ALL A
,AP.AP_ÌN7DÌCE_0ÌSTFÌ8UTÌDNS_ALL 8
,PD.PD_0ÌSTFÌ8UTÌDNS_ALL C
,PD.PD_HEA0EFS_ALL 0
,PD.PD_7EN0DFS E
,PD.PD_7EN0DF_SÌTES_ALL F
,PD.PD_LÌNES_ALL C
,AP.AP_ÌN7DÌCE_PAY|ENTS_ALL H
,AP.AP_CHECKS_ALL Ì
WHEFE
,a.InvoIce_Id = b.InvoIce_Id and
b.po_dIstrIbutIon_Id = c. po_dIstrIbutIon_Id (+) and
c.po_header_Id = d.po_header_Id (+) and
e.vendor_Id (+) = d.7EN0DF_Ì0 and
f.vendor_sIte_Id (+) = d.vendor_sIte_Id and
d.po_header_Id = g.po_header_Id and
c.po_lIne_Id = g.po_lIne_Id and
a.InvoIce_Id = h.InvoIce_Id and
h.check_Id = I.check_Id and
f.vendor_sIte_Id = I.vendor_sIte_Id and
c.PD_HEA0EF_Ì0 Is not null and
a.payment_status_flag = 'Y' and
d.type_lookup_code != '8LANKET'
············································································································
ALL DPEN PD'S
SELECT
,h.segment1 ¨PD NU|¨
,h.authorIzatIon_status ¨STATUS¨
,l.lIne_num ¨SE0 NU|¨
,ll.lIne_locatIon_Id
,d.po_dIstrIbutIon_Id
,h.type_lookup_code ¨TYPE¨
FFD|
,po.po_headers_all h
,po.po_lInes_all l
,po.po_lIne_locatIons_all ll
,po.po_dIstrIbutIons_all d
WHEFE
h.po_header_Id = l.po_header_Id and
ll.po_lIne_Id = l.po_LIne_Id and
ll.lIne_locatIon_Id = d.lIne_locatIon_Id and
h.closed_date Is NULL and
h.type_lookup_code not In ('0UDTATÌDN')
············································································································
STEPS TD 0E8UC A PUFCHASE DF0EF
Cet po_header_Id fIrst and run each query and then analyze the data.
For better understandIng thIs Is splIted Into 5 major stages.
Stage 1: PD CreatIon
PD_HEA0EFS_ALL
select po_header_Id from po_headers_all where segment1 =;
select * from po_headers_all where po_header_Id =;
PD_LÌNES_ALL
select * from po_lInes_all where po_header_Id =;
PD_LÌNE_LDCATÌDNS_ALL
select * from po_lIne_locatIons_all where po_header_Id =;
PD_0ÌSTFÌ8UTÌDNS_ALL
select * from po_dIstrIbutIons_all where po_header_Id =;
PD_FELEASES_ALL
SELECT * FFD| po_releases_all WHEFE po_header_Id =;
Stage 2: Dnce PD Is receIved, data Is moved to respectIve recevIng tables and Inventory tables
FC7_SHÌP|ENT_HEA0EFS
select * from rcv_shIpment_headers where shIpment_header_Id In
(select shIpment_header_Id from rcv_shIpment_lIneswhere po_header_Id =);
FC7_SHÌP|ENT_LÌNES
select * from rcv_shIpment_lInes where po_header_Id =;
FC7_TFANSACTÌDNS
select * from rcv_transactIons where po_header_Id =;
FC7_ACCDUNTÌNC_E7ENTS
SELECT * FFD| rcv_AccountIng_Events WHEFE rcv_transactIon_Id ÌN
(select transactIon_Id from rcv_transactIonswhere po_header_Id =);
FC7_FECEÌ7ÌNC_SU8_LE0CEF
select * from rcv_receIvIng_sub_ledger where rcv_transactIon_Id ÌN
(select transactIon_Id from rcv_transactIons where po_header_Id =);
FC7_SU8_LE0CEF_0ETAÌLS
select * from rcv_sub_ledger_detaIlswhere rcv_transactIon_Id ÌN
(select transactIon_Id from rcv_transactIons where po_header_Id =);
|TL_|ATEFÌAL_TFANSACTÌDNS
select * from mtl_materIal_transactIons where transactIon_source_Id =;
|TL_TFANSACTÌDN_ACCDUNTS
select * from mtl_transactIon_accounts where transactIon_Id ÌN
(select transactIon_Id from mtl_materIal_transactIons where transactIon_source_Id =);
Stage J: ÌnvoIcIng detaIls
AP_ÌN7DÌCE_0ÌSTFÌ8UTÌDNS_ALL
select * from ap_InvoIce_dIstrIbutIons_all where po_dIstrIbutIon_Id In
( select po_dIstrIbutIon_Id from po_dIstrIbutIons_all where po_header_Id =);
AP_ÌN7DÌCES_ALL
select * from ap_InvoIces_all where InvoIce_Id In
(select InvoIce_Id from ap_InvoIce_dIstrIbutIons_all where po_dIstrIbutIon_Id In( select po_dIstrIbutIon_Id from po_dIstrIbutIons_all where po_header_
Stage 4 : |ostly there Is tIe up wIth Project related PD
PA_EXPEN0ÌTUFE_ÌTE|S_ALL
select * from pa_expendIture_Items_all peIa where peIa.orIg_transactIon_reference ÌN
(select to_char(transactIon_Id) from mtl_materIal_transactIons where transactIon_source_Id = );
Stage 5 : Ceneral Ledger
Prompt 17. CL_8C_PACKETS ..ThIs Is for encumbrances
SELECT * FFD| gl_bc_packets WHEFE reference2 ÌN ('');
CL_ÌNTEFFACE
select * from gl_Interface glI where user_je_source_name ='PurchasIng'
and gl_sl_lInk_table ='FSL' and reference21='PD' and exIsts
(select 1 from rcv_receIvIng_sub_ledger rrsl where glI.reference22 =FFSL.reference2 and CLÌ.reference2J =FFSL.referenceJAN0 CLÌ.reference24 =FFS
CL_Ì|PDFT_FEFEFENCES
SELECT *FFD| gl_Import_references CLÌF WHEFE reference_1='PD' AN0 gl_sl_lInk_table ='FSL'AN0 EXÌSTS
( SELECT 1 FFD| rcv_receIvIng_sub_ledger FFSLWHEFE CLÌF.reference_2 =FFSL.reference2AN0 CLÌF.reference_J =FFSL.referenceJ AN0 CLÌF.referenc
(select transactIon_Id from rcv_transactIons where po_header_Id =))
A singIe Query covering P2P Iife CycIe
SELECT
A.DFC_Ì0 ¨DFC Ì0¨,
E.7EN0DF_NA|E ¨7EN0DF NA|E¨,
UPPEF(E.7EN0DF_TYPE_LDDKUP_CD0E) ¨7EN0DF TYPE¨,
F.7EN0DF_SÌTE_CD0E ¨7EN0DF SÌTE¨,
F.A00FESS_LÌNE1 ¨A00FESS¨,
F.CÌTY ¨CÌTY¨,
F.CDUNTFY ¨CDUNTFY¨,
TD_CHAF(TFUNC(0.CFEATÌDN_0ATE)) ¨PD 0ATE¨,
0.SEC|ENT1 ¨PD NU|8EF¨,
0.TYPE_LDDKUP_CD0E ¨PD TYPE¨,
C.0UANTÌTY_DF0EFE0 ¨0TY DF0EFE0¨,
C.0UANTÌTY_CANCELLE0 ¨0TY CANCALLE0¨,
C.ÌTE|_0ESCFÌPTÌDN ¨ÌTE| 0ESCFÌPTÌDN¨,
C.UNÌT_PFÌCE ¨UNÌT PFÌCE¨,
(N7L(C.0UANTÌTY_DF0EFE0,0)·N7L(C.0UANTÌTY_CANCELLE0,0))*N7L(C.UNÌT_PFÌCE,0) ¨PD LIne Amount¨,
(SELECT
0ECD0E(PH.APPFD7E0_FLAC, 'Y', 'Approved')
FFD| PD.PD_HEA0EFS_ALL PH
WHEFE PH.PD_HEA0EF_Ì0 = 0.PD_HEA0EF_Ì0) ¨PD STATUS¨,
A.ÌN7DÌCE_TYPE_LDDKUP_CD0E ¨ÌN7DÌCE TYPE¨,
A.ÌN7DÌCE_A|DUNT ¨ÌN7DÌCE A|DUNT¨,
TD_CHAF(TFUNC(A.ÌN7DÌCE_0ATE)) ¨ÌN7DÌCE 0ATE¨,
A.ÌN7DÌCE_NU| ¨ÌN7DÌCE NU|8EF¨,
(SELECT
0ECD0E(X.|ATCH_STATUS_FLAC, 'A', 'Approved')
FFD| AP.AP_ÌN7DÌCE_0ÌSTFÌ8UTÌDNS_ALL X
WHEFE X.ÌN7DÌCE_0ÌSTFÌ8UTÌDN_Ì0 = 8.ÌN7DÌCE_0ÌSTFÌ8UTÌDN_Ì0)¨ÌnvoIce Approved:¨,
A.A|DUNT_PAÌ0,
H.A|DUNT,
Ì.CHECK_NU|8EF ¨CHE0UE NU|8EF¨,
TD_CHAF(TFUNC(Ì.CHECK_0ATE)) ¨PAY|ENT 0ATE¨
FFD| AP.AP_ÌN7DÌCES_ALL A,
AP.AP_ÌN7DÌCE_0ÌSTFÌ8UTÌDNS_ALL 8,
PD.PD_0ÌSTFÌ8UTÌDNS_ALL C,
PD.PD_HEA0EFS_ALL 0,
PD.PD_7EN0DFS E,
PD.PD_7EN0DF_SÌTES_ALL F,
PD.PD_LÌNES_ALL C,
AP.AP_ÌN7DÌCE_PAY|ENTS_ALL H,
AP.AP_CHECKS_ALL Ì
WHEFE A.ÌN7DÌCE_Ì0 = 8.ÌN7DÌCE_Ì0
AN0 8.PD_0ÌSTFÌ8UTÌDN_Ì0 = C. PD_0ÌSTFÌ8UTÌDN_Ì0 (+)
AN0 C.PD_HEA0EF_Ì0 = 0.PD_HEA0EF_Ì0 (+)
AN0 E.7EN0DF_Ì0 (+) = 0.7EN0DF_Ì0
AN0 F.7EN0DF_SÌTE_Ì0 (+) = 0.7EN0DF_SÌTE_Ì0
AN0 0.PD_HEA0EF_Ì0 = C.PD_HEA0EF_Ì0
AN0 C.PD_LÌNE_Ì0 = C.PD_LÌNE_Ì0
AN0 A.ÌN7DÌCE_Ì0 = H.ÌN7DÌCE_Ì0
AN0 H.CHECK_Ì0 = Ì.CHECK_Ì0
AN0 F.7EN0DF_SÌTE_Ì0 = Ì.7EN0DF_SÌTE_Ì0
AN0 C.PD_HEA0EF_Ì0 ÌS NDT NULL
AN0 A.PAY|ENT_STATUS_FLAC = 'Y'
AN0 0.TYPE_LDDKUP_CD0E != '8LANKET';
where job_id = 18069
Prompt 1. po_headers_all
select * from po_headers_all
where po_header_Id =EEpo_header_Id;
Prompt 2. po_lInes_all
select * from po_lInes_all
where po_header_Id =EEpo_header_Id;
Prompt J. po_lIne_locatIons_all
select * from po_lIne_locatIons_all
where po_header_Id =EEpo_header_Id;
Prompt 4. po_dIstrIbutIons_all
select * from po_dIstrIbutIons_all
where po_header_Id =EEpo_header_Id;
Prompt 5. po_releases_all
SELECT * FFD| po_releases_all
WHEFE po_header_Id =EEpo_header_Id;
/*·································································
SectIon : 8.
0ata from FecevIng tables and Inventory tables
···································································*/
Prompt 6. rcv_shIpment_headers
select * from rcv_shIpment_headers
where shIpment_header_Id In
(select shIpment_header_Id from rcv_shIpment_lInes
where po_header_Id =EEpo_header_Id );
Prompt 7. rcv_shIpment_lInes
select * from rcv_shIpment_lInes
where po_header_Id =EEpo_header_Id;
Prompt 8. rcv_transactIons
select * from rcv_transactIons
where po_header_Id =EEpo_header_Id;
Prompt 9. rcv_AccountIng_Events from 11I10 Dnwards
SELECT * FFD| rcv_AccountIng_Events
WHEFE rcv_transactIon_Id ÌN
(select transactIon_Id from rcv_transactIons
where po_header_Id =EEpo_header_Id);
Prompt 10. rcv_receIvIng_sub_ledger
select * from rcv_receIvIng_sub_ledger
where rcv_transactIon_Id In
(select transactIon_Id from rcv_transactIons
where po_header_Id =EEpo_header_Id);
Prompt 11. rcv_sub_ledger_detaIls
select * from rcv_sub_ledger_detaIls
where rcv_transactIon_Id In
(select transactIon_Id from rcv_transactIons
where po_header_Id =EEpo_header_Id);
Prompt 12. mtl_materIal_transactIons
select * from mtl_materIal_transactIons
where transactIon_source_Id = EEpo_header_Id;
Prompt 1J. mtl_transactIon_accounts
select * from mtl_transactIon_accounts
where transactIon_Id In
( select transactIon_Id from mtl_materIal_transactIons
where transactIon_source_Id = EEpo_header_Id );
/*·································································
SectIon : C.
ÌnvoIcIng detaIls.
Note : Pls provIde the detaIls of followIng querIes If InvoIcIng
data only If the Issue Is related to the calculatIon of
Accrual amount or Issue wIth the data In PDXXF70F,PDXPDFFA
(Any Accrual reports)
···································································*/
Prompt 14. ap_InvoIce_dIstrIbutIons_all
select * from ap_InvoIce_dIstrIbutIons_all
where po_dIstrIbutIon_Id In
( select po_dIstrIbutIon_Id from po_dIstrIbutIons_all
where po_header_Id =EEpo_header_Id );
Prompt 15. ap_InvoIces_all
select * from ap_InvoIces_all
where InvoIce_Id In
(select InvoIce_Id from ap_InvoIce_dIstrIbutIons_all
where po_dIstrIbutIon_Id In
( select po_dIstrIbutIon_Id from po_dIstrIbutIons_all
where po_header_Id =EEpo_header_Id ));
/*·································································
SectIon : 0.
Projects data
Note : Pls provIde detaIls If Issue Is related to the cost
transferred to projects for Ìnventory and receIvIng.
···································································*/
Prompt 16. pa_expendIture_Items_all
select *
from pa_expendIture_Items_all peIa
where peIa.orIg_transactIon_reference In
( select to_char(transactIon_Id) from mtl_materIal_transactIons
where transactIon_source_Id = EEpo_header_Id );
·· one more query requIred from FFSL to PA
/*·································································
SectIon : E.
Encumbrances 0ata
Note : Pls provIde detaIls If Issue Is related to the Encumbrance
Amount mIsmatch for the PD.
···································································*/
Prompt 17. gl_bc_packets
SELECT *
FFD| gl_bc_packets
WHEFE reference2 ÌN ('EEpo_header_Id');
/*·································································
SectIon : F.
CL data
Note : Pls furnIsh followIng detaIls only If Issue Is related
to the CL Transfer of receIvIng transactIons.
·································································*/
Prompt 18. CL_ÌNTEFFACE
SELECT *
FFD| CL_ÌNTEFFACE CLÌ
WHEFE user_je_source_name ='PurchasIng'
AN0 gl_sl_lInk_table ='FSL'
AN0 reference21='PD'
AN0 EXÌSTS
( SELECT 1
FFD| rcv_receIvIng_sub_ledger FFSL
WHEFE CLÌ.reference22 =FFSL.reference2
AN0 CLÌ.reference2J =FFSL.referenceJ
AN0 CLÌ.reference24 =FFSL.reference4
AN0 FFSL.rcv_transactIon_Id In
(select transactIon_Id from rcv_transactIons
where po_header_Id =EEpo_header_Id));
Prompt 19. gl_Import_references
SELECT *
FFD| gl_Import_references CLÌF
WHEFE reference_1='PD'
AN0 gl_sl_lInk_table ='FSL'
AN0 EXÌSTS
( SELECT 1
FFD| rcv_receIvIng_sub_ledger FFSL
WHEFE CLÌF.reference_2 =FFSL.reference2
AN0 CLÌF.reference_J =FFSL.referenceJ
AN0 CLÌF.reference_4 =FFSL.reference4
AN0 FFSL.rcv_transactIon_Id In
(select transactIon_Id from rcv_transactIons
where po_header_Id =EEpo_header_Id));
Status PopuIated TabIes CoIumn(status) VaIue 0escrIptIonltransactIons
Entered oe_order_headers_all open_flag Y 1 record created In header table
oe_order_lInes_all LInes for partIcular records
oe_prIce_adjustments When dIscount gets applIed
oe_order_prIce_attrIbs Ìf lIne has prIce attrIbutes then populated
oe_order_holds_all Ìf any hold applIed for order lIke credIt check etc.
ßooked oe_order_headers_all 8ooked_flag Y Drder booked.
wsh_delIvery_detaIls Feleased_status F Feady to release
No records In wsh_delIvery_assIgnments and
wsh_new_delIverIes
PIck
PeIeased wsh_delIvery_detaIls Feleased_status S
Feleased to Warehouse (LIne has been
released to Ìnventory for processIng)
wsh_pIckIng_batches After batch Is created for pIck release.
(Fully) mtl_reservatIons
ThIs Is only soft reservatIons.
No physIcal movement of stock
mtl_materIal_transactIo
ns_temp No records In mtl_materIal_transactIons
mtl_txn_request_headers
mtl_txn_request_lInes
(PartIal) wsh_delIvery_detaIls S Feleased to warehouse.
8 8ackordered
LIne faIled to be allocated In Ìnventory
wsh_new_delIverIes name If Auto·Create Is Yes then data populated.
wsh_delIvery_assIgnments delIverIes get assIgned
PIck
ConfIrmed wsh_delIvery_detaIls Feleased_status Y
Hard FeservatIons. PIcked the stock.
PhysIcal movement of stock
LIne has been pIcked and staged by Ìnventory
SubInventory to stagIng area. PackIng slIp.
ShIp
ConfIrmed wsh_delIvery_detaIls Feleased_status C
Y To C:ShIpped ;0elIvery Note get prInted
0elIvery assIgned to trIp stop
quantIty wIll be decreased from staged
mtl_materIal_transactIons Dn the shIp confIrm form, check ShIp all box
wsh_new_delIverIes C Ìf 0efer Ìnterface Is checked Ì.e Its deferred then
D| E Inventory not updated.
Ìf 0efer Ìnterface Is not checked.: ShIpped
oe_order_lInes_all ShIpped_quantIty get populated.
wsh_delIvery_legs 1 leg Is called as 1 trIp.
1 PIckup E drop up stop for each trIp.
147
oe_order_headers_all open_flag N Ìf all the lInes get shIpped then only flag N
AutoInvoIce wsh_delIvery_detaIls Feleased_status Ì Need to run workflow background process.
ra_Interface_lInes_all 0ata wIll be populated after wkfw process.
ra_customer_trx_all After runnIng AutoInvoIce |aster Program for
ra_customer_trx_lInes_all specIfIc batch transactIon tables get populated
0 Cancelled
WF scrIpts doc Id 18J64J.1
Query to find the transactions against this SaIes Order
select rcta.trx_number "Transaction"
, rctta.name "Trans Type"
, RCTA.CT_REFERENCE "Reference"
, rcta.CREATIJN_DATE "Created"
, fu.USER_NAME "Created By"
, fcp.user_concurrent_program_name "Created by CC Program"
, rcta.BATCH_ID
, rcta.REQUEST_ID
, rcta.INTERFACE_HEADER_CJNTEXT "Created From"
, rcta.CREATED_FRJM "CC/Form"
, rcta.PRINTING_JRIGINAL_DATE "Jrig Print Date"
from ra_customer_trx_all rcta
, fnd_concurrent_programs_vl fcp
, fnd_concurrent_programs_vl fcp1
, RA_CUST_TRX_TYPES_ALL rctta
, fnd_user fu
where
RCTA.CT_REFERENCE = '20001731' ( give order no)
and fcp.CJNCURRENT_PRJGRAM_ID (+) = rcta.PRJGRAM_ID
and fcp1.CJNCURRENT_PRJGRAM_NAME (+) = rcta.CREATED_FRJM
and rctta.CUST_TRX_TYPE_ID = rcta.CUST_TRX_TYPE_ID
and rctta.JRG_ID = rcta.JRG_ID
and fu.USER_ID = rcta.CREATED_BY
order by rcta.trx_number
select · from oe_order_holds_all where header_id = 755934
select · from apps.JE_HJLD_sources_all where hold_source_id in ( 179401 , 179402 , 179403 )
select · from JE_HJLD_definitions where hold_id in (1,1181,1201)
select · from oe_line_sets where line_id in ( 1163708 , 1162719)
FIndIng the Drder IIne reIease status
SELECT DECJDE(RELEASED_STATUS,'Y','PICKED','S','PICKED','B','PICKED','NJT PICKED') FRJM WSH
WHERE SJURCE_CJDE = 'JE' AND SJURCE_LINE_ID = &line_id
9078
ShIp to / 8Ill to (Drder Type) / PrIce LIst /
Ìtem(LIne Type)
After EnterIng / bookIng ·· Proces Drder APÌ wIll
be called · ThIs wIll take care of holds etc
After AwaItIng ShIppIng · 7IsIble 0emand Flag Is
set to Yes
SchedulIng wIll happen ···.1 Soft FeservatIon 2.
|TL 0emand record wIll be Inserted (ThIs Is
Input for PlannIng) ···J. 0ependIng on the ATP
rules It wIll gIve the Schedule ShIp 0ate
PIck Felease APÌ / PIck ConfIrm APÌ
|ove Drder (CreatIon · TransactIon)
Ìnterface TrIp Stop··Sales Drder Ìssue
TransactIon In |aterIal TransactIon and
reservatIon Is releIved

Duery 0etaIIs
select * from |TL_ÌNTEFCD|PANY_PAFA|ETEFS_7 where SHÌP_DFCANÌZATÌDN_NA|E lIke 'Austraº' Ìntercompany FelatIons
select * |TL_ÌNTEFCD|PANY_PAFA|ETEFS_7 Ìntercompany FelatIons
select max(order_number) from oe_order_headers_all where org_Id=912 Latest Drder
select * from oe_order_headers_all where org_Id=912 All In Dne Du
select * from org_organIzatIon_defInItIons All DU / ÌN7 Etc
select hr.busIness_group_Id,hr.DFCANÌZATÌDN_Ì0,hr.name,hr.LECAL_ENTÌTY_Ì0,
hr.SET_DF_8DDKS_Ì0,gl.CHAFT_DF_ACCDUNTS_Ì0
from gl_sets_of_books gl,hr_operatIng_unIts hr
where gl.set_of_books_Id=hr.set_of_books_Id ALL DU/LE/8C Etc
select * from wsh_delIvery_detaIls where organIzatIon_Id=4160 and serIal_number Is not null
select * from mtl_system_Items where Inventory_Item_Id=198
Select * from dba_vIews where vIew_name lIke '8CÌWSH_FC_A7AÌL_DNHAN0S_7' To fInd the S0l for the 7Iew
select * from oe_order_headers_all where order_number=75001141
select * from oe_order_lInes_all where header_Id= 6J54017
select * from wsh_delIvery_detaIls where source_header_Id= 6J54017
select * from wsh_new_delIverIes where delIvery_Id = 12041579
select · from RA_CUSTJMER_TRX_LINES_ALL where CUSTJMER_TRX_ID = 968746
Select * from ra_rules --- for accounting rule and invoicing rule definitions
select · from ra_cust_trx_types_all
select · from ra_customer_trx_all where ct_reference = '186205'
select * from vSdatabase
Discounts : select · from oe_price_adjustments where header_id = '758957'
To see the Inventory accountIng perIods : select · from org_acct_periods
select * from org_organIzatIon_defInItIons
Duery to fInd aII DU's ßC's and LE's : select * from hr_all_organIzatIon_unIts
user havIng whIch responsIbIIItIes ; select * from fnd_responsIbIlIty_vl , select * from apps.FN0_USEF_FESP_CFDUPS
Duery to fInd the WF actIvItIes as In front end
select executIon_tIme,
to_char(Ias.begIn_date,'00·|DN·FF HH24:|Ì:SS') begIn_date,
ap.dIsplay_name11'/'11ac.dIsplay_name ActIvIty,
Ias.actIvIty_status Status,
Ias.actIvIty_result_code Fesult,
Ias.assIgned_user ass_User
from wf_Item_actIvIty_statuses Ias,
wf_process_actIvItIes pa,
wf_actIvItIes_vl ac,
wf_actIvItIes_vl ap,
wf_Items I
where Ias.Item_type = 'PDAPPF7'
and Ias.Item_key = '120298·264181'
and Ias.process_actIvIty = pa.Instance_Id
and pa.actIvIty_name = ac.name
and pa.actIvIty_Item_type = ac.Item_type
and pa.process_name = ap.name
and pa.process_Item_type = ap.Item_type
and pa.process_versIon = ap.versIon
and I.Item_type = 'PDAPPF7'
and I.Item_key = Ias.Item_key
and I.begIn_date ·= ac.begIn_date
and I.begIn_date · nvl(ac.end_date, I.begIn_date+1)
unIon all
select executIon_tIme,
to_char(Ias.begIn_date,'00·|DN·FF HH24:|Ì:SS') begIn_date,
ap.dIsplay_name11'/'11ac.dIsplay_name ActIvIty,
Ias.actIvIty_status Status,
Ias.actIvIty_result_code Fesult,
Ias.assIgned_user ass_User
from wf_Item_actIvIty_statuses_h Ias,
wf_process_actIvItIes pa,
wf_actIvItIes_vl ac,
wf_actIvItIes_vl ap,
wf_Items I
where Ias.Item_type = 'PDAPPF7'
and Ias.Item_key = '120298·264181'
and Ias.process_actIvIty = pa.Instance_Id
and pa.actIvIty_name = ac.name
and pa.actIvIty_Item_type = ac.Item_type
and pa.process_name = ap.name
and pa.process_Item_type = ap.Item_type
and pa.process_versIon = ap.versIon
and I.Item_type = 'PDAPPF7'
and I.Item_key = Ias.Item_key
and I.begIn_date ·= ac.begIn_date
and I.begIn_date · nvl(ac.end_date, I.begIn_date+1)
order by 2,1
Duery showIng the Error In WF
select ac.display_name Activity,
ias.activity_result_code Result,
ias.error_name ERRJR_NAME,
ias.error_message ERRJR_MESSAGE,
ias.error_stack ERRJR_STACK
from wf_item_activity_statuses ias,
wf_process_activities pa,
wf_activities_vl ac,
wf_activities_vl ap,
wf_items i
where ias.item_type = 'JEJH'
and ias.item_key = '730077'
and ias.activity_status = 'ERRJR'
and ias.process_activity = pa.instance_id
and pa.activity_name = ac.name
and pa.activity_item_type = ac.item_type
and pa.process_name = ap.name
and pa.process_item_type = ap.item_type
and pa.process_version = ap.version
and i.item_type = 'JEJH'
and i.item_key = ias.item_key
and i.begin_date = ac.begin_date
and i.begin_date < nvl(ac.end_date, i.begin_date+1)
order by ias.execution_time
select · from wf_item_attribute_values where item_key = '771627'
Query to find mapping between segment name and the value set -
SELECT fifsv.segment_name, fifsv.segment_num, fifsv.application_column_name, fifsv.flex_value_set_id, fif.application_table_na
--------------------------------
We can get the defined values by using flex_value_set_id for specific segments as-
select * from fnd_flex_values where flex_value_set_id = 1005635
To Check Dpen Inventory PerIods
SELECT summary.organIzatIon_Id organIzatIon_Id,
ood.organIzatIon_code organIzatIon_code,
ood.organIzatIon_name organIzatIon_name,
perIods.perIod_name perIod_name,
perIods.DPEN_FLAC ,perIods.PEFÌD0_CLDSE_0ATE ,
perIods.perIod_year perIod_year,
perIods.perIod_start_date perIod_start_date,
perIods.schedule_close_date schedule_close_date,
summary.secondary_Inventory sub_Inv, summary.Inventory_value 7ALUE
FFD| mtl_perIod_summary summary,
org_acct_perIods perIods,
org_organIzatIon_defInItIons ood
WHEFE summary.organIzatIon_Id = perIods.organIzatIon_Id
AN0 summary.organIzatIon_Id = ood.organIzatIon_Id
AN0 summary.acct_perIod_Id = perIods.acct_perIod_Id
AN0 perIods.perIod_close_date ÌS NDT NULL
AN0 summary.Inventory_type = 1
SYSADMIN & HRMS
Query to find the responsibiIities of a user
select RESPONSÌBÌLÌTY_NAME from apps.fnd_user_resp_groups_direct ur,fnd_responsibility_vl rv
where ur.RESPONSÌBÌLÌTY_ÌD=rv.RESPONSÌBÌLÌTY_ÌD and ur.user_id=19228
Query to find the cost center assigned to an empIoyee
SELECT * FROM PAY_COST_ALLOCATÌONS_F WHERE assignment_id = 63801
2. SELECT * FROM PAY_COST_ALLOCATÌON_KEYFLEX WHERE COST_ALLOCATÌON_KEYFLEX_ÌD = 150
Patches & Bugs
SELECT · FRJM ad_bugs
SELECT · FRJM ad_applied_patches
Duery to fInd when a user has Iogged In and Iogged out : select * from fnd_logIns
Query to find the detaiIs of Concurrent Program
select * from fnd_concurrent_requests where request_Id = 7755802
select * from fnd_concurrent_programs_tl where concurrent_program_Id = 20428
Emp Supervisor Heirarchy
SELECT f.person_id person_id, f.effective_start_date,
f.effective_end_date,f.employee_number, f.full_name employee_name, f.email_address,
f2.full_name manager_name1, f3.full_name manager_name2,
f4.full_name manager_name3, f5.full_name manager_name4,
f6.full_name manager_name5,
f7.full_name manager_name6
FROM per_all_people_f f,
per_assignments_f pera,
per_all_people_f f2,
per_all_people_f f3,
per_assignments_f pera1,
per_all_people_f f4,
per_assignments_f pera2,
per_all_people_f f5,
per_assignments_f pera3,
per_all_people_f f6,
per_assignments_f pera4,
per_all_people_f f7,
per_assignments_f pera5,
per_all_people_f f8,
per_assignments_f pera6
WHERE 1 = 1
AND NVL (pera.supervisor_id, -99) = NVL (f2.person_id(+), -99)
AND NVL (f.person_id, 1) = NVL (pera.person_id(+), 1)
and f.person_id = &person_id -- Pass person_id
AND NVL (pera.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f2.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f2.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f3.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f3.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f2.person_id, 1) = NVL (pera1.person_id(+), 1)
AND NVL (pera1.supervisor_id, -99) = NVL (f3.person_id(+), -99)
AND NVL (pera1.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera1.effective_end_date, SYSDATE + 1) > SYSDATE
------cond for lvl 3
AND NVL (f4.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f4.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f3.person_id, 1) = NVL (pera2.person_id(+), 1)
AND NVL (pera2.supervisor_id, -99) = NVL (f4.person_id(+), -99)
AND NVL (pera2.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera2.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f3.person_id, 1) = NVL (pera2.person_id, 1)
AND NVL (pera2.supervisor_id, -99) = NVL (f4.person_id, -99)
------cond for lvl 4
AND NVL (f5.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f5.effective_end_date, SYSDATE + 1) > SYSDATE
AND f4.person_id = pera3.person_id(+)
AND NVL (pera3.supervisor_id, -99) = NVL (f5.person_id(+), -99)
AND NVL (pera3.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera3.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f4.person_id, -1) = NVL (pera3.person_id, -1)
!,0 1
SYSADMIN & HRMS
AND NVL (pera3.supervisor_id, -99) = NVL (f5.person_id, -99)
------cond for lvl 5
AND NVL (f6.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f6.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f5.person_id, 1) = NVL (pera4.person_id(+), 1)
AND NVL (pera4.supervisor_id, -99) = NVL (f6.person_id(+), -99)
AND NVL (pera4.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera4.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f5.person_id, 1) = NVL (pera4.person_id, 1)
AND NVL (pera4.supervisor_id, -99) = NVL (f6.person_id, -99)
-----cond for lvl VÌ
AND NVL (f7.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f7.effective_end_date, SYSDATE + 1) > SYSDATE
AND f6.person_id = pera5.person_id(+)
AND NVL (pera5.supervisor_id, -99) = NVL (f7.person_id(+), -99)
AND NVL (pera5.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera5.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f6.person_id, 1) = NVL (pera5.person_id, 1)
AND NVL (pera5.supervisor_id, -99) = NVL (f7.person_id, -99)
-----cond for lvl VÌÌ
AND NVL (f8.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (f8.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f7.person_id, -99) = NVL (pera6.person_id(+), -99)
AND NVL (pera6.supervisor_id, -99) = NVL (f8.person_id(+), -99)
AND NVL (pera6.effective_start_date, SYSDATE) <= SYSDATE
AND NVL (pera6.effective_end_date, SYSDATE + 1) > SYSDATE
AND NVL (f7.person_id, 1) = NVL (pera6.person_id, 1)
AND NVL (pera6.supervisor_id, -99) = NVL (f8.person_id, -99)
#esponsibiIities of a user
SELECT
fu.user_name
,fu.email_address
,fu.end_date fu_end_date
,papf.employee_number
,papf.full_name employee_name
,pbg.NAME business_group
,fa.application_id
,fa.application_short_name
,frt.responsibility_id
,frt.responsibility_name
,furgd.start_date fu_resp_start_date
,furgd.end_date fu_resp_end_date
FROM
fnd_application fa
,fnd_responsibility_tl frt
,fnd_responsibility fr
,apps.fnd_user_resp_groups_direct furgd
,fnd_user fu
,per_all_assignments_f paaf
,per_all_people_f papf
,gl_code_combinations gcc
,per_business_groups pbg
WHERE
1=1
and fa.application_id = frt.application_id
AND frt.responsibility_id = fr.responsibility_id
--AND resp.VERSÌON = 'W' -- Self Service Web applications Value
--and frt.RESPONSÌBÌLÌTY_NAME like '%NUAN Japan%Setu%'
AND NVL (fr.end_date, SYSDATE + 1) > TRUNC (SYSDATE)
AND fr.responsibility_id = furgd.responsibility_id
AND NVL (furgd.end_date, SYSDATE + 1) > TRUNC (SYSDATE)
AND furgd.user_id = fu.user_id
AND NVL (fu.end_date, SYSDATE + 1) > TRUNC (SYSDATE)
AND fu.user_name like '%ASHONTE_GABBART%'
AND fu.employee_id = papf.person_id
AND TRUNC (SYSDATE) BETWEEN TRUNC (papf.effective_start_date)
AND TRUNC (NVL (papf.effective_end_date, SYSDATE))
AND papf.business_group_id = pbg.business_group_id
and trunc(sysdate) between paaf.EFFECTÌVE_START_DATE and paaf.EFFECTÌVE_END_DATE
and papf.PERSON_ÌD=paaf.PERSON_ÌD
and trunc(sysdate) between papf.EFFECTÌVE_START_DATE and papf.EFFECTÌVE_END_DATE
and gcc.code_combination_id=paaf.DEFAULT_CODE_COMB_ÌD
--and gcc.segment1 in ('86')
and paaf.ASSÌGNMENT_NUMBER is not null
Max Iength of vaIues in a coIumn
select max(length(tax_code)) from oe_order_lines_all
Below is the query to get audit details like Last Logon Time and Last Logout Time of Responsibilities for particular User.

!,0 2
SYSADMIN & HRMS
"uery1

SELECT fl.user_id, fu.user_name, frt.responsibility_name,
MAX (flr.start_time) "Last Logon Time At Resp",
MAX (flr.end_time) "Last Logout Time At Resp",
fu.last_logon_date "Last Logon Time At Application"
FROM fnd_login_responsibilities flr,
fnd_responsibility_tl frt,
fnd_logins fl,
fnd_user fu
WHERE 1 = 1
--AND frt.responsibility_name LÌKE 'NUAN US Ìnventory Ìnquiry'
AND fu.user_name LÌKE 'AAOFFSHORE'
AND frt.responsibility_id = flr.responsibility_id
AND flr.login_id = fl.login_id
AND fl.user_id = fu.user_id
GROUP BY fl.user_id, fu.user_name, fu.last_logon_date,
frt.responsibility_name
ORDER BY 5 DESC
Below is the query to get audit details like Unsuccessful Login Time for particular User in the Oracle Applications

"uery2

SELECT fu.user_id, fu.user_name, fl.attempt_time
FROM fnd_unsuccessful_logins fl, fnd_user fu
WHERE fl.user_id = fu.user_id
ORDER BY fu.user_id DESC
!,0 3
OM Queries
Query to find the Holds on an Order Header
SELECT oh.header_id hdr_id, oh.line_id line, hd.hold_id, hd.NAME hold_name,
hd.item_type, hd.activity_name activity, oh.creation_date held_date,
oe_holds_pvt.user_name (oh.created_by) held_by, hs.hold_until_date,
DECJDE (hs.hold_entity_code,
'S', 'Ship To',
'B', 'Bill To',
'I', 'Item',
'W', 'Warehouse',
'J', 'Jrder',
'C', 'Customer',
hs.hold_entity_code
) entity_code,
hs.hold_entity_id,
DECJDE (hs.hold_entity_code2,
'S', 'Ship To',
'B', 'Bill To',
'I', 'Item',
'W', 'Warehouse',
'J', 'Jrder',
'C', 'Customer',
hs.hold_entity_code2
) entity_code2,
hs.hold_entity_id2, oh.released_flag
FRJM oe_order_holds_all oh, oe_hold_sources_all hs, oe_hold_definitions hd
WHERE oh.hold_source_id = hs.hold_source_id
AND oh.hold_source_id = hs.hold_source_id
AND hd.hold_id = hs.hold_id
AND oh.header_id = &order_header_id --pass header_id
Business Purpose: Develop a query which lists the orders which are on hold from the last (no of days to be entered by the user) %he query should list all the
Fields:
Order Date
Order Number
Order %ype (Name)
Order tem
Date of Hold
Reason of Hold
Hold by
Days of Hold
ANSWER:
SELEC% ohordered_date, ohorder_number, ohorder_category_code "Order %ype",
olordered_item, holdscreation_date "Date of Hold",
hdefdescription "Reason of Hold",
hdefcreated_by "Hold by",
months_between(SYSDA%E,holdscreation_date) "Days of hold"
FROM oe_order_lines_all ol,
oe_order_headers_all oh,
oe_order_holds_all holds,
oe_hold_definitions hdef
WHERE olheader_id = ohheader_id
AND ohheader_id = holdsheader_id
AND hdefcreated_by = holdscreated_by;
Business Purpose: Develop a query to list all the un booked sales orders.(show relevant fields)
ANSWER:
SELEC% ohordered_date,ohflow_status_code "Order Status",
ohorder_type_id, ohorder_category_code,
partyparty_name,ohcreated_by,ohrequest_date,
ohcreation_date,ohbooked_date,ohorder_firmed_date,
ohtransactional_curr_code,ohpayment_term_id,
wddsource_header_type_id,wddsource_header_type_name,
wddinventory_item_id,wdditem_description,wddrequested_quantity,
wddrequested_quantity_UOM,wddreleased_status,
cacust_account_id "CustomerNumber",partyparty_name "Customer Name"
FROM oe_order_headers_all oh,
wsh_delivery_details wdd,
hz_parties party,
hz_cust_accounts_all ca
WHERE wddsource_header_number=ohorder_number
AND ohsold_to_org_id=cacust_account_id
!,e 1
OM Queries
AND partyparty_id=caparty_id
AND ohflow_status_code like 'EN%ERED';
Business Purpose: List all the Orders which are Backordered

Fields:
Order Number
Customer Number
Customer Name
Order %ype (Name)
Status
Date of Order
tem Number
Description
ANSWER:
SELEC% wddsource_header_number "Order Number",
partyparty_name "Customer Name",
cacust_account_id "CustomerNumber",
wddsource_header_type_name "Order %ype",
wddreleased_status "Status",
ohordered_date,
ohrequest_date,
ohcreation_date,
wddinventory_item_id "tem Number",
wdditem_description
FROM oe_order_headers_all oh
JON hz_cust_accounts_all ca
ON ohsold_to_org_id = cacust_account_id
JON hz_parties party
ON partyparty_id=caparty_id
JON wsh_delivery_details wdd
ON wddsource_header_number=ohorder_number
WHERE wddreleased_status='B';
' Business Purpose: Develop a query to list all the orders which are ready for shipping

Fields:
Sales Order Number
Sales Order Date
Customer Name
Pick Slip Number
Order Status
Sub inventory
Move Order Number
ANSWER:
SELEC% ohheader_id "Sales Order Number",
ohordered_date,
ohsold_to_org_id,
partyparty_name "Customer Name",
mtllpick_slip_number,
wddsubinventory,
olflow_status_code,
wddsubinventory,
mtlhrequest_number move_order_num
FROM oe_order_headers_all oh,
oe_order_lines_all ol,
wsh_delivery_details wdd,
hz_cust_accounts_all ca,
hz_parties party,
mtl_txn_request_lines mtll,
mtl_txn_request_headers mtlh
WHERE ohheader_id = olheader_id
AND wddorg_id = ohorg_id
AND ohsold_to_org_id = cacust_account_id
AND partyparty_id=caparty_id
AND wddmove_order_line_id =mtllline_id
AND mtllheader_id = mtlhheader_id
AND olflow_status_code='AWA%NG_SHPPNG';
select · from oe_order_holds_all where header_id = 755934
select · from apps.JE_HJLD_sources_all where hold_source_id in ( 179401 , 179402 , 179403 )
select · from JE_HJLD_definitions where hold_id in (1,1181,1201)
!,e 2
OM Queries
select · from oe_line_sets where line_id in ( 1163708 , 1162719)
Select · from JE_HJLD_AUTHJRIZATIJNS-- To check what responsibilites are authorized to apply and release holds
select · from oe_sets where header_id =
To restrict o/p to one org
HOLD Authorizations
select b.responsibility_name , a.responsibility_id , a.START_DATE_ACTIVE , a.END_DATE_ACTIVE, a.authorized_action_co
c.hold_id , c.DESCRIPTIJN
from oe_hold_authorizations a , fnd_responsibility_tl b , oe_hold_definitions c
where a.responsibility_id = b.responsibility_id
and c.hold_id = a.hold_id
and b.responsibility_name like 'NUAN%US%MLB%Jrder%Manager'
"uery to check error in chiId WF
SELEC% iitem_key, iitem_type
FROM wf_items i
WHERE iitem_type = 'WFERROR' ÷'OMERROR'
AND iparent_item_type = 'OEOH'
AND iparent_item_key = 859384 ÷header_id
$ets on Order
SELECT JLS.LINE_ID, l.flow_status_code , JLS.SET_ID , JST.SET_NAME , JST.SET_TYPE
FRJM JE_LINE_SETS JLS, JE_SETS JST, oe_order_lines_all l
WHERE JLS.LINE_ID = l.line_id
AND JLS.SET_ID = JST.SET_ID
--AND OST.SET_TYPE = 'FULFILLMENT_SET'
and l.header_id = 1005745
order by ols.set_id, ols.line_id;
!,e 3
OM Queries
!,e 4
OM Queries
!,e 5
OM Queries
.3,20
!,e 6
Metalink Imp Doc ID's
Diagnostic Scripts
ORDER MANAGEMENT - DÌAGNOSTÌCS LÌBRARY Doc ÌD: 741642.1
Dh WF scrIpts doc Id 18J64J.1
ow to Diagnose Purchasing Document Approval Routing Doc ÌD: 603232.1
Reset a PO To Ìncomplete/Requires Reapproval For Ìsolated Cases : 390023.1
Manufacturing Transaction Diagnostics - FUNCTÌONAL USER SQL ÌNVESTÌGATÌON and REPAÌR
Doc ÌD: 801794.1 ( Ìmp SQL queries and scripts for checking period end process etc.. )
Procurement WF 374428.1
Oracle Order Management Suite White Papers Doc id 113492.1
Serial Number FAQ Doc ÌD: 417875.1
nternaI SaIes Order CycIe n Order Management Doc ÌD: 744481.1
Setup nstructions For nternaI SaIes Orders Across Operating Units Doc ÌD: 403786.1
What Are The Basic Steps Of The Purchasing Receipt AccruaI Period-End Process? Doc ÌD: 467584.1
Brief Overview of Receipt Accounting Doc ÌD: 563100.1
FAQ on Period End AccruaIs and Uninvoiced Receipt Report Doc ÌD: 453579.1
ORDER MANAGEMENT SUTE - DATA F SCRPT PATCH LBRARY Doc ÌD: 398822.1
Tom's Top nventory FAQ Notes 2008 Doc ÌD: 605044.1
Note 568012.1 - FAQ: Ìnventory Standard Datafixes
How To Check Onhand / SeriaI Number Setup? Doc ÌD: 330284.1
AR Transaction Workbench FAQ 10.7 & 11.5 Doc ÌD: 220026.1
FAQ: nventory Standard Datafixes Doc ÌD: 568012.1
https://support.oracIe.com/CSP/main/articIe?cmd=show&id=113492.1&type=NOT OM Documents
Also check if the user is setup for Category or Ìtem-Source #0,28 . This restricts the items available for a user to find. For addit
SeIf service tooIkit: iProcurement [D 131595.1]
iProcurement Setup 11i: OracIe nternet Procurement FunctionaI Setup [D 134168.1]
http://kutuboracle.blogspot.com/2009/12/how-to-diagnose-purchasing-document.html
How To Diagnose A ProbIem n The tem CataIog [D 382592.1]
!age 1
Metalink Imp Doc ID's
Note 332414.1 about Realm useage, and Note 109497.1 for Ìtem Frequently Asked Questions.
!age 2
$.7598
Script to re-inserted record into interface
/*
* Please run the script on TEST instance first, if satisfied then run on PRODUCTÌON Ìnstance.
* Oracle Corp is NOT responsible if directly run on PRODUCTÌON Ìnstance without running on TEST instance.
* This script is NOT a generic script, Ìt is very scpecific for recommended/Problematic Sales Order.
*/
SET SERVEROUTPUT ON SÌZE 100000;
SET LÌNESÌZE 175
SET VERÌFY OFF
DECLARE
L_LÌNE_ÌD NUMBER;
L_FÌLE_VAL VARCHAR2(1000);
L_RESULT_OUT VARCHAR2(90);
L_RETURN_STATUS VARCHAR2(300);
ERR_MSG VARCHAR2(1000);
L_ORG NUMBER;
L_HEADER_ÌD NUMBER;
L_COUNT NUMBER;
l_counter NUMBER;
x_msg_count number;
x_msg_data Varchar2(2000);
x_msg_index number;


CURSOR cur_rec ÌS
select line_id
from oe_order_lines_all
where line_id in ( '1168355' , '1168356' );


BEGÌN
OE_DEBUG_PUB.DEBUG_ON;
OE_DEBUG_PUB.ÌNÌTÌALÌZE;
L_FÌLE_VAL := OE_DEBUG_PUB.SET_DEBUG_MODE('FÌLE');
OE_DEBUG_PUB.SETDEBUGLEVEL(5);
-- DBMS_OUTPUT.PUT_LÌNE('.');
DBMS_OUTPUT.PUT_LÌNE(' .... Log File Name and Location :- '||OE_DEBUG_PUB.G_DÌR||'/'||OE_DEBUG_PUB.G_FÌLE);
-- DBMS_OUTPUT.PUT_LÌNE('.');
OPEN cur_rec;

LOOP

FETCH cur_rec ÌNTO l_line_id;

EXÌT WHEN cur_rec%NOTFOUND;
SELECT count(*) into l_counter from RA_CUSTOMER_TRX_LÌNES_ALL
where line_type = 'LÌNE'
and interface_line_context = 'ORDER ENTRY'
and interface_line_attribute6 = l_line_id;
ÌF(l_counter = 0) THEN
SELECT count(*) into l_counter from RA_ÌNTERFACE_LÌNES_ALL
where line_type = 'LÌNE'
and interface_line_context = 'ORDER ENTRY'
and interface_line_attribute6 = l_line_id;
END ÌF;

ÌF(l_counter = 0) THEN
dbms_output.put_line('Putting Line into Ìnterface Table: ' || l_line_id);
SELECT L.ORG_ÌD, HEADER_ÌD ÌNTO L_ORG, L_HEADER_ÌD FROM OE_ORDER_LÌNES_ALL L WHERE L.LÌNE_ÌD = L_LÌNE_ÌD;
--OE_DEBUG_PUB.ADD(' ramising: l_org at line level = ' || L_ORG);
begin
-- DBMS_OUTPUT.PUT_LÌNE(' executing fnd_client_info.set_org_context().... ');
OE_DEBUG_PUB.ADD('ramising:- executing fnd_client_info.set_org_context().... ');
FND_CLÌENT_ÌNFO.SET_ORG_CONTEXT(L_ORG);
exception
when others then
-- DBMS_OUTPUT.PUT_LÌNE(' Errors in executing fnd_client_info.set_org_context().... '|| SQLERRM );
OE_DEBUG_PUB.ADD('ramising:- Errors in executing fnd_client_info.set_org_context().... '|| SQLERRM );
null;
end;

begin
-- DBMS_OUTPUT.PUT_LÌNE(' executing MO_GLOBAL.set_policy_context().... ');
OE_DEBUG_PUB.ADD('ramising:- executing MO_GLOBAL.set_policy_context().... ');
MO_GLOBAL.set_policy_context('S', L_ORG);
exception
!,0
$.7598
when others then
-- DBMS_OUTPUT.PUT_LÌNE(' Errors in executing MO_GLOBAL.set_policy_context().... '|| SQLERRM );
OE_DEBUG_PUB.ADD('ramising:- Errors in executing MO_GLOBAL.set_policy_context().... '|| SQLERRM );
null;
end;

UPDATE OE_ORDER_LÌNES_ALL
SET ÌNVOÌCED_QUANTÌTY = 0, ÌNVOÌCE_ÌNTERFACE_STATUS_CODE = NULL, OPEN_FLAG = 'Y' , FLOW_STATUS_CODE = NULL, LAST_
WHERE LÌNE_ÌD = L_LÌNE_ÌD;
-- COMMÌT;
UPDATE OE_PRÌCE_ADJUSTMENTS
SET ÌNVOÌCED_FLAG='N'
WHERE LÌNE_ÌD = L_LÌNE_ÌD
AND ÌNVOÌCED_FLAG='Y';
/*
DELETE FROM RA_ÌNTERFACE_LÌNES_ALL
WHERE ÌNTERFACE_LÌNE_ATTRÌBUTE1= ( select to_char(order_number) from oe_order_headers_all where header_id = L_HEADER_ÌD );
*/
DELETE FROM RA_ÌNTERFACE_LÌNES_ALL
WHERE ÌNTERFACE_LÌNE_ATTRÌBUTE6 = to_char(L_LÌNE_ÌD)
and ÌNTERFACE_LÌNE_CONTEXT = 'ORDER ENTRY'
and sales_order_line ÌS NOT NULL ;
DELETE FROM RA_ÌNTERFACE_SALESCREDÌTS_ALL
WHERE ÌNTERFACE_LÌNE_ATTRÌBUTE6=to_char(L_LÌNE_ÌD);
OE_ÌNVOÌCE_PUB.ÌNTERFACE_LÌNE(L_LÌNE_ÌD,'OEOL',L_RESULT_OUT, L_RETURN_STATUS);
OE_DEBUG_PUB.ADD('ramising:- after calling interface_line() L_RESULT_OUT: '||L_RESULT_OUT||' L_RETURN_STATUS: '|| L_RETURN

UPDATE OE_ORDER_LÌNES_ALL
SET FLOW_STATUS_CODE = 'CLOSED',OPEN_FLAG='N'
WHERE LÌNE_ÌD = L_LÌNE_ÌD;
OE_DEBUG_PUB.ADD(' ramising: updated oe_order_lines_all table .... ');
SELECT NVL(COUNT(*),0) ÌNTO L_COUNT FROM RA_ÌNTERFACE_LÌNES_ALL
WHERE ÌNTERFACE_LÌNE_ATTRÌBUTE6 = L_LÌNE_ÌD
and ÌNTERFACE_LÌNE_CONTEXT = 'ORDER ENTRY'
and sales_order_line ÌS NOT NULL ;
OE_DEBUG_PUB.ADD('ramising: count() from ra_i/face table ... ' || L_COUNT);
ÌF L_COUNT > 0 THEN
-- DBMS_OUTPUT.PUT_LÌNE(' Pls perform COMMÌT.... ');
-- DBMS_OUTPUT.PUT_LÌNE(' Pls run the Auto Ìnvoice Concurrent Program.... ');
OE_DEBUG_PUB.ADD('ramising:- Line Successfully sent to AR interface tables.');
ELSE
-- DBMS_OUTPUT.PUT_LÌNE(' Pls perform ROLLBACK .... ');
-- DBMS_OUTPUT.PUT_LÌNE('.');
x_msg_count := OE_MSG_PUB.Count_Msg;
dbms_output.put_line(' no. of OE messages logged are :'|| x_msg_count);
oe_debug_pub.add(' ramising: no. of OE messages logged are :'||x_msg_count);
if x_msg_count > 0 then
for k in 1 .. x_msg_count loop
x_msg_data := oe_msg_pub.get( p_msg_index => k, p_encoded => 'F');
oe_debug_pub.add(substr(x_msg_data,1,255));
oe_debug_pub.add(substr(x_msg_data,255,510));
oe_debug_pub.add(substr(x_msg_data,510,length(x_msg_data)));
dbms_output.put_line(' Error msg from OE Stack: ' ||substr(x_msg_data,1,200));
end loop;
end if;
-- rollback;
-- DBMS_OUTPUT.PUT_LÌNE('.');
-- DBMS_OUTPUT.PUT_LÌNE(' Pls check the debug file for this line_id ( '|| L_LÌNE_ÌD ||' ) ... ');
OE_DEBUG_PUB.ADD('ramising:- Pls check the debug file for this line_id ( '|| L_LÌNE_ÌD ||' ) ... ');

END ÌF;
-- DBMS_OUTPUT.PUT_LÌNE('.');
ELSE
dbms_out
END ÌF;
END LOOP;

CLOSE cur_rec;
EXCEPTÌON
WHEN OTHERS THEN
oe_debug_pub.add(' ramising: in exception block.... ');
x_msg_count := OE_MSG_PUB.Count_Msg;
!,0
$.7598
-- dbms_output.put_line(' no. of OE messages logged are :'|| x_msg_count);
oe_debug_pub.add(' ramising: no. of OE messages logged are :'||x_msg_count);
if x_msg_count > 0 then
for k in 1 .. x_msg_count loop
x_msg_data := oe_msg_pub.get( p_msg_index => k, p_encoded => 'F');
oe_debug_pub.add(substr(x_msg_data,1,255));
oe_debug_pub.add(substr(x_msg_data,255,510));
oe_debug_pub.add(substr(x_msg_data,510,length(x_msg_data)));
-- dbms_output.put_line(' Getting Error msg Stack: ' ||substr(x_msg_data,1,200));
end loop;
end if;
ERR_MSG := SQLERRM;
-- DBMS_OUTPUT.PUT_LÌNE('.');
OE_DEBUG_PUB.ADD('ERROR: Pls Rollback As Following Error Ocurred:- ');
-- DBMS_OUTPUT.PUT_LÌNE('. ');
DBMS_OUTPUT.PUT_LÌNE('. '||SQLERRM);
-- DBMS_OUTPUT.PUT_LÌNE('. ');
OE_DEBUG_PUB.ADD(ERR_MSG);
end;
/
SET SERVEROUTPUT OFF;
PROMPT =============================================================
PROMPT Do COMMÌT; if no error reported else do ROLLBACK;
PROMPT =============================================================
!,0
$.7598
!,0
$.7598
!,0
$
Instance # of an Order
select * from csi_item_instances
where last_oe_order_line_id in (
select line_id
from oe_order_lines_all ool,oe_order_headers_all ooh
where ooh.order_number='71038447'
and ooh.header_id=ool.header_id)
select * from oks_k_order_details where ORDER_LÌNE_ÌD1 = 1195914
select * from okc_k_headers_b where id = '294500' -- enter csr_id
!,0
"8
FAQ: Entering Purchase Orders Doc ÌD: 216824.1
FAQ: PO ControI Actions Doc ÌD: 225217.1
What Are The Basic Steps Of The Purchasing Receipt AccruaI Period-End Process? Doc ÌD: 467584.1
FAQ: Enter Receipts and Receiving Transactions Doc ÌD: 209995.1
What Are the Receiving DefauIting RuIes and Where Are they Set? Doc ÌD: 567980.1
FAQ - Receiving Doc ÌD: 135385.1
Purchase Order Matching FrequentIy Asked Questions (FAQ's) Doc ÌD: 213480.1
TCA Parties FAQ Doc ÌD: 220383.1 Type: FAQ
Customer FAQ 11i Doc ÌD: 219938.1
How To Match An Invoice To A Receipt Doc ÌD: 204312.1
!,0
PO API
Note: 215276.1 - What API wiII CanceI an Existing Standard Purchase Order
How to use the PO CanceI API - PO_Document_ControI_PUB [ID 833925.1]
Page 1
Indload
http://oracle.anilpassi.com/oracle-fndload-script-examples.html
Page 1
Conversions
http://erpschools.com/Apps/oracle-applications/articles/General/Ìnterfaces-and-Conversions-in-Oracle-Applications/index.aspx
Page 1

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close