DBA Data[Home] [Help]

APPS.PO_PDOI_PREPROC_PVT SQL Statements

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

Line: 10

PROCEDURE update_dependent_line_acc_flag; -- bug5149827
Line: 26

PROCEDURE verify_action_update;
Line: 79

    update_dependent_line_acc_flag;  -- bug5149827 - Renamed the procedure
Line: 102

  verify_action_update;
Line: 157

PROCEDURE update_dependent_line_acc_flag IS

d_api_name CONSTANT VARCHAR2(30) := 'update_dependent_line_acc_flag';
Line: 169

l_update_flag_value_idx_tbl PO_PDOI_UTL.pls_integer_tbl_type :=
                            PO_PDOI_UTL.pls_integer_tbl_type();
Line: 184

    SELECT interface_line_id,
           price_chg_accept_flag,
           price_break_flag
    BULK COLLECT
    INTO l_intf_line_id_tbl,
         l_price_chg_accept_flag_tbl,
         l_price_break_flag_tbl
    FROM po_lines_interface
    WHERE interface_header_id = PO_PDOI_PARAMS.g_request.interface_header_id
    AND   NVL(process_code, PO_PDOI_CONSTANTS.g_process_code_PENDING) =
            PO_PDOI_CONSTANTS.g_process_code_NOTIFIED
    ORDER BY po_line_id, interface_line_id;
Line: 217

        l_update_flag_value_idx_tbl.extend;
Line: 218

        l_update_flag_value_idx_tbl(l_update_flag_value_idx_tbl.COUNT) := i;
Line: 225

    IF (l_update_flag_value_idx_tbl.COUNT > 0) THEN
      FORALL i IN VALUES OF l_update_flag_value_idx_tbl
        UPDATE po_lines_interface
        SET price_chg_accept_flag = l_price_chg_accept_flag_tbl(i)
        WHERE interface_line_id = l_intf_line_id_tbl(i);
Line: 240

    UPDATE po_lines_interface lines
    SET    lines.price_chg_accept_flag =
             ( SELECT parent_lines.price_chg_accept_flag
               FROM   po_lines_interface parent_lines
               WHERE  lines.parent_interface_line_id =
                        parent_lines.interface_line_id )
    WHERE  lines.interface_header_id = PO_PDOI_PARAMS.g_request.interface_header_id
    AND  NVL(lines.process_code, PO_PDOI_CONSTANTS.g_process_code_PENDING) =
            PO_PDOI_CONSTANTS.g_process_code_NOTIFIED
    AND  lines.parent_interface_line_id IS NOT NULL;
Line: 252

      PO_LOG.stmt(d_module, d_position, '# of lines updated based on parent_intf_line_id',
                  SQL%ROWCOUNT);
Line: 259

    UPDATE po_lines_interface
    SET process_code = PO_PDOI_CONSTANTS.g_PROCESS_CODE_REJECTED
    WHERE interface_header_id = PO_PDOI_PARAMS.g_request.interface_header_id
    AND   process_code = PO_PDOI_CONSTANTS.g_PROCESS_CODE_NOTIFIED
    AND   price_chg_accept_flag = 'N';
Line: 279

END update_dependent_line_acc_flag;
Line: 304

SELECT PHI.interface_header_id,
       PHI.process_code,
       PHI.request_id
FROM po_headers_interface PHI
WHERE PHI.org_id = PO_PDOI_PARAMS.g_request.org_id
AND   NVL(PHI.process_code, PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING) <>
        PO_PDOI_CONSTANTS.g_PROCESS_CODE_REJECTED
AND   (PHI.batch_id = PO_PDOI_PARAMS.g_request.batch_id
       OR
       PO_PDOI_PARAMS.g_request.batch_id IS NULL)
