DBA Data[Home] [Help]

APPS.INV_MWB_LOCATION_TREE SQL Statements

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

Line: 36

      ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN

      IF( inv_mwb_globals.g_chk_onhand = 1) THEN

         IF inv_mwb_globals.g_serial_from IS NOT NULL
         OR inv_mwb_globals.g_serial_to IS NOT NULL
         OR inv_mwb_globals.g_status_id IS NOT NULL
         OR inv_mwb_globals.g_serial_attr_query IS NOT NULL              -- Bug 6429880
         OR inv_mwb_globals.g_unit_number IS NOT NULL                    -- Bug 9486070
         THEN
            make_common_query_onhand('MSN_QUERY');
Line: 49

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'msn.current_subinventory_code';
Line: 51

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'msn.current_locator_id';
Line: 53

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
               'msn.revision';
Line: 64

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'moqd.subinventory_code';
Line: 66

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'moqd.locator_id';
Line: 68

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
               'moqd.revision';
Line: 93

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 95

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 97

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.REVISION).column_value :=
               'rs.item_revision';
Line: 136

      SELECT meaning
      BULK COLLECT INTO mtl_loc_type
      FROM mfg_lookups
      WHERE lookup_type = 'MTL_LOCATION_TYPES'
      ORDER BY lookup_code;
Line: 142

   inv_mwb_globals.print_msg( g_pkg_name, l_procedure_name, 'Selected all the document types' );
Line: 178

   ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN
      inv_mwb_globals.print_msg( g_pkg_name, l_procedure_name, 'Tree Node Selected' );
Line: 189

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'msn.current_subinventory_code';
Line: 201

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'moqd.subinventory_code';
Line: 213

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'rs.to_subinventory';
Line: 220

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'rs.to_subinventory';
Line: 272

         SELECT locator_type
         INTO   loc_type
         FROM   mtl_secondary_inventories
         WHERE  secondary_inventory_name = inv_mwb_globals.g_tree_subinventory_code
         AND    organization_id = inv_mwb_globals.g_tree_organization_id;
Line: 317

    ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN

--      IF(inv_mwb_globals.g_chk_onhand = 1) THEN
      IF(inv_mwb_globals.g_tree_mat_loc_id = 1) THEN
         IF inv_mwb_globals.g_serial_from IS NOT NULL  ---serials entered in qf
         OR inv_mwb_globals.g_serial_to IS NOT NULL
         OR inv_mwb_globals.g_status_id IS NOT NULL
         OR inv_mwb_globals.g_serial_attr_query IS NOT NULL              -- Bug 6429880
         OR inv_mwb_globals.g_unit_number IS NOT NULL                    -- Bug 9486070
         THEN
            make_common_query_onhand('MSN_QUERY');
Line: 328

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'msn.current_subinventory_code';
Line: 330

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'msn.current_locator_id';
Line: 345

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'moqd.subinventory_code';
Line: 347

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'moqd.locator_id';
Line: 369

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 371

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 383

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 385

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 401

  END IF; -- node selected
Line: 442

   ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN

      IF (inv_mwb_globals.g_tree_mat_loc_id = 1) THEN -- Onhand node chosen
            IF inv_mwb_globals.g_serial_from IS NOT NULL  ---serials entered in qf
            OR inv_mwb_globals.g_serial_to IS NOT NULL
            OR inv_mwb_globals.g_status_id IS NOT NULL
            OR inv_mwb_globals.g_serial_attr_query IS NOT NULL              -- Bug 6429880
            OR inv_mwb_globals.g_unit_number IS NOT NULL                    -- Bug 9486070
            THEN
               make_common_query_onhand('MSN_QUERY');
Line: 453

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'msn.current_subinventory_code';
Line: 455

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
                  'msn.current_locator_id';
Line: 457

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
                  'msn.cost_group_id';
Line: 483

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'moqd.subinventory_code';
Line: 485

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
                  'moqd.locator_id';
Line: 487

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'moqd.lpn_id';
Line: 490

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
                  'moqd.lot_number';
