97
Distribution and Manufacturing Commonly used tables Anil Kumar R V 06/06/2022Interfaces Inv Po Items Po mtl_system_items_b po_headers_all mtl_item_revisions po_lines_all Item Categories po_line_locations_all mtl_categories_b PO_HEADERS_ARCHIVE and PO_LINES_ARCHIVE (PO revisions) mtl_category_sets_b po_distributions_all mtl_item_categories Buyers Item Costs po_agents cst_item_costs Document and Line Types cst_cost_types po_document_types_all_b Organization po_line_types_b hr_all_organization_units Releases org_organization_definitions po_releases_all hr_locations_all Requisitions mtl_parameters po_requisition_headers_all Transactions po_requisition_lines_all mtl_material_transactions po_req_distributions_all mtl_transaction_types Vendors Subinventories po_vendors mtl_secondary_inventories po_vendor_sites_all Lot and Serial Numbers po_vendor_contacts mtl_serial_numbers Receiving mtl_lot_numbers rcv_transactions Location and On Hand Qty rcv_shipment_headers mtl_item_locations rcv_shipment_lines ( expected receipts) mtl_onhand_quantities Requisitions Interface po_requisitions_interface_all Interfaces po_req_dist_interface_all Transactions Interface INTERFACE_SOURCE_CODE mtl_transactions_interface DESTINATION_TYPE_CODE SOURCE_CODE AUTHORIZATION_STATUS SOURCE_LINE_ID PREPARER_ID/NAME SOURCE_HEADER_ID QUANTITY PROCESS_FLAG CHARGE_ACCOUNT_ID/SEGMENTS TRANSACTION_MODE DESTINATION_ORGANIZATION_ID TRANSACTION_INTERFACE_ID DELIVER_TO_LOCATION_ID/CODE INVENTORY_ITEM_ID DELIVER_TO_REQUESTOR_ID/Name

Apps Tables

  • Upload
    goat420

  • View
    537

  • Download
    7

Embed Size (px)

Citation preview

Page 1: Apps Tables

Distribution and Manufacturing Commonly used tables

Anil Kumar R V04/08/2023Interfaces

Inv Po OmItems Po Ordersmtl_system_items_b po_headers_all oe_order_headers_allmtl_item_revisions po_lines_all oe_transaction_types_allItem Categories po_line_locations_all OE_ORDER_LINES_HISTORY