AND   (PHI.process_code = PO_PDOI_PARAMS.g_request.process_code
       OR
       ( NVL(PO_PDOI_PARAMS.g_request.process_code,
             PO_PDOI_CONSTANTS.g_process_code_PENDING) <>
           PO_PDOI_CONSTANTS.g_process_code_NOTIFIED
         AND
         PHI.process_code = PO_PDOI_CONSTANTS.g_process_code_IN_PROCESS)
       OR
       PHI.process_code IS NULL)
AND   (PHI.interface_header_id = PO_PDOI_PARAMS.g_request.interface_header_id
       OR
       PO_PDOI_PARAMS.g_request.interface_header_id IS NULL)
AND   (PHI.document_type_code = PO_PDOI_PARAMS.g_request.document_type
       OR
       PHI.document_type_code IS NULL)
AND   (PHI.processing_id IS NULL
       OR
       PHI.processing_id <> PO_PDOI_PARAMS.g_processing_id)
-- bug5471513
-- Catalog uploaded records should only be processed by catalog upload
-- request
-- bug5463188
-- Buyer acceptance process shouldn't worry about the calling module
AND   ( PO_PDOI_PARAMS.g_request.process_code =
          PO_PDOI_CONSTANTS.g_process_code_NOTIFIED
        OR
        DECODE (PHI.interface_source_code,
                PO_PDOI_CONSTANTS.g_CALL_MOD_CATALOG_UPLOAD,
                1, 2) =
        DECODE (PO_PDOI_PARAMS.g_request.calling_module,
                PO_PDOI_CONSTANTS.g_CALL_MOD_CATALOG_UPLOAD,
                1, 2));
Line: 366

    UPDATE po_headers_interface PHI
    SET    PHI.org_id = PO_PDOI_PARAMS.g_request.org_id
    WHERE  PHI.batch_id = PO_PDOI_PARAMS.g_request.batch_id
    AND    PHI.org_id IS NULL;
Line: 372

      PO_LOG.stmt(d_module, d_position,  'updatec org id for ' ||
                  SQL%ROWCOUNT || ' records.');
Line: 402

      UPDATE po_headers_interface
      SET processing_id = PO_PDOI_PARAMS.g_processing_id,
          process_code = PO_PDOI_CONSTANTS.g_process_code_IN_PROCESS,
          processing_round_num = NULL,  -- reset processing number
          request_id = FND_GLOBAL.conc_request_id,
          approval_status = NVL(approval_status,
                                PO_PDOI_PARAMS.g_request.approved_status)
      WHERE interface_header_id = l_intf_header_id_tbl(i);
Line: 412

      PO_LOG.stmt(d_module, d_position,  'after header assignment. Updated ' ||
                  SQL%ROWCOUNT || ' records');
Line: 419

      UPDATE po_lines_interface
      SET processing_id = PO_PDOI_PARAMS.g_processing_id,
          action = DECODE (action,
                           PO_PDOI_CONSTANTS.g_action_ADD, action,
                           NULL), -- null out process code unless it is force add
          process_code = DECODE (PO_PDOI_PARAMS.g_request.process_code,
                                 PO_PDOI_CONSTANTS.g_PROCESS_CODE_NOTIFIED,
                                 PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING,
                                 process_code) -- bug5149827
      WHERE interface_header_id = l_intf_header_id_tbl(i)
      AND   (PO_PDOI_PARAMS.g_request.process_code = process_code
             OR
             ( NVL(PO_PDOI_PARAMS.g_request.process_code,
                   PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING) <>
                 PO_PDOI_CONSTANTS.g_PROCESS_CODE_NOTIFIED AND
               NVL(process_code, PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING)
                 IN (PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING,
                     PO_PDOI_CONSTANTS.g_PROCESS_CODE_VAL_AND_REJECT)))
      AND   (NVL(process_code, PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING)
              IN (PO_PDOI_CONSTANTS.g_PROCESS_CODE_PENDING,
                  PO_PDOI_CONSTANTS.g_PROCESS_CODE_VAL_AND_REJECT)
             OR
             (process_code = PO_PDOI_CONSTANTS.g_PROCESS_CODE_NOTIFIED AND
              NVL(price_chg_accept_flag, 'N') = 'Y'))
     RETURNING interface_line_id
     BULK COLLECT INTO l_intf_line_id_tbl;