Line: 492

	       inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
                  'moqd.cost_group_id';
Line: 512

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 514

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 528

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 530

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 548

      END IF; -- node selected
Line: 594

      ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN

       --START Bug7462485
 	IF (inv_mwb_globals.g_inventory_item_id IS NOT NULL)  THEN  --bug 8920503

         l_return_val := inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_inventory_item_id);
Line: 625

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'msn.current_subinventory_code';
Line: 627

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
                  'msn.current_locator_id';
Line: 629

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'msn.lpn_id';
Line: 631

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
                  'msn.cost_group_id';
Line: 665

                inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
                  'moqd.cost_group_id';
Line: 667

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'moqd.subinventory_code';
Line: 669

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
                  'moqd.locator_id';
Line: 671

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'moqd.lpn_id';
Line: 749

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.revision).column_value :=
                     'msn.revision';
Line: 755

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
                        'msn.lot_number';
Line: 785

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.revision).column_value :=
                     'moqd.revision';
Line: 791

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
                        'moqd.lot_number';
Line: 814

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
                'ms.intransit_owning_org_id';
Line: 816

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.EXPECTED_RECEIPT_DATE).column_value :=
                'ms.expected_delivery_date';
Line: 818

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.FROM_ORG_ID).column_value :=
                'ms.from_organization_id';
Line: 820

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.TO_ORG_ID).column_value :=
                'ms.to_organization_id';                            -- Bug 11716231
Line: 835

	          inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
    		      'ms.req_header_id';
Line: 837

    	       inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
    		      'ms.req_line_id';
Line: 839

    	       inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
    		      'rsl.asn_lpn_id';
Line: 856

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
		         'ms.shipment_header_id';
Line: 858

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
		         'ms.shipment_line_id';
Line: 860

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
		         'rsl.asn_lpn_id';
Line: 878

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
		         'ms.shipment_header_id';
Line: 880

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
		         'ms.shipment_line_id';
Line: 882

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
		         'rsl.asn_lpn_id';
Line: 884

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_ID).column_value :=
		         'rsh.vendor_id';
Line: 886

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_SITE_ID).column_value :=
		         'rsh.vendor_site_id';
Line: 912

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 914

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 916

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'rs.lpn_id';
Line: 940

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'wlpn.subinventory_code';
Line: 942

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'wlpn.locator_id';
Line: 944

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'wlpn.lpn_id';
Line: 996

      select_lot       NUMBER;
Line: 997

      select_serial    NUMBER;
Line: 998

      select_grade     NUMBER;
Line: 1077

      ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN

         SELECT revision_qty_control_code,
                lot_control_code,
                serial_number_control_code
           INTO l_rev_control,
                l_lot_control,
                l_serial_control
           FROM mtl_system_items
          WHERE inventory_item_id = inv_mwb_globals.g_tree_item_id
            AND organization_id = inv_mwb_globals.g_tree_organization_id;
Line: 1097

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'msn.current_subinventory_code';
Line: 1099

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
                  'msn.current_locator_id';
Line: 1101

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'msn.lpn_id';
Line: 1103

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
                  'msn.cost_group_id';
Line: 1142

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
                  'moqd.cost_group_id';
Line: 1144

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'moqd.subinventory_code';
Line: 1146

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
                  'moqd.locator_id';
Line: 1148

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'moqd.lpn_id';
Line: 1173

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.STATUS_ID).column_value :=
                  'moqd.status_id';
Line: 1255

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.revision).column_value :=
                     'msn.revision';
Line: 1261

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
                        'msn.lot_number';
Line: 1286

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.revision).column_value :=
                     'moqd.revision';
Line: 1292

                     inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
                        'moqd.lot_number';
Line: 1315

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
                     'ms.item_revision';
Line: 1320

                     inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
                        'rls.lot_num';
Line: 1329

                         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
                         'count(1)';
Line: 1332

                         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
                         'sum(rls.quantity)';
Line: 1339

                     inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SERIAL).column_value :=
                        'rss.serial_num';