mtl_categories_b PO_HEADERS_ARCHIVE and PO_LINES_ARCHIVE (PO revisions)mtl_category_sets_b po_distributions_all oe_order_lines_allmtl_item_categories Buyers AgreementsItem Costs po_agents oe_agreements_bcst_item_costs Document and Line Types Order Sourcescst_cost_types po_document_types_all_b oe_order_sourcesOrganization po_line_types_b Transaction typeshr_all_organization_units Releases oe_transaction_types_all / tlorg_organization_definitions po_releases_all Pricinghr_locations_all Requisitions qp_list_headers_bmtl_parameters po_requisition_headers_all qp_list_linesTransactions po_requisition_lines_all qp_pricing_attributes , oe_price_adjustmentsmtl_material_transactions po_req_distributions_all Shippingmtl_transaction_types Vendors wsh_new_deliveriesSubinventories po_vendors wsh_delivery_detailsmtl_secondary_inventories po_vendor_sites_all wsh_delivery_assignmentsLot and Serial Numbers po_vendor_contacts WSH_PACKED_CONTAINERSmtl_serial_numbers Receiving wsh_picking_batchesmtl_lot_numbers rcv_transactions WSH_SERIAL_NUMBERS ( shipped sl no's)Location and On Hand Qty rcv_shipment_headersmtl_item_locations rcv_shipment_lines ( expected receipts)mtl_onhand_quantities

Requisitions Interface Order Importpo_requisitions_interface_all oe_headers_iface_all

Interfaces po_req_dist_interface_all REJECT_FLAG Transactions Interface INTERFACE_SOURCE_CODE ERROR_FLAGmtl_transactions_interface DESTINATION_TYPE_CODE ORIG_SYS_DOCUMENT_REFSOURCE_CODE AUTHORIZATION_STATUS OPERATION_CODESOURCE_LINE_ID PREPARER_ID/NAME oe_lines_iface_allSOURCE_HEADER_ID QUANTITY ORDER_SOURCE_IDPROCESS_FLAG CHARGE_ACCOUNT_ID/SEGMENTS ORIG_SYS_DOCUMENT_REFTRANSACTION_MODE DESTINATION_ORGANIZATION_ID ORIG_SYS_LINE_REFTRANSACTION_INTERFACE_ID DELIVER_TO_LOCATION_ID/CODE ORIG_SYS_SHIPMENT_REFINVENTORY_ITEM_ID DELIVER_TO_REQUESTOR_ID/Name INVENTORY_ITEMITEM_SEGMENT1 to ITEM_ DISTRIBUTION_NUMBER REQUEST_DATE

select * from oe_sets where header_id =

Page 2: Apps Tables

Distribution and Manufacturing Commonly used tables

Anil Kumar R V04/08/2023Interfaces

SEGMENT20 DESTINATION_ORGANIZATION_ID DELIVERY_LEAD_TIMETRANSACTION_QUANTITY INTERFACE_SOURCE_CODE DELIVERY_IDTRANSACTION_UOM CHARGE_ACCOUNT_ID ORDERED_QUANTITYTRANSACTION_DATE ORDER_QUANTITY_UOM oe_price_adjs_interfaceTRANSACTION_SOURCE_ID REQUEST_ID ORIG_SYS_DOCUMENT_REFDSP_SEGMENT1toDSP_ Purchasing Documents interface ORIG_SYS_LINE_REFSEGMENT30 po_headers_interface ORIG_SYS_SHIPMENT_REFTRANSACTION_SOURCE_NAME INTERFACE_HEADER_ID ORIG_SYS_DISCOUNT_REFTRANSACTION_TYPE_ID ACTION DISCOUNT_IDmtl_transactions_lot_interface DOCUMENT_TYPE_CODE DISCOUNT_LINE_IDLOT_NUMBER VENDOR_DOC_NUM DISCOUNT_NAMELOT_EXPIRATION_DATE po_lines_interface OPERATION_CODETRANSACTION_QUANTITY INTERFACE_LINE_ID oe_credits_interfaceTRANSACTION_INTERFACE_ID INTERFACE_HEADER_ID ORDER_SOURCE_IDSERIAL_TRANSACTION_TEMP_ID po_interface_errors ORIG_SYS_DOCUMENT_REFmtl_serial_numbers_interface Receiving Interface ORIG_SYS_LINE_REFTRANSACTION_INTERFACE_ ID rcv_headers_interface ORIG_SYS_SHIPMENT_REFFM_SERIAL_NUMBER HEADER_INTERFACE_ID ORIG_SYS_CREDIT_REFItem Interface GROUP_ID PERCENTMTL_SYSTEM_ITEMS_INTERFACE PROCESSING_STATUS_CODE OE_LOTSERIALS_INTERFACEPROCESS_FLAG RECEIPT_SOURCE_CODE OPERATION_CODETRANSACTION_TYPE VENDOR_NAME ORDER_SOURCE_IDSET_PROCESS_ID VENDOR_NUM ORIG_SYS_DOCUMENT_REFORGANIZATION_CODE VENDOR_ID ORIG_SYS_LINE_REFITEM_NUMBER VALIDATION_FLAG ORIG_SYS_LOTSERIAL_REF

rcv_transactions_interface QUANTITYINTERFACE_TRANSACTION_ID OPERATION_CODE

MTL_INTERFACE_ERRORS GROUP_ID OE_RESERVTNS_INTERFACEMTL_ITEM_CATE_INTERFACE TRANSACTION_TYPE oe_actions_interfaceMTL_ITEM_REVI_INTERFACE TRANSACTION_DATE ORIG_SYS_DOCUMENT_REF

PROCESSING_STATUS_CODE OPERATION_CODEPROCESSING_MODE_CODETRANSACTION_STATUS_CODEQUANTITYUNIT_OF_MEASUREITEM_DESCRIPTIONRECEIPT_SOURCE_CODEVENDOR_IDVENDOR_NUMVENDOR_NAME

Page 3: Apps Tables

Distribution and Manufacturing Commonly used tables

Anil Kumar R V04/08/2023Interfaces

AUTO_TRANSACT_CODE DOCUMENT_NUMSOURCE_DOCUMENT_CODE HEADER_INTERFACE_IDPO_HEADER_ID VALIDATION_FLAG

select * from org_acct_periods

begin

end;fnd_client_info.set_org_context('539');

select * from wf_item_attribute_values where item_key = '776773'

select * from fnd_responsibility_tl where RESPONSIBILITY_ID = 55295

Page 4: Apps Tables

Distribution and Manufacturing Commonly used tables

Anil Kumar R V04/08/2023Interfaces

APPayable IncoivesAP_INVOICES_ALLAP_INVOICE_DISTRIBUTIONS_ALLPayments to Invoice

AP_PAYMENT_DISTRIBUTIONS_ALLAP_PAYMENT_HISTORY_ALLAP_PAYMENT_SCHEDULES_ALLAP_INVOICE_PAYMENTS_ALL

AR AR_VAT_TAX_ALL_BAR_CASH_RECEIPTS_ALLAR_CASH_RECEIPT_HISTORY_ALLAR_AGING_BUCKETSAR_AGING_BUCKET_LINES_BAR_MISC_CASH_DISTRIBUTIONS_ALLAR_RECEIVABLES_TRX_ALL

RA_CUSTOMER_TRX_ALLRA_CUSTOMER_TRX_LINES_ALLRA_CUST_TRX_LINE_GL_DIST_ALLCustomershz_parties hz_loc_assignments hz_cust_accountshz_cust_acct_sites_allhz_cust_site_uses_allhz_party_sites hz_contact_points CPhz_locationsGL

GL_DAILY_RATESGL_BALANCESGL_ACCOUNT_HIERARCHIESGL_BUDGET_ASSIGNMENTSGL_ENCUMBRANCE_TYPESGL_JE_BATCHESGL_JE_HEADERSGL_JE_LINES

select * from ra_cust_trx_types_all

Page 5: Apps Tables

Distribution and Manufacturing Commonly used tables

Anil Kumar R V04/08/2023Interfaces

APAP_INVOICES_INTERFACEAP_INVOICES_INTERFACE

ARRA_CUSTOMERS_INTERFACE_ALLRA_INTERFACE_DISTRIBUTIONS_ALLRA_INTERFACE_DISTRIBUTIONS_ALLRA_INTERFACE_DISTRIBUTIONS_ALL

GLGL_DAILY_RATES_INTERFACEGL_INTERCOMPANY_ACCTS_VGL_INTERFACE_CONTROLGL_INTERFACE_GROUPS_VGL_INTERFACE_HISTORYGL_INTERFACE_SOURCES_VGL_INTERFACEJE_SOURCE_NAME.STATUSSET_OF_BOOKS_IDUSER_JE_SOURCE_NAMEUSER_JE_CATEGORY_NAMEACCOUNTING_DATECURRENCY_CODEDo Not Enter any valueTRANSACTION_DATEJE_BATCH_IDJE_HEADER_IDJE_LINE_NUMCHART_OF_ACCOUNTS_IDValidations• Set of books• Period name• Source name• Journal entry name• Currency code• Category name• Actual flag

Page 6: Apps Tables

Distribution and Manufacturing Commonly used tables

Anil Kumar R V04/08/2023Interfaces

• Encumbrance type ID• User conversion type• Accounting date• Budget version ID• Reversal period GL_BUDGET_INTERFACEGL_BUDGET_INTERIM

Page 7: Apps Tables

ReportsUser ExitsFND SRWINITFND SRWEXITFND FORMAT_CURRENCYFND 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 OracleApplication Object Library user exits to detect that they have beencalled by an Oracle Reports program. FND SRWINIT also allows yourreport to use the correct organization automatically. FND SRWEXITensures that all the memory allocated for Oracle Application ObjectLibrary 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 ReportsCancelled Orders ReportReturns by Reason ReportCancelled Orders Reasons Detail ReportOrders by Item ReportUnbooked Orders Report

Page 8: Apps Tables

FND FLEXIDVAL are used to display flex field information like prompt, value etc with dynamic query

Page 9: Apps Tables

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 PO_REQUISITION_HEADERS_ALL WHERE SEGMENT1 ='5666'

select * from PO_REQUISITION_LINES_ALL WHERE REQUISITION_HEADER_ID = 56622

select * from PO_REQ_DISTRIBUTIONS_ALL WHERE REQUISITION_LINE_ID = 60533

select * from PO_HEADERS_ALL WHERE SEGMENT1 = '326' AND TYPE_LOOKUP_CODE = 'RFQ'

select * from PO_RFQ_VENDORS WHERE PO_HEADER_ID = 32562

select * from PO_HEADERS_ALL WHERE SEGMENT1 = '517' AND TYPE_LOOKUP_CODE = 'QUOTATION'

select * from PO_HEADERS_ALL WHERE SEGMENT1 = '4451' AND TYPE_LOOKUP_CODE= 'STANDARD'

select * from PO_LINES_ALL WHERE PO_HEADER_ID = 32566

select * from PO_LINE_LOCATIONS_ALL WHERE PO_LINE_ID = 37773

select * from PO_DISTRIBUTIONS_ALL WHERE LINE_LOCATION_ID in( 72186)

select * from RCV_SHIPMENT_HEADERS WHERE RECEIPT_NUM = '9616' AND SHIP_TO_ORG_ID = 207

select * from RCV_SHIPMENT_LINES WHERE SHIPMENT_HEADER_ID = 56423

select * from ap_invoices_all where invoice_num = 'AL-346'

select * from ap_invoice_distributions_all where invoice_id = 63253

select * from AP_ACCOUNTING_EVENTS_ALL WHERE source_id = 63253 and source_table = 'AP_INVOICES'

select * from ap_payment_schedules_all where invoice_id = 63253

select * from ap_checks_all where check_number = 2473 --creation_date like sysdate

select * from AP_INVOICE_PAYMENTS_ALL where invoice_id = 63253

select * from AP_ACCOUNTING_EVENTS_ALL WHERE source_id = 28599 and source_table = 'AP_CHECKS' --ACCOUNTING_EVENT_ID = 77429

Page 10: Apps Tables

Approval Groups : po_control_groups , po_control_rules

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_date, end_date, action_argument "Forwarded To" from wf_routing_rules where SYSDATE between BEGIN_DATE-1 and NVL(END_DATE,sysdate+1) order by rule_id;

/ 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'

Release 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 = '&PO_NUM' and rel.release_num = 'REL_NUM' 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,

select * from po_control_functions

select * from po_Approval_list_lines

Page 11: Apps Tables

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_ID' 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_ID' 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_ASSIGNMENTS_F pa, per_positions pos,per_jobs job, fnd_user fnd WHERE pa.POSITION_ID = pos.POSITION_ID and pa.job_ID = job.job_id and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE and pa.primary_flag = 'Y' and pa.assignment_type = 'E' and pa.person_id = fnd.employee_id and pa.PERSON_ID = (select employee_id from fnd_user where user_name = '&user_name'

Requistions in Process--------------------------------------------select --item_key,substr(item_key,1,length(item_key)),

Page 12: Apps Tables

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_statusfrom wf_item_activity_statuses a, po_requisition_headers_all b,fnd_user c,po_requisition_lines_all

d,mtl_system_items_b ewhere a.item_type='NUAMEREQ'and Activity_status in ( 'WAITING','ERROR','NOTIFIED','DEFERRED','ACTIVE')and b.created_by=c.user_idand b.REQUISITION_HEADER_ID=d.requisition_header_id--and b.segment1='21166'and d.DESTINATION_ORGANIZATION_ID=e.organization_idand e.inventory_item_id=d.item_idand (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_statusfrom wf_item_activity_statuses a, po_requisition_headers_all b,fnd_user c,po_requisition_lines_all

d,mtl_system_items_b ewhere a.item_type='NUAMEREQ'and Activity_status = 'ERROR'and b.created_by=c.user_idand b.REQUISITION_HEADER_ID=d.requisition_header_id--and b.segment1='21166'and d.DESTINATION_ORGANIZATION_ID=e.organization_idand e.inventory_item_id=d.item_idand (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

PO Approval Gropup whith limitsSELECT h.NAME operating_unit_name, d.NAME job_name, cf.control_function_name document_type, g1.control_group_name approval_group_name FROM per_jobs d, po_position_controls_all f1, po_control_groups_all g1, hr_all_organization_units h, po_control_functions cf

Page 13: Apps Tables

WHERE 1 = 1 AND h.TYPE = 'OU' AND h.organization_id = g1.org_id AND d.job_id = f1.job_id AND f1.control_group_id = g1.control_group_id AND cf.control_function_id = f1.control_function_idORDER BY 1,2

select * from AME_TRANS_APPROVAL_HISTORY where transaction_id = '125864' order by row_timestamp

/************************************************************

Purpose - Query to compare the errored PO creation date and item last update dateVersion - V1.0Date - 08-April-2009Created By - Apps Associates

/***********************************************************/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

/******************************************************************/

/************************************************************

Page 14: Apps Tables

Purpose - Query to compare the errored requisition errored date and item last update dateVersion - V1.0Date - 06-April-2009Created By - Apps Associates

***********************************************************/

per_all_people_f pap

per_all_people_f pap

SELECT prh.segment1 "REQ#", prl.requisition_line_id "REQ_LINE_ID", prh.creation_date "REQ_CREATION_DATE", prh.preparer_id "PREPARER ID", pap.full_name "NAME", 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, ias.activity_status, ias.error_name, ias.error_message, ias.error_stack FROM wf_item_activity_statuses ias, po_requisition_headers_all prh, mtl_system_items mtl, po_requisition_lines_all prl,

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 = 'ERROR' AND pap.effective_end_date >= SYSDATEunion SELECT prh.segment1 "REQ#", prl.requisition_line_id "REQ_LINE_ID", prh.creation_date "REQ_CREATION_DATE", prh.preparer_id "PREPARER ID", pap.full_name "NAME", 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, ias.activity_status, ias.error_name, ias.error_message, ias.error_stack FROM wf_item_activity_statuses ias, po_requisition_headers_all prh, mtl_system_items mtl, po_requisition_lines_all prl,

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

Page 15: Apps Tables

http://rafi-oracle.blogspot.com/2009/03/quries-on-oracle-purchasing.html

INTERNAL REQUISITIONS THAT DO NOT HAVE AN ASSOCIATED INTERNAL SALES ORDERSELECT,RQH.SEGMENT1,RQL.LINE_NUM,RQL.REQUISITION_HEADER_ID,RQL.REQUISITION_LINE_ID,RQL.ITEM_ID,RQL.UNIT_MEAS_LOOKUP_CODE,RQL.UNIT_PRICE,RQL.QUANTITY,RQL.QUANTITY_CANCELLED,RQL.QUANTITY_DELIVERED,RQL.CANCEL_FLAG,RQL.SOURCE_TYPE_CODE,RQL.SOURCE_ORGANIZATION_ID,RQL.DESTINATION_ORGANIZATION_ID,RQH.TRANSFERRED_TO_OE_FLAGFROM,PO_REQUISITION_LINES_ALL RQL

AND mtl.inventory_item_id = prl.item_id AND prh.preparer_id = pap.person_id AND activity_status = 'ERROR' AND pap.effective_end_date < SYSDATE

order by 3 desc

DISPLAY WHAT REQUISITION AND PO ARE LINKED(Relation with Requisition and PO )SELECT,r.segment1 "Req Num",p.segment1 "PO Num"from,po_headers_all p,po_distributions_all d,po_req_distributions_all rd,po_requisition_lines_all rl,po_requisition_headers_all rWHEREp.po_header_id = d.po_header_id andd.req_distribution_id = rd.distribution_id andrd.requisition_line_id = rl.requisition_line_id andrl.requisition_header_id = r.requisition_header_id

Page 16: Apps Tables

,PO_REQUISITION_HEADERS_ALL RQHWHERERQL.REQUISITION_HEADER_ID = RQH.REQUISITION_HEADER_ID andRQL.SOURCE_TYPE_CODE = 'INVENTORY' andRQL.SOURCE_ORGANIZATION_ID is not null and not exists(select 'existing internal order'from OE_ORDER_LINES_ALL LIN where LIN.SOURCE_DOCUMENT_LINE_ID = RQL.REQUISITION_LINE_ID and LIN.SOURCE_DOCUMENT_TYPE_ID = 10)ORDER BY RQH.REQUISITION_HEADER_ID, RQL.LINE_NUM------------------------------------------------------------------------------------------------------------ DISPLAY WHAT REQUISITION AND PO ARE LINKED(Relation with Requisition and PO )SELECT,r.segment1 "Req Num",p.segment1 "PO Num"from,po_headers_all p,po_distributions_all d,po_req_distributions_all rd,po_requisition_lines_all rl,po_requisition_headers_all rWHEREp.po_header_id = d.po_header_id andd.req_distribution_id = rd.distribution_id andrd.requisition_line_id = rl.requisition_line_id andrl.requisition_header_id = r.requisition_header_id------------------------------------------------------------------------------------------------------------PURCHASE REQUISITION WITHOUT PO THAT MEANS A PR HAS NOT BEEN AUTOCREATED TO PO(Purchase Requisition without a Purchase Order)SELECT,prh.segment1 "PR NUM",trunc(prh.creation_date) "CREATED ON",trunc(prl.creation_date) "Line Creation Date",prl.line_num "Seq #",msi.segment1 "Item Num",prl.item_description "Description",prl.quantity "Qty",trunc(prl.need_by_date) "Required By",ppf1.full_name "REQUESTOR",ppf2.agent_name "BUYER"FROM,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 phWHEREprh.requisition_header_id = prl.requisition_header_id and

Page 17: Apps Tables

prl.requisition_line_id = prd.requisition_line_id andppf1.person_id = prh.preparer_id andprh.creation_date between ppf1.effective_start_date and ppf1.effective_end_date andppf2.agent_id(+) = msi.buyer_id andmsi.inventory_item_id = prl.item_id andmsi.organization_id = prl.destination_organization_id andpll.line_location_id(+) = prl.line_location_id andpll.po_header_id = ph.po_header_id(+) andpll.pl_line_id = pl.po_line_id(+) andprh.authorization_status = 'APPROVED' andpll.line_location_id is NULL andprl.closed_code is NULL andnvl(prl.cancel_flag,'N') <> 'Y'ORDER BY 1,2------------------------------------------------------------------------------------------------------------ INFORMATION FROM PR to PO(Requisition moved from different stages till converting into PR)SELECT DISTINCT,u.description "Requestor",porh.segment1 as "Req Number",trunc(porh.Creation_Date) "Created On",pord.LAST_UPDATED_BY,porh.Authorization_Status "Status",porh.Description "Description",poh.segment1 "PO Number",trunc(poh.Creation_date) "PO Creation Date",poh.AUTHORIZATION_STATUS "PO Status",trunc(poh.Approved_Date) "Approved Date"FROM,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 uWHEREporh.requisition_header_id = porl.requisition_header_id and porl.requisition_line_id = pord.requisition_line_id andpord.distribution_id = pod.req_distribution_id(+) andpod.po_header_id = poh.po_header_id(+) andporh.created_by = u.user_idorder by 2------------------------------------------------------------------------------------------------------------PO’s WHICH DOES NOT HAVE ANY PR’sSELECT,prh.segment1 "PR NUM",trunc(prh.creation_date) "CREATED ON",trunc(prl.creation_date) "Line Creation Date",prl.line_num "Seq #",msi.segment1 "Item Num",prl.item_description "Description"

Page 18: Apps Tables

,prl.quantity "Qty",trunc(prl.need_by_date) "Required By",ppf1.full_name "REQUESTOR",ppf2.agent_name "BUYER"FROM,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 phWHEREprh.requisition_header_id = prl.requisition_header_id andprl.requisition_line_id = prd.requisition_line_id andppf1.person_id = prh.preparer_id andprh.creation_date between ppf1.effective_start_date and ppf1.effective_end_date andppf2.agent_id(+) = msi.buyer_id andmsi.inventory_item_id = prl.item_id andmsi.organization_id = prl.destination_organization_id andpll.line_location_id(+) = prl.line_location_id andpll.po_header_id = ph.po_header_id(+) andpll.po_line_id = pl.po_line_id(+) andprh.authorization_status = 'APPROVED' andpll.line_location_id is NULL andprl.closed_code is NULL andnvl(prl.cancel_flag,'N') <> 'Y'ORDER BY 1,2------------------------------------------------------------------------------------------------------------ALL PO’s WITH APPROVAL, INVOICE, & PAYMENT DETAILSSELECT,a.org_id "ORG ID",E.SEGMENT1 "VENDOR NUM",e.vendor_name "SUPPLIER NAME",UPPER(e.vendor_type_lookup_code) "VENDOR TYPE",f.vendor_site_code "VENDOR SITE CODE",f.ADDRESS_LINE1 "ADDRESS",f.city "CITY",f.country "COUNTRY",to_char(trunc(d.CREATION_DATE)) "PO Date",d.segment1 "PO NUM",d.type_lookup_code "PO Type",c.quantity_ordered "QTY ORDERED",c.quantity_cancelled "QTY CANCELLED",g.item_id "ITEM ID",g.item_description "ITEM DESCRIPTION",g.unit_price "UNIT PRICE",(NVL(c.quantity_ordered,0)-NVL(c.quantity_cancelled,0))*NVL(g.unit_price,0) "PO Line Amount"

Page 19: Apps Tables

,(select decode(ph.approved_FLAG, 'Y', 'Approved') from po.po_headers_all ph where,ph.po_header_ID = d.po_header_id) "PO Approved?", a.invoice_type_lookup_code "INVOICE TYPE",a.invoice_amount "INVOICE AMOUNT",to_char(trunc(a.INVOICE_DATE)) "INVOICE DATE",a.invoice_num "INVOICE NUMBER",(select decode(x.MATCH_STATUS_FLAG, 'A', 'Approved') from ap.ap_invoice_distributions_all x where,x.invoice_distribution_id = b.invoice_distribution_id) "Invoice Approved?",a.amount_paid,h.amount,h.check_id,h.invoice_payment_id "Payment Id",i.check_number "Cheque Number",to_char(trunc(i.check_DATE)) "Payment Date"FROM,AP.AP_INVOICES_ALL A,AP.AP_INVOICE_DISTRIBUTIONS_ALL B,PO.PO_DISTRIBUTIONS_ALL C,PO.PO_HEADERS_ALL D,PO.PO_VENDORS E,PO.PO_VENDOR_SITES_ALL F,PO.PO_LINES_ALL G,AP.AP_INVOICE_PAYMENTS_ALL H,AP.AP_CHECKS_ALL IWHERE,a.invoice_id = b.invoice_id andb.po_distribution_id = c. po_distribution_id (+) andc.po_header_id = d.po_header_id (+) ande.vendor_id (+) = d.VENDOR_ID andf.vendor_site_id (+) = d.vendor_site_id andd.po_header_id = g.po_header_id andc.po_line_id = g.po_line_id anda.invoice_id = h.invoice_id andh.check_id = i.check_id andf.vendor_site_id = i.vendor_site_id andc.PO_HEADER_ID is not null anda.payment_status_flag = 'Y' andd.type_lookup_code != 'BLANKET' ------------------------------------------------------------------------------------------------------------ALL OPEN PO'SSELECT,h.segment1 "PO NUM",h.authorization_status "STATUS",l.line_num "SEQ NUM",ll.line_location_id,d.po_distribution_id,h.type_lookup_code "TYPE"FROM,po.po_headers_all h,po.po_lines_all l,po.po_line_locations_all ll

Page 20: Apps Tables

,po.po_distributions_all dWHEREh.po_header_id = l.po_header_id andll.po_line_id = l.po_Line_id andll.line_location_id = d.line_location_id andh.closed_date is NULL andh.type_lookup_code not in ('QUOTATION')------------------------------------------------------------------------------------------------------------ STEPS TO DEBUG A PURCHASE ORDERGet 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: PO CreationPO_HEADERS_ALLselect po_header_id from po_headers_all where segment1 =;select * from po_headers_all where po_header_id =;PO_LINES_ALLselect * from po_lines_all where po_header_id =;PO_LINE_LOCATIONS_ALLselect * from po_line_locations_all where po_header_id =;PO_DISTRIBUTIONS_ALL select * from po_distributions_all where po_header_id =;PO_RELEASES_ALLSELECT * FROM po_releases_all WHERE po_header_id =;

Stage 2: Once PO is received, data is moved to respective receving tables and inventory tablesRCV_SHIPMENT_HEADERSselect * from rcv_shipment_headers where shipment_header_id in(select shipment_header_id from rcv_shipment_lineswhere po_header_id =);RCV_SHIPMENT_LINESselect * from rcv_shipment_lines where po_header_id =;RCV_TRANSACTIONSselect * from rcv_transactions where po_header_id =;RCV_ACCOUNTING_EVENTSSELECT * FROM rcv_Accounting_Events WHERE rcv_transaction_id IN(select transaction_id from rcv_transactionswhere po_header_id =);RCV_RECEIVING_SUB_LEDGERselect * from rcv_receiving_sub_ledger where rcv_transaction_id IN(select transaction_id from rcv_transactions where po_header_id =);RCV_SUB_LEDGER_DETAILSselect * from rcv_sub_ledger_detailswhere rcv_transaction_id IN(select transaction_id from rcv_transactions where po_header_id =);MTL_MATERIAL_TRANSACTIONSselect * 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 =);

Stage 3: Invoicing detailsAP_INVOICE_DISTRIBUTIONS_ALLselect * from ap_invoice_distributions_all where po_distribution_id in

Page 21: Apps Tables

( select po_distribution_id from po_distributions_all where po_header_id =);AP_INVOICES_ALLselect * 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 =));

Stage 4 : Mostly there is tie up with Project related POPA_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 = );

