DBA Data[Home] [Help]

APPS.CLN_SYNC_INVENTORY_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 99

        SELECT cln_generic_s.nextval INTO l_event_key FROM Dual;
Line: 108

                SELECT etph.party_type, etpv.party_id, etpv.party_site_id, etpv.party_name
                INTO l_tr_partner_type, l_tr_partner_id, l_tr_partner_site, l_party_name
                FROM ecx_tp_headers_v etpv, ecx_tp_headers etph
                WHERE  etph.tp_header_id = p_inv_user
                AND etph.tp_header_id  = etpv.tp_header_id;
Line: 142

        SELECT cln_generic_s.nextval INTO l_xmlg_document_id FROM Dual;
Line: 149

        SELECT TO_CHAR(cln_sync_inv_doc_s.nextval) INTO l_doc_number FROM Dual;
Line: 157

                SELECT 'x' INTO l_dummy_check FROM DUAL
                WHERE EXISTS(
                SELECT 'x'
                FROM CLN_INVENTORY_REPORT_V
                WHERE organization_id = p_inv_org
                AND (concatenated_segments BETWEEN nvl(p_item_number_from,concatenated_segments) AND nvl(p_item_number_to,concatenated_segments))
		AND (((p_item_revision_from IS NULL OR p_item_revision_to IS NULL) AND CLN_INVENTORY_REPORT_V.REVISION_QTY_CONTROL_CODE =1)or revision BETWEEN nvl(p_item_revision_from,revision) AND nvl(p_item_revision_to,revision))
                AND EXISTS ( SELECT 'X' FROM MTL_ITEM_CATEGORIES MIC
                              WHERE (CLN_INVENTORY_REPORT_V.INVENTORY_ITEM_ID = MIC.INVENTORY_ITEM_ID(+)
                                AND CLN_INVENTORY_REPORT_V.ORGANIZATION_ID = MIC.ORGANIZATION_ID(+))
                                AND MIC.category_id = nvl(p_item_category,MIC.category_id))
                AND EXISTS (
                             SELECT 'X' FROM mtl_secondary_inventories msi, mtl_onhand_quantities_detail moqd
                              WHERE msi.organization_id = moqd.organization_id
                                AND msi.secondary_inventory_name = moqd.subinventory_code
                                AND msi.organization_id = CLN_INVENTORY_REPORT_V.organization_id
                                AND msi.secondary_inventory_name = NVL(p_sub_inv,msi.secondary_inventory_name)
                                AND moqd.inventory_item_id = CLN_INVENTORY_REPORT_V.inventory_item_id
                                AND (CLN_INVENTORY_REPORT_V.revision IS NULL OR moqd.revision IS NULL OR moqd.revision = CLN_INVENTORY_REPORT_V.revision)
                           )
                AND ( (p_lot_number IS NULL AND CLN_INVENTORY_REPORT_V.LOT_CONTROL_CODE = 1) OR
                      EXISTS (
                                SELECT 'X' FROM MTL_LOT_NUMBERS MLN
                                WHERE CLN_INVENTORY_REPORT_V.inventory_item_id = mln.inventory_item_id(+)
                                  AND CLN_INVENTORY_REPORT_V.organization_id = mln.organization_id(+)
                                  AND mln.lot_number = NVL(p_lot_number,mln.lot_number)
                             )
                    )
                );
Line: 189

                     FND_MESSAGE.SET_NAME('CLN','CLN_CH_NO_ROW_SELECTED');
Line: 447

                        SELECT mci.customer_item_number
                        INTO x_customer_item_number
                        FROM
                              mtl_customer_items mci  ,
                              mtl_customer_item_xrefs mcix
                        WHERE mcix.master_organization_id = p_inv_org
                          AND mcix.inventory_item_id = p_item_number
                          AND mci.customer_id = p_tp_id
                          AND mci.customer_item_id(+) = mcix.customer_item_id;
Line: 485

                  SELECT nvl(sum(moqd.primary_transaction_quantity),0)
                  INTO x_quantity_blocked
                  FROM mtl_onhand_quantities_detail moqd, mtl_secondary_inventories msi
                  WHERE moqd.organization_id = p_inv_org
                  AND moqd.inventory_item_id = p_item_number
                  AND moqd.subinventory_code = msi.secondary_inventory_name
                  AND moqd.organization_id   = msi.organization_id
                  AND msi.availability_type  = 2
                  AND moqd.subinventory_code = nvl(p_sub_inv,moqd.subinventory_code)
                  AND (p_item_revision IS NULL OR moqd.revision IS NULL OR moqd.revision = p_item_revision)
                  AND (p_lot_number IS NULL OR moqd.lot_number = p_lot_number);
Line: 500

                               cln_debug_pub.Add('No Rows selected from the SQL statement used for calculating Blocked Qty',1);
Line: 513

                  SELECT nvl(sum(moqd.primary_transaction_quantity),0)
                  INTO x_quantity_blocked
                  FROM mtl_onhand_quantities_detail moqd, mtl_secondary_inventories msi
                  WHERE moqd.organization_id = p_inv_org
                    AND moqd.inventory_item_id = p_item_number
                    AND moqd.subinventory_code = msi.secondary_inventory_name
                    AND moqd.organization_id = msi.organization_id
                    AND msi.inventory_atp_code = 2
                    AND moqd.subinventory_code = nvl(p_sub_inv,moqd.subinventory_code)
                    AND (p_item_revision IS NULL OR moqd.revision IS NULL OR moqd.revision = p_item_revision)
                    AND (p_lot_number IS NULL OR moqd.lot_number = p_lot_number);
Line: 528

                               cln_debug_pub.Add('No Rows selected from the SQL statement used for calculating Blocked Qty',1);
Line: 541

                  SELECT nvl(sum(moqd.primary_transaction_quantity),0)
                  INTO x_quantity_blocked
                  FROM mtl_onhand_quantities_detail moqd, mtl_secondary_inventories msi
                  WHERE moqd.organization_id = p_inv_org
                    AND moqd.inventory_item_id = p_item_number
                    AND moqd.subinventory_code = msi.secondary_inventory_name
                    AND moqd.organization_id = msi.organization_id
                    AND (msi.inventory_atp_code = 2 OR msi.availability_type = 2)
                    AND moqd.subinventory_code = nvl(p_sub_inv,moqd.subinventory_code)
                    AND (p_item_revision IS NULL OR moqd.revision IS NULL OR moqd.revision = p_item_revision)
                    AND (p_lot_number IS NULL OR moqd.lot_number = p_lot_number);
Line: 556

                               cln_debug_pub.Add('No Rows selected from the SQL statement used for calculating Blocked Qty',1);