Line: 1341

                     inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value := 1;
Line: 1347

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 1349

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.EXPECTED_RECEIPT_DATE).column_value :=
               'ms.expected_delivery_date';
Line: 1351

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.FROM_ORG_ID).column_value :=
               'ms.from_organization_id';
Line: 1353

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.TO_ORG_ID).column_value :=
               'ms.to_organization_id';                            -- Bug 11716231
Line: 1363

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_NUMBER).column_value :=
                  inv_mwb_globals.g_tree_node_value;
Line: 1365

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_HEADER_ID).column_value :=
                  'ms.po_header_id';
Line: 1367

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
                  'ms.po_line_id';
Line: 1369

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
                  'ms.item_revision';
Line: 1371

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_RELEASE_ID).column_value :=
                  'ms.po_release_id';
Line: 1373

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.RELEASE_NUMBER).column_value :=
                  'prl.release_num';                     -- Bug 11932315
Line: 1395

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
                     'ms.req_header_id';
Line: 1397

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
                     'ms.req_line_id';
Line: 1412

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
                  'ms.shipment_header_id';
Line: 1414

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
                  'ms.shipment_line_id';
Line: 1416

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
                  'rsh.shipped_date';
Line: 1418

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
                  'ms.intransit_owning_org_id';
Line: 1433

                     inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                        'rsl.asn_lpn_id';
Line: 1444

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
                  'ms.shipment_header_id';
Line: 1446

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
                  'ms.shipment_line_id';
Line: 1448

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_ID).column_value :=
                  'rsh.vendor_id';
Line: 1450

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_SITE_ID).column_value :=
                  'rsh.vendor_site_id';
Line: 1452

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
                  'rsh.shipped_date';
Line: 1470

                     inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                        'rsl.asn_lpn_id';
Line: 1484

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 1486

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'rs.to_locator_id';
Line: 1488

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'rs.lpn_id';
Line: 1528

                  inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.REVISION).column_value :=
                  'rs.item_revision';
Line: 1532

                  inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
                  'rss.lot_num';
Line: 1537

                  inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SERIAL).column_value :=
                  'rss.serial_num';
Line: 1545

                  inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.REVISION).column_value :=
                  'rs.item_revision';
Line: 1553

					        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
                            'rls.lot_num';
Line: 1557

							inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.RECEIVING).column_value :=
							  'SUM(rls.primary_quantity)';
Line: 1560

							inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
							  'SUM(DECODE (rs.lpn_id, null, rls.primary_quantity, 0))';
Line: 1562

							inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
							  'SUM(DECODE (rs.lpn_id, null, 0, rls.primary_quantity))';
Line: 1565

						    inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_RECEIVING).column_value :=
									  'SUM(rls.secondary_quantity)';
Line: 1567

							inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
							'SUM(DECODE (rs.lpn_id, null, rls.secondary_quantity, 0))';
Line: 1569

							inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
							'SUM(DECODE (rs.lpn_id, null, 0, rls.secondary_quantity))';
Line: 1576

                  inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
                  'rls.lot_num';
Line: 1581

                      inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.RECEIVING).column_value :=
                        'SUM(rls.primary_quantity)';
Line: 1584

					  inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
                        'SUM(DECODE (rs.lpn_id, null, rls.primary_quantity, 0))';
Line: 1586

                      inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
                        'SUM(DECODE (rs.lpn_id, null, 0, rls.primary_quantity))';
Line: 1589

					inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_RECEIVING).column_value :=
                      'SUM(rls.secondary_quantity)';
Line: 1591

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, rls.secondary_quantity, 0))';
Line: 1593

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, 0, rls.secondary_quantity))';
Line: 1602

      END IF; -- node selected
Line: 1619

      select_serial          NUMBER     := 0;
Line: 1620

      select_grade           NUMBER     := 0;                -- NSRIVAST, INVCONV
Line: 1683

    ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN
      SELECT lot_control_code
           , serial_number_control_code
      INTO   l_lot_control
           , l_serial_control
      FROM   mtl_system_items
      WHERE  inventory_item_id = inv_mwb_globals.g_tree_item_id
      AND    organization_id = inv_mwb_globals.g_tree_organization_id;