Stage 5 : General LedgerPrompt 17. GL_BC_PACKETS ..This is for encumbrancesSELECT * FROM gl_bc_packets WHERE reference2 IN (’‘);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.reference3AND GLI.reference24 =RRSL.reference4AND RRSL.rcv_transaction_id in(select transaction_id from rcv_transactionswhere po_header_id ));GL_IMPORT_REFERENCES SELECT *FROM gl_import_references GLIR WHERE reference_1=’PO’ AND gl_sl_link_table =’RSL’AND EXISTS( SELECT 1 FROM rcv_receiving_sub_ledger RRSLWHERE GLIR.reference_2 =RRSL.reference2AND GLIR.reference_3 =RRSL.reference3 AND GLIR.reference_4 =RRSL.reference4AND RRSL.rcv_transaction_id in(select transaction_id from rcv_transactions where po_header_id =))

SELECTA.ORG_ID "ORG ID",E.VENDOR_NAME "VENDOR NAME",UPPER(E.VENDOR_TYPE_LOOKUP_CODE) "VENDOR TYPE",F.VENDOR_SITE_CODE "VENDOR SITE",F.ADDRESS_LINE1 "ADDRESS",F.CITY "CITY",F.COUNTRY "COUNTRY",TO_CHAR(TRUNC(D.CREATION_DATE)) "PO DATE",D.SEGMENT1 "PO NUMBER",D.TYPE_LOOKUP_CODE "PO TYPE",C.QUANTITY_ORDERED "QTY ORDERED",C.QUANTITY_CANCELLED "QTY CANCALLED",G.ITEM_DESCRIPTION "ITEM DESCRIPTION",G.UNIT_PRICE "UNIT PRICE",(NVL(C.QUANTITY_ORDERED,0)-NVL(C.QUANTITY_CANCELLED,0))*NVL(G.UNIT_PRICE,0) "PO Line Amount",(SELECTDECODE(PH.APPROVED_FLAG, 'Y', 'Approved')FROM PO.PO_HEADERS_ALL PHWHERE PH.PO_HEADER_ID = D.PO_HEADER_ID) "PO STATUS",A.INVOICE_TYPE_LOOKUP_CODE "INVOICE TYPE",A.INVOICE_AMOUNT "INVOICE AMOUNT",TO_CHAR(TRUNC(A.INVOICE_DATE)) "INVOICE DATE",A.INVOICE_NUM "INVOICE NUMBER",