Line: 448

      PO_LOG.stmt(d_module, d_position,  'after line assignment. Updated ' ||
                  SQL%ROWCOUNT || ' records');
Line: 454

      UPDATE po_line_locations_interface
      SET processing_id = PO_PDOI_PARAMS.g_processing_id
      WHERE interface_line_id = l_intf_line_id_tbl(i);
Line: 460

                  ' Updated ' || SQL%ROWCOUNT || ' records');
Line: 465

      UPDATE po_price_diff_interface
      SET processing_id = PO_PDOI_PARAMS.g_processing_id
      WHERE interface_line_id = l_intf_line_id_tbl(i);
Line: 471

                  'Updated ' || SQL%ROWCOUNT || ' records');
Line: 478

        UPDATE po_distributions_interface
        SET processing_id = PO_PDOI_PARAMS.g_processing_id
        WHERE interface_line_id = l_intf_line_id_tbl(i);
Line: 484

                    'Updated ' || SQL%ROWCOUNT || ' records');
Line: 494

        UPDATE po_attr_values_interface
        SET processing_id = PO_PDOI_PARAMS.g_processing_id
        WHERE interface_line_id = l_intf_line_id_tbl(i);
Line: 500

                    'Updated ' || SQL%ROWCOUNT || ' records');
Line: 505

        UPDATE po_attr_values_tlp_interface
        SET processing_id = PO_PDOI_PARAMS.g_processing_id
        WHERE interface_line_id = l_intf_line_id_tbl(i);
Line: 511

                    ' Updated ' || SQL%ROWCOUNT || ' records');
Line: 651

  SELECT interface_header_id, action
  BULK COLLECT
  INTO l_reject_tbl, l_action_tbl
  FROM po_headers_interface
  WHERE processing_id = PO_PDOI_PARAMS.g_processing_id
  AND  (action IS NULL
       OR
        (PO_PDOI_PARAMS.g_request.document_type IN
          (PO_PDOI_CONSTANTS.g_DOC_TYPE_BLANKET,
           PO_PDOI_CONSTANTS.g_DOC_TYPE_QUOTATION) AND
         action NOT IN (PO_PDOI_CONSTANTS.g_ACTION_ORIGINAL,
                        PO_PDOI_CONSTANTS.g_ACTION_ADD,
                        PO_PDOI_CONSTANTS.g_ACTION_REPLACE,
                        PO_PDOI_CONSTANTS.g_ACTION_UPDATE))
       OR
        (PO_PDOI_PARAMS.g_request.document_type = PO_PDOI_CONSTANTS.g_DOC_TYPE_STANDARD AND
         action NOT IN (PO_PDOI_CONSTANTS.g_ACTION_ORIGINAL,
                        PO_PDOI_CONSTANTS.g_ACTION_ADD,
                        PO_PDOI_CONSTANTS.g_ACTION_UPDATE)));
Line: 759

  SELECT interface_header_id,
         vendor_name,
         vendor_num,
         vendor_id
  BULK COLLECT
  INTO l_intf_header_id_tbl,
       l_vendor_name_tbl,
       l_vendor_num_tbl,
       l_vendor_id_tbl
  FROM po_headers_interface PHI
  WHERE vendor_id IS NULL
  AND   po_header_id IS NULL      -- if po_header_id is already provided,
                                  -- skip vendor_id derivation as it is
                                  -- not needed
  AND processing_id = PO_PDOI_PARAMS.g_processing_id;
Line: 793

    UPDATE po_headers_interface
    SET vendor_id = l_vendor_id_tbl(i)
    WHERE interface_header_id = l_intf_header_id_tbl(i)
    AND l_vendor_id_tbl(i) IS NOT NULL;
