Escolar Documentos
Profissional Documentos
Cultura Documentos
Inv Po Om
Items Po Orders
mtl_system_items_b po_headers_all oe_order_headers_all
mtl_item_revisions po_lines_all oe_transaction_types_all
Item Categories po_line_locations_all OE_ORDER_LINES_HISTORY
mtl_categories_b PO_HEADERS_ARCHIVE and PO_LINES_ARCHIVE (PO revisions) select * from oe_sets where header_id =
mtl_category_sets_b po_distributions_all oe_order_lines_all
mtl_item_categories Buyers Agreements
Item Costs po_agents oe_agreements_b
cst_item_costs Document and Line Types Order Sources
cst_cost_types po_document_types_all_b oe_order_sources
Organization po_line_types_b Transaction types
hr_all_organization_units Releases oe_transaction_types_all / tl
org_organization_definitions po_releases_all Pricing
hr_locations_all Requisitions qp_list_headers_b
mtl_parameters po_requisition_headers_all qp_list_lines
Transactions po_requisition_lines_all qp_pricing_attributes , oe_price_adjustments
mtl_material_transactions po_req_distributions_all Shipping
mtl_transaction_types Vendors wsh_new_deliveries
Subinventories po_vendors wsh_delivery_details
mtl_secondary_inventories po_vendor_sites_all wsh_delivery_assignments
Lot and Serial Numbers po_vendor_contacts WSH_PACKED_CONTAINERS
mtl_serial_numbers Receiving wsh_picking_batches
mtl_lot_numbers rcv_transactions WSH_SERIAL_NUMBERS ( shipped sl no's)
Location and On Hand Qty rcv_shipment_headers
mtl_item_locations rcv_shipment_lines ( expected receipts)
mtl_onhand_quantities
Requisitions Interface Order Import
po_requisitions_interface_all oe_headers_iface_all
Interfaces po_req_dist_interface_all REJECT_FLAG
Transactions Interface INTERFACE_SOURCE_CODE ERROR_FLAG
mtl_transactions_interface DESTINATION_TYPE_CODE ORIG_SYS_DOCUMENT_REF
SOURCE_CODE AUTHORIZATION_STATUS OPERATION_CODE
SOURCE_LINE_ID PREPARER_ID/NAME oe_lines_iface_all
SOURCE_HEADER_ID QUANTITY ORDER_SOURCE_ID
PROCESS_FLAG CHARGE_ACCOUNT_ID/SEGMENTS ORIG_SYS_DOCUMENT_REF
TRANSACTION_MODE DESTINATION_ORGANIZATION_ID ORIG_SYS_LINE_REF
TRANSACTION_INTERFACE_ID DELIVER_TO_LOCATION_ID/CODE ORIG_SYS_SHIPMENT_REF
INVENTORY_ITEM_ID DELIVER_TO_REQUESTOR_ID/Name INVENTORY_ITEM
ITEM_SEGMENT1 to ITEM_ DISTRIBUTION_NUMBER REQUEST_DATE
Anil Kumar R V
12/09/2021Interfaces
Distribution and Manufacturing Commonly used tables
Anil Kumar R V
12/09/2021Interfaces
Distribution and Manufacturing Commonly used tables
AUTO_TRANSACT_CODE DOCUMENT_NUM
SOURCE_DOCUMENT_CODE HEADER_INTERFACE_ID
PO_HEADER_ID VALIDATION_FLAG
begin
fnd_client_info.set_org_context('539');
end;
Anil Kumar R V
12/09/2021Interfaces
Distribution and Manufacturing Commonly used tables
AP
Payable Incoives
AP_INVOICES_ALL
AP_INVOICE_DISTRIBUTIONS_ALL
Payments to Invoice
AP_PAYMENT_DISTRIBUTIONS_ALL
AP_PAYMENT_HISTORY_ALL
AP_PAYMENT_SCHEDULES_ALL
AP_INVOICE_PAYMENTS_ALL
AR
AR_VAT_TAX_ALL_B
AR_CASH_RECEIPTS_ALL
AR_CASH_RECEIPT_HISTORY_ALL
AR_AGING_BUCKETS
AR_AGING_BUCKET_LINES_B
AR_MISC_CASH_DISTRIBUTIONS_ALL
AR_RECEIVABLES_TRX_ALL
select * from ra_cust_trx_types_all
RA_CUSTOMER_TRX_ALL
RA_CUSTOMER_TRX_LINES_ALL
RA_CUST_TRX_LINE_GL_DIST_ALL
Customers
hz_parties hz_loc_assignments
hz_cust_accounts
hz_cust_acct_sites_all
hz_cust_site_uses_all
hz_party_sites hz_contact_points CP
hz_locations
GL
GL_DAILY_RATES
GL_BALANCES
GL_ACCOUNT_HIERARCHIES
GL_BUDGET_ASSIGNMENTS
GL_ENCUMBRANCE_TYPES
GL_JE_BATCHES
GL_JE_HEADERS
GL_JE_LINES
Anil Kumar R V
12/09/2021Interfaces
Distribution and Manufacturing Commonly used tables
AP
AP_INVOICES_INTERFACE
AP_INVOICES_INTERFACE
AR
RA_CUSTOMERS_INTERFACE_ALL
RA_INTERFACE_DISTRIBUTIONS_ALL
RA_INTERFACE_DISTRIBUTIONS_ALL
RA_INTERFACE_DISTRIBUTIONS_ALL
GL
GL_DAILY_RATES_INTERFACE
GL_INTERCOMPANY_ACCTS_V
GL_INTERFACE_CONTROL
GL_INTERFACE_GROUPS_V
GL_INTERFACE_HISTORY
GL_INTERFACE_SOURCES_V
GL_INTERFACE
JE_SOURCE_NAME.
STATUS
SET_OF_BOOKS_ID
USER_JE_SOURCE_NAME
USER_JE_CATEGORY_NAME
ACCOUNTING_DATE
CURRENCY_CODE
Do Not Enter any value
TRANSACTION_DATE
JE_BATCH_ID
JE_HEADER_ID
JE_LINE_NUM
CHART_OF_ACCOUNTS_ID
Validations
• Set of books
• Period name
• Source name
• Journal entry name
• Currency code
• Category name
• Actual flag
Anil Kumar R V
12/09/2021Interfaces
Distribution and Manufacturing Commonly used tables
• Encumbrance type ID
• User conversion type
• Accounting date
• Budget version ID
• Reversal period
GL_BUDGET_INTERFACE
GL_BUDGET_INTERIM
Anil Kumar R V
12/09/2021Interfaces
Reports
User Exits
FND SRWINIT
FND SRWEXIT
FND FORMAT_CURRENCY
FND FLEXIDVAL :p_org_id := TO_NUMBER(fnd_profile.VALUE('ORG_ID'));
FND FLEXSQL :cp_user_name := fnd_profile.VALUE('USERNAME')
FND SRWINIT sets your profile option values and allows Oracle
Application Object Library user exits to detect that they have been
called by an Oracle Reports program. FND SRWINIT also allows your
report to use the correct organization automatically. FND SRWEXIT
ensures that all the memory allocated for Oracle Application Object
Library user exits has been freed up properly.
FND FLEXIDVAL are used to display flex field information like prompt, value etc with dynamic query
FND FLEXSQL
OM Reports
Cancelled Orders Report
Returns by Reason Report
Cancelled Orders Reasons Detail Report
Orders by Item Report
Unbooked Orders Report
login for PO – NUAN_AME_SSP_ADMIN / welcome1
• Account combinations
• Periods
• Unbalanced journal entries
• Foreign currency errors
• Budget information
• Encumbrance information
• Other miscellaneous items
select * from AP_ACCOUNTING_EVENTS_ALL WHERE source_id = 28599 and source_table = 'AP_CHECKS' --ACCOUNTING_EVEN
Approval Groups : po_control_groups , po_control_rules
select * from po_control_functions
Approval Assignments : po_position_controls
The Vacation Rules for Workflow Notifications are stored in the table wf_routing_rules.
The following query can be used to determine which Routing Rules are active: select rule_id, role "Forwarded From", begin
Requisition Status:
Release Status:
Requistions in Process
--------------------------------------------
select --item_key,substr(item_key,1,length(item_key)),
distinct b.segment1 "PO 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='NUAMEREQ'
and Activity_status in ( 'WAITING','ERROR','NOTIFIED','DEFERRED','ACTIVE')
and b.created_by=c.user_id
and b.REQUISITION_HEADER_ID=d.requisition_header_id
--and b.segment1='21166'
and d.DESTINATION_ORGANIZATION_ID=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
--Requistion in Error.
select --item_key,substr(item_key,1,length(item_key)),
distinct b.segment1 "PO 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='NUAMEREQ'
and Activity_status = 'ERROR'
and b.created_by=c.user_id
and b.REQUISITION_HEADER_ID=d.requisition_header_id
--and b.segment1='21166'
and d.DESTINATION_ORGANIZATION_ID=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
/************************************************************
/***********************************************************/
SELECT poh.segment1 "PO#", pol.po_line_id "PO_LINE_ID",
poh.creation_date "PO_CREATION_DATE",
ias.begin_date "WF_ERROR_DATE", ias.end_date "WF_END_DATE",
mtl.segment1 "ITEM", mtl.last_update_date "ITEM_UPDATE_DATE",
mtl.organization_id, fnd.user_name "UPDATED_BY", ias.activity_status,
ias.error_name, ias.error_message, ias.error_stack
FROM wf_item_activity_statuses ias,
po_headers_all poh,
mtl_system_items mtl,
po_lines_all pol,
po_distributions_all pod,
fnd_user fnd
WHERE 1 = 1
AND ias.item_type = 'POAPPRV'
AND poh.wf_item_key = ias.item_key
AND poh.po_header_id = pol.po_header_id
AND pol.po_line_id = pod.po_line_id
AND mtl.organization_id = pod.destination_organization_id
AND mtl.inventory_item_id = pol.item_id
AND mtl.last_updated_by = fnd.user_id
AND activity_status = 'ERROR'
ORDER BY begin_date DESC
/******************************************************************/
/************************************************************
Purpose - Query to compare the errored requisition errored date
and item last update date
Version - V1.0
Date - 06-April-2009
Created By - Apps Associates
***********************************************************/
http://rafi-oracle.blogspot.com/2009/03/quries-on-oracle-purchasing.html
Stage 2: Once PO is received, data is moved to respective receving tables and inventory tables
RCV_SHIPMENT_HEADERS
select * from rcv_shipment_headers where shipment_header_id in
(select shipment_header_id from rcv_shipment_lineswhere po_header_id =);
RCV_SHIPMENT_LINES
select * from rcv_shipment_lines where po_header_id =;
RCV_TRANSACTIONS
select * from rcv_transactions where po_header_id =;
RCV_ACCOUNTING_EVENTS
SELECT * FROM rcv_Accounting_Events WHERE rcv_transaction_id IN
(select transaction_id from rcv_transactionswhere po_header_id =);
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 =);
RCV_SUB_LEDGER_DETAILS
select * from rcv_sub_ledger_detailswhere rcv_transaction_id IN
(select transaction_id from rcv_transactions where po_header_id =);
MTL_MATERIAL_TRANSACTIONS
select * from mtl_material_transactions where transaction_source_id =;
MTL_TRANSACTION_ACCOUNTS
select * from mtl_transaction_accounts where transaction_id IN
(select transaction_id from mtl_material_transactions where transaction_source_id =);
Prompt 1. po_headers_all
select * from po_headers_all
where po_header_id =&&po_header_id;
Prompt 2. po_lines_all
select * from po_lines_all
where po_header_id =&&po_header_id;
Prompt 3. po_line_locations_all
select * from po_line_locations_all
where po_header_id =&&po_header_id;
Prompt 4. po_distributions_all
select * from po_distributions_all
where po_header_id =&&po_header_id;
Prompt 5. po_releases_all
SELECT * FROM po_releases_all
WHERE po_header_id =&&po_header_id;
/*-----------------------------------------------------------------
Section : B.
Data from Receving 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 =&&po_header_id );
Prompt 7. rcv_shipment_lines
select * from rcv_shipment_lines
where po_header_id =&&po_header_id;
Prompt 8. rcv_transactions
select * from rcv_transactions
where po_header_id =&&po_header_id;
/*-----------------------------------------------------------------
Section : C.
Invoicing details.
Note : Pls provide the details of following queries if invo
data only if the issue is related to the calculation of
quisition_line_id and Accrual amount or issue with the data in POXXRVDR,POX
(Any Accrual reports)
-------------------------------------------------------------------*/
/*-----------------------------------------------------------------
Section : D.
Projects data
Note : Pls provide details if issue is related to the cost
transferred to projects for Inventory 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_tran
where transaction_source_id = &&po_header_id );
/*-----------------------------------------------------------------
Section : E.
Encumbrances Data
Note : Pls provide details if issue is related to the Encum
Amount mismatch for the PO.
-------------------------------------------------------------------*/
Prompt 17. gl_bc_packets
SELECT *
FROM gl_bc_packets
WHERE reference2 IN ('&&po_header_id');
/*-----------------------------------------------------------------
Section : F.
GL data
Note : Pls furnish following details only if issue is related
to the GL Transfer of receiving transactions.
-----------------------------------------------------------------*/
Prompt 18. GL_INTERFACE
SELECT *
FROM GL_INTERFACE GLI
WHERE user_je_source_name ='Purchasing'
AND gl_sl_link_table ='RSL'
AND reference21='PO'
AND EXISTS
( SELECT 1
FROM rcv_receiving_sub_ledger RRSL
WHERE GLI.reference22 =RRSL.reference2
AND GLI.reference23 =RRSL.reference3
AND GLI.reference24 =RRSL.reference4
AND RRSL.rcv_transaction_id in
(select transaction_id from rcv_transactions
eader_ID = d.po_header_id) "PO Approved?" where po_header_id =&&po_header_id));
=&&po_header_id;
_locations_all
=&&po_header_id;
ributions_all
=&&po_header_id;
=&&po_header_id;
------------------------------------------
ent_headers
pment_headers
pment_lines
=&&po_header_id;
=&&po_header_id;
d from rcv_transactions
=&&po_header_id);
ving_sub_ledger
eiving_sub_ledger
d from rcv_transactions
=&&po_header_id);
edger_details
_ledger_details
d from rcv_transactions
=&&po_header_id);
erial_transactions
terial_transactions
urce_id = &&po_header_id;
action_accounts
nsaction_accounts
d from mtl_material_transactions
urce_id = &&po_header_id );
------------------------------------------
-----------------------------------------*/
e_distributions_all
ice_distributions_all
m ap_invoice_distributions_all
on_id from po_distributions_all
=&&po_header_id ));
------------------------------------------
_items_all peia
saction_reference in
saction_id) from mtl_material_transactions
urce_id = &&po_header_id );
------------------------------------------
-----------------------------------------*/
('&&po_header_id');
------------------------------------------
ce_name ='Purchasing'
sub_ledger RRSL
e22 =RRSL.reference2
=RRSL.reference3
=RRSL.reference4
d from rcv_transactions
=&&po_header_id));
_references
rences GLIR
sub_ledger RRSL
ce_2 =RRSL.reference2
3 =RRSL.reference3
4 =RRSL.reference4
d from rcv_transactions
=&&po_header_id));
select transaction_id from rcv_transactionswhere po_header_id ));
Status Populated Tables Column(status) Value
oe_order_lines_all
oe_price_adjustments
oe_order_price_attribs
oe_order_holds_all
Pick
Released wsh_delivery_details Released_status S
wsh_picking_batches
(Fully) mtl_reservations
mtl_material_transactio
ns_temp
mtl_txn_request_headers
mtl_txn_request_lines
(Partial) wsh_delivery_details S
B
wsh_new_deliveries name
wsh_delivery_assignments
Pick
Confirmed wsh_delivery_details Released_status Y
Ship
Confirmed wsh_delivery_details Released_status C
mtl_material_transactions
wsh_new_deliveries C
oe_order_lines_all Shipped_quantity
wsh_delivery_legs
oe_order_headers_all open_flag N
SELECT DECODE(RELEASED_STATUS,'Y','PICKED','S','PICKED'
WHERE SOURCE_CODE = 'OE' AND SOURCE_LINE_ID = &line_id
Description/transactions Others
No records in mtl_material_transactions
Released to warehouse.
Backordered
Line failed to be allocated in Inventory
if Auto-Create is Yes then data populated.
deliveries get assigned
Y To C:Shipped ;Delivery Note get printed Interface Trip Stop--Sales Order Issue
Delivery assigned to trip stop Transaction in Material Transaction and
quantity will be decreased from staged reservation is releived
On the ship confirm form, check Ship all box
If Defer Interface is checked I.e its deferred then
OM & inventory not updated.
If Defer Interface is not checked.: Shipped
get populated.
1 leg is called as 1 trip.
1 Pickup & drop up stop for each trip.
147
If all the lines get shipped then only flag N
Cancelled
Created by CC Program"
ated From"
Print Date"
e order no)
rcta.PROGRAM_ID
= rcta.CREATED_FROM
ST_TRX_TYPE_ID
er_id = 755934
e hold_source_id in ( 179401 , 179402 , 179403 )
d_id in (1,1181,1201)
( 1163708 , 1162719)
select hr.business_group_id,hr.ORGANIZATION_ID,hr.name,hr.LEGAL_ENTITY_ID,
hr.SET_OF_BOOKS_ID,gl.CHART_OF_ACCOUNTS_ID
from gl_sets_of_books gl,hr_operating_units hr
where gl.set_of_books_id=hr.set_of_books_id
Query to find all OU's BG's and LE's : select * from hr_all_organization_units
user having which responsibilities ; select * from fnd_responsibility_vl , select * from apps.FND_USER_RESP_GROUPS
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
--------------------------------
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
All in One Ou
All OU / INV Etc
apps.FND_USER_RESP_GROUPS
n_name, fifsv.flex_value_set_id, fif.application_table_name, fif.id_flex_code flex_code, fif.id_flex_name flex_name F
flex_name flex_name FROM fnd_id_flex_segments_vl fifsv, fnd_id_flexs fif WHERE fifsv.id_flex_code = fif.id_flex_co
sv.id_flex_code = fif.id_flex_code
SYSADMIN & HRMS
Query to find the responsibilities of a user
Query to find when a user has logged in and logged out : select * from fnd_logins
Page 52
SYSADMIN & HRMS
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)
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 VI
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)
Page 53
SYSADMIN & HRMS
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 VII
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)
Responsibilities 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.VERSION = 'W' -- Self Service Web applications Value
--and frt.RESPONSIBILITY_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%'
Page 54
SYSADMIN & HRMS
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.EFFECTIVE_START_DATE and paaf.EFFECTIVE_END_DATE
and papf.PERSON_ID=paaf.PERSON_ID
and trunc(sysdate) between papf.EFFECTIVE_START_DATE and papf.EFFECTIVE_END_DATE
and gcc.code_combination_id=paaf.DEFAULT_CODE_COMB_ID
--and gcc.segment1 in ('86')
and paaf.ASSIGNMENT_NUMBER is not null
Below is the query to get audit details like Last Logon Time and Last Logout Time of Responsibilities for particular User.
Query1
Below is the query to get audit details like Unsuccessful Login Time for particular User in the Oracle Applications
Query2
Page 55
SYSADMIN & HRMS
Page 56
SYSADMIN & HRMS
d = 63801
ION_KEYFLEX_ID = 150
Page 57
SYSADMIN & HRMS
Page 58
OM Queries
Query to find the Holds on an Order Header
I. Business Purpose: Develop a query which lists the orders which are on hold from the last (no of days to be entered by the
Fields:
Order Date
Order Number
Order Type (Name)
Order Item
Date of Hold
Reason of Hold
Hold by
Days of Hold
ANSWER:
Page 59
OM Queries
SELECT oh.ordered_date, oh.order_number, oh.order_category_code "Order Type",
ol.ordered_item, holds.creation_date "Date of Hold",
hdef.description "Reason of Hold",
hdef.created_by "Hold by",
months_between(SYSDATE,holds.creation_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 ol.header_id = oh.header_id
AND oh.header_id = holds.header_id
AND hdef.created_by = holds.created_by;
II. Business Purpose: Develop a query to list all the un booked sales orders…(show relevant fields).
ANSWER:
III. Business Purpose: List all the Orders which are Backordered
Fields:
Order Number
Customer Number
Customer Name
Order Type (Name)
Status
Date of Order
Item Number
Description
Page 60
OM Queries
ANSWER:
IV. 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:
Page 61
OM Queries
mtl_txn_request_lines mtll,
mtl_txn_request_headers mtlh
WHERE oh.header_id = ol.header_id
AND wdd.org_id = oh.org_id
AND oh.sold_to_org_id = ca.cust_account_id
AND party.party_id=ca.party_id
AND wdd.move_order_line_id =mtll.line_id
AND mtll.header_id = mtlh.header_id
AND ol.flow_status_code='AWAITING_SHIPPING';
HOLD Authorizations
select b.responsibility_name , a.responsibility_id , a.START_DATE_ACTIVE ,
c.hold_id , c.DESCRIPTION
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%Order%Manager'
Sets on Order
Page 62
OM Queries
WHERE OLS.LINE_ID = l.line_id
AND OLS.SET_ID = OST.SET_ID
--AND OST.SET_TYPE = 'FULFILLMENT_SET'
and l.header_id = 1005745
order by ols.set_id, ols.line_id;
Page 63
OM Queries
hold_name,
held_date,
initions hd
ass header_id
last (no of days to be entered by the user) .The query should list all the basic details and the reason for hold.
Page 64
OM Queries
d_definitions c
ME , OST.SET_TYPE
Page 65
Metalink Imp Doc ID's
Diagnostic Scripts
Procurement WF 374428.1
Setup Instructions For Internal Sales Orders Across Operating Units Doc ID: 403786.1
What Are The Basic Steps Of The Purchasing Receipt Accrual Period-End Process? Doc ID
FAQ on Period End Accruals and Uninvoiced Receipt Report Doc ID: 453579.1
ORDER MANAGEMENT SUITE - DATA FIX SCRIPT PATCH LIBRARY Doc ID: 398822.1
https://support.oracle.com/CSP/main/article?cmd=show&id=113492.1&type=NOT
Page 66
Metalink Imp Doc ID's
Also check if the user is setup for Category or Item-Source Realms. This restricts the items available for a user to fin
http://kutuboracle.blogspot.com/2009/12/how-to-diagnose-purchasing-document.html
Page 67
Metalink Imp Doc ID's
OM Documents
Page 68
Metalink Imp Doc ID's
the items available for a user to find. For additional information see Note 332414.1 about Realm useage, and Note 109497.1
up [ID 134168.1]
Page 69
Metalink Imp Doc ID's
Page 70
Scripts
Script to re-inserted record into interface
/*
* Please run the script on TEST instance first, if satisfied then run on PRODUCTION Instance.
* Oracle Corp is NOT responsible if directly run on PRODUCTION Instance without running on TEST instance.
* This script is NOT a generic script, It is very scpecific for recommended/Problematic Sales Order.
*/
DECLARE
L_LINE_ID NUMBER;
L_FILE_VAL VARCHAR2(1000);
L_RESULT_OUT VARCHAR2(90);
L_RETURN_STATUS VARCHAR2(300);
ERR_MSG VARCHAR2(1000);
L_ORG NUMBER;
L_HEADER_ID NUMBER;
L_COUNT NUMBER;
l_counter NUMBER;
x_msg_count number;
x_msg_data Varchar2(2000);
x_msg_index number;
CURSOR cur_rec IS
select line_id
from oe_order_lines_all
where line_id in ( '1168355' , '1168356' );
BEGIN
OE_DEBUG_PUB.DEBUG_ON;
OE_DEBUG_PUB.INITIALIZE;
L_FILE_VAL := OE_DEBUG_PUB.SET_DEBUG_MODE('FILE');
OE_DEBUG_PUB.SETDEBUGLEVEL(5);
-- DBMS_OUTPUT.PUT_LINE('.');
DBMS_OUTPUT.PUT_LINE(' .... Log File Name and Location :- '||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE
-- DBMS_OUTPUT.PUT_LINE('.');
OPEN cur_rec;
LOOP
Page 71
Scripts
SELECT count(*) into l_counter from RA_CUSTOMER_TRX_LINES_ALL
where line_type = 'LINE'
and interface_line_context = 'ORDER ENTRY'
and interface_line_attribute6 = l_line_id;
IF(l_counter = 0) THEN
SELECT count(*) into l_counter from RA_INTERFACE_LINES_ALL
where line_type = 'LINE'
and interface_line_context = 'ORDER ENTRY'
and interface_line_attribute6 = l_line_id;
END IF;
IF(l_counter = 0) THEN
dbms_output.put_line('Putting Line into Interface Table: ' || l_line_id);
begin
-- DBMS_OUTPUT.PUT_LINE(' executing fnd_client_info.set_org_context().... ');
OE_DEBUG_PUB.ADD('ramising:- executing fnd_client_info.set_org_context().... ');
FND_CLIENT_INFO.SET_ORG_CONTEXT(L_ORG);
exception
when others then
-- DBMS_OUTPUT.PUT_LINE(' 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_LINE(' 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
when others then
-- DBMS_OUTPUT.PUT_LINE(' 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_LINES_ALL
SET INVOICED_QUANTITY = 0, INVOICE_INTERFACE_STATUS_CODE = NULL, OPEN_FLAG = 'Y' , FLOW
WHERE LINE_ID = L_LINE_ID;
-- COMMIT;
UPDATE OE_PRICE_ADJUSTMENTS
SET INVOICED_FLAG='N'
WHERE LINE_ID = L_LINE_ID
Page 72
Scripts
AND INVOICED_FLAG='Y';
/*
DELETE FROM RA_INTERFACE_LINES_ALL
WHERE INTERFACE_LINE_ATTRIBUTE1= ( select to_char(order_number) from oe_order_headers_all where header_id
*/
OE_INVOICE_PUB.INTERFACE_LINE(L_LINE_ID,'OEOL',L_RESULT_OUT, L_RETURN_STATUS);
OE_DEBUG_PUB.ADD('ramising:- after calling interface_line() L_RESULT_OUT: '||L_RESULT_OUT||' L_R
UPDATE OE_ORDER_LINES_ALL
SET FLOW_STATUS_CODE = 'CLOSED',OPEN_FLAG='N'
WHERE LINE_ID = L_LINE_ID;
OE_DEBUG_PUB.ADD(' ramising: updated oe_order_lines_all table .... ');
Page 73
Scripts
-- rollback;
-- DBMS_OUTPUT.PUT_LINE('.');
-- DBMS_OUTPUT.PUT_LINE(' Pls check the debug file for this line_id ( '|| L_LINE_ID ||' ) ... ');
OE_DEBUG_PUB.ADD('ramising:- Pls check the debug file for this line_id ( '|| L_LINE_ID ||' ) ... ');
END IF;
-- DBMS_OUTPUT.PUT_LINE('.');
ELSE
dbms_o
END IF;
END LOOP;
CLOSE cur_rec;
EXCEPTION
WHEN OTHERS THEN
oe_debug_pub.add(' ramising: in exception block.... ');
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(' Getting Error msg Stack: ' ||substr(x_msg_data,1,200));
end loop;
end if;
ERR_MSG := SQLERRM;
-- DBMS_OUTPUT.PUT_LINE('.');
OE_DEBUG_PUB.ADD('ERROR: Pls Rollback As Following Error Ocurred:- ');
-- DBMS_OUTPUT.PUT_LINE('. ');
DBMS_OUTPUT.PUT_LINE('. '||SQLERRM);
-- DBMS_OUTPUT.PUT_LINE('. ');
OE_DEBUG_PUB.ADD(ERR_MSG);
end;
/
SET SERVEROUTPUT OFF;
PROMPT =============================================================
PROMPT Do COMMIT; if no error reported else do ROLLBACK;
PROMPT =============================================================
Page 74
Scripts
.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);
Page 75
Scripts
context().... ');
Page 76
Scripts
UT, L_RETURN_STATUS);
T_OUT: '||L_RESULT_OUT||' L_RETURN_STATUS: '|| L_RETURN_STATUS);
data,1,200));
Page 77
Scripts
Page 78
IB SC
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)
Page 79
FAQ's
FAQ: Entering Purchase Orders Doc ID: 216824.1
What Are The Basic Steps Of The Purchasing Receipt Accrual Period-End Process? Doc ID
What Are the Receiving Defaulting Rules and Where Are they Set? Doc ID: 567980.1
Purchase Order Matching Frequently Asked Questions (FAQ's) Doc ID: 213480.1
Page 80
FAQ's
Page 81
PO API
Note: 215276.1 - What API will Cancel an Existing Standard Purchase Order
Page 82
fndload
http://oracle.anilpassi.com/oracle-fndload-script-examples.html
Page 83
Conversions
http://erpschools.com/Apps/oracle-applications/articles/General/Interfaces-and-Conversions-in-Oracle-Applications/index.aspx
Page 84
Conversions
ions-in-Oracle-Applications/index.aspx
Page 85