A single Query covering P2P life Cycle

Page 22: Apps Tables

(SELECTDECODE(X.MATCH_STATUS_FLAG, 'A', 'Approved')FROM AP.AP_INVOICE_DISTRIBUTIONS_ALL XWHERE X.INVOICE_DISTRIBUTION_ID = B.INVOICE_DISTRIBUTION_ID)"Invoice Approved?",A.AMOUNT_PAID,H.AMOUNT,I.CHECK_NUMBER "CHEQUE NUMBER",TO_CHAR(TRUNC(I.CHECK_DATE)) "PAYMENT DATE"FROM AP.AP_INVOICES_ALL A,AP.AP_INVOICE_DISTRIBUTIONS_ALL B,PO.PO_DISTRIBUTIONS_ALL C,PO.PO_HEADERS_ALL D,PO.PO_VENDORS E,PO.PO_VENDOR_SITES_ALL F,PO.PO_LINES_ALL G,AP.AP_INVOICE_PAYMENTS_ALL H,AP.AP_CHECKS_ALL IWHERE A.INVOICE_ID = B.INVOICE_IDAND B.PO_DISTRIBUTION_ID = C. PO_DISTRIBUTION_ID (+)AND C.PO_HEADER_ID = D.PO_HEADER_ID (+)AND E.VENDOR_ID (+) = D.VENDOR_IDAND F.VENDOR_SITE_ID (+) = D.VENDOR_SITE_IDAND D.PO_HEADER_ID = G.PO_HEADER_IDAND C.PO_LINE_ID = G.PO_LINE_IDAND A.INVOICE_ID = H.INVOICE_IDAND H.CHECK_ID = I.CHECK_IDAND F.VENDOR_SITE_ID = I.VENDOR_SITE_IDAND C.PO_HEADER_ID IS NOT NULLAND A.PAYMENT_STATUS_FLAG = 'Y'AND D.TYPE_LOOKUP_CODE != 'BLANKET';

Page 23: Apps Tables

select * from PO_HEADERS_ALL WHERE SEGMENT1 = '517' AND TYPE_LOOKUP_CODE = 'QUOTATION'

select * from PO_HEADERS_ALL WHERE SEGMENT1 = '4451' AND TYPE_LOOKUP_CODE= 'STANDARD'

select * from RCV_SHIPMENT_HEADERS WHERE RECEIPT_NUM = '9616' AND SHIP_TO_ORG_ID = 207

select * from AP_ACCOUNTING_EVENTS_ALL WHERE source_id = 63253 and source_table = 'AP_INVOICES'

select * from AP_ACCOUNTING_EVENTS_ALL WHERE source_id = 28599 and source_table = 'AP_CHECKS' --ACCOUNTING_EVENT_ID = 77429

select * from po_position_controls_all where job_id = 18069

select * from po_control_groups_all

select * from po_control_functions

Page 24: Apps Tables

The following query can be used to determine which Routing Rules are active: select rule_id, role "Forwarded From", begin_date, end_date, action_argument "Forwarded To" from wf_routing_rules where SYSDATE between BEGIN_DATE-1 and NVL(END_DATE,sysdate+1) order by rule_id;