Line: 899

  SELECT interface_header_id,
         vendor_id,
         effective_date,
         expiration_date,
         vendor_doc_num
  BULK COLLECT INTO l_interface_header_id_tbl, l_vendor_id_tbl,
      l_start_date_tbl, l_end_date_tbl, l_vendor_doc_num_tbl
  FROM po_headers_interface
  WHERE processing_id = PO_PDOI_PARAMS.g_processing_id
  AND action = PO_PDOI_CONSTANTS.g_ACTION_REPLACE;
Line: 966

        SELECT po_header_id,
               NVL(closed_code, 'OPEN'),
               NVL(cancel_flag, 'N'),
               NULL
        BULK COLLECT
        INTO  l_orig_po_header_id_tbl,
              l_orig_closed_code_tbl,
              l_orig_cancel_flag_tbl,
              l_orig_ga_tbl
        FROM po_headers POH
        WHERE vendor_id = l_vendor_id_tbl(i)
        AND   quote_vendor_quote_number = l_vendor_doc_num_tbl(i)
        AND   TRUNC(l_start_date_tbl(i)) >= TRUNC(NVL(start_date, SYSDATE))
        AND   TRUNC(NVL(l_end_date_tbl(i), SYSDATE)) <= TRUNC(NVL(end_date, SYSDATE));
Line: 986

        SELECT po_header_id,
               NVL(closed_code, 'OPEN'),
               NVL(cancel_flag, 'N'),
               NVL(global_agreement_flag, 'N')
        BULK COLLECT
        INTO  l_orig_po_header_id_tbl,
              l_orig_closed_code_tbl,
              l_orig_cancel_flag_tbl,
              l_orig_ga_tbl
        FROM po_headers POH
        WHERE vendor_id = l_vendor_id_tbl(i)
        AND   vendor_order_num = l_vendor_doc_num_tbl(i)
        AND   TRUNC(l_start_date_tbl(i)) >= TRUNC(NVL(start_date, SYSDATE))
        AND   TRUNC(NVL(l_end_date_tbl(i), SYSDATE)) <= TRUNC(NVL(end_date, SYSDATE));
Line: 1105

    UPDATE po_headers_interface
    SET original_po_header_id = l_final_orig_header_id_tbl(i)
    WHERE interface_header_id = l_final_intf_header_id_tbl(i);
Line: 1179

    SELECT MAX('Y')
    INTO l_rel_exists
    FROM DUAL
    WHERE EXISTS (SELECT 'Exists std PO ref the orig GA'
                  FROM   po_lines_all POL,
                         po_headers_all POH
                  WHERE POL.from_header_id = p_po_header_id
                  AND POL.po_header_id = POH.po_header_id
                  AND POH.creation_date >= l_exp_date);
Line: 1206

    SELECT MAX('Y')
    INTO l_rel_exists
    FROM DUAL
    WHERE EXISTS (SELECT 'release exist after expiration date'
                 FROM   po_releases POR
                 WHERE  POR.po_header_id = p_po_header_id
                 AND    POR.release_date >= l_exp_date);
Line: 1253

PROCEDURE verify_action_update IS

d_api_name CONSTANT VARCHAR2(30) := 'verify_action_update';
Line: 1303

  SELECT interface_header_id,
         vendor_id,
         effective_date,
         expiration_date,
         po_header_id,
         vendor_doc_num,
         document_num
  BULK COLLECT
  INTO l_interface_header_id_tbl,
       l_vendor_id_tbl,
       l_start_date_tbl,
       l_end_date_tbl,
       l_po_header_id_tbl,
       l_vendor_doc_num_tbl,
       l_document_num_tbl
  FROM po_headers_interface
  WHERE processing_id = PO_PDOI_PARAMS.g_processing_id
  AND action = PO_PDOI_CONSTANTS.g_ACTION_UPDATE;