Line: 1709

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
            'msn.current_subinventory_code';
Line: 1711

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
            'msn.current_locator_id';
Line: 1713

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
            'msn.lpn_id';
Line: 1715

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
            'msn.revision';
Line: 1717

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
            'msn.cost_group_id';
Line: 1727

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
               'msn.lot_number';
Line: 1731

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SERIAL).column_value :=
               'msn.serial_number';
Line: 1766

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
         'moqd.subinventory_code';
Line: 1768

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
         'moqd.locator_id';
Line: 1770

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
         'moqd.lot_number';
Line: 1772

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
         'moqd.cost_group_id';
Line: 1774

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
         'moqd.lpn_id';
Line: 1776

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
         'moqd.revision';
Line: 1803

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.STATUS_ID).column_value :=
            'moqd.status_id';
Line: 1843

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_NUMBER).column_value :=
            inv_mwb_globals.g_tree_node_value;
Line: 1845

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_HEADER_ID).column_value :=
               'ms.po_header_id';
Line: 1847

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.po_line_id';
Line: 1849

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
               'ms.item_revision';
Line: 1851

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_HEADER_ID).column_value :=
               'ms.po_release_id';
Line: 1872

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
               'ms.req_header_id';
Line: 1874

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.req_line_id';
Line: 1876

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
               'rls.lot_num';
Line: 1878

             inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
               'rls.expiration_date';
Line: 1897

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
                  'rls.lot_num';
Line: 1899

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
                  'rls.expiration_date';
Line: 1904

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SERIAL).column_value :=
                 'rss.serial_num';
Line: 1910

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'rsl.asn_lpn_id';
Line: 1917

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 1919

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 1921

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'rsh.shipped_date';
Line: 1923

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 1925

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
               'ms.item_revision';
Line: 1943

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
                  'rls.lot_num';
Line: 1945

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
                  'rls.expiration_date';
Line: 1950

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SERIAL).column_value :=
                 'rss.serial_num';
Line: 1956

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'rsl.asn_lpn_id';
Line: 1963

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 1965

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 1967

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'rsh.shipped_date';
Line: 1969

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 1971

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
               'ms.item_revision';
Line: 1988

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
           'rs.to_subinventory';
Line: 1990

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
           'rs.to_locator_id';
Line: 1992

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LPN_ID).column_value :=
           'rs.lpn_id';
Line: 1994

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.REVISION).column_value :=
           'rs.item_revision';
Line: 2029

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
               'rss.lot_num';
Line: 2033

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SERIAL).column_value :=
               'rss.serial_num';
Line: 2041

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
               'rls.lot_num';
Line: 2046

                    inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.RECEIVING).column_value :=
                      'SUM(rls.primary_quantity)';
Line: 2049

				    inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, rls.primary_quantity, 0))';
Line: 2051

                    inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, 0, rls.primary_quantity))';
Line: 2055

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_RECEIVING).column_value :=
                      'SUM(rls.secondary_quantity)';
Line: 2057

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, rls.secondary_quantity, 0))';
Line: 2059

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, 0, rls.secondary_quantity))';
Line: 2081

    select_serial        NUMBER    := 0;
Line: 2131

    ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN
      SELECT serial_number_control_code
      INTO   serial_control
      FROM   mtl_system_items
      WHERE  organization_id = inv_mwb_globals.g_tree_organization_id
      AND    inventory_item_id = inv_mwb_globals.g_tree_item_id;
Line: 2144

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
               'msn.revision';
Line: 2146

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SERIAL).column_value :=
               'msn.serial_number';
Line: 2148

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'msn.current_subinventory_code';
Line: 2150

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'msn.current_locator_id';
Line: 2152

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'msn.lpn_id';
Line: 2154

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
               'msn.cost_group_id';
Line: 2156

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
               'msn.lot_number';
Line: 2200

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
               'moqd.revision';