poah.employee_id emp_id, fnd.user_name, substr(poah.object_type_code,1,3) type, poah.object_sub_type_code sub_type,

Page 25: Apps Tables

poah.employee_id emp_id, fnd.user_name, substr (poah.object_type_code,1,3) type, poah.object_sub_type_code sub_type,

Page 26: Apps Tables

from wf_item_activity_statuses a, po_requisition_headers_all b,fnd_user c,po_requisition_lines_all

from wf_item_activity_statuses a, po_requisition_headers_all b,fnd_user c,po_requisition_lines_all

Page 27: Apps Tables

select * from AME_TRANS_APPROVAL_HISTORY where transaction_id = '125864' order by row_timestamp

- Query to compare the errored PO creation date

Page 28: Apps Tables

- Query to compare the errored requisition errored date

Page 29: Apps Tables

(select 'existing internal order'from OE_ORDER_LINES_ALL LIN where LIN.SOURCE_DOCUMENT_LINE_ID = RQL.REQUISITION_LINE_ID and LIN.SOURCE_DOCUMENT_TYPE_ID = 10)

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

Page 30: Apps Tables

select * from rcv_transactions where po_header_id =&&po_header_id;

Prompt 9. rcv_Accounting_Events from 11i10 Onwards SELECT * FROM rcv_Accounting_Events WHERE rcv_transaction_id IN (select transaction_id from rcv_transactions where po_header_id =&&po_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 =&&po_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 =&&po_header_id);

Prompt 12. mtl_material_transactions select * from mtl_material_transactions where transaction_source_id = &&po_header_id;

Prompt 13. mtl_transaction_accounts select * from mtl_transaction_accounts where transaction_id in ( select transaction_id from mtl_material_transactions where transaction_source_id = &&po_header_id );

/*----------------------------------------------------------------- Section : C. Invoicing details. Note : Pls provide the details of following queries if invoicing data only if the issue is related to the calculation of

porh.requisition_header_id = porl.requisition_header_id and porl.requisition_line_id = pord.requisition_line_id and Accrual amount or issue with the data in POXXRVDR,POXPORRA (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 =&&po_header_id );

Prompt 15. ap_invoices_all select * from ap_invoices_all where invoice_id in (select invoice_id from ap_invoice_distributions_all

Page 31: Apps Tables

where po_distribution_id in ( select po_distribution_id from po_distributions_all where po_header_id =&&po_header_id ));

/*----------------------------------------------------------------- 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_transactions where transaction_source_id = &&po_header_id );

-- one more query required from RRSL to PA

/*----------------------------------------------------------------- Section : E. Encumbrances Data Note : Pls provide details if issue is related to the Encumbrance 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

Page 32: Apps Tables

,(select decode(ph.approved_FLAG, 'Y', 'Approved') from po.po_headers_all ph where,ph.po_header_ID = d.po_header_id) "PO Approved?" where po_header_id =&&po_header_id));

Prompt 19. gl_import_references SELECT * FROM gl_import_references GLIR

,(select decode(x.MATCH_STATUS_FLAG, 'A', 'Approved') from ap.ap_invoice_distributions_all x where WHERE reference_1='PO' AND gl_sl_link_table ='RSL' AND EXISTS ( SELECT 1 FROM rcv_receiving_sub_ledger RRSL WHERE GLIR.reference_2 =RRSL.reference2 AND GLIR.reference_3 =RRSL.reference3 AND GLIR.reference_4 =RRSL.reference4 AND RRSL.rcv_transaction_id in (select transaction_id from rcv_transactions where po_header_id =&&po_header_id));

Page 33: Apps Tables
Page 34: Apps Tables

(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 =));

(select to_char(transaction_id) from mtl_material_transactions where transaction_source_id = );

(select 1 from rcv_receiving_sub_ledger rrsl where gli.reference22 =RRSL.reference2 and GLI.reference23 =RRSL.reference3AND GLI.reference24 =RRSL.reference4AND RRSL.rcv_transaction_id in(select transaction_id from rcv_transactionswhere po_header_id ));

SELECT *FROM gl_import_references GLIR WHERE reference_1=’PO’ AND gl_sl_link_table =’RSL’AND EXISTS( SELECT 1 FROM rcv_receiving_sub_ledger RRSLWHERE GLIR.reference_2 =RRSL.reference2AND GLIR.reference_3 =RRSL.reference3 AND GLIR.reference_4 =RRSL.reference4AND RRSL.rcv_transaction_id in

(NVL(C.QUANTITY_ORDERED,0)-NVL(C.QUANTITY_CANCELLED,0))*NVL(G.UNIT_PRICE,0) "PO Line Amount",

A single Query covering P2P life Cycle

Page 35: Apps Tables

The following query can be used to determine which Routing Rules are active: select rule_id, role "Forwarded From", begin_date, end_date, action_argument "Forwarded To" from wf_routing_rules where SYSDATE between BEGIN_DATE-1 and NVL(END_DATE,sysdate+1) order by rule_id;

Page 36: Apps Tables

where po_header_id =&&po_header_id;

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;

SELECT * FROM po_releases_all WHERE po_header_id =&&po_header_id;

/*-----------------------------------------------------------------

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;

Page 37: Apps Tables

select * from rcv_transactions where po_header_id =&&po_header_id;

Prompt 9. rcv_Accounting_Events from 11i10 Onwards SELECT * FROM rcv_Accounting_Events

(select transaction_id from rcv_transactions where po_header_id =&&po_header_id);

Prompt 10. rcv_receiving_sub_ledger select * from rcv_receiving_sub_ledger

(select transaction_id from rcv_transactions where po_header_id =&&po_header_id);

Prompt 11. rcv_sub_ledger_details select * from rcv_sub_ledger_details

(select transaction_id from rcv_transactions where po_header_id =&&po_header_id);

Prompt 12. mtl_material_transactions select * from mtl_material_transactions where transaction_source_id = &&po_header_id;

Prompt 13. mtl_transaction_accounts select * from mtl_transaction_accounts

( select transaction_id from mtl_material_transactions where transaction_source_id = &&po_header_id );

/*-----------------------------------------------------------------

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 POXXRVDR,POXPORRA

-------------------------------------------------------------------*/

Prompt 14. ap_invoice_distributions_all select * from ap_invoice_distributions_all

( select po_distribution_id from po_distributions_all where po_header_id =&&po_header_id );

(select invoice_id from ap_invoice_distributions_all

Page 38: Apps Tables

( select po_distribution_id from po_distributions_all where po_header_id =&&po_header_id ));

/*-----------------------------------------------------------------

Note : Pls provide details if issue is related to the cost transferred to projects for Inventory and receiving. -------------------------------------------------------------------*/ Prompt 16. pa_expenditure_items_all

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 = &&po_header_id );

-- one more query required from RRSL to PA

/*-----------------------------------------------------------------

Note : Pls provide details if issue is related to the Encumbrance Amount mismatch for the PO. -------------------------------------------------------------------*/

WHERE reference2 IN ('&&po_header_id');

/*-----------------------------------------------------------------

Note : Pls furnish following details only if issue is related to the GL Transfer of receiving transactions. -----------------------------------------------------------------*/

WHERE user_je_source_name ='Purchasing'

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

Page 39: Apps Tables

where po_header_id =&&po_header_id));

Prompt 19. gl_import_references

FROM gl_import_references GLIR

FROM rcv_receiving_sub_ledger RRSL WHERE GLIR.reference_2 =RRSL.reference2 AND GLIR.reference_3 =RRSL.reference3 AND GLIR.reference_4 =RRSL.reference4 AND RRSL.rcv_transaction_id in (select transaction_id from rcv_transactions where po_header_id =&&po_header_id));

Page 40: Apps Tables

(select 1 from rcv_receiving_sub_ledger rrsl where gli.reference22 =RRSL.reference2 and GLI.reference23 =RRSL.reference3AND GLI.reference24 =RRSL.reference4AND RRSL.rcv_transaction_id in(select transaction_id from rcv_transactionswhere po_header_id ));