Line: 1352

      SELECT DECODE(MAX(POH.po_header_id), NULL, 'N', 'Y'),
             NVL(MAX(POH.consigned_consumption_flag), 'N')
      INTO l_existing_header,
           l_consigned_consumption_flag
      FROM po_headers POH
      WHERE POH.po_header_id = l_po_header_id_tbl(i)
      AND POH.type_lookup_code = PO_PDOI_PARAMS.g_request.document_type;
Line: 1389

            p_mode => 'CHECK_UPDATEABLE',
            p_calling_module => PO_DRAFTS_PVT.g_call_mod_PDOI,
            p_role => PO_PDOI_PARAMS.g_request.role,
            p_skip_cat_upload_chk => l_skip_cat_upload_chk,
            x_po_status_rec => l_status_rec,
            x_return_status => l_return_status
          );
Line: 1422

        SELECT NVL(MIN(segment1), 'UNKNOWN')
        INTO   l_doc_num_for_msg_dsp
        FROM   po_headers_all
        WHERE  po_header_id = l_po_header_id_tbl(i);
Line: 1459

          SELECT POH.po_header_id,
                 NVL(POH.consigned_consumption_flag, 'N')
          BULK COLLECT
          INTO l_orig_po_header_id_tbl,
               l_orig_consumption_flag_tbl
          FROM po_headers POH
          WHERE POH.vendor_id = l_vendor_id_tbl(i)
          AND   POH.vendor_order_num = l_vendor_doc_num_tbl(i)
          AND   POH.segment1 = NVL(l_document_num_tbl(i), POH.segment1)
          AND   POH.type_lookup_code = PO_PDOI_PARAMS.g_request.document_type
          AND   (POH.type_lookup_code = 'STANDARD'
                 OR
                 (POH.type_lookup_code = 'BLANKET'
                  AND TRUNC(NVL(l_start_date_tbl(i), SYSDATE)) >=
                        TRUNC(NVL(POH.start_date, SYSDATE))
                  AND TRUNC(nvl(l_end_date_tbl(i), SYSDATE)) <=
                        TRUNC(nvl(POH.end_date, SYSDATE))))
          AND   NVL(POH.closed_code, 'OPEN') <> 'FINALLY CLOSED'
          AND   NVL(POH.cancel_flag, 'N') <> 'Y';
Line: 1482

          SELECT POH.po_header_id,
                 NVL(POH.consigned_consumption_flag, 'N')
          BULK COLLECT
          INTO l_orig_po_header_id_tbl,
               l_orig_consumption_flag_tbl
          FROM po_headers POH
          WHERE POH.vendor_id = l_vendor_id_tbl(i)
          AND   POH.quote_vendor_quote_number = l_vendor_doc_num_tbl(i)
          AND   POH.segment1 = NVL(l_document_num_tbl(i), POH.segment1)
          AND   POH.type_lookup_code = PO_PDOI_PARAMS.g_request.document_type
          AND   POH.type_lookup_code = 'QUOTATION'
          AND   TRUNC(NVL(l_start_date_tbl(i), SYSDATE)) >=
                  TRUNC(NVL(POH.start_date, SYSDATE))
          AND   TRUNC(nvl(l_end_date_tbl(i), SYSDATE)) <=
                  TRUNC(nvl(POH.end_date, SYSDATE))
          AND   NVL(POH.closed_code, 'OPEN') <> 'FINALLY CLOSED'
          AND   NVL(POH.cancel_flag, 'N') <> 'Y';