Line: 2204

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'moqd.subinventory_code';
Line: 2206

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
               'moqd.locator_id';
Line: 2208

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'moqd.lpn_id';
Line: 2210

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
               'moqd.cost_group_id';
Line: 2212

            inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
               'moqd.lot_number';
Line: 2244

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.STATUS_ID).column_value :=
               'moqd.status_id';
Line: 2293

	          inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
    		      'ms.req_header_id';
Line: 2295

    	       inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
    		      'ms.req_line_id';
Line: 2297

     	       inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
    		      'rls.lot_num';
Line: 2299

     	       inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
    		      'rls.expiration_date';
Line: 2330

                 inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
                 'count(1)';
Line: 2333

                  inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
                  'sum(rls.quantity)';
Line: 2346

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SERIAL).column_value :=
                  'rss.serial_num';
Line: 2348

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value := 1;
Line: 2370

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
               'ms.item_revision';
Line: 2372

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 2374

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 2376

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
               'rls.lot_num';
Line: 2378

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
               'rls.expiration_date';
Line: 2380

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'ms.receipt_date';
Line: 2382

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 2394

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'rsl.asn_lpn_id';
Line: 2422

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
               'sum(rls.quantity)';
Line: 2431

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SERIAL).column_value :=
                  'rss.serial_num';
Line: 2433

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value := 1;
Line: 2438

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REVISION).column_value :=
               'ms.item_revision';
Line: 2440

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 2442

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 2444

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
               'rls.lot_num';
Line: 2446

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
               'rls.expiration_date';
Line: 2448

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'ms.receipt_date';
Line: 2450

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 2462

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'rsl.asn_lpn_id';
Line: 2487

	inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
           'rs.to_subinventory';
Line: 2489

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
           'rs.to_locator_id';
Line: 2491

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LPN_ID).column_value :=
           'rs.lpn_id';
Line: 2493

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.REVISION).column_value :=
           'rs.item_revision';
Line: 2533

	   inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
              'rss.lot_num';
Line: 2537

           inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SERIAL).column_value :=
              'rss.serial_num';
Line: 2545

           inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
                 'rls.lot_num';
Line: 2549

	   inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.RECEIVING).column_value :=
                    'SUM(rls.primary_quantity)';
Line: 2552

           inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
                    'SUM(DECODE (rs.lpn_id, null, rls.primary_quantity, 0))';
Line: 2554

           inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
                    'SUM(DECODE (rs.lpn_id, null, 0, rls.primary_quantity))';
Line: 2557

                      inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_RECEIVING).column_value :=
                      'SUM(rls.secondary_quantity)';
Line: 2559

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, rls.secondary_quantity, 0))';
Line: 2561

                     inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
                      'SUM(DECODE (rs.lpn_id, null, 0, rls.secondary_quantity))';
Line: 2569

   END IF; -- node selected
Line: 2591

    IF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN
      IF inv_mwb_globals.g_tree_mat_loc_id = 1 THEN
         make_common_query_onhand('MSN');
Line: 2594

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.REVISION).column_value :=
            'msn.revision';
Line: 2596

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
            'msn.current_locator_id';
Line: 2598

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LPN_ID).column_value :=
            'msn.lpn_id';
Line: 2600

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.LOT).column_value :=
            'msn.lot_number';
Line: 2602

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SERIAL).column_value :=
            'msn.serial_number';
Line: 2604

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
            'msn.current_subinventory_code';
Line: 2606

         inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.CG_ID).column_value :=
            'msn.cost_group_id';
Line: 2668

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT).column_value :=
                  'rls.lot_num';
Line: 2670

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LOT_EXPIRY_DATE).column_value :=
                  'rls.expiration_date';
Line: 2680

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SERIAL).column_value :=
               'rss.serial_num';
Line: 2682

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 2684

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 2686

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'ms.receipt_date';
Line: 2688

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 2690

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value := 1;
Line: 2698

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
                  'rsl.asn_lpn_id';
Line: 2723

	inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
           'rs.to_subinventory';