( SELECT 1 FROM rcv_receiving_sub_ledger RRSLWHERE GLIR.reference_2 =RRSL.reference2AND GLIR.reference_3 =RRSL.reference3 AND GLIR.reference_4 =RRSL.reference4AND RRSL.rcv_transaction_id in

Page 41: Apps Tables

The following query can be used to determine which Routing Rules are active: select rule_id, role "Forwarded From", begin_date, end_date, action_argument "Forwarded To" from wf_routing_rules where SYSDATE between BEGIN_DATE-1 and NVL(END_DATE,sysdate+1) order by rule_id;

Page 42: Apps Tables

Status Populated Tables Column(status) Value

Entered oe_order_headers_all open_flag Y

oe_order_lines_all

oe_price_adjustmentsoe_order_price_attribsoe_order_holds_all

Booked oe_order_headers_all Booked_flag Ywsh_delivery_details Released_status R

wsh_delivery_details Released_status Swsh_picking_batches

(Fully) mtl_reservations

mtl_txn_request_headersmtl_txn_request_lines

(Partial) wsh_delivery_details SB

wsh_new_deliveries namewsh_delivery_assignments

wsh_delivery_details Released_status Y

wsh_delivery_details Released_status Cmtl_material_transactionswsh_new_deliveries C

oe_order_lines_all Shipped_quantity

Pick Released

mtl_material_transactions_temp

Pick Confirmed

Ship Confirmed

Page 43: Apps Tables

wsh_delivery_legs

oe_order_headers_all open_flag N

Autoinvoicewsh_delivery_details Released_status Ira_interface_lines_allra_customer_trx_allra_customer_trx_lines_all

D

WF scripts doc id 183643.1

Query to find the transactions against this Sales Order

select rcta.trx_number "Transaction", rctta.name "Trans Type", RCTA.CT_REFERENCE "Reference", rcta.CREATION_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_CONTEXT "Created From", rcta.CREATED_FROM "CC/Form", rcta.PRINTING_ORIGINAL_DATE "Orig 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 fuwhere RCTA.CT_REFERENCE = '20001731' ( give order no)and fcp.CONCURRENT_PROGRAM_ID (+) = rcta.PROGRAM_IDand fcp1.CONCURRENT_PROGRAM_NAME (+) = rcta.and rctta.CUST_TRX_TYPE_ID = rcta.CUST_TRX_TYPE_IDand rctta.ORG_ID = rcta.ORG_IDand fu.USER_ID = rcta.CREATED_BYorder by rcta.trx_number

select * from oe_order_holds_all where header_id = 755934

Page 44: Apps Tables

Finding the Order line release status

select * from apps.OE_HOLD_sources_all where hold_source_id

select * from OE_HOLD_definitions where hold_id in (1

select * from oe_line_sets where line_id in ( 1163708

SELECT DECODE(RELEASED_STATUS,'Y','PICKED','S','PICKED'WHERE SOURCE_CODE = 'OE' AND SOURCE_LINE_ID = &line_id

Page 45: Apps Tables

Description/transactions Others

1 record created in header table

Lines for particular records

When discount gets appliedIf line has price attributes then populatedIf any hold applied for order like credit check etc.

Order booked.Ready to release Pick Release API / Pick Confirm APINo records in wsh_delivery_assignments andwsh_new_deliveries

Move Order (Creation - Transaction)After batch is created for pick release.

No records in mtl_material_transactions

Released to warehouse.Backordered Line failed to be allocated in Inventoryif Auto-Create is Yes then data populated.deliveries get assigned

Line has been picked and staged by InventorySubinventory to staging area. Packing slip.

On the ship confirm form, check Ship all boxIf Defer Interface is checked I.e its deferred thenOM & inventory not updated.If Defer Interface is not checked.: Shippedget populated.

Ship to / Bill to (Order Type) / Price List / Item(Line Type)After Entering / booking -- Proces Order API will be called - This will take care of holds etcAfter Awaiting Shipping - Visible Demand Flag is set to Yes

Scheduling will happen -->.1 Soft Reservation 2. MTL Demand record will be inserted (This is input for Planning) -->3. Depending on the ATP rules it will give the Schedule Ship Date

Released to Warehouse (Line has been released to Inventory for processing)

This is only soft reservations. No physical movement of stock

Hard Reservations. Picked the stock. Physical movement of stock

Y To C:Shipped ;Delivery Note get printed Delivery assigned to trip stopquantity will be decreased from staged

Interface Trip Stop--Sales Order Issue Transaction in Material Transaction and reservation is releived

Page 46: Apps Tables

1 leg is called as 1 trip.1 Pickup & drop up stop for each trip.

147If all the lines get shipped then only flag N

Need to run workflow background process.Data will be populated after wkfw process.After running Autoinvoice Master Program forspecific batch transaction tables get populated

Cancelled

"Created by CC Program"

"Created From"

"Orig Print Date"

'20001731' ( give order no) rcta.PROGRAM_ID = rcta.CREATED_FROM

CUST_TRX_TYPE_ID

header_id = 755934

Page 47: Apps Tables

where hold_source_id in ( 179401 , 179402 , 179403 )

hold_id in (1,1181,1201)

( 1163708 , 1162719)

'S','PICKED','B','PICKED','NOT PICKED') FROM WSH_DELIVERY_DETAILS SOURCE_LINE_ID = &line_id

Page 48: Apps Tables

Queryselect * from MTL_INTERCOMPANY_PARAMETERS_V where SHIP_ORGANIZATION_NAME like 'Austra%select * MTL_INTERCOMPANY_PARAMETERS_Vselect max(order_number) from oe_order_headers_all where org_id=912

select * from oe_order_headers_all where org_id=912select * from org_organization_definitions

Select * from dba_views where view_name like 'BCIWSH_FG_AVAIL_ONHANDS_V'

select * from oe_order_headers_all where order_number=75001141select * from oe_order_lines_all where header_id= 6354017 select * from wsh_delivery_details where source_header_id= 6354017select * from wsh_new_deliveries where delivery_id = 12041579

Select * from ra_rules --- for accounting rule and invoicing rule definitions

select * from v$database

select * from org_organization_definitions

Query to find the WF activities as in front end select execution_time, to_char(ias.begin_date,'DD-MON-RR HH24:MI:SS') begin_date, ap.display_name||'/'||ac.display_name Activity, ias.activity_status Status, ias.activity_result_code Result, ias.assigned_user ass_User from wf_item_activity_statuses ias, wf_process_activities pa,

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 hrwhere gl.set_of_books_id=hr.set_of_books_idselect * from wsh_delivery_details where organization_id=4160 and serial_number is not nullselect * from mtl_system_items where inventory_item_id=198

select * from RA_CUSTOMER_TRX_LINES_ALL where CUSTOMER_TRX_ID = 968746

select * from ra_cust_trx_types_allselect * from ra_customer_trx_all where ct_reference = '186205'

Discounts : select * from oe_price_adjustments where header_id = '758957'

To see the Inventory accounting periods : select * from org_acct_periods

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

Page 49: Apps Tables

wf_activities_vl ac, wf_activities_vl ap, wf_items i where ias.item_type = 'POAPPRV' 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 = 'POAPPRV' 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,'DD-MON-RR HH24:MI:SS') begin_date, ap.display_name||'/'||ac.display_name Activity, ias.activity_status Status, ias.activity_result_code Result, 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 = 'POAPPRV' 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 = 'POAPPRV' 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

Query showing the Error in WF

select ac.display_name Activity, ias.activity_result_code Result,

ias.error_name ERROR_NAME, ias.error_message ERROR_MESSAGE, ias.error_stack ERROR_STACK

from wf_item_activity_statuses ias, wf_process_activities pa,

Page 50: Apps Tables

wf_items i

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_name, fif.id_flex_code flex_code, fif.id_flex_name flex_name FROM fnd_id_flex_segments_vl fifsv, fnd_id_flexs fif WHERE fifsv.id_flex_code = fif.id_flex_code--------------------------------

To Check Open inventory PeriodsSELECT summary.organization_id organization_id,ood.organization_code organization_code,ood.organization_name organization_name,periods.period_name period_name, periods.OPEN_FLAG ,periods.PERIOD_CLOSE_DATE ,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 VALUEFROM mtl_period_summary summary,org_acct_periods periods,org_organization_definitions oodWHERE summary.organization_id = periods.organization_idAND summary.organization_id = ood.organization_id

wf_activities_vl ac, wf_activities_vl ap,

where ias.item_type = 'OEOH' and ias.item_key = '730077' and ias.activity_status = 'ERROR' 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 = 'OEOH' 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'

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

Page 51: Apps Tables

AND summary.acct_period_id = periods.acct_period_idAND periods.period_close_date IS NOT NULLAND summary.inventory_type = 1

Page 52: Apps Tables

DetailsIntercompany RelationsIntercompany RelationsLatest Order

All in One OuAll OU / INV Etc

ALL OU/LE/BG Etc

To find the SQl for the View

; select * from fnd_responsibility_vl , select * from apps.FND_USER_RESP_GROUPS

Page 53: Apps Tables

SELECT fifsv.segment_name, fifsv.segment_num, fifsv.application_column_name, fifsv.flex_value_set_id, fif.application_table_name, fif.id_flex_code flex_code, fif.id_flex_name flex_name FROM fnd_id_flex_segments_vl fifsv, fnd_id_flexs fif WHERE fifsv.id_flex_code = fif.id_flex_code

Page 54: Apps Tables

SELECT fifsv.segment_name, fifsv.segment_num, fifsv.application_column_name, fifsv.flex_value_set_id, fif.application_table_name, fif.id_flex_code flex_code, fif.id_flex_name flex_name FROM fnd_id_flex_segments_vl fifsv, fnd_id_flexs fif WHERE fifsv.id_flex_code = fif.id_flex_code

Page 55: Apps Tables

SELECT fifsv.segment_name, fifsv.segment_num, fifsv.application_column_name, fifsv.flex_value_set_id, fif.application_table_name, fif.id_flex_code flex_code, fif.id_flex_name flex_name FROM fnd_id_flex_segments_vl fifsv, fnd_id_flexs fif WHERE fifsv.id_flex_code = fif.id_flex_code

Page 56: Apps Tables

SYSADMIN & HRMS

Page 56

Query to find the responsibilities of a user

select RESPONSIBILITY_NAME from apps.fnd_user_resp_groups_direct ur,fnd_responsibility_vl rvwhere ur.RESPONSIBILITY_ID=rv.RESPONSIBILITY_ID and ur.user_id=19228

Query to find the cost center assigned to an employee

SELECT * FROM PAY_COST_ALLOCATIONS_F WHERE assignment_id = 63801

2. SELECT * FROM PAY_COST_ALLOCATION_KEYFLEX WHERE COST_ALLOCATION_KEYFLEX_ID = 150

Patches & Bugs

Query to find the details 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 HeirarchySELECT 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,

SELECT * FROM ad_bugs

SELECT * FROM ad_applied_patches

Query to find when a user has logged in and logged out : select * from fnd_logins

Page 57: Apps Tables

SYSADMIN & HRMS

Page 57

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 58: Apps Tables

SYSADMIN & HRMS

Page 58

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 userSELECT 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_dateFROM 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 pbgWHERE 1=1and fa.application_id = frt.application_idAND 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_idAND NVL (furgd.end_date, SYSDATE + 1) > TRUNC (SYSDATE)AND furgd.user_id = fu.user_idAND NVL (fu.end_date, SYSDATE + 1) > TRUNC (SYSDATE)AND fu.user_name like '%ASHONTE_GABBART%'

Page 59: Apps Tables

SYSADMIN & HRMS

Page 59

AND fu.employee_id = papf.person_idAND TRUNC (SYSDATE) BETWEEN TRUNC (papf.effective_start_date)AND TRUNC (NVL (papf.effective_end_date, SYSDATE))AND papf.business_group_id = pbg.business_group_idand trunc(sysdate) between paaf.EFFECTIVE_START_DATE and paaf.EFFECTIVE_END_DATEand papf.PERSON_ID=paaf.PERSON_IDand trunc(sysdate) between papf.EFFECTIVE_START_DATE and papf.EFFECTIVE_END_DATEand gcc.code_combination_id=paaf.DEFAULT_CODE_COMB_ID --and gcc.segment1 in ('86')and paaf.ASSIGNMENT_NUMBER is not null

Max length of values in a column

Below is the query to get audit details like Last Logon Time and Last Logout Time of Responsibilities for particular User.

Query1

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 LIKE 'NUAN US Inventory Inquiry' AND fu.user_name LIKE 'AAOFFSHORE' AND frt.responsibility_id = flr.responsibility_id AND flr.login_id = fl.login_id AND fl.user_id = fu.user_idGROUP BY fl.user_id, fu.user_name, fu.last_logon_date, frt.responsibility_nameORDER BY 5 DESC

Below is the query to get audit details like Unsuccessful Login Time for particular User in the Oracle Applications

Query2

select max(length(tax_code)) from oe_order_lines_all

Page 60: Apps Tables

SYSADMIN & HRMS

Page 60

SELECT fu.user_id, fu.user_name, fl.attempt_time FROM fnd_unsuccessful_logins fl, fnd_user fu WHERE fl.user_id = fu.user_idORDER BY fu.user_id DESC

Page 61: Apps Tables

SYSADMIN & HRMS

Page 61

SELECT * FROM PAY_COST_ALLOCATIONS_F WHERE assignment_id = 63801

2. SELECT * FROM PAY_COST_ALLOCATION_KEYFLEX WHERE COST_ALLOCATION_KEYFLEX_ID = 150

Page 62: Apps Tables

SYSADMIN & HRMS

Page 62

Below is the query to get audit details like Last Logon Time and Last Logout Time of Responsibilities for particular User.

Below is the query to get audit details like Unsuccessful Login Time for particular User in the Oracle Applications

Page 63: Apps Tables

OM Queries

Page 63

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 user) .The query should list all the basic details and the reason for hold.

Fields:Order DateOrder NumberOrder Type (Name)Order ItemDate of HoldReason of HoldHold byDays of Hold

ANSWER:

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, DECODE (hs.hold_entity_code, 'S', 'Ship To', 'B', 'Bill To', 'I', 'Item', 'W', 'Warehouse', 'O', 'Order', 'C', 'Customer', hs.hold_entity_code ) entity_code, hs.hold_entity_id, DECODE (hs.hold_entity_code2, 'S', 'Ship To', 'B', 'Bill To', 'I', 'Item', 'W', 'Warehouse', 'O', 'Order', 'C', 'Customer', hs.hold_entity_code2 ) entity_code2, hs.hold_entity_id2, oh.released_flag FROM 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

Page 64: Apps Tables

OM Queries

Page 64

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_idAND 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:

SELECT oh.ordered_date,oh.flow_status_code "Order Status",oh.order_type_id, oh.order_category_code, party.party_name,oh.created_by,oh.request_date,oh.creation_date,oh.booked_date,oh.order_firmed_date,oh.transactional_curr_code,oh.payment_term_id,wdd.source_header_type_id,wdd.source_header_type_name,wdd.inventory_item_id,wdd.item_description,wdd.requested_quantity,wdd.requested_quantity_UOM,wdd.released_status,ca.cust_account_id "CustomerNumber",party.party_name "Customer Name"

FROM oe_order_headers_all oh,wsh_delivery_details wdd,hz_parties party,hz_cust_accounts_all ca

WHERE wdd.source_header_number=oh.order_numberAND oh.sold_to_org_id=ca.cust_account_idAND party.party_id=ca.party_idAND oh.flow_status_code like 'ENTERED';

III. Business Purpose: List all the Orders which are Backordered

Fields:Order Number Customer NumberCustomer NameOrder Type (Name)StatusDate of OrderItem NumberDescription

 

Page 65: Apps Tables

OM Queries

Page 65

ANSWER:

SELECT wdd.source_header_number "Order Number",party.party_name "Customer Name",ca.cust_account_id "CustomerNumber",wdd.source_header_type_name "Order Type", wdd.released_status "Status",oh.ordered_date,

oh.request_date, oh.creation_date, wdd.inventory_item_id "Item Number",

wdd.item_description FROM oe_order_headers_all oh JOIN hz_cust_accounts_all ca ON oh.sold_to_org_id = ca.cust_account_id JOIN hz_parties party ON party.party_id=ca.party_id JOIN wsh_delivery_details wdd ON wdd.source_header_number=oh.order_number WHERE wdd.released_status='B';

IV. Business Purpose: Develop a query to list all the orders which are ready for shipping

Fields:Sales Order NumberSales Order DateCustomer NamePick Slip NumberOrder StatusSub inventoryMove Order Number

ANSWER:

SELECT oh.header_id "Sales Order Number", oh.ordered_date, oh.sold_to_org_id,

party.party_name "Customer Name",mtll.pick_slip_number,wdd.subinventory,ol.flow_status_code, wdd.subinventory,mtlh.request_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,

 

Page 66: Apps Tables

OM Queries

Page 66

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';

To restrict o/p to one org

HOLD Authorizations

Query to check error in child WFSELECT i.item_key, i.item_type FROM wf_items i WHERE i.item_type = 'WFERROR' –'OMERROR' AND i.parent_item_type = 'OEOH' AND i.parent_item_key = 859384 –header_id

Sets on Order

select * from oe_order_holds_all where header_id = 755934

select * from apps.OE_HOLD_sources_all where hold_source_id in ( 179401 , 179402

select * from OE_HOLD_definitions where hold_id in (1,1181,1201)

select * from oe_line_sets where line_id in ( 1163708 , 1162719)Select * from OE_HOLD_AUTHORIZATIONS-- To check what responsibilites are authorized to apply and release holds

select * from oe_sets where header_id =

select b.responsibility_name , a.responsibility_id , a.START_DATE_ACTIVE ,c.hold_id , c.DESCRIPTIONfrom 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_idand b.responsibility_name like 'NUAN%US%MLB%Order%Manager'

SELECT OLS.LINE_ID, l.flow_status_code , OLS.SET_ID , OST.SET_NAME , OST.SET_TYPEFROM OE_LINE_SETS OLS, OE_SETS OST, oe_order_lines_all l

Page 67: Apps Tables

OM Queries

Page 67

--AND OST.SET_TYPE = 'FULFILLMENT_SET'

WHERE OLS.LINE_ID = l.line_idAND OLS.SET_ID = OST.SET_ID

and l.header_id = 1005745order by ols.set_id, ols.line_id;

Page 68: Apps Tables

OM Queries

Page 68

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 user) .The query should list all the basic details and the reason for hold.

NAME hold_name,creation_date held_date,

oe_hold_definitions hd

--pass header_id

Page 69: Apps Tables

OM Queries

Page 69

179401 , 179402 , 179403 )