Line: 1511

          SELECT POH.po_header_id,
                 NVL(POH.consigned_consumption_flag, 'N')
          BULK COLLECT
          INTO l_orig_po_header_id_tbl,
               l_orig_consumption_flag_tbl
          FROM po_headers POH
          WHERE POH.vendor_id = l_vendor_id_tbl(i)
          AND   NVL(POH.vendor_order_num, FND_API.G_MISS_CHAR) =
                  NVL(l_vendor_doc_num_tbl(i),
                      NVL(POH.vendor_order_num, FND_API.G_MISS_CHAR))
          AND   POH.segment1 = l_document_num_tbl(i)
          AND   POH.type_lookup_code = PO_PDOI_PARAMS.g_request.document_type
          AND   (POH.type_lookup_code = 'STANDARD'
                 OR
                 (POH.type_lookup_code = 'BLANKET'
                  AND TRUNC(NVL(l_start_date_tbl(i), SYSDATE)) >=
                        TRUNC(NVL(POH.start_date, SYSDATE))
                  AND TRUNC(nvl(l_end_date_tbl(i), SYSDATE)) <=
                        TRUNC(nvl(POH.end_date, SYSDATE))))
          AND   NVL(POH.closed_code, 'OPEN') <> 'FINALLY CLOSED'
          AND   NVL(POH.cancel_flag, 'N') <> 'Y';
Line: 1536

          SELECT POH.po_header_id,
                 NVL(POH.consigned_consumption_flag, 'N')
          BULK COLLECT
          INTO l_orig_po_header_id_tbl,
               l_orig_consumption_flag_tbl
          FROM po_headers POH
          WHERE POH.vendor_id = l_vendor_id_tbl(i)
          AND   NVL(POH.quote_vendor_quote_number, FND_API.G_MISS_CHAR) =
                  NVL(l_vendor_doc_num_tbl(i),
                      NVL(POH.quote_vendor_quote_number, FND_API.G_MISS_CHAR))
          AND   POH.segment1 = l_document_num_tbl(i)
          AND   POH.type_lookup_code = PO_PDOI_PARAMS.g_request.document_type
          AND   POH.type_lookup_code = 'QUOTATION'
          AND   TRUNC(NVL(l_start_date_tbl(i), SYSDATE)) >=
                  TRUNC(NVL(POH.start_date, SYSDATE))
          AND   TRUNC(nvl(l_end_date_tbl(i), SYSDATE)) <=
                  TRUNC(nvl(POH.end_date, SYSDATE))
          AND   NVL(POH.closed_code, 'OPEN') <> 'FINALLY CLOSED'
          AND   NVL(POH.cancel_flag, 'N') <> 'Y';
Line: 1622

            p_mode => 'CHECK_UPDATEABLE',
            p_calling_module => PO_DRAFTS_PVT.g_call_mod_PDOI,
            p_role => PO_PDOI_PARAMS.g_request.role,
            p_skip_cat_upload_chk => l_skip_cat_upload_chk,
            x_po_status_rec => l_status_rec,
            x_return_status => l_return_status
          );
Line: 1681

    UPDATE po_headers_interface
    SET po_header_id = l_final_po_header_id_tbl(i)
    WHERE interface_header_id = l_final_intf_header_id_tbl(i);
Line: 1704

END verify_action_update;
Line: 1740

    SELECT POH.po_header_id,
           PHI.interface_header_id,
           PHI.vendor_doc_num
    BULK COLLECT
    INTO   l_po_header_id_tbl,
           l_reject_list,
           l_vendor_doc_num_tbl
    FROM   po_headers POH,
           po_headers_interface PHI
    WHERE  POH.vendor_id = PHI.vendor_id
    AND    POH.quote_vendor_quote_number = PHI.vendor_doc_Num
    AND    TRUNC (NVL(PHI.effective_date, SYSDATE)) >=
             TRUNC (NVL(POH.start_date, SYSDATE))
    AND    TRUNC (NVL(PHI.expiration_date, SYSDATE)) <=
             TRUNC (NVL(POH.end_date, SYSDATE))
    AND    NVL(POH.closed_code, 'OPEN') <> 'FINALLY CLOSED'
    AND    NVL(POH.cancel_flag, 'N') <> 'Y'
    AND    PHI.processing_id = PO_PDOI_PARAMS.g_processing_id
    AND    PHI.action IN (PO_PDOI_CONSTANTS.g_ACTION_ORIGINAL,
                          PO_PDOI_CONSTANTS.g_ACTION_ADD);
