DBA Data[Home] [Help]

APPS.GME_INCREMENTAL_BACKFLUSH_PVT SQL Statements

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

Line: 56

  validate_material_for_IB is changed for not allowing IB for Lab Batches with update inventory off. And
  plan_qty = 0 check is replaced by wip_plan_qty
========================================================================================================*/

  PROCEDURE incremental_backflush
    (p_batch_header_rec           IN GME_BATCH_HEADER%ROWTYPE
    ,p_material_detail_rec        IN GME_MATERIAL_DETAILS%ROWTYPE
    ,p_qty                        IN NUMBER
    ,p_qty_type                   IN NUMBER
    ,p_trans_date                 IN DATE
    ,p_backflush_rsrc_usg_ind     IN NUMBER
    ,x_exception_material_tbl     IN OUT NOCOPY gme_common_pvt.exceptions_tab
    ,x_return_status              OUT NOCOPY VARCHAR2) IS

    l_api_name   CONSTANT VARCHAR2(30) := 'incremental_backflush';
Line: 73

      SELECT *
      FROM   gme_material_details
      WHERE  batch_id = v_batch_id
      AND    (release_type = gme_common_pvt.g_mtl_incremental_release
              OR
              (release_type = gme_common_pvt.g_mtl_manual_release AND material_detail_id = v_matl_dtl_id)
             )
      AND    wip_plan_qty <> 0
      ORDER BY line_type,line_no;
Line: 84

      SELECT *
      FROM   gme_batch_steps
      WHERE  batchstep_id IN (SELECT DISTINCT batchstep_id
                              FROM   gme_batch_step_items
                              WHERE  batch_id = v_batch_id);
Line: 91

      SELECT s.*
      FROM   gme_batch_step_items m, gme_batch_steps s
      WHERE  m.batch_id = V_batch_id
      AND    m.material_detail_id = V_material_detail_id
      AND    s.batch_id = m.batch_id
      AND    s.batchstep_id = m.batchstep_id
      AND    s.step_status = gme_common_pvt.g_step_wip;
Line: 101

     SELECT ib_factor_ind
       FROM gme_parameters
      WHERE organization_id = V_org_id;
Line: 145

    error_update_row              EXCEPTION;
Line: 147

    update_step_qty_error         EXCEPTION;
Line: 395

      ELSIF l_batch_header_rec.update_inventory_ind = 'Y' AND
            l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
        IF l_new_actual = 0 THEN
          -- full revert
          IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
            gme_debug.put_line (g_pkg_name||'.'||l_api_name||' new actual = 0; calling gme_unrelease_batch_pvt.revert_material_full');
Line: 498

            gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);
Line: 501

          IF NOT gme_material_details_dbl.update_row (l_material_detail_rec) THEN
            RAISE error_update_row;
Line: 509

          gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling update material actual qty= '||l_material_detail_rec.actual_qty);
Line: 512

        IF NOT gme_material_details_dbl.update_row (l_material_detail_rec) THEN
          RAISE error_update_row;
Line: 527

        gme_update_step_qty_pvt.update_step_qty
          (p_batch_step_rec         => l_step_tbl(i)
          ,x_message_count          => l_msg_count
          ,x_message_list           => l_msg_stack
          ,x_return_status          => l_return_status
          ,x_batch_step_rec         => l_batch_step_rec);
Line: 535

          RAISE update_step_qty_error;
Line: 546

        gme_update_step_qty_pvt.update_step_qty
          (p_batch_step_rec         => l_in_batch_step_rec
          ,p_backflush_factor       => l_incr_factor_res/100
          ,x_message_count          => l_msg_count
          ,x_message_list           => l_msg_stack
          ,x_return_status          => l_return_status
          ,x_batch_step_rec         => l_batch_step_rec);
Line: 555

          RAISE update_step_qty_error;
Line: 559

        update_dependent_steps
            (p_batchstep_id     => l_in_batch_step_rec.batchstep_id
            ,p_backflush_factor => l_incr_factor_res/100
            ,x_return_status    => l_return_status);
Line: 575

  WHEN error_fetch_batch OR error_fetch_matl OR error_update_row THEN
    gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
Line: 584

  WHEN update_step_qty_error OR ERROR_UPDATING_STEPS THEN
    x_return_status := l_return_status;