To check what responsibilites are authorized to apply and release holds

START_DATE_ACTIVE , a.END_DATE_ACTIVE, a.authorized_action_code , c.name ,

oe_hold_definitions c

SET_NAME , OST.SET_TYPE

Page 70: Apps Tables

Metalink Imp Doc ID's

Page 70

Diagnostic Scripts

OM WF scripts doc id 183643.1

How to Diagnose Purchasing Document Approval Routing Doc ID: 603232.1

Reset a PO To Incomplete/Requires Reapproval For Isolated Cases : 390023.1

Manufacturing Transaction Diagnostics - FUNCTIONAL USER SQL INVESTIGATION and REPAIR Doc ID: 801794.1 ( Imp 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 ID: 417875.1

https://support.oracle.com/CSP/main/article?cmd=show&id=113492.1&type=NOT

How To Diagnose A Problem In The Item Catalog [ID 382592.1]

ORDER MANAGEMENT - DIAGNOSTICS LIBRARY Doc ID: 741642.1

Internal Sales Order Cycle In Order Management Doc ID: 744481.1

Setup Instructions For Internal Sales Orders Across Operating Units

What Are The Basic Steps Of The Purchasing Receipt Accrual Period-End Process?

Brief Overview of Receipt Accounting Doc ID: 563100.1

FAQ on Period End Accruals and Uninvoiced Receipt Report Doc ID: 453579.1

ORDER MANAGEMENT SUITE - DATA FIX SCRIPT PATCH LIBRARY Doc ID

Tom's Top Inventory FAQ Notes 2008 Doc ID: 605044.1

Note 568012.1 - FAQ: Inventory Standard Datafixes

How To Check Onhand / Serial Number Setup? Doc ID: 330284.1

AR Transaction Workbench FAQ 10.7 & 11.5 Doc ID: 220026.1

FAQ: Inventory Standard Datafixes Doc ID: 568012.1

Page 71: Apps Tables

Metalink Imp Doc ID's

Page 71

Self service toolkit: iProcurement [ID 131595.1]iProcurement Setup 11i: Oracle Internet Procurement Functional Setup [ID 134168.1]

http://kutuboracle.blogspot.com/2009/12/how-to-diagnose-purchasing-document.html

Also check if the user is setup for Category or Item-Source Realms. This restricts the items available for a user to find. For additional information see

A48
/CSP/main/article?cmd=show&id=332414.1&type=NOT /CSP/main/article?cmd=show&id=109497.1&type=NOT
Page 72: Apps Tables

Metalink Imp Doc ID's

Page 72

OM Documents

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: 467584.1

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

Page 73: Apps Tables

Metalink Imp Doc ID's

Page 73

iProcurement Setup 11i: Oracle Internet Procurement Functional Setup [ID 134168.1]

Realms. This restricts the items available for a user to find. For additional information see Note 332414.1

Page 74: Apps Tables

Metalink Imp Doc ID's

Page 74

. This restricts the items available for a user to find. For additional information see Note 332414.1 about Realm useage, and Note 109497.1 for Item Frequently Asked Questions.

Page 75: Apps Tables

Metalink Imp Doc ID's

Page 75

for Item Frequently Asked Questions.

Page 76: Apps Tables

Scripts

Page 76

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.*/

SET SERVEROUTPUT ON SIZE 100000;SET LINESIZE 175SET VERIFY OFF

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 FETCH cur_rec INTO l_line_id; EXIT WHEN cur_rec%NOTFOUND;

Page 77: Apps Tables

Scripts

Page 77

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);