Line: 1764

    SELECT POH.po_header_id,
           PHI.interface_header_id,
           PHI.vendor_doc_num
    BULK COLLECT
    INTO   l_po_header_id_tbl,
           l_reject_list,
           l_vendor_doc_num_tbl
    FROM   po_headers POH,
           po_headers_interface PHI
    WHERE  POH.vendor_id = PHI.vendor_id
    AND    POH.vendor_order_num = PHI.vendor_doc_Num
    AND    TRUNC (NVL(PHI.effective_date, SYSDATE)) >=
             TRUNC (NVL(POH.start_date, SYSDATE))
    AND    TRUNC (NVL(PHI.expiration_date, SYSDATE)) <=
             TRUNC (NVL(POH.end_date, SYSDATE))
    AND    NVL(POH.closed_code, 'OPEN') <> 'FINALLY CLOSED'
    AND    NVL(POH.cancel_flag, 'N') <> 'Y'
    AND    PHI.processing_id = PO_PDOI_PARAMS.g_processing_id
    AND    PHI.action IN (PO_PDOI_CONSTANTS.g_ACTION_ORIGINAL,
                          PO_PDOI_CONSTANTS.g_ACTION_ADD);
Line: 1853

  UPDATE po_headers_interface
  SET    po_header_id = PO_HEADERS_S.nextval
  WHERE  processing_id = PO_PDOI_PARAMS.g_processing_id
  AND    po_header_id IS NULL
  AND    action IN (PO_PDOI_CONSTANTS.g_ACTION_ORIGINAL,
                    PO_PDOI_CONSTANTS.g_ACTION_ADD,
                    PO_PDOI_CONSTANTS.g_ACTION_REPLACE);
Line: 1901

  SELECT rowid
  FROM po_lines_interface
  WHERE processing_id = PO_PDOI_PARAMS.g_processing_id
  AND   NVL(line_loc_populated_flag, 'N') = 'N';
Line: 1911

  SELECT PLLI.interface_line_id,
         PLLI.interface_line_location_id
  FROM   po_line_locations_interface PLLI,
         po_lines_interface PLI
  WHERE  PLLI.processing_id = PO_PDOI_PARAMS.g_processing_id
  AND    PLLI.interface_line_id = PLI.interface_line_id
  AND    NVL(PLI.line_loc_populated_flag, 'N') = 'N';