Line: 2725

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOCATOR_ID).column_value :=
           'rs.to_locator_id';
Line: 2727

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LPN_ID).column_value :=
           'rs.lpn_id';
Line: 2729

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.REVISION).column_value :=
           'rs.item_revision';
Line: 2731

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.LOT).column_value :=
           'rss.lot_num';
Line: 2733

        inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SERIAL).column_value :=
           'rss.serial_num';
Line: 2809

      SELECT meaning
      BULK COLLECT INTO document_type_meaning
      FROM mfg_lookups
      WHERE lookup_type = 'MTL_DOCUMENT_TYPES'
      ORDER BY lookup_code;
Line: 2842

               inv_mwb_globals.g_inserted_under_org := 'Y';
Line: 2844

               inv_mwb_globals.g_inserted_under_org := 'N';
Line: 2921

    ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN
      inv_mwb_globals.print_msg( g_pkg_name, l_procedure_name, 'Tree Node Selected' );
Line: 2932

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'msn.current_subinventory_code';
Line: 2941

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
                  'moqd.subinventory_code';
Line: 2951

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SUBINVENTORY_CODE).column_value :=
               'rs.to_subinventory';
Line: 2959

            inv_mwb_globals.print_msg( g_pkg_name, l_procedure_name, 'Going to add po_header_id in select');
Line: 2960

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_HEADER_ID).column_value :=
               'ms.po_header_id';
Line: 2962

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
               'ms.req_header_id';
Line: 2964

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 3000

      ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN
         make_common_query_inbound('INBOUND');
Line: 3006

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_HEADER_ID).column_value :=
                  'ms.po_header_id';
Line: 3008

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.RELEASE_NUMBER).column_value :=
                  'prl.release_num';                     -- Bug 11694520
Line: 3019

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
                  'ms.req_header_id';
Line: 3022

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
                  'ms.intransit_owning_org_id';
Line: 3024

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.EXPECTED_RECEIPT_DATE).column_value :=
                  'ms.expected_delivery_date';
Line: 3026

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.FROM_ORG_ID).column_value :=
                  'ms.from_organization_id';
Line: 3028

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.TO_ORG_ID).column_value :=
                  'ms.to_organization_id';
Line: 3042

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
                  'ms.shipment_header_id';
Line: 3050

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
                  'ms.shipment_header_id';
Line: 3052

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_ID).column_value :=
                  'rsh.vendor_id';
Line: 3054

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_SITE_ID).column_value :=
                  'rsh.vendor_site_id';
Line: 3098

      ELSIF inv_mwb_globals.g_tree_event = 'TREE_NODE_SELECTED' THEN

         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
            'ms.intransit_owning_org_id';
Line: 3102

         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.EXPECTED_RECEIPT_DATE).column_value :=
            'ms.expected_delivery_date';
Line: 3104

         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.FROM_ORG_ID).column_value :=
            'ms.from_organization_id';
Line: 3106

         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.TO_ORG_ID).column_value :=
            'ms.to_organization_id';                            -- Bug 11716231
Line: 3117

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_NUMBER).column_value :=
            inv_mwb_globals.g_tree_node_value;
Line: 3119

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_HEADER_ID).column_value :=
               'ms.po_header_id';
Line: 3121

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.po_line_id';
Line: 3123

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.PO_RELEASE_ID).column_value :=
               'ms.po_release_id';
Line: 3125

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.RELEASE_NUMBER).column_value :=
               'prl.release_num';                     -- Bug 11932315
Line: 3142

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.REQ_HEADER_ID).column_value :=
               'ms.req_header_id';
Line: 3144

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.req_line_id';
Line: 3155

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 3157

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 3159

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'rsl.asn_lpn_id';
Line: 3161

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.OWNING_ORG_ID).column_value :=
               'ms.intransit_owning_org_id';
Line: 3163

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'rsh.shipped_date';
Line: 3178

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPMENT_HEADER_ID_ASN).column_value :=
               'ms.shipment_header_id';
