SQL Id | SQL Text |
02w6b7xyjd8hu | SELECT 'Y' FROM SYS.DUAL WHERE EXISTS( SELECT NULL FROM PO_DISTRIBUTIONS POD, PO_DISTRIBUTIONS_ARCHIVE PODA WHERE POD.PO_HEADER_ID = :B3 AND (:B2 IS NULL OR POD.PO_LINE_ID = :B2 ) AND (:B1 IS NULL OR POD.LINE_LOCATION_ID = :B1 ) AND POD.PO_DISTRIBUTION_ID = PODA.PO_DISTRIBUTION_ID (+) AND PODA.LATEST_EXTERNAL_FLAG (+) = 'Y' AND ( (PODA.PO_DISTRIBUTION_ID IS NULL) OR (POD.QUANTITY_ORDERED <> PODA.QUANTITY_ORDERED) OR (POD.QUANTITY_ORDERED IS NULL AND PODA.QUANTITY_ORDERED IS NOT NULL) OR (POD.QUANTITY_ORDERED IS NOT NULL AND PODA.QUANTITY_ORDERED IS NULL) OR (POD.AMOUNT_ORDERED <> PODA.AMOUNT_ORDERED) OR (POD.AMOUNT_ORDERED IS NULL AND PODA.AMOUNT_ORDERED IS NOT NULL) OR (POD.AMOUNT_ORDERED IS NOT NULL AND PODA.AMOUNT_ORDERED IS NULL) OR (POD.DELIVER_TO_PERSON_ID <> PODA.DELIVER_TO_PERSON_ID) OR (POD.DELIVER_TO_PERSON_ID IS NULL AND PODA.DELIVER_TO_PERSON_ID IS NOT NULL) OR (POD.DELIVER_TO_PERSON_ID IS NOT NULL AND PODA.DELIVER_TO_PERSON_ID IS NULL) )) |
0wmwsjy9kd92f | SELECT PROFILE_OPTION_ID, APPLICATION_ID, SITE_ENABLED_FLAG , APP_ENABLED_FLAG , RESP_ENABLED_FLAG , USER_ENABLED_FLAG, ORG_ENABLED_FLAG , SERVER_ENABLED_FLAG, SERVERRESP_ENABLED_FLAG, HIERARCHY_TYPE, USER_CHANGEABLE_FLAG FROM FND_PROFILE_OPTIONS WHERE PROFILE_OPTION_NAME = :B1 AND START_DATE_ACTIVE <= SYSDATE AND NVL(END_DATE_ACTIVE, SYSDATE) >= SYSDATE |
15py3q5vknkb9 | BEGIN PO_REQAPPROVAL_INIT1.Start_WF_Process(ItemType => NULL, ItemKey => NULL, WorkflowProcess => NULL, ActionOriginatedFrom => 'PO_FORM', DocumentID => :1, DocumentNumber => :2, PreparerID => :3, DocumentTypeCode => :4, DocumentSubtype => :5, SubmitterAction => 'APPROVE', forwardToID => :6, forwardFromID => :7, DefaultApprovalPathID => :8, Note => :9, PrintFlag => :10, FaxFlag => :11, FaxNumber => :12, EmailFlag => :13, EmailAddress => :14, CreateSourcingRule => :15, UpdateSourcingRule => :16, ReleaseGenMethod => :17, MassUpdateReleases => :18, RetroactivePriceChange => :19, OrgAssignChange => :20, CommunicatePriceChange => :21, p_xml_flag => :22, FpdsngFlag => :23); END; |
1cyrp6fh6mp53 |
SELECT * FROM (SELECT /*+ LEADING(prl) */ prh.requisition_header_id REQUISITION_HEADER_ID , prh.segment1 REQUISITION_NUM , prl.requisition_line_id REQUISITION_LINE_ID , prl.line_num REQUISITION_LINE_NUM , prh.org_id OPERATING_UNIT_ID , nvl(po_moac_utils_pvt.get_ou_shortcode(prh.org_id), po_moac_utils_pvt.get_ou_name(prh.org_id)) ORGANIZATION , prh.type_lookup_code TYPE_LOOKUP_CODE , prl.item_description ITEM_DESCRIPTION , prl.item_id ITEM_ID , msi.concatenated_segments ITEM_NUMBER , prl.item_revision ITEM_REVISION , prl.quantity QUANTITY , prl.need_by_date NEED_BY_DATE , prl.category_id CATEGORY_ID , mc.concatenated_segments CATEGORY , prl.unit_meas_lookup_code UNIT_MEAS_LOOKUP_CODE , prl.unit_price REQ_UNIT_PRICE , DECODE (prl.rfq_required_flag, 'Y', 'RfqRequiredY', 'RfqRequiredN') RFQ_REQUIRED , NVL(prl.rfq_required_flag, 'N') RFQ_REQUIRED_FLAG , NVL(prl.on_rfq_flag, 'N') ON_RFQ_FLAG , NVL(prl.drop_ship_flag, 'N') DROP_SHIP_FLAG , prl.suggested_vendor_name SUGGESTED_VENDOR_NAME , prl.vendor_id VENDOR_ID , prl.suggested_vendor_location SUGGESTED_VENDOR_LOC , prl.vendor_site_id VENDOR_SITE_ID , DECODE(prl.order_type_lookup_code, 'FIXED PRICE', prl.amount, 'RATE', prl.amount, prl.quantity * prl.unit_price) REQ_AMOUNT , req_sob.currency_code REQ_CURRENCY_CODE , prl.bid_line_number BID_LINE_NUMBER , prl.bid_number BID_NUMBER , prl.suggested_buyer_id SUGGESTED_BUYER_ID , buyer.full_name SUGGESTED_BUYER , prh.creation_date CREATION_DATE , prl.currency_code FOREIGN_CURRENCY_CODE , DECODE(prl.order_type_lookup_code, 'FIXED PRICE', prl.currency_amount, 'RATE', prl.currency_amount, prl.quantity * prl.currency_unit_price) FOREIGN_CURRENCY_AMT , decode(pltb.purchase_basis, 'GOODS', prl.currency_unit_price , 'SERVICES', decode(prl.order_type_lookup_code , 'FIXED PRICE', prl.amount , 'AMOUNT', prl.quantity * prl.currency_unit_price) , 'TEMP LABOR', prl.currency_unit_price ) FOREIGN_CURRENCY_UNIT_PRICE , prl.deliver_to_location_id DELIVER_TO_LOCATION_ID , NVL(deliver_hrtl.location_code, SUBSTRB(rtrim(deliver_hz.address1)||'-'||rtrim(deliver_hz.city), 1, 20)) DELIVER_TO_LOCATION , prl.destination_organization_id DESTINATION_ORGANIZATION_ID , dst_hou.name DESTINATION_ORGANIZATION , prl.destination_subinventory DESTINATION_SUBINVENTORY , prl.destination_type_code DESTINATION_TYPE_CODE , NVL(deliver_hr.ship_to_location_id, deliver_hz.location_id) SHIP_TO_LOCATION_ID , prh.emergency_po_num EMERGENCY_PO_NUM , prh.emergency_po_org_id EMERGENCY_PO_ORG_ID , DECODE(prl.encumbered_flag, 'Y', 'EncumberedY', 'EncumberedN') ENCUMBERED , NVL(prl.encumbered_flag, 'N') ENCUMBERED_FLAG , prl.assignment_end_date ASSIGNMENT_END_DATE , prl.candidate_first_name CANDIDATE_FIRST_NAME , prl.suggested_vendor_contact SUGGESTED_VENDOR_CONTACT , prl.hazard_class_id HAZARD_CLASS_ID , prh.interface_source_code IMPORT_SOURCE_CODE , prl.job_id JOB_ID , prl.justification JUSTIFICATION , prl.candidate_last_name CANDIDATE_LAST_NAME , DECODE(SIGN(SYSDATE - NVL(prl.need_by_date, SYSDATE) - NVL(msi.full_lead_time, 0)), 1, 'Y', 'N') LATE_FLAG , DECODE(prl.modified_by_agent_flag, 'Y', 'ModifiedY', 'ModifiedN') MODIFIED , prl.auction_line_number NEGOTIATION_LINE_NUMBER , prl.auction_display_number NEGOTIATION_NUMBER , prl.note_to_agent NOTE_TO_BUYER , prl.note_to_receiver NOTE_TO_RECEIVER , prl.wip_operation_seq_num OPERATION_SEQUENCE , prl.wip_repetitive_schedule_id REPETITIVE_SCHEDULE_ID , DECODE(NVL(prl.pcard_flag, 'N'), 'N', TO_NUMBER(NULL), 'S', -99999, prh.pcard_id) PCARD_ID , prl.suggested_vendor_phone SUGGESTED_VENDOR_PHONE , prl.preferred_grade PREFERRED_GRADE , preparer.full_name PREPARER , prh.preparer_id PREPARER_ID , prl.quantity_received QUANTITY_RECEIVED , prl.rate FOREIGN_CURRENCY_RATE , prl.rate_date FOREIGN_CURRENCY_RATE_DATE , prl.rate_type FOREIGN_CURRENCY_RATE_TYPE , prl.reference_num REFERENCE_NUM , requester.full_name REQUESTER , prl.to_person_id R
EQUESTER_ID , prh.description REQUISITION_DESCRIPTION , prl.bom_resource_id BOM_RESOURCE_ID , prl.wip_resource_seq_num RESOURCE_SEQUENCE , prl.secondary_quantity SECONDARY_QUANTITY , prl.secondary_unit_of_measure SECONDARY_UNIT_OF_MEASURE , prl.blanket_po_line_num SOURCE_DOCUMENT_LINE , src_doc.segment1 SOURCE_DOCUMENT_NUM , prl.blanket_po_header_id SOURCE_DOCUMENT_ID , src_doc.org_id SOURCE_DOCUMENT_ORG_ID , prl.document_type_code SOURCE_DOC_TYPE_CODE , NVL(src_doc.global_agreement_flag, 'N') GLOBAL_FLAG , DECODE (src_doc.global_agreement_flag, 'Y', 'GlobalY', 'GlobalN') GLOBAL , DECODE (prl.blanket_po_header_id, NULL, 'N', 'Y') REQ_SOURCED_FLAG , prl.oke_contract_header_id OKE_CONTRACT_HEADER_ID , prl.assignment_start_date ASSIGNMENT_START_DATE , DECODE (prl.new_supplier_flag, 'Y', 'NewSupplierY', 'NewSupplierN') NEW_SUPPLIER , NVL(prl.new_supplier_flag, 'N') NEW_SUPPLIER_FLAG , prl.supplier_ref_number SUPPLIER_CONFIG_ID , prl.suggested_vendor_contact_email SUGGESTED_VENDOR_EMAIL , prl.suggested_vendor_contact_fax SUGGESTED_VENDOR_FAX , prl.suggested_vendor_product_code SUPPLIER_ITEM , prl.ussgl_transaction_code TRANSACTION_CODE , prl.transaction_reason_code TRANSACTION_REASON , plttl.line_type LINE_TYPE_DSP , pltb.line_type_id LINE_TYPE_ID , pltb.order_type_lookup_code ORDER_TYPE_LOOKUP_CODE , pltb.purchase_basis PURCHASE_BASIS , pltb.matching_basis MATCHING_BASIS , prl.labor_req_line_id LABOR_REQ_LINE_ID , DECODE (prl.suggested_buyer_id, NULL, 'Y', 'N') UNASSIGNED_FLAG , prl.un_number_id UN_NUMBER_ID , DECODE (prl.urgent_flag, 'Y', 'UrgentY', 'UrgentN') URGENT , NVL(prl.urgent_flag, 'N') URGENT_FLAG , DECODE (prl.vmi_flag, 'Y', 'VmiY', 'VmiN') VMI , NVL(prl.vmi_flag, 'N') VMI_FLAG , prl.wip_entity_id WIP_ENTITY_ID , prl.wip_line_id WIP_LINE_ID , NVL(prh.authorization_status, 'INCOMPLETE') AUTHORIZATION_STATUS , prl.attribute_category ATTRIBUTE_CATEGORY , prl.attribute1 ATTRIBUTE1 , prl.attribute2 ATTRIBUTE2 , prl.attribute3 ATTRIBUTE3 , prl.attribute4 ATTRIBUTE4 , prl.attribute5 ATTRIBUTE5 , prl.attribute6 ATTRIBUTE6 , prl.attribute7 ATTRIBUTE7 , prl.attribute8 ATTRIBUTE8 , prl.attribute9 ATTRIBUTE9 , prl.attribute10 ATTRIBUTE10 , prl.attribute11 ATTRIBUTE11 , prl.attribute12 ATTRIBUTE12 , prl.attribute13 ATTRIBUTE13 , prl.attribute14 ATTRIBUTE14 , prl.attribute15 ATTRIBUTE15 , req_fsp.inventory_organization_id BASE_INV_ORGANIZATION_ID , prl.auction_header_id AUCTION_HEADER_ID , prh.segment1 ||', ' || prl.line_num REQUEST , nvl( msi.concatenated_segments, prl.item_description) ITEM , decode(pltb.purchase_basis, 'GOODS', prl.unit_price , 'SERVICES', decode(prl.order_type_lookup_code , 'FIXED PRICE', prl.amount , 'AMOUNT', prl.quantity * prl.unit_price) , 'TEMP LABOR', prl.unit_price ) PRICE , prl.vendor_contact_id VENDOR_CONTACT_ID , prl.PARENT_REQ_LINE_ID , prl.source_type_code , ( SELECT 'Y' FROM dual WHERE exists ( SELECT 'Y' FROM po_req_distributions_all prd WHERE prd.requisition_line_id=prl.requisition_line_id AND prd.award_id is not null ) )AWARD_EXISTS , prl.kanban_card_id , src_doc.style_id SOURCE_DOCUMENT_STYLE_ID , src_doc_line.po_line_id SOURCE_DOCUMENT_LINE_ID FROM po_requisition_headers_all prh, po_requisition_lines prl, hr_all_organization_units_tl hou, po_line_types_tl plttl, po_line_types_b pltb, po_headers_all src_doc, po_lines_all src_doc_line, hr_all_organization_units_tl dst_hou, mtl_system_items_b_kfv msi, mtl_categories_kfv mc, per_all_people_f buyer, per_all_people_f requester, per_all_people_f preparer, hr_locations_all_tl deliver_hrtl, hr_locations_all deliver_hr, hz_locations deliver_hz, financials_system_params_all req_fsp, gl_sets_of_books req_sob WHERE prl.requisition_header_id = prh.requisition_header_id AND hou.organization_id (+) = prl.org_id AND req_fsp.org_id = prl.org_id AND hou.language (+) = userenv('LANG') AND pltb.line_type_id = prl.line_type_id AND plttl.line_type_id = pltb.line_type_
id AND plttl.language = userenv('LANG') AND src_doc.po_header_id (+) = prl.blanket_po_header_id AND src_doc_line.po_header_id(+) = prl.blanket_po_header_id AND src_doc_line.line_num(+) = prl.blanket_po_line_num AND dst_hou.organization_id (+) = prl.destination_organization_id AND dst_hou.language (+) = userenv('LANG') AND msi.inventory_item_id (+) = prl.item_id AND msi.organization_id (+) = prl.destination_organization_id AND mc.category_id = prl.category_id AND buyer.person_id (+) = prl.suggested_buyer_id AND TRUNC(sysdate) BETWEEN buyer.effective_start_date(+) AND buyer.effective_end_date(+) AND requester.person_id = prl.to_person_id AND TRUNC(sysdate) BETWEEN requester.effective_start_date AND requester.effective_end_date AND preparer.person_id = prh.preparer_id AND TRUNC(sysdate) BETWEEN preparer.effective_start_date AND preparer.effective_end_date AND deliver_hr.location_id(+) = prl.deliver_to_location_id AND deliver_hrtl.location_id (+) = deliver_hr.location_id AND deliver_hrtl.language (+) = USERENV('LANG') AND deliver_hz.location_id(+) = prl.deliver_to_location_id AND req_fsp.set_of_books_id = req_sob.set_of_books_id AND prl.reqs_in_pool_flag = 'Y' AND ( NOT (pltb.order_type_lookup_code = 'RATE' AND pltb.purchase_basis = 'TEMP LABOR' AND EXISTS (SELECT 'Corresponding expense line not in pool' FROM po_requisition_lines_all expense_line WHERE expense_line.labor_req_line_id = prl.requisition_line_id AND expense_line.reqs_in_pool_flag is null))) AND ( NOT (pltb.order_type_lookup_code = 'FIXED PRICE' AND pltb.purchase_basis = 'SERVICES' AND EXISTS (SELECT 'Corresponding labor line not in pool' FROM po_requisition_lines_all labor_line WHERE labor_line.requisition_line_id = prl.labor_req_line_id AND labor_line.reqs_in_pool_flag is null))) AND NVL(prh.authorization_status, 'INCOMPLETE') NOT IN ('SYSTEM_SAVED', 'RETURNED') AND prl.requisition_line_id NOT IN (SELECT doc_builder.index_num1 FROM po_session_gt doc_builder WHERE doc_builder.key = :1) AND DECODE(FND_PROFILE.VALUE('PO_AUTOCREATE_ALLOW_BUYER_OVERRIDE'), 'Y', FND_GLOBAL.EMPLOYEE_ID, 'N', PRL.SUGGESTED_BUYER_ID, FND_GLOBAL.EMPLOYEE_ID)=FND_GLOBAL.EMPLOYEE_ID) QRSLT WHERE (requisition_line_id IN ( SELECT selected_req_lines.index_num1 FROM po_session_gt selected_req_lines WHERE selected_req_lines.key = :2 )) ORDER BY CREATION_DATE desc, ORGANIZATION, TO_NUMBER(REQUISITION_NUM) DESC, REQUISITION_LINE_NUM DESC |
1rd31t40r4fu5 | BEGIN fnd_global.bless_next_init('FND_PERMIT_0006'); FND_GLOBAL.APPS_INITIALIZE( user_id=>:1 , resp_id=>:2 , resp_appl_id=>:3 , security_group_id=>:4 , server_id=>:5);END; |
1xhyhsq3uy5by | SELECT ACCRUED_CODE_COMBINATION_ID FROM PO_SYSTEM_PARAMETERS |
2m7nn405vu27s |
SELECT * FROM (SELECT POH.ACCEPTANCE_DUE_DATE ACKNOWLEDGE_BY, NVL(POH.ACCEPTANCE_REQUIRED_FLAG, 'N') ACCEPTANCE_REQUIRED_FLAG, DECODE(POH.APPROVED_FLAG, 'Y', POH.APPROVED_DATE, NULL) APPROVED_DATE, POH.BILL_TO_LOCATION_ID, POH.AGENT_ID, NVL(POH.CANCEL_FLAG, 'N') HEADER_CANCEL_FLAG, POH.CLOSED_DATE, NVL(POH.CLOSED_CODE, 'OPEN') HEADER_CLOSED_CODE, POH.CONFIRMING_ORDER_FLAG, POH.CONSIGNED_CONSUMPTION_FLAG, NVL(POH.CONTERMS_EXIST_FLAG, 'N') CONTERMS_EXIST_FLAG, POH.CURRENCY_CODE CURRENCY_CODE, POH.COMMENTS DESCRIPTION, NVL(POH.FIRM_STATUS_LOOKUP_CODE, 'N') FIRM_STATUS_LOOKUP_CODE, POH.FIRM_DATE, POH.FOB_LOOKUP_CODE, POH.FREIGHT_TERMS_LOOKUP_CODE, NVL(POH.FROZEN_FLAG, 'N') FROZEN_FLAG, POH.NOTE_TO_RECEIVER, POH.NOTE_TO_VENDOR, POH.SEGMENT1 PO_NUM, NVL(POH.USER_HOLD_FLAG, 'N') USER_HOLD_FLAG, POH.ORG_ID, POH.CREATION_DATE HEADER_CREATION_DATE, POH.PCARD_ID, POH.PAY_ON_CODE, POH.PRINT_COUNT, POH.PRINTED_DATE, POH.RATE RATE, POH.RATE_DATE, POH.RATE_TYPE RATE_TYPE, POH.REVISED_DATE, POH.REVISION_NUM, POH.SHIP_VIA_LOOKUP_CODE, POH.VENDOR_ID, POH.VENDOR_CONTACT_ID, POH.VENDOR_SITE_ID, POH.TERMS_ID, POH.SHIPPING_CONTROL, POH.TYPE_LOOKUP_CODE, DECODE(POH.XML_CHANGE_SEND_DATE, NULL, POH.XML_SEND_DATE, POH.XML_CHANGE_SEND_DATE) XML_SEND_DATE, POH.BLANKET_TOTAL_AMOUNT, POH.START_DATE EFFECTIVE_FROM, POH.END_DATE EFFECTIVE_TO, POH.GLOBAL_AGREEMENT_FLAG, POH.AMOUNT_LIMIT, POH.PRICE_UPDATE_TOLERANCE, POH.STYLE_ID, NVL(POH.ENCUMBRANCE_REQUIRED_FLAG, 'N') ENCUMBRANCE_REQUIRED_FLAG, POH.CHANGE_REQUESTED_BY, POH.ATTRIBUTE1, POH.ATTRIBUTE2, POH.ATTRIBUTE3, POH.ATTRIBUTE4, POH.ATTRIBUTE5, POH.ATTRIBUTE6, POH.ATTRIBUTE7, POH.ATTRIBUTE8, POH.ATTRIBUTE9, POH.ATTRIBUTE10, POH.ATTRIBUTE11, POH.ATTRIBUTE12, POH.ATTRIBUTE13, POH.ATTRIBUTE14, POH.ATTRIBUTE15, POH.PO_HEADER_ID, NVL(POH.AUTHORIZATION_STATUS, 'INCOMPLETE') AUTHORIZATION_STATUS, NVL(POH.SUPPLIER_AUTH_ENABLED_FLAG, 'N') SUPPLIER_AUTH_ENABLED_FLAG, PDTL.TYPE_NAME DOC_TYPE_NAME, PDTL.DOCUMENT_TYPE_CODE DOCUMENT_TYPE_CODE, AT.NAME TERMS_NAME, HRL2.LOCATION_CODE BILL_TO_LOCATION, V.VENDOR_NAME SUPPLIER, VS.VENDOR_SITE_CODE SUPPLIER_SITE, POD.AMOUNT_TO_ENCUMBER, POD.BUDGET_ACCOUNT_ID, POD.ENCUMBERED_FLAG, POD.ENCUMBERED_AMOUNT, POD.GL_ENCUMBERED_DATE, POD.GL_ENCUMBERED_PERIOD_NAME ENCUMBERED_PERIOD, POD.UNENCUMBERED_AMOUNT BLANKET_UNENCUMBERED_AMOUNT, POAH.ACTION_DATE CANCELED_DATE, POAH.EMPLOYEE_ID CANCELED_BY_ID, NVL(PO_MOAC_UTILS_PVT.GET_OU_SHORTCODE(POH.ORG_ID), PO_MOAC_UTILS_PVT.GET_OU_NAME(POH.ORG_ID)) OPERATING_UNIT, POH.ATTRIBUTE_CATEGORY, PDSLVL.DISPLAY_NAME DOC_STYLE, PDT.SECURITY_LEVEL_CODE, PDT.ACCESS_LEVEL_CODE, NVL(POH.PENDING_SIGNATURE_FLAG, 'N') PENDING_SIGNATURE_FLAG, POH.LOCK_OWNER_ROLE, POD.PO_DISTRIBUTION_ID, POH.SUPPLIER_NOTIF_METHOD, POH.FAX, POH.EMAIL_ADDRESS, -- Bug 5468465 NVL(POH.CAT_ADMIN_AUTH_ENABLED_FLAG, 'N') CAT_ADMIN_AUTH_ENABLED_FLAG FROM PO_DOCUMENT_TYPES_ALL_B PDT, PO_DOCUMENT_TYPES_ALL_TL PDTL, PO_VENDORS V, PO_VENDOR_SITES_ALL VS, PO_VENDOR_CONTACTS VC, AP_TERMS AT, HR_LOCATIONS_ALL_TL HRL2, PO_HEADERS_ALL POH, PO_DISTRIBUTIONS_ALL POD, PO_ACTION_HISTORY POAH, PO_DOC_STYLE_LINES_VL PDSLVL WHERE PDT.DOCUMENT_TYPE_CODE = :1 AND PDT.DOCUMENT_SUBTYPE = POH.TYPE_LOOKUP_CODE AND PDT.DOCUMENT_TYPE_CODE = PDTL.DOCUMENT_TYPE_CODE AND PDT.DOCUMENT_SUBTYPE = PDTL.DOCUMENT_SUBTYPE AND PDTL.LANGUAGE = USERENV('LANG') AND PDT.ORG_ID = PDTL.ORG_ID AND PDT.ORG_ID = POH.ORG_ID AND V.VENDOR_ID (+) = POH.VENDOR_ID AND VS.VENDOR_SITE_ID (+) = POH.VENDOR_SITE_ID AND VC.VENDOR_CONTACT_ID (+) = POH.VENDOR_CONTACT_ID AND /* Bug 6241452 */ ( POH.VENDOR_CONTACT_ID IS NULL OR POH.VENDOR_SITE_ID=VC.VENDOR_SITE_ID ) AND AT.TERM_ID (+) = POH.TERMS_ID AND POH.PO_HEADER_ID = POD.PO_HEADER_ID (+) AND 'AGREEMENT' = POD.DISTRIBUTION_TYPE (+) AND POH.REVISION_NUM = POAH.OBJECT_REVISION_NUM (+) AND POH.PO_HEADER_ID = POAH.OBJECT_ID (+) AND POH.TYPE_LOOKUP_CODE = POAH.OBJECT_SUB_TY
PE_CODE (+) AND :2 = POAH.OBJECT_TYPE_CODE (+) AND POAH.ACTION_CODE (+) = 'CANCEL' AND HRL2.LOCATION_ID (+) = POH.BILL_TO_LOCATION_ID AND HRL2.LANGUAGE (+) = USERENV('LANG') AND ( ( NVL(POH.GLOBAL_AGREEMENT_FLAG, 'N') = 'Y' AND (PO_MOAC_UTILS_PVT.check_access(POH.ORG_ID) = 'Y' OR EXISTS ( SELECT 'ENABLED IN MOAC OU' FROM PO_GA_ORG_ASSIGNMENTS POGA WHERE POH.PO_HEADER_ID = POGA.PO_HEADER_ID AND POGA.ENABLED_FLAG ='Y' AND (PO_MOAC_UTILS_PVT.check_access(POGA.ORGANIZATION_ID) = 'Y' OR PO_MOAC_UTILS_PVT.check_access(POGA.PURCHASING_ORG_ID) = 'Y' ) ) AND POH.AUTHORIZATION_STATUS = 'APPROVED' AND NVL(POH.CLOSED_CODE, 'OPEN') <> 'FINALLY CLOSED' AND NVL(POH.CANCEL_FLAG, 'N') = 'N' AND NVL(POH.FROZEN_FLAG, 'N') = 'N' AND ( TRUNC(SYSDATE) BETWEEN NVL(TRUNC(POH.START_DATE), TRUNC(SYSDATE) -1) AND NVL(TRUNC(POH.END_DATE), TRUNC(SYSDATE)+1) OR ( TRUNC(POH.START_DATE) IS NOT NULL AND TRUNC(SYSDATE) <= TRUNC(POH.START_DATE)) ) ) ) OR (NVL(GLOBAL_AGREEMENT_FLAG, 'N') = 'N' AND TYPE_LOOKUP_CODE = 'STANDARD' AND PO_MOAC_UTILS_PVT.CHECK_ACCESS (POH.ORG_ID ) = 'Y') ) AND POH.STYLE_ID = PDSLVL.STYLE_ID (+) AND POH.TYPE_LOOKUP_CODE = PDSLVL.DOCUMENT_SUBTYPE (+) AND PDSLVL.ENABLED_FLAG (+) = 'Y' AND (:3<> 'CAT_ADMIN' OR POH.CAT_ADMIN_AUTH_ENABLED_FLAG = 'Y') AND (/** always allow access to the buyer of the document **/ (agent_id = :4) OR ( ( (access_level_code IS NULL OR access_level_code = 'FULL') OR /** If the access level is View Only, prevent Modify or Full access **/ (access_level_code = 'VIEW_ONLY' AND :5 NOT IN ('MODIFY', 'FULL')) OR /** If the access level is Modify, prevent Full access **/ (access_level_code = 'MODIFY' AND :6 <> 'FULL')) AND ( (security_level_code = 'PUBLIC') OR (security_level_code IN ('PRIVATE', 'PURCHASING', 'HIERARCHY') AND EXISTS ( SELECT 'Employee is in approval path of this document' FROM PO_ACTION_HISTORY POAH WHERE POAH.employee_id = :7 AND POAH.object_type_code IN ('PO', 'PA') AND POAH.object_id = POH.po_header_id) ) OR (security_level_code = 'PURCHASING' AND EXISTS ( SELECT 'User is a BUYER' FROM po_agents poa WHERE poa.agent_id = :8 AND SYSDATE BETWEEN NVL(POA.start_date_active, SYSDATE) AND NVL(POA.end_date_active, SYSDATE + 1)) ) OR (security_level_code = 'HIERARCHY' AND EXISTS ( SELECT 'User exists in the HIERARCHY' /** use aliases to avoid clashes with the main query for the org_id column name **/ FROM (SELECT org_id poeh_org_id, position_structure_id, employee_id, superior_id FROM po_employee_hierarchies) poeh, (SELECT org_id psp_org_id, security_position_structure_id FROM po_system_parameters_all) psp WHERE poeh.superior_id = :9 AND psp.psp_org_id = POH.org_id AND poeh.employee_id = agent_id AND poeh.position_structure_id = NVL(psp.security_position_structure_id, -1) ) ) ) ) ) AND 'Y' = Decode(Nvl(FND_PROFILE.Value('PO_ENFORCE_PROJ_SECURITY'), 'N'), 'Y', PA_PO_INTEGRATION_UTILS.PA_USER_PO_ACCESS_CHECK(poh.po_header_id, :10, 'VIEW'), 'Y')) QRSLT WHERE (AGENT_ID = :11 AND ( UPPER(AUTHORIZATION_STATUS) = UPPER(:12) AND (AUTHORIZATION_STATUS like :13 OR AUTHORIZATION_STATUS like :14 OR AUTHORIZATION_STATUS like :15 OR AUTHORIZATION_STATUS like :16))) ORDER BY header_creation_date DESC |
2xn2trkq5y922 | SELECT POH.PO_HEADER_ID FROM PO_HEADERS POH WHERE POH.PO_HEADER_ID = :B1 |
327r1ynryuzvw | begin PO_REQAPPROVAL_ACTION.APPROVE_DOC (:v1, :v2, :v3, :v4, :v5); end; |
34k9nsvs1zfv5 |
SELECT * FROM (SELECT DECODE(prl.po_release_id, NULL, NVL(POH.CLM_DOCUMENT_NUMBER, POH.segment1), NVL(POH.CLM_DOCUMENT_NUMBER, POH.segment1) || '-' || TO_CHAR(prl.release_num)) po_number_display, NVL(POH.CLM_DOCUMENT_NUMBER, POH.segment1) po_number , poh.po_header_id po_header_id , poh.agent_id agent_id , poh.creation_date creation_date , poh.vendor_id vendor_id , poh.vendor_site_id vendor_site_id , poh.vendor_contact_id vendor_contact_id , NVL(POL.LINE_NUM_DISPLAY, to_char(POL.LINE_NUM)) line_num , pol.item_description item_description , /*5082374, we should set the unit price and uom to null for prepayments. The 0*null is used so the datatype returned from the decode is number */ DECODE(pll.shipment_type, 'PREPAYMENT', DECODE(pll.matching_basis, 'AMOUNT', 0 *NULL, NVL(pll.price_override, pol.unit_price)), NVL(pll.price_override, pol.unit_price)) unit_price, DECODE(pll.shipment_type, 'PREPAYMENT', DECODE(pll.matching_basis, 'AMOUNT', NULL, pol.unit_meas_lookup_code), pol.unit_meas_lookup_code) unit_meas_lookup_code , mum.uom_class uom_class, pll.quantity quantity_ordered, pll.quantity_received quantity_received , (DECODE(pll.shipment_type, 'PREPAYMENT', pll.quantity_financed, NVL(pll.quantity_billed, 0))) quantity_billed, hrl.location_code ship_to_location, pvs.vendor_site_code vendor_site_code, pvs.pay_site_flag pay_site_flag, poh.currency_code currency_code, pol.po_line_id po_line_id, pll.line_location_id line_location_id, pll.ship_to_organization_id shipto_org_id, pll.shipment_num shipment_num, pll.taxable_flag taxable_flag, pll.tax_code_id tax_code_id, hro.name organization_name, pll.org_id org_id, pll.po_release_id po_release_id, msi.concatenated_segments item_number, pol.vendor_product_num supplier_item_number, pll.amount_received amount_received, DECODE(pll.shipment_type, 'PREPAYMENT', pll.amount_financed, NVL(pll.amount_billed, 0)) amount_billed, pll.amount amount_ordered, NVL(pll.matching_basis, 'QUANTITY') matching_basis, pol.item_id, flv.meaning matching_basis_meaning, prl.release_num, pv.vendor_name vendor_name, NULL waybill_airbill_num, --rsh.waybill_airbill_num, NULL packing_slip, --rsl.packing_slip, NULL container_num, --rsl.container_num, pll.match_option, pll.shipment_type, DECODE(pll.shipment_type, 'PREPAYMENT', 'Y', 'N') finance_flag, pll.ship_to_location_id, pv.segment1 vendor_num, (NVL(pll.quantity, 0) -DECODE(pll.shipment_type, 'PREPAYMENT', pll.quantity_financed, NVL(pll.quantity_billed, 0)) -NVL(pll.quantity_cancelled, 0)) unbilled_qty, NULL shipment_line_id, --rsl.shipment_line_id, (NVL(pll.amount, 0) -DECODE(pll.shipment_type, 'PREPAYMENT', pll.amount_financed, NVL(pll.amount_billed, 0)) -NVL(pll.amount_cancelled, 0)) unbilled_amount, poh.pay_on_code pay_on_code FROM po_headers_all poh , po_lines_all pol , po_lines_ap_v polv , po_line_locations_all pll , po_releases_all prl , po_vendor_sites_all pvs , hr_locations_all hrl , mtl_units_of_measure mum, mtl_system_items_kfv msi, hr_all_organization_units_vl hro, fnd_lookup_values_vl flv, po_vendors pv WHERE poh.po_header_id = pol.po_header_id AND poh.authorization_status = 'APPROVED' AND pol.po_line_id = pll.po_line_id and pol.po_line_id = polv.po_line_id AND pol.unit_meas_lookup_code = mum.unit_of_measure(+) AND pll.po_release_id = prl.po_release_id(+) AND pvs.vendor_site_id = poh.vendor_site_id AND hrl.location_id(+) = pll.ship_to_location_id AND NVL(pll.approved_flag, 'N') = 'Y' AND NVL(pll.cancel_flag, 'N') = 'N' AND poh.pcard_id IS NULL AND NVL(pll.closed_code, 'OPEN') NOT IN('FINALLY CLOSED', 'CLOSED', 'CANCELLED') AND pll.shipment_type IN('STANDARD', 'BLANKET', 'SCHEDULED', 'PREPAYMENT') AND hro.organization_id(+) = poh.org_id AND pol.item_id = msi.inventory_item_id(+) AND NVL(pll.consigned_flag, 'N') <> 'Y' AND NVL(msi.organization_id, pll.ship_to_organization_id) = pll.ship_to_organization_id AND flv.lookup_type(+) = 'MAT
CH_BASIS' AND flv.lookup_code(+) = NVL(pll.matching_basis, 'QUANTITY') AND pv.vendor_id = poh.vendor_id AND (DECODE(pll.shipment_type, 'PREPAYMENT', DECODE(pll.matching_basis, 'QUANTITY', (NVL(pll.quantity, 0) -NVL(pll.quantity_financed, 0) -NVL(pll.quantity_cancelled, 0)), (NVL(pll.amount, 0) -NVL(pll.amount_financed, 0) -NVL(pll.amount_cancelled, 0))), 1)) > 0 AND NVL(pll.match_option, 'P') = 'P' UNION SELECT DECODE(prl.PO_RELEASE_ID, NULL, NVL(POH.CLM_DOCUMENT_NUMBER, POH.segment1), NVL(POH.CLM_DOCUMENT_NUMBER, POH.segment1) || '-' || TO_CHAR(prl.RELEASE_NUM)) PO_NUMBER_DISPLAY, NVL(POH.CLM_DOCUMENT_NUMBER, POH.segment1) PO_NUMBER , poh.PO_HEADER_ID PO_HEADER_ID , poh.AGENT_ID AGENT_ID , poh.CREATION_DATE CREATION_DATE , poh.VENDOR_ID VENDOR_ID , poh.VENDOR_SITE_ID VENDOR_SITE_ID , poh.VENDOR_CONTACT_ID VENDOR_CONTACT_ID , NVL(POL.LINE_NUM_DISPLAY, to_char(POL.LINE_NUM)) LINE_NUM , pol.ITEM_DESCRIPTION ITEM_DESCRIPTION , /*5082374, we should set the unit price and uom to null for prepayments. The 0*null is used so the datatype returned from the decode is number */ DECODE(pll.shipment_type, 'PREPAYMENT', DECODE(pll.matching_basis, 'AMOUNT', 0*NULL, NVL(pll.PRICE_OVERRIDE, pol.UNIT_PRICE)), NVL(pll.PRICE_OVERRIDE, pol.UNIT_PRICE)) UNIT_PRICE , DECODE(pll.shipment_type, 'PREPAYMENT', DECODE(pll.matching_basis, 'AMOUNT', NULL, pol.UNIT_MEAS_LOOKUP_CODE), pol.UNIT_MEAS_LOOKUP_CODE) UNIT_MEAS_LOOKUP_CODE , mum.UOM_CLASS UOM_CLASS, PLL.QUANTITY QUANTITY_ORDERED, (AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt(RSL.shipment_line_id, PLL.MATCHING_BASIS, 'QUANTITY_RECEIVED')) QUANTITY_RECEIVED, (AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt(RSL.shipment_line_id, PLL.MATCHING_BASIS, 'QUANTITY_BILLED')) QUANTITY_BILLED, hrl.LOCATION_CODE SHIP_TO_LOCATION, pvs.VENDOR_SITE_CODE VENDOR_SITE_CODE, pvs.PAY_SITE_FLAG PAY_SITE_FLAG, poh.CURRENCY_CODE CURRENCY_CODE, pol.PO_LINE_ID PO_LINE_ID, pll.LINE_LOCATION_ID LINE_LOCATION_ID, pll.SHIP_TO_ORGANIZATION_ID SHIPTO_ORG_ID, pll.SHIPMENT_NUM SHIPMENT_NUM, pll.TAXABLE_FLAG TAXABLE_FLAG, pll.TAX_CODE_ID TAX_CODE_ID, hro.NAME ORGANIZATION_NAME, pll.ORG_ID ORG_ID, pll.PO_RELEASE_ID PO_RELEASE_ID, msi.CONCATENATED_SEGMENTS ITEM_NUMBER, pol.VENDOR_PRODUCT_NUM SUPPLIER_ITEM_NUMBER, (AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt(RSL.shipment_line_id, PLL.MATCHING_BASIS, 'AMOUNT_RECEIVED')) amount_received, (AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt( RSL.shipment_line_id, PLL.MATCHING_BASIS, 'AMOUNT_BILLED')) amount_billed, pll.amount AMOUNT_ORDERED, NVL(pll.MATCHING_BASIS, 'QUANTITY') MATCHING_BASIS, pol.ITEM_ID, flv.meaning MATCHING_BASIS_MEANING, prl.release_num, PV.VENDOR_NAME VENDOR_NAME, RSH.WAYBILL_AIRBILL_NUM, RSL.PACKING_SLIP, RSL.CONTAINER_NUM, PLL.MATCH_OPTION, PLL.SHIPMENT_TYPE, DECODE(pll.shipment_type, 'PREPAYMENT', 'Y', 'N') FINANCE_FLAG, pll.ship_to_location_id, pv.segment1 vendor_num, (AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt( RSL.shipment_line_id, PLL.MATCHING_BASIS, 'QUANTITY_UNBILLED')) UNBILLED_QTY, RSL.shipment_line_id, (AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt( RSL.shipment_line_id, PLL.MATCHING_BASIS, 'AMOUNT_UNBILLED')) UNBILLED_AMOUNT, POH.PAY_ON_CODE PAY_ON_CODE FROM PO_HEADERS_ALL poh , PO_LINES_ALL pol , po_lines_ap_v polv , PO_LINE_LOCATIONS_ALL pll , PO_RELEASES_ALL prl , PO_VENDOR_SITES_ALL pvs , HR_LOCATIONS_ALL hrl , MTL_UNITS_OF_MEASURE mum , MTL_SYSTEM_ITEMS_KFV MSI , HR_ALL_ORGANIZATION_UNITS_VL hro, fnd_lookup_values_vl flv , PO_VENDORS PV , RCV_SHIPMENT_LINES RSL , RCV_SHIPMENT_HEADERS RSH WHERE POH.PO_HEADER_ID = POL.PO_HEADER_ID AND POH.AUTHORIZATION_STATUS = 'APPROVED' AND POL.PO_LINE_ID = PLL.PO_LINE_ID and pol.po_line_id = polv.po_line_id AND pol.unit_meas_lookup_code = mum.unit_of_measure (+) AND PLL.PO_RELEASE_ID = PRL.PO_RELEASE_ID(+) AND pvs.vendor_site_id = poh.vendor_site_id AND hrl.location_id (+) = pll.ship_to_location_id AND NVL(pll.approved_flag,
'N') = 'Y' AND NVL(pll.CANCEL_FLAG, 'N') = 'N' AND POH.pcard_id IS NULL AND NVL(pll.closed_code, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CANCELLED') AND pll.shipment_type IN ('STANDARD', 'BLANKET', 'SCHEDULED', 'PREPAYMENT') AND hro.ORGANIZATION_ID (+) = poh.ORG_ID AND pol.item_id = MSI.inventory_item_id (+) AND NVL(pll.consigned_flag, 'N') <> 'Y' AND NVL(msi.ORGANIZATION_ID, pll.SHIP_TO_ORGANIZATION_ID) = pll.SHIP_TO_ORGANIZATION_ID AND flv.lookup_type (+) = 'MATCH_BASIS' AND flv.lookup_code (+) = NVL(pll.MATCHING_BASIS, 'QUANTITY') AND PV.VENDOR_ID = POH.VENDOR_ID AND RSL.PO_LINE_LOCATION_ID(+) = PLL.LINE_LOCATION_ID AND RSH.SHIPMENT_HEADER_ID(+) = RSL.SHIPMENT_HEADER_ID AND DECODE( PLL.MATCHING_BASIS, 'QUANTITY', AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt( RSL.shipment_line_id, PLL.MATCHING_BASIS, 'QUANTITY_RECEIVED'), AP_MATCHING_UTILS_PKG.Get_rcv_ship_qty_amt(RSL.shipment_line_id, PLL.MATCHING_BASIS, 'AMOUNT_RECEIVED'), 1 ) > 0 AND pll.match_option = 'R') QRSLT WHERE (UPPER(PO_NUMBER) LIKE :1 AND (PO_NUMBER LIKE :2 OR PO_NUMBER LIKE :3 OR PO_NUMBER LIKE :4 OR PO_NUMBER LIKE :5) AND NVL(PAY_ON_CODE, 'NULL') NOT IN ('RECEIPT') AND org_id IN (SELECT organization_id FROM per_all_assignments_f WHERE person_id=:6 AND nvl(effective_end_date, SYSDATE) >= SYSDATE)) ORDER BY PO_NUMBER desc, RELEASE_NUM desc |
39ns7knvp8759 | begin AP_ISP_UTILITIES_PKG.match_invoice_lines(:1, :2); end; |
3mhu25sfw466x | begin :1 := POR_UTIL_PKG.submitreq(:2, :3, :4, :5, :6); end; |
3v6p5sm1dkafz |
SELECT * FROM (SELECT /*+ LEADING(prl) */ prh.requisition_header_id REQUISITION_HEADER_ID , prh.segment1 REQUISITION_NUM , prl.requisition_line_id REQUISITION_LINE_ID , prl.line_num REQUISITION_LINE_NUM , prh.org_id OPERATING_UNIT_ID , nvl(po_moac_utils_pvt.get_ou_shortcode(prh.org_id), po_moac_utils_pvt.get_ou_name(prh.org_id)) ORGANIZATION , prh.type_lookup_code TYPE_LOOKUP_CODE , prl.item_description ITEM_DESCRIPTION , prl.item_id ITEM_ID , msi.concatenated_segments ITEM_NUMBER , prl.item_revision ITEM_REVISION , prl.quantity QUANTITY , prl.need_by_date NEED_BY_DATE , prl.category_id CATEGORY_ID , mc.concatenated_segments CATEGORY , prl.unit_meas_lookup_code UNIT_MEAS_LOOKUP_CODE , prl.unit_price REQ_UNIT_PRICE , DECODE (prl.rfq_required_flag, 'Y', 'RfqRequiredY', 'RfqRequiredN') RFQ_REQUIRED , NVL(prl.rfq_required_flag, 'N') RFQ_REQUIRED_FLAG , NVL(prl.on_rfq_flag, 'N') ON_RFQ_FLAG , NVL(prl.drop_ship_flag, 'N') DROP_SHIP_FLAG , prl.suggested_vendor_name SUGGESTED_VENDOR_NAME , prl.vendor_id VENDOR_ID , prl.suggested_vendor_location SUGGESTED_VENDOR_LOC , prl.vendor_site_id VENDOR_SITE_ID , DECODE(prl.order_type_lookup_code, 'FIXED PRICE', prl.amount, 'RATE', prl.amount, prl.quantity * prl.unit_price) REQ_AMOUNT , req_sob.currency_code REQ_CURRENCY_CODE , prl.bid_line_number BID_LINE_NUMBER , prl.bid_number BID_NUMBER , prl.suggested_buyer_id SUGGESTED_BUYER_ID , buyer.full_name SUGGESTED_BUYER , prh.creation_date CREATION_DATE , prl.currency_code FOREIGN_CURRENCY_CODE , DECODE(prl.order_type_lookup_code, 'FIXED PRICE', prl.currency_amount, 'RATE', prl.currency_amount, prl.quantity * prl.currency_unit_price) FOREIGN_CURRENCY_AMT , decode(pltb.purchase_basis, 'GOODS', prl.currency_unit_price , 'SERVICES', decode(prl.order_type_lookup_code , 'FIXED PRICE', prl.amount , 'AMOUNT', prl.quantity * prl.currency_unit_price) , 'TEMP LABOR', prl.currency_unit_price ) FOREIGN_CURRENCY_UNIT_PRICE , prl.deliver_to_location_id DELIVER_TO_LOCATION_ID , NVL(deliver_hrtl.location_code, SUBSTRB(rtrim(deliver_hz.address1)||'-'||rtrim(deliver_hz.city), 1, 20)) DELIVER_TO_LOCATION , prl.destination_organization_id DESTINATION_ORGANIZATION_ID , dst_hou.name DESTINATION_ORGANIZATION , prl.destination_subinventory DESTINATION_SUBINVENTORY , prl.destination_type_code DESTINATION_TYPE_CODE , NVL(deliver_hr.ship_to_location_id, deliver_hz.location_id) SHIP_TO_LOCATION_ID , prh.emergency_po_num EMERGENCY_PO_NUM , prh.emergency_po_org_id EMERGENCY_PO_ORG_ID , DECODE(prl.encumbered_flag, 'Y', 'EncumberedY', 'EncumberedN') ENCUMBERED , NVL(prl.encumbered_flag, 'N') ENCUMBERED_FLAG , prl.assignment_end_date ASSIGNMENT_END_DATE , prl.candidate_first_name CANDIDATE_FIRST_NAME , prl.suggested_vendor_contact SUGGESTED_VENDOR_CONTACT , prl.hazard_class_id HAZARD_CLASS_ID , prh.interface_source_code IMPORT_SOURCE_CODE , prl.job_id JOB_ID , prl.justification JUSTIFICATION , prl.candidate_last_name CANDIDATE_LAST_NAME , DECODE(SIGN(SYSDATE - NVL(prl.need_by_date, SYSDATE) - NVL(msi.full_lead_time, 0)), 1, 'Y', 'N') LATE_FLAG , DECODE(prl.modified_by_agent_flag, 'Y', 'ModifiedY', 'ModifiedN') MODIFIED , prl.auction_line_number NEGOTIATION_LINE_NUMBER , prl.auction_display_number NEGOTIATION_NUMBER , prl.note_to_agent NOTE_TO_BUYER , prl.note_to_receiver NOTE_TO_RECEIVER , prl.wip_operation_seq_num OPERATION_SEQUENCE , prl.wip_repetitive_schedule_id REPETITIVE_SCHEDULE_ID , DECODE(NVL(prl.pcard_flag, 'N'), 'N', TO_NUMBER(NULL), 'S', -99999, prh.pcard_id) PCARD_ID , prl.suggested_vendor_phone SUGGESTED_VENDOR_PHONE , prl.preferred_grade PREFERRED_GRADE , preparer.full_name PREPARER , prh.preparer_id PREPARER_ID , prl.quantity_received QUANTITY_RECEIVED , prl.rate FOREIGN_CURRENCY_RATE , prl.rate_date FOREIGN_CURRENCY_RATE_DATE , prl.rate_type FOREIGN_CURRENCY_RATE_TYPE , prl.reference_num REFERENCE_NUM , requester.full_name REQUESTER , prl.to_person_id R
EQUESTER_ID , prh.description REQUISITION_DESCRIPTION , prl.bom_resource_id BOM_RESOURCE_ID , prl.wip_resource_seq_num RESOURCE_SEQUENCE , prl.secondary_quantity SECONDARY_QUANTITY , prl.secondary_unit_of_measure SECONDARY_UNIT_OF_MEASURE , prl.blanket_po_line_num SOURCE_DOCUMENT_LINE , src_doc.segment1 SOURCE_DOCUMENT_NUM , prl.blanket_po_header_id SOURCE_DOCUMENT_ID , src_doc.org_id SOURCE_DOCUMENT_ORG_ID , prl.document_type_code SOURCE_DOC_TYPE_CODE , NVL(src_doc.global_agreement_flag, 'N') GLOBAL_FLAG , DECODE (src_doc.global_agreement_flag, 'Y', 'GlobalY', 'GlobalN') GLOBAL , DECODE (prl.blanket_po_header_id, NULL, 'N', 'Y') REQ_SOURCED_FLAG , prl.oke_contract_header_id OKE_CONTRACT_HEADER_ID , prl.assignment_start_date ASSIGNMENT_START_DATE , DECODE (prl.new_supplier_flag, 'Y', 'NewSupplierY', 'NewSupplierN') NEW_SUPPLIER , NVL(prl.new_supplier_flag, 'N') NEW_SUPPLIER_FLAG , prl.supplier_ref_number SUPPLIER_CONFIG_ID , prl.suggested_vendor_contact_email SUGGESTED_VENDOR_EMAIL , prl.suggested_vendor_contact_fax SUGGESTED_VENDOR_FAX , prl.suggested_vendor_product_code SUPPLIER_ITEM , prl.ussgl_transaction_code TRANSACTION_CODE , prl.transaction_reason_code TRANSACTION_REASON , plttl.line_type LINE_TYPE_DSP , pltb.line_type_id LINE_TYPE_ID , pltb.order_type_lookup_code ORDER_TYPE_LOOKUP_CODE , pltb.purchase_basis PURCHASE_BASIS , pltb.matching_basis MATCHING_BASIS , prl.labor_req_line_id LABOR_REQ_LINE_ID , DECODE (prl.suggested_buyer_id, NULL, 'Y', 'N') UNASSIGNED_FLAG , prl.un_number_id UN_NUMBER_ID , DECODE (prl.urgent_flag, 'Y', 'UrgentY', 'UrgentN') URGENT , NVL(prl.urgent_flag, 'N') URGENT_FLAG , DECODE (prl.vmi_flag, 'Y', 'VmiY', 'VmiN') VMI , NVL(prl.vmi_flag, 'N') VMI_FLAG , prl.wip_entity_id WIP_ENTITY_ID , prl.wip_line_id WIP_LINE_ID , NVL(prh.authorization_status, 'INCOMPLETE') AUTHORIZATION_STATUS , prl.attribute_category ATTRIBUTE_CATEGORY , prl.attribute1 ATTRIBUTE1 , prl.attribute2 ATTRIBUTE2 , prl.attribute3 ATTRIBUTE3 , prl.attribute4 ATTRIBUTE4 , prl.attribute5 ATTRIBUTE5 , prl.attribute6 ATTRIBUTE6 , prl.attribute7 ATTRIBUTE7 , prl.attribute8 ATTRIBUTE8 , prl.attribute9 ATTRIBUTE9 , prl.attribute10 ATTRIBUTE10 , prl.attribute11 ATTRIBUTE11 , prl.attribute12 ATTRIBUTE12 , prl.attribute13 ATTRIBUTE13 , prl.attribute14 ATTRIBUTE14 , prl.attribute15 ATTRIBUTE15 , req_fsp.inventory_organization_id BASE_INV_ORGANIZATION_ID , prl.auction_header_id AUCTION_HEADER_ID , prh.segment1 ||', ' || prl.line_num REQUEST , nvl( msi.concatenated_segments, prl.item_description) ITEM , decode(pltb.purchase_basis, 'GOODS', prl.unit_price , 'SERVICES', decode(prl.order_type_lookup_code , 'FIXED PRICE', prl.amount , 'AMOUNT', prl.quantity * prl.unit_price) , 'TEMP LABOR', prl.unit_price ) PRICE , prl.vendor_contact_id VENDOR_CONTACT_ID , prl.PARENT_REQ_LINE_ID , prl.source_type_code , ( SELECT 'Y' FROM dual WHERE exists ( SELECT 'Y' FROM po_req_distributions_all prd WHERE prd.requisition_line_id=prl.requisition_line_id AND prd.award_id is not null ) )AWARD_EXISTS , prl.kanban_card_id , src_doc.style_id SOURCE_DOCUMENT_STYLE_ID , src_doc_line.po_line_id SOURCE_DOCUMENT_LINE_ID FROM po_requisition_headers_all prh, po_requisition_lines prl, hr_all_organization_units_tl hou, po_line_types_tl plttl, po_line_types_b pltb, po_headers_all src_doc, po_lines_all src_doc_line, hr_all_organization_units_tl dst_hou, mtl_system_items_b_kfv msi, mtl_categories_kfv mc, per_all_people_f buyer, per_all_people_f requester, per_all_people_f preparer, hr_locations_all_tl deliver_hrtl, hr_locations_all deliver_hr, hz_locations deliver_hz, financials_system_params_all req_fsp, gl_sets_of_books req_sob WHERE prl.requisition_header_id = prh.requisition_header_id AND hou.organization_id (+) = prl.org_id AND req_fsp.org_id = prl.org_id AND hou.language (+) = userenv('LANG') AND pltb.line_type_id = prl.line_type_id AND plttl.line_type_id = pltb.line_type_
id AND plttl.language = userenv('LANG') AND src_doc.po_header_id (+) = prl.blanket_po_header_id AND src_doc_line.po_header_id(+) = prl.blanket_po_header_id AND src_doc_line.line_num(+) = prl.blanket_po_line_num AND dst_hou.organization_id (+) = prl.destination_organization_id AND dst_hou.language (+) = userenv('LANG') AND msi.inventory_item_id (+) = prl.item_id AND msi.organization_id (+) = prl.destination_organization_id AND mc.category_id = prl.category_id AND buyer.person_id (+) = prl.suggested_buyer_id AND TRUNC(sysdate) BETWEEN buyer.effective_start_date(+) AND buyer.effective_end_date(+) AND requester.person_id = prl.to_person_id AND TRUNC(sysdate) BETWEEN requester.effective_start_date AND requester.effective_end_date AND preparer.person_id = prh.preparer_id AND TRUNC(sysdate) BETWEEN preparer.effective_start_date AND preparer.effective_end_date AND deliver_hr.location_id(+) = prl.deliver_to_location_id AND deliver_hrtl.location_id (+) = deliver_hr.location_id AND deliver_hrtl.language (+) = USERENV('LANG') AND deliver_hz.location_id(+) = prl.deliver_to_location_id AND req_fsp.set_of_books_id = req_sob.set_of_books_id AND prl.reqs_in_pool_flag = 'Y' AND ( NOT (pltb.order_type_lookup_code = 'RATE' AND pltb.purchase_basis = 'TEMP LABOR' AND EXISTS (SELECT 'Corresponding expense line not in pool' FROM po_requisition_lines_all expense_line WHERE expense_line.labor_req_line_id = prl.requisition_line_id AND expense_line.reqs_in_pool_flag is null))) AND ( NOT (pltb.order_type_lookup_code = 'FIXED PRICE' AND pltb.purchase_basis = 'SERVICES' AND EXISTS (SELECT 'Corresponding labor line not in pool' FROM po_requisition_lines_all labor_line WHERE labor_line.requisition_line_id = prl.labor_req_line_id AND labor_line.reqs_in_pool_flag is null))) AND NVL(prh.authorization_status, 'INCOMPLETE') NOT IN ('SYSTEM_SAVED', 'RETURNED') AND prl.requisition_line_id NOT IN (SELECT doc_builder.index_num1 FROM po_session_gt doc_builder WHERE doc_builder.key = :1) AND DECODE(FND_PROFILE.VALUE('PO_AUTOCREATE_ALLOW_BUYER_OVERRIDE'), 'Y', FND_GLOBAL.EMPLOYEE_ID, 'N', PRL.SUGGESTED_BUYER_ID, FND_GLOBAL.EMPLOYEE_ID)=FND_GLOBAL.EMPLOYEE_ID) QRSLT WHERE ((suggested_buyer_id = :2 AND ship_to_location_id = :3)) ORDER BY CREATION_DATE desc, ORGANIZATION, TO_NUMBER(REQUISITION_NUM) DESC, REQUISITION_LINE_NUM DESC |
4md5yxcm3xmuy |
MERGE INTO PO_HEADERS_ALL PH USING ( SELECT PHD.DRAFT_ID, PHD.DELETE_FLAG, PHD.CHANGE_ACCEPTED_FLAG, PHD.PO_HEADER_ID, PHD.AGENT_ID, PHD.TYPE_LOOKUP_CODE, PHD.LAST_UPDATE_DATE, PHD.LAST_UPDATED_BY, PHD.SEGMENT1, PHD.SUMMARY_FLAG, PHD.ENABLED_FLAG, PHD.SEGMENT2, PHD.SEGMENT3, PHD.SEGMENT4, PHD.SEGMENT5, PHD.START_DATE_ACTIVE, PHD.END_DATE_ACTIVE, PHD.LAST_UPDATE_LOGIN, PHD.CREATION_DATE, PHD.CREATED_BY, PHD.VENDOR_ID, PHD.VENDOR_SITE_ID, PHD.VENDOR_CONTACT_ID, PHD.SHIP_TO_LOCATION_ID, PHD.BILL_TO_LOCATION_ID, PHD.TERMS_ID, PHD.SHIP_VIA_LOOKUP_CODE, PHD.FOB_LOOKUP_CODE, PHD.FREIGHT_TERMS_LOOKUP_CODE, PHD.STATUS_LOOKUP_CODE, PHD.CURRENCY_CODE, PHD.RATE_TYPE, PHD.RATE_DATE, PHD.RATE, PHD.FROM_HEADER_ID, PHD.FROM_TYPE_LOOKUP_CODE, PHD.START_DATE, PHD.END_DATE, PHD.BLANKET_TOTAL_AMOUNT, PHD.AUTHORIZATION_STATUS, PHD.REVISION_NUM, PHD.REVISED_DATE, PHD.APPROVED_FLAG, PHD.APPROVED_DATE, PHD.AMOUNT_LIMIT, PHD.MIN_RELEASE_AMOUNT, PHD.NOTE_TO_AUTHORIZER, PHD.NOTE_TO_VENDOR, PHD.NOTE_TO_RECEIVER, PHD.PRINT_COUNT, PHD.PRINTED_DATE, PHD.VENDOR_ORDER_NUM, PHD.CONFIRMING_ORDER_FLAG, PHD.COMMENTS, PHD.REPLY_DATE, PHD.REPLY_METHOD_LOOKUP_CODE, PHD.RFQ_CLOSE_DATE, PHD.QUOTE_TYPE_LOOKUP_CODE, PHD.QUOTATION_CLASS_CODE, PHD.QUOTE_WARNING_DELAY_UNIT, PHD.QUOTE_WARNING_DELAY, PHD.QUOTE_VENDOR_QUOTE_NUMBER, PHD.ACCEPTANCE_REQUIRED_FLAG, PHD.ACCEPTANCE_DUE_DATE, PHD.CLOSED_DATE, PHD.USER_HOLD_FLAG, PHD.APPROVAL_REQUIRED_FLAG, PHD.CANCEL_FLAG, PHD.FIRM_STATUS_LOOKUP_CODE, PHD.FIRM_DATE, PHD.FROZEN_FLAG, PHD.SUPPLY_AGREEMENT_FLAG, PHD.EDI_PROCESSED_FLAG, PHD.EDI_PROCESSED_STATUS, PHD.ATTRIBUTE_CATEGORY, PHD.ATTRIBUTE1, PHD.ATTRIBUTE2, PHD.ATTRIBUTE3, PHD.ATTRIBUTE4, PHD.ATTRIBUTE5, PHD.ATTRIBUTE6, PHD.ATTRIBUTE7, PHD.ATTRIBUTE8, PHD.ATTRIBUTE9, PHD.ATTRIBUTE10, PHD.ATTRIBUTE11, PHD.ATTRIBUTE12, PHD.ATTRIBUTE13, PHD.ATTRIBUTE14, PHD.ATTRIBUTE15, PHD.CLOSED_CODE, PHD.USSGL_TRANSACTION_CODE, PHD.GOVERNMENT_CONTEXT, PHD.REQUEST_ID, PHD.PROGRAM_APPLICATION_ID, PHD.PROGRAM_ID, PHD.PROGRAM_UPDATE_DATE, PHD.ORG_ID, PHD.GLOBAL_ATTRIBUTE_CATEGORY, PHD.GLOBAL_ATTRIBUTE1, PHD.GLOBAL_ATTRIBUTE2, PHD.GLOBAL_ATTRIBUTE3, PHD.GLOBAL_ATTRIBUTE4, PHD.GLOBAL_ATTRIBUTE5, PHD.GLOBAL_ATTRIBUTE6, PHD.GLOBAL_ATTRIBUTE7, PHD.GLOBAL_ATTRIBUTE8, PHD.GLOBAL_ATTRIBUTE9, PHD.GLOBAL_ATTRIBUTE10, PHD.GLOBAL_ATTRIBUTE11, PHD.GLOBAL_ATTRIBUTE12, PHD.GLOBAL_ATTRIBUTE13, PHD.GLOBAL_ATTRIBUTE14, PHD.GLOBAL_ATTRIBUTE15, PHD.GLOBAL_ATTRIBUTE16, PHD.GLOBAL_ATTRIBUTE17, PHD.GLOBAL_ATTRIBUTE18, PHD.GLOBAL_ATTRIBUTE19, PHD.GLOBAL_ATTRIBUTE20, PHD.INTERFACE_SOURCE_CODE, PHD.REFERENCE_NUM, PHD.WF_ITEM_TYPE, PHD.WF_ITEM_KEY, PHD.MRC_RATE_TYPE, PHD.MRC_RATE_DATE, PHD.MRC_RATE, PHD.PCARD_ID, PHD.PRICE_UPDATE_TOLERANCE, PHD.PAY_ON_CODE, PHD.XML_FLAG, PHD.XML_SEND_DATE, PHD.XML_CHANGE_SEND_DATE, PHD.GLOBAL_AGREEMENT_FLAG, PHD.CONSIGNED_CONSUMPTION_FLAG, PHD.CBC_ACCOUNTING_DATE, PHD.CONSUME_REQ_DEMAND_FLAG, PHD.CHANGE_REQUESTED_BY, PHD.SHIPPING_CONTROL, PHD.CONTERMS_EXIST_FLAG, PHD.CONTERMS_ARTICLES_UPD_DATE, PHD.CONTERMS_DELIV_UPD_DATE, PHD.ENCUMBRANCE_REQUIRED_FLAG, PHD.PENDING_SIGNATURE_FLAG, PHD.CHANGE_SUMMARY, PHD.DOCUMENT_CREATION_METHOD, PHD.SUBMIT_DATE, PHD.SUPPLIER_NOTIF_METHOD, PHD.FAX, PHD.EMAIL_ADDRESS, PHD.RETRO_PRICE_COMM_UPDATES_FLAG, PHD.RETRO_PRICE_APPLY_UPDATES_FLAG, PHD.UPDATE_SOURCING_RULES_FLAG, PHD.AUTO_SOURCING_FLAG, PHD.CREATED_LANGUAGE, PHD.CPA_REFERENCE, PHD.STYLE_ID, PHD.TAX_ATTRIBUTE_UPDATE_CODE, PHD.PAY_WHEN_PAID FROM PO_HEADERS_DRAFT_ALL PHD WHERE PHD.DRAFT_ID = :B1 AND NVL(PHD.CHANGE_ACCEPTED_FLAG, 'Y') = 'Y' ) PHDV ON (PH.PO_HEADER_ID = PHDV.PO_HEADER_ID) WHEN MATCHED THEN UPDATE SET PH.AGENT_ID = PHDV.AGENT_ID, PH.TYPE_LOOKUP_CODE = PHDV.TYPE_LOOKUP_CODE, PH.LAST_UPDATE_DATE = PHDV.LAST_UPDATE_DATE, PH.LAST_UPDATED_BY = PHDV.LAST_UPDATED_BY, PH.SEGMENT1 = PHDV.SEGMENT1, PH.SUMMARY_FLAG = PHDV.SUMMARY_FLAG, PH.EN
ABLED_FLAG = PHDV.ENABLED_FLAG, PH.SEGMENT2 = PHDV.SEGMENT2, PH.SEGMENT3 = PHDV.SEGMENT3, PH.SEGMENT4 = PHDV.SEGMENT4, PH.SEGMENT5 = PHDV.SEGMENT5, PH.START_DATE_ACTIVE = PHDV.START_DATE_ACTIVE, PH.END_DATE_ACTIVE = PHDV.END_DATE_ACTIVE, PH.LAST_UPDATE_LOGIN = PHDV.LAST_UPDATE_LOGIN, PH.VENDOR_ID = PHDV.VENDOR_ID, PH.VENDOR_SITE_ID = PHDV.VENDOR_SITE_ID, PH.VENDOR_CONTACT_ID = PHDV.VENDOR_CONTACT_ID, PH.SHIP_TO_LOCATION_ID = PHDV.SHIP_TO_LOCATION_ID, PH.BILL_TO_LOCATION_ID = PHDV.BILL_TO_LOCATION_ID, PH.TERMS_ID = PHDV.TERMS_ID, PH.SHIP_VIA_LOOKUP_CODE = PHDV.SHIP_VIA_LOOKUP_CODE, PH.FOB_LOOKUP_CODE = PHDV.FOB_LOOKUP_CODE, PH.FREIGHT_TERMS_LOOKUP_CODE = PHDV.FREIGHT_TERMS_LOOKUP_CODE, PH.STATUS_LOOKUP_CODE = PHDV.STATUS_LOOKUP_CODE, PH.CURRENCY_CODE = PHDV.CURRENCY_CODE, PH.RATE_TYPE = PHDV.RATE_TYPE, PH.RATE_DATE = PHDV.RATE_DATE, PH.RATE = PHDV.RATE, PH.FROM_HEADER_ID = PHDV.FROM_HEADER_ID, PH.FROM_TYPE_LOOKUP_CODE = PHDV.FROM_TYPE_LOOKUP_CODE, PH.START_DATE = PHDV.START_DATE, PH.END_DATE = PHDV.END_DATE, PH.BLANKET_TOTAL_AMOUNT = PHDV.BLANKET_TOTAL_AMOUNT, PH.AUTHORIZATION_STATUS = PHDV.AUTHORIZATION_STATUS, PH.REVISION_NUM = PHDV.REVISION_NUM, PH.REVISED_DATE = PHDV.REVISED_DATE, PH.APPROVED_FLAG = PHDV.APPROVED_FLAG, PH.APPROVED_DATE = PHDV.APPROVED_DATE, PH.AMOUNT_LIMIT = PHDV.AMOUNT_LIMIT, PH.MIN_RELEASE_AMOUNT = PHDV.MIN_RELEASE_AMOUNT, PH.NOTE_TO_AUTHORIZER = PHDV.NOTE_TO_AUTHORIZER, PH.NOTE_TO_VENDOR = PHDV.NOTE_TO_VENDOR, PH.NOTE_TO_RECEIVER = PHDV.NOTE_TO_RECEIVER, PH.PRINT_COUNT = PHDV.PRINT_COUNT, PH.PRINTED_DATE = PHDV.PRINTED_DATE, PH.VENDOR_ORDER_NUM = PHDV.VENDOR_ORDER_NUM, PH.CONFIRMING_ORDER_FLAG = PHDV.CONFIRMING_ORDER_FLAG, PH.COMMENTS = PHDV.COMMENTS, PH.REPLY_DATE = PHDV.REPLY_DATE, PH.REPLY_METHOD_LOOKUP_CODE = PHDV.REPLY_METHOD_LOOKUP_CODE, PH.RFQ_CLOSE_DATE = PHDV.RFQ_CLOSE_DATE, PH.QUOTE_TYPE_LOOKUP_CODE = PHDV.QUOTE_TYPE_LOOKUP_CODE, PH.QUOTATION_CLASS_CODE = PHDV.QUOTATION_CLASS_CODE, PH.QUOTE_WARNING_DELAY_UNIT = PHDV.QUOTE_WARNING_DELAY_UNIT, PH.QUOTE_WARNING_DELAY = PHDV.QUOTE_WARNING_DELAY, PH.QUOTE_VENDOR_QUOTE_NUMBER = PHDV.QUOTE_VENDOR_QUOTE_NUMBER, PH.ACCEPTANCE_REQUIRED_FLAG = PHDV.ACCEPTANCE_REQUIRED_FLAG, PH.ACCEPTANCE_DUE_DATE = PHDV.ACCEPTANCE_DUE_DATE, PH.CLOSED_DATE = PHDV.CLOSED_DATE, PH.USER_HOLD_FLAG = PHDV.USER_HOLD_FLAG, PH.APPROVAL_REQUIRED_FLAG = PHDV.APPROVAL_REQUIRED_FLAG, PH.CANCEL_FLAG = PHDV.CANCEL_FLAG, PH.FIRM_STATUS_LOOKUP_CODE = PHDV.FIRM_STATUS_LOOKUP_CODE, PH.FIRM_DATE = PHDV.FIRM_DATE, PH.FROZEN_FLAG = PHDV.FROZEN_FLAG, PH.SUPPLY_AGREEMENT_FLAG = PHDV.SUPPLY_AGREEMENT_FLAG, PH.ATTRIBUTE_CATEGORY = PHDV.ATTRIBUTE_CATEGORY, PH.ATTRIBUTE1 = PHDV.ATTRIBUTE1, PH.ATTRIBUTE2 = PHDV.ATTRIBUTE2, PH.ATTRIBUTE3 = PHDV.ATTRIBUTE3, PH.ATTRIBUTE4 = PHDV.ATTRIBUTE4, PH.ATTRIBUTE5 = PHDV.ATTRIBUTE5, PH.ATTRIBUTE6 = PHDV.ATTRIBUTE6, PH.ATTRIBUTE7 = PHDV.ATTRIBUTE7, PH.ATTRIBUTE8 = PHDV.ATTRIBUTE8, PH.ATTRIBUTE9 = PHDV.ATTRIBUTE9, PH.ATTRIBUTE10 = PHDV.ATTRIBUTE10, PH.ATTRIBUTE11 = PHDV.ATTRIBUTE11, PH.ATTRIBUTE12 = PHDV.ATTRIBUTE12, PH.ATTRIBUTE13 = PHDV.ATTRIBUTE13, PH.ATTRIBUTE14 = PHDV.ATTRIBUTE14, PH.ATTRIBUTE15 = PHDV.ATTRIBUTE15, PH.CLOSED_CODE = PHDV.CLOSED_CODE, PH.USSGL_TRANSACTION_CODE = PHDV.USSGL_TRANSACTION_CODE, PH.GOVERNMENT_CONTEXT = PHDV.GOVERNMENT_CONTEXT, PH.REQUEST_ID = PHDV.REQUEST_ID, PH.PROGRAM_APPLICATION_ID = PHDV.PROGRAM_APPLICATION_ID, PH.PROGRAM_ID = PHDV.PROGRAM_ID, PH.PROGRAM_UPDATE_DATE = PHDV.PROGRAM_UPDATE_DATE, PH.ORG_ID = PHDV.ORG_ID, PH.GLOBAL_ATTRIBUTE_CATEGORY = PHDV.GLOBAL_ATTRIBUTE_CATEGORY, PH.GLOBAL_ATTRIBUTE1 = PHDV.GLOBAL_ATTRIBUTE1, PH.GLOBAL_ATTRIBUTE2 = PHDV.GLOBAL_ATTRIBUTE2, PH.GLOBAL_ATTRIBUTE3 = PHDV.GLOBAL_ATTRIBUTE3, PH.GLOBAL_ATTRIBUTE4 = PHDV.GLOBAL_ATTRIBUTE4, PH.GLOBAL_ATTRIBUTE5 = PHDV.GLOBAL_ATTRIBUTE5, PH.GLOBAL_ATTRIBUTE6 = PHDV.GLOBAL_ATTRIBUTE6, PH.GLOBAL_ATTRIBUTE7 = PHDV.GLOBAL_ATTRIBUTE7, PH.GLOBAL_ATTRIBUTE8 = PHDV.GLOBAL_AT
TRIBUTE8, PH.GLOBAL_ATTRIBUTE9 = PHDV.GLOBAL_ATTRIBUTE9, PH.GLOBAL_ATTRIBUTE10 = PHDV.GLOBAL_ATTRIBUTE10, PH.GLOBAL_ATTRIBUTE11 = PHDV.GLOBAL_ATTRIBUTE11, PH.GLOBAL_ATTRIBUTE12 = PHDV.GLOBAL_ATTRIBUTE12, PH.GLOBAL_ATTRIBUTE13 = PHDV.GLOBAL_ATTRIBUTE13, PH.GLOBAL_ATTRIBUTE14 = PHDV.GLOBAL_ATTRIBUTE14, PH.GLOBAL_ATTRIBUTE15 = PHDV.GLOBAL_ATTRIBUTE15, PH.GLOBAL_ATTRIBUTE16 = PHDV.GLOBAL_ATTRIBUTE16, PH.GLOBAL_ATTRIBUTE17 = PHDV.GLOBAL_ATTRIBUTE17, PH.GLOBAL_ATTRIBUTE18 = PHDV.GLOBAL_ATTRIBUTE18, PH.GLOBAL_ATTRIBUTE19 = PHDV.GLOBAL_ATTRIBUTE19, PH.GLOBAL_ATTRIBUTE20 = PHDV.GLOBAL_ATTRIBUTE20, PH.PCARD_ID = PHDV.PCARD_ID, PH.PRICE_UPDATE_TOLERANCE = PHDV.PRICE_UPDATE_TOLERANCE, PH.PAY_ON_CODE = PHDV.PAY_ON_CODE, PH.CHANGE_REQUESTED_BY = PHDV.CHANGE_REQUESTED_BY, PH.SHIPPING_CONTROL = PHDV.SHIPPING_CONTROL, PH.CONTERMS_ARTICLES_UPD_DATE = PHDV.CONTERMS_ARTICLES_UPD_DATE, PH.CONTERMS_DELIV_UPD_DATE = PHDV.CONTERMS_DELIV_UPD_DATE, PH.ENCUMBRANCE_REQUIRED_FLAG = PHDV.ENCUMBRANCE_REQUIRED_FLAG, PH.SUPPLIER_NOTIF_METHOD = PHDV.SUPPLIER_NOTIF_METHOD, PH.FAX = PHDV.FAX, PH.EMAIL_ADDRESS = PHDV.EMAIL_ADDRESS, PH.RETRO_PRICE_COMM_UPDATES_FLAG = PHDV.RETRO_PRICE_COMM_UPDATES_FLAG, PH.RETRO_PRICE_APPLY_UPDATES_FLAG = PHDV.RETRO_PRICE_APPLY_UPDATES_FLAG, PH.UPDATE_SOURCING_RULES_FLAG = PHDV.UPDATE_SOURCING_RULES_FLAG, PH.AUTO_SOURCING_FLAG = PHDV.AUTO_SOURCING_FLAG, PH.TAX_ATTRIBUTE_UPDATE_CODE = PHDV.TAX_ATTRIBUTE_UPDATE_CODE, PH.PAY_WHEN_PAID = PHDV.PAY_WHEN_PAID WHEN NOT MATCHED THEN INSERT ( PH.PO_HEADER_ID, PH.AGENT_ID, PH.TYPE_LOOKUP_CODE, PH.LAST_UPDATE_DATE, PH.LAST_UPDATED_BY, PH.SEGMENT1, PH.SUMMARY_FLAG, PH.ENABLED_FLAG, PH.SEGMENT2, PH.SEGMENT3, PH.SEGMENT4, PH.SEGMENT5, PH.START_DATE_ACTIVE, PH.END_DATE_ACTIVE, PH.LAST_UPDATE_LOGIN, PH.CREATION_DATE, PH.CREATED_BY, PH.VENDOR_ID, PH.VENDOR_SITE_ID, PH.VENDOR_CONTACT_ID, PH.SHIP_TO_LOCATION_ID, PH.BILL_TO_LOCATION_ID, PH.TERMS_ID, PH.SHIP_VIA_LOOKUP_CODE, PH.FOB_LOOKUP_CODE, PH.FREIGHT_TERMS_LOOKUP_CODE, PH.STATUS_LOOKUP_CODE, PH.CURRENCY_CODE, PH.RATE_TYPE, PH.RATE_DATE, PH.RATE, PH.FROM_HEADER_ID, PH.FROM_TYPE_LOOKUP_CODE, PH.START_DATE, PH.END_DATE, PH.BLANKET_TOTAL_AMOUNT, PH.AUTHORIZATION_STATUS, PH.REVISION_NUM, PH.REVISED_DATE, PH.APPROVED_FLAG, PH.APPROVED_DATE, PH.AMOUNT_LIMIT, PH.MIN_RELEASE_AMOUNT, PH.NOTE_TO_AUTHORIZER, PH.NOTE_TO_VENDOR, PH.NOTE_TO_RECEIVER, PH.PRINT_COUNT, PH.PRINTED_DATE, PH.VENDOR_ORDER_NUM, PH.CONFIRMING_ORDER_FLAG, PH.COMMENTS, PH.REPLY_DATE, PH.REPLY_METHOD_LOOKUP_CODE, PH.RFQ_CLOSE_DATE, PH.QUOTE_TYPE_LOOKUP_CODE, PH.QUOTATION_CLASS_CODE, PH.QUOTE_WARNING_DELAY_UNIT, PH.QUOTE_WARNING_DELAY, PH.QUOTE_VENDOR_QUOTE_NUMBER, PH.ACCEPTANCE_REQUIRED_FLAG, PH.ACCEPTANCE_DUE_DATE, PH.CLOSED_DATE, PH.USER_HOLD_FLAG, PH.APPROVAL_REQUIRED_FLAG, PH.CANCEL_FLAG, PH.FIRM_STATUS_LOOKUP_CODE, PH.FIRM_DATE, PH.FROZEN_FLAG, PH.SUPPLY_AGREEMENT_FLAG, PH.EDI_PROCESSED_FLAG, PH.EDI_PROCESSED_STATUS, PH.ATTRIBUTE_CATEGORY, PH.ATTRIBUTE1, PH.ATTRIBUTE2, PH.ATTRIBUTE3, PH.ATTRIBUTE4, PH.ATTRIBUTE5, PH.ATTRIBUTE6, PH.ATTRIBUTE7, PH.ATTRIBUTE8, PH.ATTRIBUTE9, PH.ATTRIBUTE10, PH.ATTRIBUTE11, PH.ATTRIBUTE12, PH.ATTRIBUTE13, PH.ATTRIBUTE14, PH.ATTRIBUTE15, PH.CLOSED_CODE, PH.USSGL_TRANSACTION_CODE, PH.GOVERNMENT_CONTEXT, PH.REQUEST_ID, PH.PROGRAM_APPLICATION_ID, PH.PROGRAM_ID, PH.PROGRAM_UPDATE_DATE, PH.ORG_ID, PH.GLOBAL_ATTRIBUTE_CATEGORY, PH.GLOBAL_ATTRIBUTE1, PH.GLOBAL_ATTRIBUTE2, PH.GLOBAL_ATTRIBUTE3, PH.GLOBAL_ATTRIBUTE4, PH.GLOBAL_ATTRIBUTE5, PH.GLOBAL_ATTRIBUTE6, PH.GLOBAL_ATTRIBUTE7, PH.GLOBAL_ATTRIBUTE8, PH.GLOBAL_ATTRIBUTE9, PH.GLOBAL_ATTRIBUTE10, PH.GLOBAL_ATTRIBUTE11, PH.GLOBAL_ATTRIBUTE12, PH.GLOBAL_ATTRIBUTE13, PH.GLOBAL_ATTRIBUTE14, PH.GLOBAL_ATTRIBUTE15, PH.GLOBAL_ATTRIBUTE16, PH.GLOBAL_ATTRIBUTE17, PH.GLOBAL_ATTRIBUTE18, PH.GLOBAL_ATTRIBUTE19, PH.GLOBAL_ATTRIBUTE20, PH.INTERFACE_SOURCE_CODE, PH.REFERENCE_NUM, PH.WF_
ITEM_TYPE, PH.WF_ITEM_KEY, PH.MRC_RATE_TYPE, PH.MRC_RATE_DATE, PH.MRC_RATE, PH.PCARD_ID, PH.PRICE_UPDATE_TOLERANCE, PH.PAY_ON_CODE, PH.XML_FLAG, PH.XML_SEND_DATE, PH.XML_CHANGE_SEND_DATE, PH.GLOBAL_AGREEMENT_FLAG, PH.CONSIGNED_CONSUMPTION_FLAG, PH.CBC_ACCOUNTING_DATE, PH.CONSUME_REQ_DEMAND_FLAG, PH.CHANGE_REQUESTED_BY, PH.SHIPPING_CONTROL, PH.CONTERMS_EXIST_FLAG, PH.CONTERMS_ARTICLES_UPD_DATE, PH.CONTERMS_DELIV_UPD_DATE, PH.ENCUMBRANCE_REQUIRED_FLAG, PH.PENDING_SIGNATURE_FLAG, PH.CHANGE_SUMMARY, PH.DOCUMENT_CREATION_METHOD, PH.SUBMIT_DATE, PH.SUPPLIER_NOTIF_METHOD, PH.FAX, PH.EMAIL_ADDRESS, PH.RETRO_PRICE_COMM_UPDATES_FLAG, PH.RETRO_PRICE_APPLY_UPDATES_FLAG, PH.UPDATE_SOURCING_RULES_FLAG, PH.AUTO_SOURCING_FLAG, PH.CREATED_LANGUAGE, PH.CPA_REFERENCE, PH.STYLE_ID, PH.TAX_ATTRIBUTE_UPDATE_CODE, PH.PAY_WHEN_PAID ) VALUES ( PHDV.PO_HEADER_ID, PHDV.AGENT_ID, PHDV.TYPE_LOOKUP_CODE, PHDV.LAST_UPDATE_DATE, PHDV.LAST_UPDATED_BY, PHDV.SEGMENT1, PHDV.SUMMARY_FLAG, PHDV.ENABLED_FLAG, PHDV.SEGMENT2, PHDV.SEGMENT3, PHDV.SEGMENT4, PHDV.SEGMENT5, PHDV.START_DATE_ACTIVE, PHDV.END_DATE_ACTIVE, PHDV.LAST_UPDATE_LOGIN, PHDV.CREATION_DATE, PHDV.CREATED_BY, PHDV.VENDOR_ID, PHDV.VENDOR_SITE_ID, PHDV.VENDOR_CONTACT_ID, PHDV.SHIP_TO_LOCATION_ID, PHDV.BILL_TO_LOCATION_ID, PHDV.TERMS_ID, PHDV.SHIP_VIA_LOOKUP_CODE, PHDV.FOB_LOOKUP_CODE, PHDV.FREIGHT_TERMS_LOOKUP_CODE, PHDV.STATUS_LOOKUP_CODE, PHDV.CURRENCY_CODE, PHDV.RATE_TYPE, PHDV.RATE_DATE, PHDV.RATE, PHDV.FROM_HEADER_ID, PHDV.FROM_TYPE_LOOKUP_CODE, PHDV.START_DATE, PHDV.END_DATE, PHDV.BLANKET_TOTAL_AMOUNT, PHDV.AUTHORIZATION_STATUS, PHDV.REVISION_NUM, PHDV.REVISED_DATE, PHDV.APPROVED_FLAG, PHDV.APPROVED_DATE, PHDV.AMOUNT_LIMIT, PHDV.MIN_RELEASE_AMOUNT, PHDV.NOTE_TO_AUTHORIZER, PHDV.NOTE_TO_VENDOR, PHDV.NOTE_TO_RECEIVER, PHDV.PRINT_COUNT, PHDV.PRINTED_DATE, PHDV.VENDOR_ORDER_NUM, PHDV.CONFIRMING_ORDER_FLAG, PHDV.COMMENTS, PHDV.REPLY_DATE, PHDV.REPLY_METHOD_LOOKUP_CODE, PHDV.RFQ_CLOSE_DATE, PHDV.QUOTE_TYPE_LOOKUP_CODE, PHDV.QUOTATION_CLASS_CODE, PHDV.QUOTE_WARNING_DELAY_UNIT, PHDV.QUOTE_WARNING_DELAY, PHDV.QUOTE_VENDOR_QUOTE_NUMBER, PHDV.ACCEPTANCE_REQUIRED_FLAG, PHDV.ACCEPTANCE_DUE_DATE, PHDV.CLOSED_DATE, PHDV.USER_HOLD_FLAG, PHDV.APPROVAL_REQUIRED_FLAG, PHDV.CANCEL_FLAG, PHDV.FIRM_STATUS_LOOKUP_CODE, PHDV.FIRM_DATE, PHDV.FROZEN_FLAG, PHDV.SUPPLY_AGREEMENT_FLAG, PHDV.EDI_PROCESSED_FLAG, PHDV.EDI_PROCESSED_STATUS, PHDV.ATTRIBUTE_CATEGORY, PHDV.ATTRIBUTE1, PHDV.ATTRIBUTE2, PHDV.ATTRIBUTE3, PHDV.ATTRIBUTE4, PHDV.ATTRIBUTE5, PHDV.ATTRIBUTE6, PHDV.ATTRIBUTE7, PHDV.ATTRIBUTE8, PHDV.ATTRIBUTE9, PHDV.ATTRIBUTE10, PHDV.ATTRIBUTE11, PHDV.ATTRIBUTE12, PHDV.ATTRIBUTE13, PHDV.ATTRIBUTE14, PHDV.ATTRIBUTE15, PHDV.CLOSED_CODE, PHDV.USSGL_TRANSACTION_CODE, PHDV.GOVERNMENT_CONTEXT, PHDV.REQUEST_ID, PHDV.PROGRAM_APPLICATION_ID, PHDV.PROGRAM_ID, PHDV.PROGRAM_UPDATE_DATE, PHDV.ORG_ID, PHDV.GLOBAL_ATTRIBUTE_CATEGORY, PHDV.GLOBAL_ATTRIBUTE1, PHDV.GLOBAL_ATTRIBUTE2, PHDV.GLOBAL_ATTRIBUTE3, PHDV.GLOBAL_ATTRIBUTE4, PHDV.GLOBAL_ATTRIBUTE5, PHDV.GLOBAL_ATTRIBUTE6, PHDV.GLOBAL_ATTRIBUTE7, PHDV.GLOBAL_ATTRIBUTE8, PHDV.GLOBAL_ATTRIBUTE9, PHDV.GLOBAL_ATTRIBUTE10, PHDV.GLOBAL_ATTRIBUTE11, PHDV.GLOBAL_ATTRIBUTE12, PHDV.GLOBAL_ATTRIBUTE13, PHDV.GLOBAL_ATTRIBUTE14, PHDV.GLOBAL_ATTRIBUTE15, PHDV.GLOBAL_ATTRIBUTE16, PHDV.GLOBAL_ATTRIBUTE17, PHDV.GLOBAL_ATTRIBUTE18, PHDV.GLOBAL_ATTRIBUTE19, PHDV.GLOBAL_ATTRIBUTE20, PHDV.INTERFACE_SOURCE_CODE, PHDV.REFERENCE_NUM, PHDV.WF_ITEM_TYPE, PHDV.WF_ITEM_KEY, PHDV.MRC_RATE_TYPE, PHDV.MRC_RATE_DATE, PHDV.MRC_RATE, PHDV.PCARD_ID, PHDV.PRICE_UPDATE_TOLERANCE, PHDV.PAY_ON_CODE, PHDV.XML_FLAG, PHDV.XML_SEND_DATE, PHDV.XML_CHANGE_SEND_DATE, PHDV.GLOBAL_AGREEMENT_FLAG, PHDV.CONSIGNED_CONSUMPTION_FLAG, PHDV.CBC_ACCOUNTING_DATE, PHDV.CONSUME_REQ_DEMAND_FLAG, PHDV.CHANGE_REQUESTED_BY, PHDV.SHIPPING_CONTROL, PHDV.CONTERMS_EXIST_FLAG, PHDV.CONT
ERMS_ARTICLES_UPD_DATE, PHDV.CONTERMS_DELIV_UPD_DATE, PHDV.ENCUMBRANCE_REQUIRED_FLAG, PHDV.PENDING_SIGNATURE_FLAG, PHDV.CHANGE_SUMMARY, PHDV.DOCUMENT_CREATION_METHOD, PHDV.SUBMIT_DATE, PHDV.SUPPLIER_NOTIF_METHOD, PHDV.FAX, PHDV.EMAIL_ADDRESS, PHDV.RETRO_PRICE_COMM_UPDATES_FLAG, PHDV.RETRO_PRICE_APPLY_UPDATES_FLAG, PHDV.UPDATE_SOURCING_RULES_FLAG, PHDV.AUTO_SOURCING_FLAG, PHDV.CREATED_LANGUAGE, PHDV.CPA_REFERENCE, PHDV.STYLE_ID, PHDV.TAX_ATTRIBUTE_UPDATE_CODE, PHDV.PAY_WHEN_PAID ) WHERE NVL(PHDV.DELETE_FLAG, 'N') <> 'Y' |
4pd98vc39jzh8 | BEGIN :1 := AP_ETAX_PKG.calletax(:2, :3, :4, :5, :6, :7, :8, :9, :10, :11) ; END; |
529wb67xu0sy9 | SELECT INPUT_TAX_CLASSIFICATION_CODE FROM ZX_LINES_DET_FACTORS WHERE APPLICATION_ID = :B6 AND ENTITY_CODE = :B5 AND EVENT_CLASS_CODE = :B4 AND TRX_ID = :B3 AND TRX_LINE_ID = :B2 AND TRX_LEVEL_TYPE = :B1 |
5693gr4xpt3ac | SELECT 1 FROM PO_LINE_LOCATIONS_ALL PLLA WHERE PLLA.LINE_LOCATION_ID = :B1 AND ((NVL(PLLA.QUANTITY_RECEIVED, 0) > (SELECT SUM(NVL(POD.QUANTITY_DELIVERED, 0)) FROM PO_DISTRIBUTIONS POD WHERE POD.LINE_LOCATION_ID = PLLA.LINE_LOCATION_ID)) OR (NVL(PLLA.AMOUNT_RECEIVED, 0) > (SELECT SUM(NVL(POD.AMOUNT_DELIVERED, 0)) FROM PO_DISTRIBUTIONS POD WHERE POD.LINE_LOCATION_ID = PLLA.LINE_LOCATION_ID))) |
608c0n36kaw62 | begin FND_FLEX_WORKFLOW_APIS.COPY_FROM_COMBINATION (:v1, :v2, :v3, :v4, :v5); end; |
64y52qc72ffda | SELECT 'Y' FROM SYS.DUAL WHERE EXISTS( SELECT NULL FROM PO_LINE_LOCATIONS POLL, PO_LINE_LOCATIONS_ARCHIVE POLLA WHERE POLL.PO_HEADER_ID = :B4 AND POLL.PO_RELEASE_ID IS NULL AND (:B3 IS NULL OR POLL.PO_LINE_ID = :B3 ) AND (:B2 IS NULL OR POLL.LINE_LOCATION_ID = :B2 ) AND POLL.LINE_LOCATION_ID = POLLA.LINE_LOCATION_ID (+) AND POLLA.LATEST_EXTERNAL_FLAG (+) = 'Y' AND ( (POLLA.LINE_LOCATION_ID IS NULL) OR (POLL.QUANTITY <> POLLA.QUANTITY) OR (POLL.QUANTITY IS NULL AND POLLA.QUANTITY IS NOT NULL) OR (POLL.QUANTITY IS NOT NULL AND POLLA.QUANTITY IS NULL) OR (POLL.AMOUNT <> POLLA.AMOUNT) OR (POLL.AMOUNT IS NULL AND POLLA.AMOUNT IS NOT NULL) OR (POLL.AMOUNT IS NOT NULL AND POLLA.AMOUNT IS NULL) OR (POLL.SHIP_TO_LOCATION_ID <> POLLA.SHIP_TO_LOCATION_ID) OR (POLL.SHIP_TO_LOCATION_ID IS NULL AND POLLA.SHIP_TO_LOCATION_ID IS NOT NULL) OR (POLL.SHIP_TO_LOCATION_ID IS NOT NULL AND POLLA.SHIP_TO_LOCATION_ID IS NULL) OR (POLL.NEED_BY_DATE <> POLLA.NEED_BY_DATE) OR (POLL.NEED_BY_DATE IS NULL AND POLLA.NEED_BY_DATE IS NOT NULL) OR (POLL.NEED_BY_DATE IS NOT NULL AND POLLA.NEED_BY_DATE IS NULL) OR (POLL.PROMISED_DATE <> POLLA.PROMISED_DATE) OR (POLL.PROMISED_DATE IS NULL AND POLLA.PROMISED_DATE IS NOT NULL) OR (POLL.PROMISED_DATE IS NOT NULL AND POLLA.PROMISED_DATE IS NULL) OR (POLL.LAST_ACCEPT_DATE <> POLLA.LAST_ACCEPT_DATE) OR (POLL.LAST_ACCEPT_DATE IS NULL AND POLLA.LAST_ACCEPT_DATE IS NOT NULL) OR (POLL.LAST_ACCEPT_DATE IS NOT NULL AND POLLA.LAST_ACCEPT_DATE IS NULL) OR (POLL.PRICE_OVERRIDE <> POLLA.PRICE_OVERRIDE) OR (POLL.PRICE_OVERRIDE IS NULL AND POLLA.PRICE_OVERRIDE IS NOT NULL) OR (POLL.PRICE_OVERRIDE IS NOT NULL AND POLLA.PRICE_OVERRIDE IS NULL) OR (POLL.PAYMENT_TYPE <> POLLA.PAYMENT_TYPE) OR (POLL.PAYMENT_TYPE IS NULL AND POLLA.PAYMENT_TYPE IS NOT NULL) OR (POLL.PAYMENT_TYPE IS NOT NULL AND POLLA.PAYMENT_TYPE IS NULL) OR (POLL.DESCRIPTION <> POLLA.DESCRIPTION) OR (POLL.DESCRIPTION IS NULL AND POLLA.DESCRIPTION IS NOT NULL) OR (POLL.DESCRIPTION IS NOT NULL AND POLLA.DESCRIPTION IS NULL) OR (POLL.WORK_APPROVER_ID <> POLLA.WORK_APPROVER_ID) OR (POLL.WORK_APPROVER_ID IS NULL AND POLLA.WORK_APPROVER_ID IS NOT NULL) OR (POLL.WORK_APPROVER_ID IS NOT NULL AND POLLA.WORK_APPROVER_ID IS NULL) OR (POLL.SHIPMENT_NUM <> POLLA.SHIPMENT_NUM) OR (POLL.SHIPMENT_NUM IS NULL AND POLLA.SHIPMENT_NUM IS NOT NULL) OR (POLL.SHIPMENT_NUM IS NOT NULL AND POLLA.SHIPMENT_NUM IS NULL) OR (POLL.SALES_ORDER_UPDATE_DATE <> POLLA.SALES_ORDER_UPDATE_DATE) OR (POLL.SALES_ORDER_UPDATE_DATE IS NULL AND POLLA.SALES_ORDER_UPDATE_DATE IS NOT NULL) OR (POLL.SALES_ORDER_UPDATE_DATE IS NOT NULL AND POLLA.SALES_ORDER_UPDATE_DATE IS NULL) OR (:B1 = 'Y' AND ((POLL.CANCEL_FLAG <> POLLA.CANCEL_FLAG) OR (POLL.CANCEL_FLAG IS NULL AND POLLA.CANCEL_FLAG IS NOT NULL) OR (POLL.CANCEL_FLAG IS NOT NULL AND POLLA.CANCEL_FLAG IS NULL))))) |
67mmmbx5hb3p0 | BEGIN :1 := FND_AOLJ_UTIL.is_Valid_ICX(:2, NULL, 'Y', TRUE, TRUE, NULL, NULL, NULL, NULL, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, true);:19 := fnd_session_management.g_enc_key;:20 := fnd_session_management.g_mac_key;:21 := fnd_session_management.g_proxy_user_id; :22 := fnd_session_management.g_mode_code; END; |
6puncb1y2mfyw | SELECT SOB.SET_OF_BOOKS_ID, SOB.CHART_OF_ACCOUNTS_ID FROM GL_SETS_OF_BOOKS SOB, FINANCIALS_SYSTEM_PARAMETERS FSP WHERE FSP.SET_OF_BOOKS_ID = SOB.SET_OF_BOOKS_ID |
6vx0fw5141z4n | SELECT STATUS_FLAG FROM IGI_GCC_INSTALLED_OPTIONS WHERE OPTION_NAME = UPPER(:B1 ) |
7byyg5wpqtscd | SELECT VAT_CODE, PARTY_SITE_ID FROM AP_SUPPLIER_SITES WHERE VENDOR_SITE_ID = :B1 |
7ujfmgb1j83a3 | BEGIN FND_AOLJ_UTIL.SET_NLS_CONTEXT( :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13);END; |
7yr8xbwxpdnav | INSERT INTO WIP_EAM_DIRECT_ITEMS ( DESCRIPTION , PURCHASING_CATEGORY_ID , DIRECT_ITEM_SEQUENCE_ID , OPERATION_SEQ_NUM , DEPARTMENT_ID , WIP_ENTITY_ID , ORGANIZATION_ID , SUGGESTED_VENDOR_NAME , SUGGESTED_VENDOR_ID , SUGGESTED_VENDOR_SITE , SUGGESTED_VENDOR_SITE_ID , SUGGESTED_VENDOR_CONTACT , SUGGESTED_VENDOR_CONTACT_ID , UNIT_PRICE , AUTO_REQUEST_MATERIAL , REQUIRED_QUANTITY , UOM , NEED_BY_DATE , LAST_UPDATE_DATE , LAST_UPDATED_BY , CREATION_DATE , CREATED_BY , LAST_UPDATE_LOGIN , ORDER_TYPE_LOOKUP_CODE) VALUES ( :B18 , :B17 , :B16 , :B15 , :B14 , :B13 , :B12 , :B11 , :B10 , :B9 , :B8 , :B7 , :B6 , :B5 , 'Y' , :B4 , :B3 , :B2 , SYSDATE , FND_GLOBAL.USER_ID , SYSDATE , FND_GLOBAL.USER_ID , FND_GLOBAL.LOGIN_ID , :B1 ) |
9tmzdvyu94058 |
SELECT PoLineLocationMergeEO.OWNER_USER_ID AS "OwnerUserId", PoLineLocationMergeEO.OWNER_ROLE AS "OwnerRole", PoLineLocationMergeEO.STATUS AS "Status", PoLineLocationMergeEO.DRAFT_ID AS "DraftId", PoLineLocationMergeEO.CHANGE_ACCEPTED_FLAG AS "ChangeAcceptedFlag", PoLineLocationMergeEO.DELETE_FLAG AS "DeleteFlag", PoLineLocationMergeEO.USSGL_TRANSACTION_CODE AS "UssglTransactionCode", PoLineLocationMergeEO.GOVERNMENT_CONTEXT AS "GovernmentContext", PoLineLocationMergeEO.RECEIVING_ROUTING_ID AS "ReceivingRoutingId", PoLineLocationMergeEO.ACCRUE_ON_RECEIPT_FLAG AS "AccrueOnReceiptFlag", PoLineLocationMergeEO.CLOSED_REASON AS "ClosedReason", PoLineLocationMergeEO.CLOSED_DATE AS "ClosedDate", PoLineLocationMergeEO.CLOSED_BY AS "ClosedBy", PoLineLocationMergeEO.ORG_ID AS "OrgId", PoLineLocationMergeEO.ATTRIBUTE6 AS "Attribute6", PoLineLocationMergeEO.ATTRIBUTE7 AS "Attribute7", PoLineLocationMergeEO.ATTRIBUTE8 AS "Attribute8", PoLineLocationMergeEO.ATTRIBUTE9 AS "Attribute9", PoLineLocationMergeEO.ATTRIBUTE10 AS "Attribute10", PoLineLocationMergeEO.UNIT_OF_MEASURE_CLASS AS "UnitOfMeasureClass", PoLineLocationMergeEO.ENCUMBER_NOW AS "EncumberNow", PoLineLocationMergeEO.ATTRIBUTE11 AS "Attribute11", PoLineLocationMergeEO.ATTRIBUTE12 AS "Attribute12", PoLineLocationMergeEO.ATTRIBUTE13 AS "Attribute13", PoLineLocationMergeEO.ATTRIBUTE14 AS "Attribute14", PoLineLocationMergeEO.ATTRIBUTE15 AS "Attribute15", PoLineLocationMergeEO.INSPECTION_REQUIRED_FLAG AS "InspectionRequiredFlag", PoLineLocationMergeEO.RECEIPT_REQUIRED_FLAG AS "ReceiptRequiredFlag", PoLineLocationMergeEO.QTY_RCV_TOLERANCE AS "QtyRcvTolerance", PoLineLocationMergeEO.QTY_RCV_EXCEPTION_CODE AS "QtyRcvExceptionCode", PoLineLocationMergeEO.ENFORCE_SHIP_TO_LOCATION_CODE AS "EnforceShipToLocationCode", PoLineLocationMergeEO.ALLOW_SUBSTITUTE_RECEIPTS_FLAG AS "AllowSubstituteReceiptsFlag", PoLineLocationMergeEO.DAYS_EARLY_RECEIPT_ALLOWED AS "DaysEarlyReceiptAllowed", PoLineLocationMergeEO.DAYS_LATE_RECEIPT_ALLOWED AS "DaysLateReceiptAllowed", PoLineLocationMergeEO.RECEIPT_DAYS_EXCEPTION_CODE AS "ReceiptDaysExceptionCode", PoLineLocationMergeEO.INVOICE_CLOSE_TOLERANCE AS "InvoiceCloseTolerance", PoLineLocationMergeEO.RECEIVE_CLOSE_TOLERANCE AS "ReceiveCloseTolerance", PoLineLocationMergeEO.SHIP_TO_ORGANIZATION_ID AS "ShipToOrganizationId", PoLineLocationMergeEO.SHIPMENT_NUM AS "ShipmentNum", PoLineLocationMergeEO.SOURCE_SHIPMENT_ID AS "SourceShipmentId", PoLineLocationMergeEO.SHIPMENT_TYPE AS "ShipmentType", PoLineLocationMergeEO.CLOSED_CODE AS "ClosedCode", PoLineLocationMergeEO.REQUEST_ID AS "RequestId", PoLineLocationMergeEO.PROGRAM_APPLICATION_ID AS "ProgramApplicationId", PoLineLocationMergeEO.PROGRAM_ID AS "ProgramId", PoLineLocationMergeEO.PROGRAM_UPDATE_DATE AS "ProgramUpdateDate", PoLineLocationMergeEO.PROMISED_DATE AS "PromisedDate", PoLineLocationMergeEO.LAST_ACCEPT_DATE AS "LastAcceptDate", PoLineLocationMergeEO.PRICE_OVERRIDE AS "PriceOverride", PoLineLocationMergeEO.ENCUMBERED_FLAG AS "EncumberedFlag", PoLineLocationMergeEO.ENCUMBERED_DATE AS "EncumberedDate", PoLineLocationMergeEO.UNENCUMBERED_QUANTITY AS "UnencumberedQuantity", PoLineLocationMergeEO.FOB_LOOKUP_CODE AS "FobLookupCode", PoLineLocationMergeEO.FREIGHT_TERMS_LOOKUP_CODE AS "FreightTermsLookupCode", PoLineLocationMergeEO.TAXABLE_FLAG AS "TaxableFlag", PoLineLocationMergeEO.ESTIMATED_TAX_AMOUNT AS "Estimat
edTaxAmount", PoLineLocationMergeEO.FROM_HEADER_ID AS "FromHeaderId", PoLineLocationMergeEO.FROM_LINE_ID AS "FromLineId", PoLineLocationMergeEO.FROM_LINE_LOCATION_ID AS "FromLineLocationId", PoLineLocationMergeEO.START_DATE AS "StartDate", PoLineLocationMergeEO.END_DATE AS "EndDate", PoLineLocationMergeEO.LEAD_TIME AS "LeadTime", PoLineLocationMergeEO.LEAD_TIME_UNIT AS "LeadTimeUnit", PoLineLocationMergeEO.PRICE_DISCOUNT AS "PriceDiscount", PoLineLocationMergeEO.TERMS_ID AS "TermsId", PoLineLocationMergeEO.APPROVED_FLAG AS "ApprovedFlag", PoLineLocationMergeEO.APPROVED_DATE AS "ApprovedDate", PoLineLocationMergeEO.CLOSED_FLAG AS "ClosedFlag", PoLineLocationMergeEO.CANCEL_FLAG AS "CancelFlag", PoLineLocationMergeEO.CANCELLED_BY AS "CancelledBy", PoLineLocationMergeEO.CANCEL_DATE AS "CancelDate", PoLineLocationMergeEO.CANCEL_REASON AS "CancelReason", PoLineLocationMergeEO.FIRM_STATUS_LOOKUP_CODE AS "FirmStatusLookupCode", PoLineLocationMergeEO.FIRM_DATE AS "FirmDate", PoLineLocationMergeEO.ATTRIBUTE_CATEGORY AS "AttributeCategory", PoLineLocationMergeEO.ATTRIBUTE1 AS "Attribute1", PoLineLocationMergeEO.ATTRIBUTE2 AS "Attribute2", PoLineLocationMergeEO.ATTRIBUTE3 AS "Attribute3", PoLineLocationMergeEO.ATTRIBUTE4 AS "Attribute4", PoLineLocationMergeEO.ATTRIBUTE5 AS "Attribute5", PoLineLocationMergeEO.LINE_LOCATION_ID AS "LineLocationId", PoLineLocationMergeEO.LAST_UPDATE_DATE AS "LastUpdateDate", PoLineLocationMergeEO.LAST_UPDATED_BY AS "LastUpdatedBy", PoLineLocationMergeEO.PO_HEADER_ID AS "PoHeaderId", PoLineLocationMergeEO.PO_LINE_ID AS "PoLineId", PoLineLocationMergeEO.LAST_UPDATE_LOGIN AS "LastUpdateLogin", PoLineLocationMergeEO.CREATION_DATE AS "CreationDate", PoLineLocationMergeEO.CREATED_BY AS "CreatedBy", PoLineLocationMergeEO.QUANTITY AS "Quantity", PoLineLocationMergeEO.QUANTITY_RECEIVED AS "QuantityReceived", PoLineLocationMergeEO.QUANTITY_ACCEPTED AS "QuantityAccepted", PoLineLocationMergeEO.QUANTITY_REJECTED AS "QuantityRejected", PoLineLocationMergeEO.QUANTITY_BILLED AS "QuantityBilled", PoLineLocationMergeEO.QUANTITY_CANCELLED AS "QuantityCancelled", PoLineLocationMergeEO.UNIT_MEAS_LOOKUP_CODE AS "UnitMeasLookupCode", PoLineLocationMergeEO.PO_RELEASE_ID AS "PoReleaseId", PoLineLocationMergeEO.SHIP_TO_LOCATION_ID AS "ShipToLocationId", PoLineLocationMergeEO.SHIP_VIA_LOOKUP_CODE AS "ShipViaLookupCode", PoLineLocationMergeEO.NEED_BY_DATE AS "NeedByDate", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE_CATEGORY AS "GlobalAttributeCategory", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE1 AS "GlobalAttribute1", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE2 AS "GlobalAttribute2", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE3 AS "GlobalAttribute3", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE4 AS "GlobalAttribute4", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE5 AS "GlobalAttribute5", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE6 AS "GlobalAttribute6", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE7 AS "GlobalAttribute7", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE8 AS "GlobalAttribute8", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE9 AS "GlobalAttribute9", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE10 AS "GlobalAttribute10", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE11 AS "GlobalAttribute11", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE12 AS "GlobalAttribute12", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE13 AS "GlobalAttribute13", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE14 AS "Global
Attribute14", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE15 AS "GlobalAttribute15", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE16 AS "GlobalAttribute16", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE17 AS "GlobalAttribute17", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE18 AS "GlobalAttribute18", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE19 AS "GlobalAttribute19", PoLineLocationMergeEO.GLOBAL_ATTRIBUTE20 AS "GlobalAttribute20", PoLineLocationMergeEO.QUANTITY_SHIPPED AS "QuantityShipped", PoLineLocationMergeEO.COUNTRY_OF_ORIGIN_CODE AS "CountryOfOriginCode", PoLineLocationMergeEO.TAX_USER_OVERRIDE_FLAG AS "TaxUserOverrideFlag", PoLineLocationMergeEO.MATCH_OPTION AS "MatchOption", PoLineLocationMergeEO.TAX_CODE_ID AS "TaxCodeId", PoLineLocationMergeEO.CALCULATE_TAX_FLAG AS "CalculateTaxFlag", PoLineLocationMergeEO.CHANGE_PROMISED_DATE_REASON AS "ChangePromisedDateReason", PoLineLocationMergeEO.NOTE_TO_RECEIVER AS "NoteToReceiver", PoLineLocationMergeEO.SECONDARY_UNIT_OF_MEASURE AS "SecondaryUnitOfMeasure", PoLineLocationMergeEO.SECONDARY_QUANTITY AS "SecondaryQuantity", PoLineLocationMergeEO.PREFERRED_GRADE AS "PreferredGrade", PoLineLocationMergeEO.SECONDARY_QUANTITY_RECEIVED AS "SecondaryQuantityReceived", PoLineLocationMergeEO.SECONDARY_QUANTITY_ACCEPTED AS "SecondaryQuantityAccepted", PoLineLocationMergeEO.SECONDARY_QUANTITY_REJECTED AS "SecondaryQuantityRejected", PoLineLocationMergeEO.SECONDARY_QUANTITY_CANCELLED AS "SecondaryQuantityCancelled", PoLineLocationMergeEO.VMI_FLAG AS "VmiFlag", PoLineLocationMergeEO.CONSIGNED_FLAG AS "ConsignedFlag", PoLineLocationMergeEO.RETROACTIVE_DATE AS "RetroactiveDate", PoLineLocationMergeEO.SUPPLIER_ORDER_LINE_NUMBER AS "SupplierOrderLineNumber", PoLineLocationMergeEO.AMOUNT AS "Amount", PoLineLocationMergeEO.AMOUNT_RECEIVED AS "AmountReceived", PoLineLocationMergeEO.AMOUNT_BILLED AS "AmountBilled", PoLineLocationMergeEO.AMOUNT_CANCELLED AS "AmountCancelled", PoLineLocationMergeEO.AMOUNT_ACCEPTED AS "AmountAccepted", PoLineLocationMergeEO.AMOUNT_REJECTED AS "AmountRejected", PoLineLocationMergeEO.DROP_SHIP_FLAG AS "DropShipFlag", PoLineLocationMergeEO.SALES_ORDER_UPDATE_DATE AS "SalesOrderUpdateDate", PoLineLocationMergeEO.TRANSACTION_FLOW_HEADER_ID AS "TransactionFlowHeaderId", PoLineLocationMergeEO.FINAL_MATCH_FLAG AS "FinalMatchFlag", PoLineLocationMergeEO.MANUAL_PRICE_CHANGE_FLAG AS "ManualPriceChangeFlag", PoLineLocationMergeEO.SHIPMENT_CLOSED_DATE AS "ShipmentClosedDate", PoLineLocationMergeEO.CLOSED_FOR_RECEIVING_DATE AS "ClosedForReceivingDate", PoLineLocationMergeEO.CLOSED_FOR_INVOICE_DATE AS "ClosedForInvoiceDate", PoLineLocationMergeEO.SECONDARY_QUANTITY_SHIPPED AS "SecondaryQuantityShipped", PoLineLocationMergeEO.PAYMENT_TYPE AS "PaymentType", PoLineLocationMergeEO.DESCRIPTION AS "Description", PoLineLocationMergeEO.VALUE_BASIS AS "ValueBasis", PoLineLocationMergeEO.MATCHING_BASIS AS "MatchingBasis", PoLineLocationMergeEO.WORK_APPROVER_ID AS "WorkApproverId", PoLineLocationMergeEO.BID_PAYMENT_ID AS "BidPaymentId", PoLineLocationMergeEO.QUANTITY_FINANCED AS "QuantityFinanced", PoLineLocationMergeEO.AMOUNT_FINANCED AS "AmountFinanced", PoLineLocationMergeEO.QUANTITY_RECOUPED AS "QuantityRecouped", PoLineLocationMergeEO.AMOUNT_RECOUPED AS "AmountRecouped", PoLineLocationMergeEO.RETAINAGE_WITHHELD_AMOUNT AS "RetainageWithheldAmount", PoLineLocationMergeEO.RETAINAGE_RELEASED_AMOUNT AS "RetainageReleasedAmount", PoLineLocationMergeEO.AMOUNT_
SHIPPED AS "AmountShipped", PoLineLocationMergeEO.TAX_ATTRIBUTE_UPDATE_CODE AS "TaxAttributeUpdateCode", PoLineLocationMergeEO.OUTSOURCED_ASSEMBLY AS "OutsourcedAssembly", PoLineLocationMergeEO.TAX_NAME AS "TaxName" FROM PO_LINE_LOCATIONS_MERGE_V PoLineLocationMergeEO WHERE PoLineLocationMergeEO.LINE_LOCATION_ID = :1 |
9tssyu6p7uk2s | SELECT SUM(AID.AMOUNT) FROM AP_INVOICE_DISTRIBUTIONS AID, AP_INVOICE_LINES AIL WHERE AID.INVOICE_ID = :B2 AND AID.INVOICE_LINE_NUMBER = :B1 AND AIL.INVOICE_ID = AID.INVOICE_ID AND AIL.LINE_NUMBER = AID.INVOICE_LINE_NUMBER AND AIL.LINE_TYPE_LOOKUP_CODE IN ('ITEM', 'RETAINAGE RELEASE') AND AID.PARENT_REVERSAL_ID IS NULL AND (AID.LINE_TYPE_LOOKUP_CODE = 'PREPAY' OR (AID.LINE_TYPE_LOOKUP_CODE IN ('REC_TAX', 'NONREC_TAX') AND AID.PREPAY_DISTRIBUTION_ID IS NOT NULL) OR (AID.LINE_TYPE_LOOKUP_CODE IN ('TIPV', 'TRV', 'TERV') AND AID.RELATED_ID IN (SELECT INVOICE_DISTRIBUTION_ID FROM AP_INVOICE_DISTRIBUTIONS AID1 WHERE AID1.INVOICE_ID = AID.INVOICE_ID AND AID1.INVOICE_LINE_NUMBER = AID.INVOICE_LINE_NUMBER AND AID1.LINE_TYPE_LOOKUP_CODE IN ('REC_TAX', 'NONREC_TAX') AND AID1.PREPAY_DISTRIBUTION_ID IS NOT NULL) ) ) |
9ybx57rqdhm4m | BEGIN PO_INTERFACE_S.create_documents( p_api_version => 1.0, x_return_status => :1, x_msg_count => :2, x_msg_data => :3, p_batch_id => :4, p_req_operating_unit_id => :5, p_purch_operating_unit_id => :6, x_document_id => :7, x_number_lines => :8, x_document_number => :9, p_document_creation_method => 'AUTOCREATE'); END; |
akma8kaxsp84b |
SELECT reservation_id , requirement_date , organization_id , inventory_item_id , demand_source_type_id , demand_source_name , demand_source_header_id , demand_source_line_id , demand_source_delivery , primary_uom_code , primary_uom_id , secondary_uom_code , secondary_uom_id , reservation_uom_code , reservation_uom_id , reservation_quantity , primary_reservation_quantity , secondary_reservation_quantity , detailed_quantity , secondary_detailed_quantity , autodetail_group_id , external_source_code , external_source_line_id , supply_source_type_id , supply_source_header_id , supply_source_line_id , supply_source_name , supply_source_line_detail , revision , subinventory_code , subinventory_id , locator_id , lot_number , lot_number_id , pick_slip_number , lpn_id , attribute_category , attribute1 , attribute2 , attribute3 , attribute4 , attribute5 , attribute6 , attribute7 , attribute8 , attribute9 , attribute10 , attribute11 , attribute12 , attribute13 , attribute14 , attribute15 , ship_ready_flag , staged_flag /**** {{ R12 Enhanced reservations code changes }}****/ , crossdock_flag , crossdock_criteria_id , demand_source_line_detail , serial_reservation_quantity , supply_receipt_date , demand_ship_date , project_id , task_id , orig_supply_source_type_id , orig_supply_source_header_id , orig_supply_source_line_id , orig_supply_source_line_detail , orig_demand_source_type_id , orig_demand_source_header_id , orig_demand_source_line_id , orig_demand_source_line_detail , serial_number /***** End R12 ***/ FROM mtl_reservations WHERE (:requirement_date = :l_miss_date OR :requirement_date IS NULL AND requirement_date IS NULL OR :requirement_date = requirement_date ) AND (:organization_id = :l_miss_num OR :organization_id IS NULL AND organization_id IS NULL OR :organization_id = organization_id ) AND (:inventory_item_id = :l_miss_num OR :inventory_item_id IS NULL AND inventory_item_id IS NULL OR :inventory_item_id = inventory_item_id ) AND (:demand_source_type_id = :l_miss_num OR :demand_source_type_id IS NULL AND demand_source_type_id IS NULL OR :demand_source_type_id = demand_source_type_id ) AND (:demand_source_header_id = :l_miss_num OR :demand_source_header_id IS NULL AND demand_source_header_id IS NULL OR :demand_source_header_id = demand_source_header_id ) AND (:demand_source_line_id = :l_miss_num OR :demand_source_line_id IS NULL AND demand_source_line_id IS NULL OR :demand_source_line_id = demand_source_line_id ) AND (:demand_source_name = :l_miss_char OR :demand_source_name IS NULL AND demand_source_name IS NULL OR :demand_source_name = demand_source_name ) AND (:demand_source_delivery = :l_miss_num OR :demand_source_delivery IS NULL AND demand_source_delivery IS NULL OR :demand_source_delivery = demand_source_delivery ) AND (:primary_uom_code = :l_miss_char OR :primary_uom_code IS NULL AND primary_uom_code IS NULL OR :primary_uom_code = primary_uom_code ) AND (:primary_uom_id = :l_miss_num OR :primary_uom_id IS NULL AND primary_uom_id IS NULL OR :primary_uom_id = primary_uom_id ) -- INVCONV BEGIN AND (:secondary_uom_code = :l_miss_char OR :secondary_uom_code IS NULL AND secondary_uom_code IS NULL OR :secondary_uom_code = secondary_uom_code ) AND (:secondary_uom_id = :l_miss_num OR :secondary_uom_id IS NULL AND secondary_uom_id IS NULL OR :secondary_uom_id = secondary_uom_id ) -- INVCONV END AND (:reservation_uom_code = :l_miss_char OR :reservation_uom_code IS NULL AND reservation_uom_code IS NULL OR :reservation_uom_code = reservation_uom_code ) AND (:reservation_uom_id = :l_miss_num OR :reservation_uom_id IS NULL AND reservation_uom_id IS NULL OR :reservation_uom_id = reservation_uom_id ) AND (:autodetail_group_id = :l_miss_num OR :autodetail_group_id IS NULL AND autodetail_group_id IS NULL OR :autodetail_group_id = autodetail_group_id ) AND (:external_source_code = :l_miss_char OR :external_source_code IS NULL AND external_source_code IS NULL OR :external_s
ource_code = external_source_code ) AND (:external_source_line_id = :l_miss_num OR :external_source_line_id IS NULL AND external_source_line_id IS NULL OR :external_source_line_id = external_source_line_id ) AND (:supply_source_type_id = :l_miss_num OR :supply_source_type_id IS NULL AND supply_source_type_id IS NULL OR :supply_source_type_id = supply_source_type_id ) AND (:supply_source_header_id = :l_miss_num OR :supply_source_header_id IS NULL AND supply_source_header_id IS NULL OR :supply_source_header_id = supply_source_header_id ) AND (:supply_source_line_id = :l_miss_num OR :supply_source_line_id IS NULL AND supply_source_line_id IS NULL OR :supply_source_line_id = supply_source_line_id ) AND (:supply_source_name = :l_miss_char OR :supply_source_name IS NULL AND supply_source_name IS NULL OR :supply_source_name = supply_source_name ) AND (:supply_source_line_detail = :l_miss_num OR :supply_source_line_detail IS NULL AND supply_source_line_detail IS NULL OR :supply_source_line_detail = supply_source_line_detail ) AND (:revision = :l_miss_char OR :revision IS NULL AND revision IS NULL OR :revision = revision ) AND (:subinventory_code = :l_miss_char OR :subinventory_code IS NULL AND subinventory_code IS NULL OR :subinventory_code = subinventory_code ) AND (:subinventory_id = :l_miss_num OR :subinventory_id IS NULL AND subinventory_id IS NULL OR :subinventory_id = subinventory_id ) AND (:locator_id = :l_miss_num OR :locator_id IS NULL AND locator_id IS NULL OR :locator_id = locator_id ) AND (:lot_number = :l_miss_char OR :lot_number IS NULL AND lot_number IS NULL OR :lot_number = lot_number ) AND (:lot_number_id = :l_miss_num OR :lot_number_id IS NULL AND lot_number_id IS NULL OR :lot_number_id = lot_number_id ) AND (:lpn_id = :l_miss_num OR :lpn_id IS NULL AND lpn_id IS NULL OR :lpn_id = lpn_id ) AND (:ship_ready_flag = :l_miss_num OR (:ship_ready_flag IS NULL OR :ship_ready_flag = 2) AND (ship_ready_flag IS NULL OR ship_ready_flag = 2) OR :ship_ready_flag = ship_ready_flag ) AND (:staged_flag = :l_miss_char OR (:staged_flag IS NULL OR :staged_flag = 'N') AND (staged_flag IS NULL OR staged_flag = 'N') OR :staged_flag = staged_flag ) AND (:attribute_category = :l_miss_char OR :attribute_category IS NULL AND attribute_category IS NULL OR :attribute_category = attribute_category ) AND (:attribute1 = :l_miss_char OR :attribute1 IS NULL AND attribute1 IS NULL OR :attribute1 = attribute1 ) AND (:attribute2 = :l_miss_char OR :attribute2 IS NULL AND attribute2 IS NULL OR :attribute2 = attribute2 ) AND (:attribute3 = :l_miss_char OR :attribute3 IS NULL AND attribute3 IS NULL OR :attribute3 = attribute3 ) AND (:attribute4 = :l_miss_char OR :attribute4 IS NULL AND attribute4 IS NULL OR :attribute4 = attribute4 ) AND (:attribute5 = :l_miss_char OR :attribute5 IS NULL AND attribute5 IS NULL OR :attribute5 = attribute5 ) AND (:attribute6 = :l_miss_char OR :attribute6 IS NULL AND attribute6 IS NULL OR :attribute6 = attribute6 ) AND (:attribute7 = :l_miss_char OR :attribute7 IS NULL AND attribute7 IS NULL OR :attribute7 = attribute7 ) AND (:attribute8 = :l_miss_char OR :attribute8 IS NULL AND attribute8 IS NULL OR :attribute8 = attribute8 ) AND (:attribute9 = :l_miss_char OR :attribute9 IS NULL AND attribute9 IS NULL OR :attribute9 = attribute9 ) AND (:attribute10 = :l_miss_char OR :attribute10 IS NULL AND attribute10 IS NULL OR :attribute10 = attribute10 ) AND (:attribute11 = :l_miss_char OR :attribute11 IS NULL AND attribute11 IS NULL OR :attribute11 = attribute11 ) AND (:attribute12 = :l_miss_char OR :attribute12 IS NULL AND attribute12 IS NULL OR :attribute12 = attribute12 ) AND (:attribute13 = :l_miss_char OR :attribute13 IS NULL AND attribute13 IS NULL OR :attribute13 = attribute13 ) AND (:attribute14 = :l_miss_char OR :attribute14 IS NULL AND attribute14 IS NULL OR :attribute14 = attribute14 ) AND (:attribute15 = :l_miss_char OR :attribute15 IS NULL AND attribute15 IS NULL OR :attribute15 = attribute15 ) /**** {{ R12 Enhanced reserv
ations code changes }}****/ AND (:crossdock_flag = :l_miss_char OR :crossdock_flag IS NULL AND crossdock_flag IS NULL OR :crossdock_flag = crossdock_flag ) AND (:crossdock_criteria_id = :l_miss_num OR :crossdock_criteria_id IS NULL AND crossdock_criteria_id IS NULL OR :crossdock_criteria_id = crossdock_criteria_id ) AND (:demand_source_line_detail = :l_miss_num OR :demand_source_line_detail IS NULL AND demand_source_line_detail IS NULL OR :demand_source_line_detail = demand_source_line_detail ) AND (:supply_receipt_date = :l_miss_date OR :supply_receipt_date IS NULL AND supply_receipt_date IS NULL OR :supply_receipt_date = supply_receipt_date ) AND (:demand_ship_date = :l_miss_date OR :demand_ship_date IS NULL AND demand_ship_date IS NULL OR :demand_ship_date = demand_ship_date ) AND (:project_id = :l_miss_num OR :project_id IS NULL AND project_id IS NULL OR :project_id = project_id ) AND (:task_id = :l_miss_num OR :task_id IS NULL AND task_id IS NULL OR :task_id = task_id ) /***** End R12 ***/ ORDER BY NVL(DEMAND_SHIP_DATE, REQUIREMENT_DATE) ASC |
b0g6w2u0z1xx7 | SELECT LINE_INTENDED_USE, PRODUCT_TYPE, PRODUCT_CATEGORY, PRODUCT_FISC_CLASSIFICATION, USER_DEFINED_FISC_CLASS, ASSESSABLE_VALUE, INPUT_TAX_CLASSIFICATION_CODE FROM ZX_LINES_DET_FACTORS WHERE APPLICATION_ID = :B7 AND INTERNAL_ORGANIZATION_ID = :B6 AND ENTITY_CODE = :B5 AND EVENT_CLASS_CODE = :B4 AND TRX_LEVEL_TYPE = :B3 AND TRX_ID = :B2 AND TRX_LINE_ID = :B1 |
bbugagurwv1vy | (SELECT STATUS_FLAG FROM IGI_GCC_INSTALLED_OPTIONS WHERE OPTION_NAME = UPPER(:B1 )) |
bf7uwg5pa3pj6 | begin FND_FLEX_WORKFLOW_APIS.VALIDATE_COMBINATION (:v1, :v2, :v3, :v4, :v5); end; |
cd02js3xuc27n |
SELECT PoLineMergeEO.DRAFT_ID AS "DraftId", PoLineMergeEO.CHANGE_ACCEPTED_FLAG AS "ChangeAcceptedFlag", PoLineMergeEO.DELETE_FLAG AS "DeleteFlag", PoLineMergeEO.ATTRIBUTE9 AS "Attribute9", PoLineMergeEO.ATTRIBUTE10 AS "Attribute10", PoLineMergeEO.REFERENCE_NUM AS "ReferenceNum", PoLineMergeEO.ATTRIBUTE11 AS "Attribute11", PoLineMergeEO.ATTRIBUTE12 AS "Attribute12", PoLineMergeEO.ATTRIBUTE13 AS "Attribute13", PoLineMergeEO.ATTRIBUTE14 AS "Attribute14", PoLineMergeEO.ATTRIBUTE15 AS "Attribute15", PoLineMergeEO.MIN_RELEASE_AMOUNT AS "MinReleaseAmount", PoLineMergeEO.PRICE_TYPE_LOOKUP_CODE AS "PriceTypeLookupCode", PoLineMergeEO.CLOSED_CODE AS "ClosedCode", PoLineMergeEO.PRICE_BREAK_LOOKUP_CODE AS "PriceBreakLookupCode", PoLineMergeEO.USSGL_TRANSACTION_CODE AS "UssglTransactionCode", PoLineMergeEO.GOVERNMENT_CONTEXT AS "GovernmentContext", PoLineMergeEO.REQUEST_ID AS "RequestId", PoLineMergeEO.PROGRAM_APPLICATION_ID AS "ProgramApplicationId", PoLineMergeEO.PROGRAM_ID AS "ProgramId", PoLineMergeEO.PROGRAM_UPDATE_DATE AS "ProgramUpdateDate", PoLineMergeEO.CLOSED_DATE AS "ClosedDate", PoLineMergeEO.CLOSED_REASON AS "ClosedReason", PoLineMergeEO.CLOSED_BY AS "ClosedBy", PoLineMergeEO.TRANSACTION_REASON_CODE AS "TransactionReasonCode", PoLineMergeEO.ORG_ID AS "OrgId", PoLineMergeEO.HAZARD_CLASS_ID AS "HazardClassId", PoLineMergeEO.NOTE_TO_VENDOR AS "NoteToVendor", PoLineMergeEO.FROM_HEADER_ID AS "FromHeaderId", PoLineMergeEO.FROM_LINE_ID AS "FromLineId", PoLineMergeEO.MIN_ORDER_QUANTITY AS "MinOrderQuantity", PoLineMergeEO.MAX_ORDER_QUANTITY AS "MaxOrderQuantity", PoLineMergeEO.QTY_RCV_TOLERANCE AS "QtyRcvTolerance", PoLineMergeEO.OVER_TOLERANCE_ERROR_FLAG AS "OverToleranceErrorFlag", PoLineMergeEO.MARKET_PRICE AS "MarketPrice", PoLineMergeEO.UNORDERED_FLAG AS "UnorderedFlag", PoLineMergeEO.CLOSED_FLAG AS "ClosedFlag", PoLineMergeEO.USER_HOLD_FLAG AS "UserHoldFlag", PoLineMergeEO.CANCEL_FLAG AS "CancelFlag", PoLineMergeEO.CANCELLED_BY AS "CancelledBy", PoLineMergeEO.CANCEL_DATE AS "CancelDate", PoLineMergeEO.CANCEL_REASON AS "CancelReason", PoLineMergeEO.FIRM_STATUS_LOOKUP_CODE AS "FirmStatusLookupCode", PoLineMergeEO.FIRM_DATE AS "FirmDate", PoLineMergeEO.VENDOR_PRODUCT_NUM AS "VendorProductNum", PoLineMergeEO.CONTRACT_NUM AS "ContractNum", PoLineMergeEO.TAXABLE_FLAG AS "TaxableFlag", PoLineMergeEO.TYPE_1099 AS "Type1099", PoLineMergeEO.CAPITAL_EXPENSE_FLAG AS "CapitalExpenseFlag", PoLineMergeEO.NEGOTIATED_BY_PREPARER_FLAG AS "NegotiatedByPreparerFlag", PoLineMergeEO.ATTRIBUTE_CATEGORY AS "AttributeCategory", PoLineMergeEO.ATTRIBUTE1 AS "Attribute1", PoLineMergeEO.ATTRIBUTE2 AS "Attribute2", PoLineMergeEO.ATTRIBUTE3 AS "Attribute3", PoLineMergeEO.ATTRIBUTE4 AS "Attribute4", PoLineMergeEO.ATTRIBUTE5 AS "Attribute5", PoLineMergeEO.ATTRIBUTE6 AS "Attribute6", PoLineMergeEO.ATTRIBUTE7 AS "Attribute7", PoLineMergeEO.ATTRIBUTE8 AS "Attribute8", PoLineMergeEO.QC_GRADE AS "QcGrade", PoLineMergeEO.BASE_UOM AS "BaseUom", PoLineMergeEO.BASE_QTY AS "BaseQty", PoLineMergeEO.SECONDARY_UOM AS "SecondaryUom", PoLineMergeEO.SECONDARY_QTY AS "SecondaryQty", PoLineMergeEO.PO_LINE_ID AS "PoLineId", PoLineMergeEO.LAST_UPDATE_DATE AS "LastUpdateDate", PoLineMergeEO.LAST_UPDATED_BY AS "LastUpdatedBy", PoLineMergeEO.PO_HEADER_ID AS
"PoHeaderId", PoLineMergeEO.LINE_TYPE_ID AS "LineTypeId", PoLineMergeEO.LINE_NUM AS "LineNum", PoLineMergeEO.LAST_UPDATE_LOGIN AS "LastUpdateLogin", PoLineMergeEO.CREATION_DATE AS "CreationDate", PoLineMergeEO.CREATED_BY AS "CreatedBy", PoLineMergeEO.ITEM_ID AS "ItemId", PoLineMergeEO.ITEM_REVISION AS "ItemRevision", PoLineMergeEO.CATEGORY_ID AS "CategoryId", PoLineMergeEO.ITEM_DESCRIPTION AS "ItemDescription", PoLineMergeEO.UNIT_MEAS_LOOKUP_CODE AS "UnitMeasLookupCode", PoLineMergeEO.QUANTITY_COMMITTED AS "QuantityCommitted", PoLineMergeEO.COMMITTED_AMOUNT AS "CommittedAmount", PoLineMergeEO.ALLOW_PRICE_OVERRIDE_FLAG AS "AllowPriceOverrideFlag", PoLineMergeEO.NOT_TO_EXCEED_PRICE AS "NotToExceedPrice", PoLineMergeEO.LIST_PRICE_PER_UNIT AS "ListPricePerUnit", PoLineMergeEO.UNIT_PRICE AS "UnitPrice", PoLineMergeEO.QUANTITY AS "Quantity", PoLineMergeEO.UN_NUMBER_ID AS "UnNumberId", PoLineMergeEO.GLOBAL_ATTRIBUTE_CATEGORY AS "GlobalAttributeCategory", PoLineMergeEO.GLOBAL_ATTRIBUTE1 AS "GlobalAttribute1", PoLineMergeEO.GLOBAL_ATTRIBUTE2 AS "GlobalAttribute2", PoLineMergeEO.GLOBAL_ATTRIBUTE3 AS "GlobalAttribute3", PoLineMergeEO.GLOBAL_ATTRIBUTE4 AS "GlobalAttribute4", PoLineMergeEO.GLOBAL_ATTRIBUTE5 AS "GlobalAttribute5", PoLineMergeEO.GLOBAL_ATTRIBUTE6 AS "GlobalAttribute6", PoLineMergeEO.GLOBAL_ATTRIBUTE7 AS "GlobalAttribute7", PoLineMergeEO.GLOBAL_ATTRIBUTE8 AS "GlobalAttribute8", PoLineMergeEO.GLOBAL_ATTRIBUTE9 AS "GlobalAttribute9", PoLineMergeEO.GLOBAL_ATTRIBUTE10 AS "GlobalAttribute10", PoLineMergeEO.GLOBAL_ATTRIBUTE11 AS "GlobalAttribute11", PoLineMergeEO.GLOBAL_ATTRIBUTE12 AS "GlobalAttribute12", PoLineMergeEO.GLOBAL_ATTRIBUTE13 AS "GlobalAttribute13", PoLineMergeEO.GLOBAL_ATTRIBUTE14 AS "GlobalAttribute14", PoLineMergeEO.GLOBAL_ATTRIBUTE15 AS "GlobalAttribute15", PoLineMergeEO.GLOBAL_ATTRIBUTE16 AS "GlobalAttribute16", PoLineMergeEO.GLOBAL_ATTRIBUTE17 AS "GlobalAttribute17", PoLineMergeEO.GLOBAL_ATTRIBUTE18 AS "GlobalAttribute18", PoLineMergeEO.GLOBAL_ATTRIBUTE19 AS "GlobalAttribute19", PoLineMergeEO.GLOBAL_ATTRIBUTE20 AS "GlobalAttribute20", PoLineMergeEO.LINE_REFERENCE_NUM AS "LineReferenceNum", PoLineMergeEO.PROJECT_ID AS "ProjectId", PoLineMergeEO.TASK_ID AS "TaskId", PoLineMergeEO.EXPIRATION_DATE AS "ExpirationDate", PoLineMergeEO.TAX_CODE_ID AS "TaxCodeId", PoLineMergeEO.OKE_CONTRACT_HEADER_ID AS "OkeContractHeaderId", PoLineMergeEO.OKE_CONTRACT_VERSION_ID AS "OkeContractVersionId", PoLineMergeEO.TAX_NAME AS "TaxName", PoLineMergeEO.SECONDARY_UNIT_OF_MEASURE AS "SecondaryUnitOfMeasure", PoLineMergeEO.SECONDARY_QUANTITY AS "SecondaryQuantity", PoLineMergeEO.PREFERRED_GRADE AS "PreferredGrade", PoLineMergeEO.AUCTION_HEADER_ID AS "AuctionHeaderId", PoLineMergeEO.AUCTION_DISPLAY_NUMBER AS "AuctionDisplayNumber", PoLineMergeEO.AUCTION_LINE_NUMBER AS "AuctionLineNumber", PoLineMergeEO.BID_NUMBER AS "BidNumber", PoLineMergeEO.BID_LINE_NUMBER AS "BidLineNumber", PoLineMergeEO.RETROACTIVE_DATE AS "RetroactiveDate", PoLineMergeEO.SUPPLIER_REF_NUMBER AS "SupplierRefNumber", PoLineMergeEO.CONTRACT_ID AS "ContractId", PoLineMergeEO.JOB_ID AS "JobId", PoLineMergeEO.AMOUNT AS "Amount", PoLineMergeEO.START_DATE AS "StartDate", PoLineMergeEO.CONTRACTOR_FIRST_NAME AS "ContractorFirstName", PoLineMergeEO.CONTRACTOR_LAST_NAME AS "ContractorLastName
", PoLineMergeEO.ORDER_TYPE_LOOKUP_CODE AS "OrderTypeLookupCode", PoLineMergeEO.PURCHASE_BASIS AS "PurchaseBasis", PoLineMergeEO.MATCHING_BASIS AS "MatchingBasis", PoLineMergeEO.SVC_AMOUNT_NOTIF_SENT AS "SvcAmountNotifSent", PoLineMergeEO.SVC_COMPLETION_NOTIF_SENT AS "SvcCompletionNotifSent", PoLineMergeEO.FROM_LINE_LOCATION_ID AS "FromLineLocationId", PoLineMergeEO.BASE_UNIT_PRICE AS "BaseUnitPrice", PoLineMergeEO.MANUAL_PRICE_CHANGE_FLAG AS "ManualPriceChangeFlag", PoLineMergeEO.RETAINAGE_RATE AS "RetainageRate", PoLineMergeEO.MAX_RETAINAGE_AMOUNT AS "MaxRetainageAmount", PoLineMergeEO.PROGRESS_PAYMENT_RATE AS "ProgressPaymentRate", PoLineMergeEO.RECOUPMENT_RATE AS "RecoupmentRate", PoLineMergeEO.SUPPLIER_PART_AUXID AS "SupplierPartAuxid", PoLineMergeEO.IP_CATEGORY_ID AS "IpCategoryId", PoLineMergeEO.TAX_ATTRIBUTE_UPDATE_CODE AS "TaxAttributeUpdateCode", PoLineMergeEO.CATALOG_NAME AS "CatalogName" FROM PO_LINES_MERGE_V PoLineMergeEO WHERE PoLineMergeEO.PO_LINE_ID = :1 |
ch6akxnh7bfx9 | SELECT 'Exists' FROM PO_LINES POL WHERE POL.PO_LINE_ID = :B2 AND POL.PO_HEADER_ID = :B1 |
ctnvq3qjh4065 | begin :1 := por_util_pkg.interface_START_WORKFLOW( :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29, :30, :31, :32, :33, :34, :35, :36, :37, :38, :39, :40, :41, :42, :43, :44, :45, :46, :47, :48, :49, :50, :51, :52, :53, :54, :55, :56, :57, :58, :59, :60, :61, :62, :63, :64, :65, :66, :67, :68, :69, :70, :71, :72, :73, :74, :75, :76, :77, :78, :79, :80, :81, :82, :83, :84, :85, :86, :87, :88, :89, :90, :91, :92, :93, :94, :95, :96, :97, :98, :99, :100, :101, :102); end; |
dawf7hvg1ym94 | select V.PROFILE_OPTION_VALUE from FND_PROFILE_OPTIONS O, FND_PROFILE_OPTION_VALUES V where O.PROFILE_OPTION_NAME = :1 and V.LEVEL_ID = :2 and O.START_DATE_ACTIVE <= SYSDATE and nvl(O.END_DATE_ACTIVE, SYSDATE) >= SYSDATE and O.PROFILE_OPTION_ID = V.PROFILE_OPTION_ID and O.APPLICATION_ID = V.APPLICATION_ID and V.LEVEL_VALUE = :3 |
dnx99s71vmu3r | SELECT POA.AGENT_ID FROM PO_AGENTS POA, MTL_ITEM_CATEGORIES MIC WHERE MIC.INVENTORY_ITEM_ID=:B2 AND MIC.CATEGORY_ID=POA.CATEGORY_ID AND MIC.ORGANIZATION_ID=:B1 AND MIC.CATEGORY_SET_ID=(SELECT CATEGORY_SET_ID FROM MTL_DEFAULT_SETS_VIEW WHERE FUNCTIONAL_AREA_ID = 2) |
du9txjm3qa2yw | begin PO_REQAPPROVAL_ACTION.DOC_COMPLETE_CHECK (:v1, :v2, :v3, :v4, :v5); end; |
f1v2hmt6qbkyc | begin fnd_session_management.PUTSESSIONATTRIBUTEVALUE(:1, :2, :3);end; |
f2mg2y50g364u | SELECT DEFAULT_TAXATION_COUNTRY , DOCUMENT_SUB_TYPE, TAX_INVOICE_DATE FROM ZX_LINES_DET_FACTORS WHERE APPLICATION_ID = :B4 AND ENTITY_CODE = :B3 AND EVENT_CLASS_CODE = :B2 AND TRX_ID = :B1 AND ROWNUM = 1 |
f5z70bpcu7f0w | begin :1 := PO_RCO_VALIDATION_GRP.IS_REQ_CHANGEABLE(:2); end; |
g4pktka6kg4w9 | SELECT MENU_ID, ENTRY_SEQUENCE, FUNCTION_ID, SUB_MENU_ID, GRANT_FLAG FROM FND_MENU_ENTRIES WHERE MENU_ID = :B1 |
g89s7tq651bus |
INSERT INTO ZX_TRANSACTION_LINES_GT( APPLICATION_ID , ENTITY_CODE , EVENT_CLASS_CODE , TRX_ID , TRX_LEVEL_TYPE , TRX_LINE_ID , LINE_LEVEL_ACTION , LINE_CLASS , TRX_LINE_TYPE , TRX_LINE_DATE , TRX_BUSINESS_CATEGORY , LINE_INTENDED_USE , USER_DEFINED_FISC_CLASS , LINE_AMT , TRX_LINE_QUANTITY , PRODUCT_ID , PRODUCT_ORG_ID , PRODUCT_FISC_CLASSIFICATION , UOM_CODE , PRODUCT_TYPE , PRODUCT_CODE , PRODUCT_CATEGORY , FOB_POINT , SHIP_FROM_PARTY_ID , BILL_FROM_PARTY_ID , SHIP_FROM_PARTY_SITE_ID , BILL_FROM_PARTY_SITE_ID , SHIP_TO_LOCATION_ID , SHIP_FROM_LOCATION_ID , BILL_TO_LOCATION_ID , BILL_FROM_LOCATION_ID , ACCOUNT_CCID , REF_DOC_APPLICATION_ID , REF_DOC_ENTITY_CODE , REF_DOC_EVENT_CLASS_CODE , REF_DOC_TRX_ID , REF_DOC_LINE_ID , LINE_TRX_USER_KEY1 , LINE_TRX_USER_KEY2 , LINE_TRX_USER_KEY3 , TRX_LINE_NUMBER , TRX_LINE_DESCRIPTION , PRODUCT_DESCRIPTION , ASSESSABLE_VALUE , LINE_AMT_INCLUDES_TAX_FLAG , INPUT_TAX_CLASSIFICATION_CODE , SOURCE_APPLICATION_ID , SOURCE_ENTITY_CODE , SOURCE_EVENT_CLASS_CODE , SOURCE_TRX_ID , SOURCE_LINE_ID , SOURCE_TRX_LEVEL_TYPE , UNIT_PRICE , REF_DOC_TRX_LEVEL_TYPE , SHIP_THIRD_PTY_ACCT_ID , BILL_THIRD_PTY_ACCT_ID , SHIP_THIRD_PTY_ACCT_SITE_ID , BILL_THIRD_PTY_ACCT_SITE_ID , SHIP_TO_PARTY_ID , USER_UPD_DET_FACTORS_FLAG , DEFAULTING_ATTRIBUTE1 ) SELECT :B5 , :B4 , :B3 , PH.PO_HEADER_ID , :B2 , PLL.LINE_LOCATION_ID , PLL.TAX_ATTRIBUTE_UPDATE_CODE , DECODE(PLL.SHIPMENT_TYPE, 'PREPAYMENT', DECODE(PLL.PAYMENT_TYPE, 'ADVANCE', 'ADVANCE', 'FINANCING'), DECODE(PLL.VALUE_BASIS, 'QUANTITY', 'INVOICE', 'AMOUNT') ) , 'ITEM' , COALESCE(PLL.NEED_BY_DATE, PLL.PROMISED_DATE, SYSDATE) , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.TRX_BUSINESS_CATEGORY) , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.LINE_INTENDED_USE) , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.USER_DEFINED_FISC_CLASS) , NVL(PLL.AMOUNT, PLL.PRICE_OVERRIDE*PLL.QUANTITY) , PLL.QUANTITY , PL.ITEM_ID , (SELECT FSP.INVENTORY_ORGANIZATION_ID FROM FINANCIALS_SYSTEM_PARAMS_ALL FSP WHERE FSP.ORG_ID=PLL.ORG_ID) , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.PRODUCT_FISC_CLASSIFICATION) , (SELECT MUM.UOM_CODE FROM MTL_UNITS_OF_MEASURE MUM WHERE MUM.UNIT_OF_MEASURE=PLL.UNIT_MEAS_LOOKUP_CODE) , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.PRODUCT_TYPE) , MSIB.SEGMENT1 , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.PRODUCT_CATEGORY) , PH.FOB_LOOKUP_CODE , PV.PARTY_ID , PV.PARTY_ID , PVS.PARTY_SITE_ID , PVS.PARTY_SITE_ID , PLL.SHIP_TO_LOCATION_ID , (SELECT HZPS.LOCATION_ID FROM HZ_PARTY_SITES HZPS WHERE HZPS.PARTY_SITE_ID = PVS.PARTY_SITE_ID) , PH.BILL_TO_LOCATION_ID , (SELECT PVS.LOCATION_ID FROM PO_VENDOR_SITES_ALL PVS WHERE PVS.VENDOR_SITE_ID=PH.VENDOR_SITE_ID) , NVL((SELECT PD.CODE_COMBINATION_ID FROM PO_DISTRIBUTIONS_ALL PD WHERE PD.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND ROWNUM = 1), MSIB.EXPENSE_ACCOUNT ) , NULL , NULL , NULL , NULL , NULL , PL.LINE_NUM , PO_LOCATIONS_S.GET_LOCATION_CODE(PLL.SHIP_TO_LOCATION_ID) , DECODE(PLL.PAYMENT_TYPE, NULL, 0, 'DELIVERY', 1, 'ADVANCE', 2, 3) , DECODE(PLL.PAYMENT_TYPE, 'ADVANCE', NULL, 'DELIVERY', NULL, PLL.SHIPMENT_NUM) , DECODE(PLL.SHIPMENT_TYPE, 'STANDARD', DECODE(PLL.PAYMENT_TYPE, NULL, PL.ITEM_DESCRIPTION, PLL.DESCRIPTION ), PL.ITEM_DESCRIPTION ) , DECODE(PLL.SHIPMENT_TYPE, 'STANDARD', DECODE(PLL.PAYMENT_TYPE, NULL, PL.ITEM_DESCRIPTION, PLL.DESCRIPTION ), PL.ITEM_DESCRIPTION ) , DECODE(:B7 , 'COPY_DOCUMENT', NULL, ZXLDET.ASSESSABLE_VALUE) , 'N' , DECODE(:B7 , 'PDOI', PLL.TAX_NAME, 'COPY_DOCUMENT', NULL, ZXLDET.INPUT_TAX_CLASSIFICATION_CODE) , DECODE(:B7 , 'COPY_DOCUMENT', :B5 , 'POXBWVRP_PO', :B5 , 'AUTOCREATED_DOC_WF' , :B5 , 'PORELGEB', :B5 , NULL) , DECODE(:B7 , 'COPY_DOCUMENT', :B4 , 'POXBWVRP_PO', :B9 , 'AUTOCREATED_DOC_WF', :B9 , 'PORELGEB', :B9 , NULL) , DECODE(:B7 , 'COPY_DOCUMENT', :B3 , 'POXBWVRP_PO', :B8 , 'AUTOCREATED_DOC_WF', :B8 , 'PORELGEB', :B8 , NULL) , DECODE(:B7 , 'COPY_DOCUMENT', (SELECT SOURCE_SHIPMENT.PO_HEADER_ID F
ROM PO_LINE_LOCATIONS_ALL SOURCE_SHIPMENT WHERE SOURCE_SHIPMENT.LINE_LOCATION_ID = PLL.ORIGINAL_SHIPMENT_ID AND :B7 = 'COPY_DOCUMENT'), 'POXBWVRP_PO', (SELECT REQUISITION_HEADER_ID FROM PO_REQUISITION_LINES_ALL WHERE REQUISITION_LINE_ID IN (SELECT MIN(REQUISITION_LINE_ID) FROM PO_REQUISITION_LINES_ALL PRL WHERE PRL.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID) AND :B7 = 'POXBWVRP_PO'), 'AUTOCREATED_DOC_WF', (SELECT REQUISITION_HEADER_ID FROM PO_REQUISITION_LINES_ALL WHERE REQUISITION_LINE_ID IN (SELECT MIN(REQUISITION_LINE_ID) FROM PO_REQUISITION_LINES_ALL PRL WHERE PRL.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID) AND :B7 = 'AUTOCREATED_DOC_WF'), 'PORELGEB', (SELECT REQUISITION_HEADER_ID FROM PO_REQUISITION_LINES_ALL WHERE REQUISITION_LINE_ID IN (SELECT MIN(REQUISITION_LINE_ID) FROM PO_REQUISITION_LINES_ALL PRL WHERE PRL.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID) AND :B7 = 'PORELGEB'), NULL) , DECODE(:B7 , 'COPY_DOCUMENT', PLL.ORIGINAL_SHIPMENT_ID, 'POXBWVRP_PO', (SELECT MIN(REQUISITION_LINE_ID) FROM PO_REQUISITION_LINES_ALL PRL WHERE PRL.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND :B7 = 'POXBWVRP_PO'), 'AUTOCREATED_DOC_WF', (SELECT MIN(REQUISITION_LINE_ID) FROM PO_REQUISITION_LINES_ALL PRL WHERE PRL.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND :B7 = 'AUTOCREATED_DOC_WF'), 'PORELGEB', (SELECT MIN(REQUISITION_LINE_ID) FROM PO_REQUISITION_LINES_ALL PRL WHERE PRL.LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND :B7 = 'PORELGEB'), NULL) , DECODE(:B7 , 'COPY_DOCUMENT', :B2 , 'POXBWVRP_PO', :B6 , 'AUTOCREATED_DOC_WF', :B6 , 'PORELGEB', :B6 , NULL) , PLL.PRICE_OVERRIDE , NULL , PV.VENDOR_ID , PV.VENDOR_ID , PVS.VENDOR_SITE_ID , PVS.VENDOR_SITE_ID , PLL.SHIP_TO_ORGANIZATION_ID , (SELECT 'Y' FROM DUAL WHERE :B7 = 'PDOI' AND PLL.TAX_NAME IS NOT NULL) , PLL.SHIP_TO_ORGANIZATION_ID FROM PO_HEADERS_ALL PH, PO_LINES_ALL PL, PO_LINE_LOCATIONS_ALL PLL, ZX_LINES_DET_FACTORS ZXLDET, PO_VENDORS PV, PO_VENDOR_SITES_ALL PVS, MTL_SYSTEM_ITEMS_B MSIB WHERE PH.PO_HEADER_ID = PLL.PO_HEADER_ID AND PL.PO_LINE_ID = PLL.PO_LINE_ID AND PLL.TAX_ATTRIBUTE_UPDATE_CODE IS NOT NULL AND PLL.TAX_ATTRIBUTE_UPDATE_CODE <> 'DIST_DELETE' AND PH.PO_HEADER_ID = :B1 AND ZXLDET.APPLICATION_ID(+) = :B5 AND ZXLDET.ENTITY_CODE(+) = :B4 AND ZXLDET.EVENT_CLASS_CODE(+) = :B3 AND ZXLDET.TRX_LEVEL_TYPE(+) = :B2 AND ZXLDET.TRX_LINE_ID(+) = PLL.ORIGINAL_SHIPMENT_ID AND PV.VENDOR_ID(+) = PH.VENDOR_ID AND PVS.VENDOR_SITE_ID(+) = PH.VENDOR_SITE_ID AND MSIB.INVENTORY_ITEM_ID(+) = PL.ITEM_ID AND MSIB.ORGANIZATION_ID(+) = PL.ORG_ID |
g9vzqq7g0nr34 | SELECT POLC.DISPLAYED_FIELD, POLC.LOOKUP_CODE FROM PO_LOOKUP_CODES POLC, PO_HEADERS POH WHERE POH.PO_HEADER_ID = :B2 AND POLC.LOOKUP_TYPE = 'CONTROL ACTIONS' AND NVL(POH.CLOSED_CODE, 'OPEN') <> 'FINALLY CLOSED' AND ( NVL(POH.CANCEL_FLAG, 'N') IN ('N', 'I') OR POLC.LOOKUP_CODE = 'FINALLY CLOSE' ) AND ( ( ( ( POLC.LOOKUP_CODE = 'FREEZE' AND NVL(POH.FROZEN_FLAG, 'N') = 'N' ) OR ( POLC.LOOKUP_CODE = 'UNFREEZE' AND POH.FROZEN_FLAG = 'Y' ) ) AND NVL(POH.USER_HOLD_FLAG, 'N') = 'N' AND NVL(POH.AUTHORIZATION_STATUS, 'INCOMPLETE') = 'APPROVED' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' ) OR ( POLC.LOOKUP_CODE = 'HOLD' AND NVL(POH.USER_HOLD_FLAG, 'N') = 'N' AND NVL(POH.FROZEN_FLAG, 'N') = 'N' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' ) OR ( POLC.LOOKUP_CODE = 'RELEASE HOLD' AND POH.USER_HOLD_FLAG = 'Y' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' ) OR ( POLC.LOOKUP_CODE = 'CANCEL PO' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' AND NVL(POH.USER_HOLD_FLAG, 'N') = 'N' AND NVL(POH.CLOSED_CODE, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED') AND NVL(POH.AUTHORIZATION_STATUS, 'INCOMPLETE') NOT IN ('IN PROCESS', 'PRE-APPROVED', 'INCOMPLETE') AND ( (:B1 IS NULL) OR (POH.AGENT_ID = :B1 ) OR EXISTS (SELECT 'security_level is full' FROM PO_DOCUMENT_TYPES PODT WHERE PODT.DOCUMENT_TYPE_CODE IN ('PO', 'PA') AND PODT.DOCUMENT_SUBTYPE = :B3 AND PODT.ACCESS_LEVEL_CODE = 'FULL') ) ) OR ( POH.APPROVED_FLAG = 'Y' AND ( ( POLC.LOOKUP_CODE = 'CLOSE' AND NVL(POH.CLOSED_CODE, 'OPEN') <> 'CLOSED' ) OR ( POLC.LOOKUP_CODE = 'FINALLY CLOSE' AND ( (:B1 IS NULL) OR (POH.AGENT_ID = :B1 ) OR EXISTS (SELECT 'security_level = full' FROM PO_DOCUMENT_TYPES PODT WHERE PODT.DOCUMENT_TYPE_CODE IN ('PO', 'PA') AND PODT.DOCUMENT_SUBTYPE = :B3 AND PODT.ACCESS_LEVEL_CODE = 'FULL') ) ) OR ( POLC.LOOKUP_CODE = 'OPEN' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' AND ( ( POH.TYPE_LOOKUP_CODE IN ('BLANKET', 'CONTRACT') AND NVL(POH.CLOSED_CODE, 'OPEN') <> 'OPEN' ) OR ( POH.TYPE_LOOKUP_CODE NOT IN ('BLANKET', 'CONTRACT') AND EXISTS (SELECT 'Ship exists not OPEN' FROM PO_LINE_LOCATIONS POLL WHERE POLL.PO_HEADER_ID = :B2 AND NVL(POLL.CONSIGNED_FLAG, 'N') <> 'Y' AND NVL(POLL.CLOSED_CODE, 'OPEN') <> 'OPEN') ) ) ) OR ( POLC.LOOKUP_CODE = 'RECEIVE CLOSE' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' AND POH.TYPE_LOOKUP_CODE NOT IN ('BLANKET', 'CONTRACT') AND EXISTS (SELECT 'Ships exist OPEN' FROM PO_LINE_LOCATIONS POLL WHERE POLL.PO_HEADER_ID = :B2 AND NVL(POLL.CLOSED_CODE, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR RECEIVING')) ) OR ( POLC.LOOKUP_CODE = 'INVOICE CLOSE' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' AND POH.TYPE_LOOKUP_CODE NOT IN ('BLANKET', 'CONTRACT') AND EXISTS(SELECT 'Ships exist OPEN' FROM PO_LINE_LOCATIONS POLL WHERE POLL.PO_HEADER_ID = :B2 AND NVL(POLL.CLOSED_CODE, 'OPEN') NOT IN ('FINALLY CLOSED', 'CLOSED', 'CLOSED FOR INVOICE')) ) OR ( POLC.LOOKUP_CODE = 'RECEIVE OPEN' AND NVL(POH.CONSIGNED_CONSUMPTION_FLAG, 'N') <> 'Y' AND POH.TYPE_LOOKUP_CODE NOT IN ('BLANKET', 'CONTRACT') AND EXISTS (SELECT 'Ships exist RCLOSED' FROM PO_LINE_LOCATIONS POLL WHERE POLL.PO_HEADER_ID = :B2 AND POLL.CLOSED_CODE IN ('CLOSED FOR RECEIVING', 'CLOSED')) ) OR ( POLC.LOOKUP_CODE = 'INVOICE OPEN' AND POH.TYPE_LOOKUP_CODE NOT IN ('BLANKET', 'CONTRACT') AND EXISTS (SELECT 'Ships exits IC/CLOSED' FROM PO_LINE_LOCATIONS POLL WHERE POLL.PO_HEADER_ID = :B2 AND NVL(POLL.CONSIGNED_FLAG, 'N') <> 'Y' AND POLL.CLOSED_CODE IN ('CLOSED FOR INVOICE', 'CLOSED')) ) ) ) ) ORDER BY POLC.DISPLAYED_FIELD |
gmzaqj0bt8jy1 | SELECT 'Y' FROM PO_HEADERS_ARCHIVE WHERE PO_HEADER_ID = :B1 AND ROWNUM = 1 |
gnkqm72nrzg9j | SELECT 'Exists' FROM PO_LINE_LOCATIONS POLL WHERE POLL.LINE_LOCATION_ID = :B3 AND POLL.PO_LINE_ID = :B2 AND POLL.PO_HEADER_ID = :B1 |