SELECT L.ORG_ID, HEADER_ID INTO L_ORG, L_HEADER_ID FROM OE_ORDER_LINES_ALL L WHERE L.LINE_ID = L_LINE_ID; --OE_DEBUG_PUB.ADD(' ramising: l_org at line level = ' || L_ORG);

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_STATUS_CODE = NULL, LAST_UPDATE_DATE = SYSDATE WHERE LINE_ID = L_LINE_ID; -- COMMIT;

UPDATE OE_PRICE_ADJUSTMENTS SET INVOICED_FLAG='N' WHERE LINE_ID = L_LINE_ID

Page 78: Apps Tables

Scripts

Page 78

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 = L_HEADER_ID );*/

DELETE FROM RA_INTERFACE_LINES_ALL WHERE INTERFACE_LINE_ATTRIBUTE6 = to_char(L_LINE_ID) and INTERFACE_LINE_CONTEXT = 'ORDER ENTRY' and sales_order_line IS NOT NULL ;

DELETE FROM RA_INTERFACE_SALESCREDITS_ALL WHERE INTERFACE_LINE_ATTRIBUTE6=to_char(L_LINE_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_RETURN_STATUS: '|| L_RETURN_STATUS); 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 .... ');

SELECT NVL(COUNT(*),0) INTO L_COUNT FROM RA_INTERFACE_LINES_ALL WHERE INTERFACE_LINE_ATTRIBUTE6 = L_LINE_ID and INTERFACE_LINE_CONTEXT = 'ORDER ENTRY' and sales_order_line IS NOT NULL ; OE_DEBUG_PUB.ADD('ramising: count() from ra_i/face table ... ' || L_COUNT);

IF L_COUNT > 0 THEN -- DBMS_OUTPUT.PUT_LINE(' Pls perform COMMIT.... '); -- DBMS_OUTPUT.PUT_LINE(' Pls run the Auto Invoice Concurrent Program.... '); OE_DEBUG_PUB.ADD('ramising:- Line Successfully sent to AR interface tables.'); ELSE -- DBMS_OUTPUT.PUT_LINE(' Pls perform ROLLBACK .... '); -- DBMS_OUTPUT.PUT_LINE('.'); 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;

Page 79: Apps Tables

Scripts

Page 79

-- 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 80: Apps Tables

Scripts

Page 80

* Oracle Corp is NOT responsible if directly run on PRODUCTION Instance without running on TEST instance.

DBMS_OUTPUT.PUT_LINE(' .... Log File Name and Location :- '||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);

Page 81: Apps Tables

Scripts

Page 81

SELECT L.ORG_ID, HEADER_ID INTO L_ORG, L_HEADER_ID FROM OE_ORDER_LINES_ALL L WHERE L.LINE_ID = L_LINE_ID;

-- 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 );

OE_DEBUG_PUB.ADD('ramising:- executing MO_GLOBAL.set_policy_context().... ');

-- 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 );

SET INVOICED_QUANTITY = 0, INVOICE_INTERFACE_STATUS_CODE = NULL, OPEN_FLAG = 'Y' , FLOW_STATUS_CODE = NULL, LAST_UPDATE_DATE = SYSDATE

Page 82: Apps Tables

Scripts

Page 82

WHERE INTERFACE_LINE_ATTRIBUTE1= ( select to_char(order_number) from oe_order_headers_all where header_id = L_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_RETURN_STATUS: '|| L_RETURN_STATUS);

dbms_output.put_line(' Error msg from OE Stack: ' ||substr(x_msg_data,1,200));

Page 83: Apps Tables

Scripts

Page 83

-- 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 ||' ) ... ');

Page 84: Apps Tables

IB SC

Page 84

Instance # of an Orderselect * from csi_item_instanceswhere last_oe_order_line_id in (select line_id from oe_order_lines_all ool,oe_order_headers_all oohwhere ooh.order_number='71038447'and ooh.header_id=ool.header_id)

select * from oks_k_order_details where ORDER_LINE_ID1 = 1195914

select * from okc_k_headers_b where id = '294500' -- enter csr_id

Page 85: Apps Tables

FAQ's

Page 85

FAQ: Entering Purchase Orders Doc ID: 216824.1

FAQ: PO Control Actions Doc ID: 225217.1

What Are The Basic Steps Of The Purchasing Receipt Accrual Period-End Process?

FAQ: Enter Receipts and Receiving Transactions Doc ID: 209995.1

What Are the Receiving Defaulting Rules and Where Are they Set?

FAQ - Receiving Doc ID: 135385.1

Purchase Order Matching Frequently Asked Questions (FAQ's) Doc ID

TCA Parties FAQ Doc ID: 220383.1 Type: FAQ

Customer FAQ 11i Doc ID: 219938.1

How To Match An Invoice To A Receipt Doc ID: 204312.1

Page 86: Apps Tables

FAQ's

Page 86

What Are The Basic Steps Of The Purchasing Receipt Accrual Period-End Process? Doc ID: 467584.1

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 87: Apps Tables

PO API

Page 87

Note: 215276.1 - What API will Cancel an Existing Standard Purchase Order

How to use the PO Cancel API - PO_Document_Control_PUB [ID 833925.1]

Page 88: Apps Tables

fndload

Page 88

http://oracle.anilpassi.com/oracle-fndload-script-examples.html

Page 89: Apps Tables

Conversions

Page 89

http://erpschools.com/Apps/oracle-applications/articles/General/Interfaces-and-Conversions-in-Oracle-Applications/index.aspx

Page 90: Apps Tables

Conversions

Page 90

http://erpschools.com/Apps/oracle-applications/articles/General/Interfaces-and-Conversions-in-Oracle-Applications/index.aspx