Line: 3180

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.DOCUMENT_LINE_NUMBER).column_value :=
               'ms.shipment_line_id';
Line: 3182

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_ID).column_value :=
               'rsh.vendor_id';
Line: 3184

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.VENDOR_SITE_ID).column_value :=
               'rsh.vendor_site_id';
Line: 3186

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.SHIPPED_DATE).column_value :=
               'rsh.shipped_date';
Line: 3188

            inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.LPN_ID).column_value :=
               'rsl.asn_lpn_id';
Line: 3206

      END IF; -- Tree node selected /expanded.
Line: 3217

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ITEM_ID).column_value :=
                  'msn.inventory_item_id';
Line: 3220

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ORG_ID).column_value :=
                  'msn.current_organization_id';
Line: 3223

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.PRIMARY_UOM_CODE).column_value :=
                  '''Ea''';
Line: 3226

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ONHAND).column_value := 1;
Line: 3235

               IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
               OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.PACKED).column_value :=
                     'DECODE(msn.lpn_id, NULL, 0,1)';
Line: 3241

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.UNPACKED).column_value :=
                     'DECODE(msn.lpn_id, NULL, 1,0)';
Line: 3244

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_UOM_CODE).column_value :=
                     'NULL';
Line: 3247

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
                     'NULL';
Line: 3250

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
                     'NULL';
Line: 3253

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SERIAL).column_value :=
                     'msn.serial_number';
Line: 3256

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.owning_organization_id).column_value :=
                     'msn.owning_organization_id';
Line: 3259

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.planning_organization_id).column_value :=
                     'msn.planning_organization_id';
Line: 3262

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.owning_tp_type).column_value :=
                     'msn.owning_tp_type';
Line: 3265

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.planning_tp_type).column_value :=
                     'msn.planning_tp_type';
Line: 3279

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ITEM_ID).column_value :=
                  'moqd.inventory_item_id';
Line: 3282

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ORG_ID).column_value :=
                  'moqd.organization_id';
Line: 3285

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ONHAND).column_value :=
                  'SUM(moqd.primary_transaction_quantity)';
Line: 3293

               IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
               OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.PACKED).column_value :=
                     'SUM(DECODE(moqd.containerized_flag, 1, moqd.primary_transaction_quantity, 0))';
Line: 3299

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.UNPACKED).column_value :=
                     'SUM(DECODE(moqd.containerized_flag, 1, 0, moqd.primary_transaction_quantity))';
Line: 3302

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_UOM_CODE).column_value :=
                     'moqd.secondary_uom_code';
Line: 3305

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.owning_organization_id).column_value :=
                     'moqd.owning_organization_id';
Line: 3308

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.planning_organization_id).column_value :=
                     'moqd.planning_organization_id';
Line: 3311

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.owning_tp_type).column_value :=
                     'moqd.owning_tp_type';
Line: 3314

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.planning_tp_type).column_value :=
                     'moqd.planning_tp_type';
Line: 3317

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_ONHAND).column_value :=
                     'SUM(moqd.secondary_transaction_quantity)';
Line: 3320

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
                     'SUM(DECODE(moqd.containerized_flag, 1, moqd.secondary_transaction_quantity, 0))';
Line: 3323

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
                     'SUM(DECODE(moqd.containerized_flag, 1, 0, moqd.secondary_transaction_quantity))';
Line: 3337

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ITEM_ID).column_value :=
                  'msn.inventory_item_id';
Line: 3340

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ORG_ID).column_value :=
                  'msn.current_organization_id';
Line: 3343

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.PRIMARY_UOM_CODE).column_value :=
                  '''Ea''';
Line: 3346

               inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.ONHAND).column_value :=
                  'count(1)';
Line: 3356

               IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
               OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN
                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.PACKED).column_value :=
                     'sum(decode(msn.lpn_id,NULL,0, 1))';
Line: 3360

                  inv_mwb_query_manager.g_onhand_select(inv_mwb_query_manager.UNPACKED).column_value :=
                     'sum(decode(msn.lpn_id,NULL,1, 0))';