Line: 1947

      INSERT INTO po_line_locations_interface
      (
        interface_line_location_id,
        interface_header_id,
        interface_line_id,
        processing_id,
        process_code,
        line_location_id,
        shipment_type,
        shipment_num,
        ship_to_organization_id,
        ship_to_organization_code,
        ship_to_location_id,
        ship_to_location,
        terms_id,
        payment_terms,
        qty_rcv_exception_code,
        freight_carrier,
        fob,
        freight_terms,
        enforce_ship_to_location_code,
        allow_substitute_receipts_flag,
        days_early_receipt_allowed,
        days_late_receipt_allowed,
        receipt_days_exception_code,
        invoice_close_tolerance,
        receive_close_tolerance,
        receiving_routing_id,
        receiving_routing,
        accrue_on_receipt_flag,
        firm_flag,
        need_by_date,
        promised_date,
        from_line_location_id,
        inspection_required_flag,
        receipt_required_flag,
        source_shipment_id,
        note_to_receiver,
        transaction_flow_header_id,
        quantity,
        price_discount,
        start_date,
        end_date,
        price_override,
        lead_time,
        lead_time_unit,
        amount,
        secondary_quantity,
        secondary_unit_of_measure,
        attribute_category,
        attribute1,
        attribute2,
        attribute3,
        attribute4,
        attribute5,
        attribute6,
        attribute7,
        attribute8,
        attribute9,
        attribute10,
        attribute11,
        attribute12,
        attribute13,
        attribute14,
        attribute15,
        creation_date,
        created_by,
        last_update_date,
        last_updated_by,
        last_update_login,
        request_id,
        program_application_id,
        program_id,
        program_update_date,
        unit_of_measure,
        preferred_grade,
        taxable_flag,
        tax_code_id,
        tax_name,
        qty_rcv_tolerance
      )
      SELECT po_line_locations_interface_s.nextval,
             PLI.interface_header_id,
             PLI.interface_line_id,
             PLI.processing_id,
             PLI.process_code,
             PLI.line_location_id,
             PLI.shipment_type,
             PLI.shipment_num,
             PLI.ship_to_organization_id,
             PLI.ship_to_organization_code,
             PLI.ship_to_location_id,
             PLI.ship_to_location,
             PLI.terms_id,
             PLI.payment_terms,
             PLI.qty_rcv_exception_code,
             PLI.freight_carrier,
             PLI.fob,
             PLI.freight_terms,
             PLI.enforce_ship_to_location_code,
             PLI.allow_substitute_receipts_flag,
             PLI.days_early_receipt_allowed,
             PLI.days_late_receipt_allowed,
             PLI.receipt_days_exception_code,
             PLI.invoice_close_tolerance,
             PLI.receive_close_tolerance,
             PLI.receiving_routing_id,
             PLI.receiving_routing,
             PLI.accrue_on_receipt_flag,
             PLI.firm_flag,
             PLI.need_by_date,
             PLI.promised_date,
             PLI.from_line_location_id,
             PLI.inspection_required_flag,
             PLI.receipt_required_flag,
             PLI.source_shipment_id,
             PLI.note_to_receiver,
             PLI.transaction_flow_header_id,
             PLI.quantity,
             PLI.price_discount,
             PLI.effective_date,
             PLI.expiration_date,
             PLI.unit_price,
             PLI.lead_time,
             PLI.lead_time_unit,
             PLI.amount,
             PLI.secondary_quantity,
             PLI.secondary_unit_of_measure,
             PLI.shipment_attribute_category,
             PLI.shipment_attribute1,
             PLI.shipment_attribute2,
             PLI.shipment_attribute3,
             PLI.shipment_attribute4,
             PLI.shipment_attribute5,
             PLI.shipment_attribute6,
             PLI.shipment_attribute7,
             PLI.shipment_attribute8,
             PLI.shipment_attribute9,
             PLI.shipment_attribute10,
             PLI.shipment_attribute11,
             PLI.shipment_attribute12,
             PLI.shipment_attribute13,
             PLI.shipment_attribute14,
             PLI.shipment_attribute15,
             PLI.creation_date,
             PLI.created_by,
             PLI.last_update_date,
             PLI.last_updated_by,
             PLI.last_update_login,
             PLI.request_id,
             PLI.program_application_id,
             PLI.program_id,
             PLI.program_update_date,
             PLI.unit_of_measure,
             PLI.preferred_grade,
             PLI.taxable_flag,
             PLI.tax_code_id,
             PLI.tax_name,
             PLI.qty_rcv_tolerance
      FROM po_lines_interface PLI
      WHERE PLI.rowid = l_rowid_tbl(i);
Line: 2131

      UPDATE po_distributions_interface
      SET interface_line_location_id = l_intf_line_loc_tbl(i)
      WHERE interface_line_id = l_intf_line_tbl(i);
Line: 2136

      UPDATE po_price_diff_interface
      SET interface_line_location_id = l_intf_line_loc_tbl(i)
      WHERE interface_line_id = l_intf_line_tbl(i);
Line: 2147

  UPDATE po_lines_interface
  SET    line_loc_populated_flag = 'S'
  WHERE  processing_id = PO_PDOI_PARAMS.g_processing_id
  AND    NVL(line_loc_populated_flag, 'N') = 'N';