Line: 723

  PROCEDURE update_dependent_steps(p_batchstep_id     IN  NUMBER
                                  ,p_backflush_factor IN  NUMBER
                                  ,x_return_status    OUT NOCOPY VARCHAR2) IS

    l_api_name        CONSTANT VARCHAR2 (30)   := 'update_dependent_steps';
Line: 730

      SELECT d.dep_step_id, d.dep_type, s.step_status
      FROM   gme_batch_step_dependencies d, gme_batch_steps s
      WHERE  d.batchstep_id = V_batchstep_id
      AND    s.batchstep_id = d.dep_step_id;
Line: 768

        gme_update_step_qty_pvt.update_step_qty
            (p_batch_step_rec          => l_in_batch_step_rec
            ,x_message_count           => l_message_count
            ,x_message_list            => l_message_list
            ,x_return_status           => x_return_status
            ,x_batch_step_rec          => l_batch_step_rec
            ,p_backflush_factor        => l_backflush_factor
            ,p_dependency_type         => get_rec.dep_type);
Line: 780

        update_dependent_steps
            (p_batchstep_id     => get_rec.dep_step_id
            ,p_backflush_factor => p_backflush_factor
            ,x_return_status    => x_return_status);
Line: 804

  END update_dependent_steps;
Line: 822

           SELECT lot_number, SUM (l.transaction_quantity) sum_trx
             FROM mtl_material_transactions m, mtl_transaction_lot_numbers l
            WHERE l.transaction_id = m.transaction_id
              AND m.inventory_item_id = v_item_id
              AND m.organization_id = v_organization_id
              AND m.transaction_source_id = v_batch_id
              AND m.trx_source_line_id = v_mat_det_id
              AND m.transaction_source_type_id = gme_common_pvt.g_txn_source_type
         GROUP BY l.lot_number;
Line: 922

      SELECT concatenated_segments
      INTO   l_item_no
      FROM   mtl_system_items_kfv
      WHERE  inventory_item_id = p_material_detail_rec.inventory_item_id
      AND    organization_id   = p_material_detail_rec.organization_id;
Line: 995

              gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn for trxns_id='||l_mmt_rec.transaction_id);
Line: 998

            gme_transactions_pvt.delete_material_txn
              (p_transaction_id       => l_mmt_rec.transaction_id
              ,p_txns_pair            => NULL
              ,x_return_status        => l_return_status);
Line: 1006

                gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
Line: 1046

              gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.update_material_txn for trxns_id='||l_mmt_rec.transaction_id);
Line: 1047

              gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; update trxn with qty='||l_mmt_rec.transaction_quantity);
Line: 1050

            gme_transactions_pvt.update_material_txn
              (p_mmt_rec         => l_mmt_rec
              ,p_mmln_tbl        => l_mmln_tbl
              ,x_return_status   => l_return_status);
Line: 1058

                gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
Line: 1255

              gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; calling gme_transactions_pvt.delete_material_txn with trxn_id='||l_mmt_tbl(i).transaction_id);
Line: 1259

            gme_transactions_pvt.delete_material_txn
              (p_transaction_id       => l_mmt_tbl(i).transaction_id
              ,p_txns_pair            => NULL
              ,x_return_status        => l_return_status);
Line: 1268

                gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.delete_material_txn returned '||l_return_status);
Line: 1326

              gme_debug.put_line (g_pkg_name||'.'||l_api_name||' calling gme_transactions_pvt.update_material_txn with updatd l_mmt_rec and new l_mmln_tbl_new');
Line: 1329

            gme_transactions_pvt.update_material_txn
              (p_mmt_rec         => l_mmt_rec
              ,p_mmln_tbl        => l_mmln_tbl_new
              ,x_return_status   => l_return_status);
Line: 1338

                gme_debug.put_line (g_pkg_name||'.'||l_api_name||' in trxn loop; gme_transactions_pvt.update_material_txn returned '||l_return_status);
Line: 1456

      SELECT s.batchstep_no, step_status
      FROM   gme_batch_steps s, gme_batch_step_items i
      WHERE  s.batchstep_id = i.batchstep_id
      AND    i.material_detail_id = v_material_detail_id;
Line: 1489

    IF p_batch_header_rec.update_inventory_ind <> 'Y' THEN
      RAISE error_inv_action_lab;