Line: 3377

            SELECT lot_control_code
              INTO l_lot_control
              FROM mtl_system_items
             WHERE inventory_item_id = inv_mwb_globals.g_tree_item_id
         AND organization_id = inv_mwb_globals.g_tree_organization_id;
Line: 3384

         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.ITEM_ID).column_value :=
            'ms.item_id';
Line: 3386

         inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.ORG_ID).column_value :=
            'ms.to_organization_id';
Line: 3392

               inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
               'COUNT(1)';
Line: 3395

           inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
           'SUM(rls.quantity)';
Line: 3398

           inv_mwb_query_manager.g_inbound_select(inv_mwb_query_manager.INBOUND).column_value :=
           'SUM(ms.to_org_primary_quantity)';
Line: 3425

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ORG_ID).column_value :=
            'rs.to_organization_id';
Line: 3427

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ITEM_ID).column_value :=
            'rs.item_id';
Line: 3429

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.RECEIVING).column_value :=
            'SUM(rs.to_org_primary_quantity)';
Line: 3431

         inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_RECEIVING).column_value :=
            'SUM(rs.secondary_quantity)'; -- 8687440
Line: 3437

            IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
            OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN
               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
                 'SUM(DECODE (rs.lpn_id, null, rs.to_org_primary_quantity, 0))';
Line: 3441

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
                 'SUM(DECODE (rs.lpn_id, null, 0, rs.to_org_primary_quantity))';
Line: 3443

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_UNPACKED).column_value :=
                 'SUM(DECODE (rs.lpn_id, null, rs.secondary_quantity, 0))'; -- 8687440
Line: 3445

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_PACKED).column_value :=
                 'SUM(DECODE (rs.lpn_id, null, 0, rs.secondary_quantity))'; -- 8687440
Line: 3450

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ORG_ID).column_value :=
               'wlpn.organization_id';
Line: 3452

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ITEM_ID).column_value :=
               'wlc.inventory_item_id';
Line: 3454

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PRIMARY_UOM_CODE).column_value :=
               'wlc.uom_code';
Line: 3456

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.RECEIVING).column_value :=
               'SUM(wlc.primary_quantity)';--bug 4761399
Line: 3463

            IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
            OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN
               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.SECONDARY_UOM_CODE).column_value :=
                  'wlc.secondary_uom_code';
Line: 3472

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ITEM_ID).column_value :=
               'rs.item_id';
Line: 3474

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ORG_ID).column_value :=
               'rs.to_organization_id';
Line: 3476

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PRIMARY_UOM_CODE).column_value :=
               '''Ea''';
Line: 3478

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.receiving).column_value :=
               'count(1)';
Line: 3485

            IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
            OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN
               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
				'SUM(DECODE(rs.lpn_id, NULL, 0,1))'; -- Bug 9865190 added SUM fnc
Line: 3489

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
				'SUM(DECODE(rs.lpn_id, NULL, 1,0))'; -- Bug 9865190 added SUM fnc
Line: 3494

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ITEM_ID).column_value :=
               'rs.item_id';
Line: 3496

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.ORG_ID).column_value :=
               'rs.to_organization_id';
Line: 3498

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PRIMARY_UOM_CODE).column_value :=
               '''Ea''';
Line: 3500

            inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.receiving).column_value :=
               'count(1)';
Line: 3506

            IF inv_mwb_globals.g_multiple_loc_selected = 'FALSE'
            OR inv_mwb_globals.g_tree_node_type <> 'APPTREE_OBJECT_TRUNK' THEN
               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.PACKED).column_value :=
                  'sum(decode(rs.lpn_id,NULL,0, 1))';
Line: 3510

               inv_mwb_query_manager.g_receiving_select(inv_mwb_query_manager.UNPACKED).column_value :=
                  'sum(decode(rs.lpn_id,NULL,1, 0))';
Line: 3531

         inv_mwb_globals.g_inserted_under_org := 'Y';
Line: 3533

         inv_mwb_globals.g_inserted_under_org := 'N';