DBA Data[Home] [Help]

APPS.INV_LOT_TRX_VALIDATION_PUB SQL Statements

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

Line: 48

    SELECT wsm_enabled_flag
      INTO x_wsm_enabled
      FROM mtl_parameters
     WHERE organization_id = p_organization_id;
Line: 389

        SELECT lot_control_code
             , serial_number_control_code
          INTO l_st_lot_control_code
             , l_st_serial_control_code
          FROM mtl_system_items
         WHERE inventory_item_id = p_st_item_id_tbl (1)
           AND organization_id = p_st_org_id_tbl (1);
Line: 397

        SELECT lot_control_code
             , serial_number_control_code
          INTO l_rs_lot_control_code
             , l_rs_serial_control_code
          FROM mtl_system_items
         WHERE inventory_item_id = p_rs_item_id_tbl (1)
           AND organization_id = p_rs_org_id_tbl (1);
Line: 707

        SELECT msik.lot_split_enabled
          INTO l_validation_status
          FROM mtl_system_items_b msik, mtl_lot_numbers mln
         WHERE mln.organization_id = p_organization_id
           AND mln.inventory_item_id = p_inventory_item_id
           AND mln.lot_number = p_lot_number
           AND mln.organization_id = msik.organization_id
           AND mln.inventory_item_id = msik.inventory_item_id;
Line: 719

            SELECT msik.lot_split_enabled
              INTO l_validation_status
              FROM mtl_system_items_b msik
                 , mtl_transaction_lots_temp mtlt
                 , mtl_material_transactions_temp mmtt
             WHERE mmtt.organization_id = p_organization_id
               AND mmtt.inventory_item_id = p_inventory_item_id
               AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
               AND mtlt.lot_number = p_lot_number
               AND mmtt.organization_id = msik.organization_id
               AND mmtt.inventory_item_id = msik.inventory_item_id;
Line: 756

        SELECT msik.lot_merge_enabled
          INTO l_validation_status
          FROM mtl_system_items_b msik, mtl_lot_numbers mln
         WHERE mln.organization_id = p_organization_id
           AND mln.inventory_item_id = p_inventory_item_id
           AND mln.lot_number = p_lot_number
           AND mln.organization_id = msik.organization_id
           AND mln.inventory_item_id = msik.inventory_item_id;
Line: 768

            SELECT msik.lot_merge_enabled
              INTO l_validation_status
              FROM mtl_system_items_b msik
                 , mtl_transaction_lots_temp mln
                 , mtl_material_transactions_temp mmtt
             WHERE mmtt.organization_id = p_organization_id
               AND mmtt.inventory_item_id = p_inventory_item_id
               AND mmtt.transaction_temp_id = mln.transaction_temp_id
               AND mln.lot_number = p_lot_number
               AND mmtt.organization_id = msik.organization_id
               AND mmtt.inventory_item_id = msik.inventory_item_id;
Line: 806

        SELECT DECODE (msik.lot_control_code, 2, 'Y', 'N')
          INTO l_validation_status
          FROM mtl_system_items_b msik, mtl_lot_numbers mln
         WHERE mln.organization_id = p_organization_id
           AND mln.inventory_item_id = p_inventory_item_id
           AND mln.lot_number = p_lot_number
           AND mln.organization_id = msik.organization_id
           AND mln.inventory_item_id = msik.inventory_item_id;
Line: 818

            SELECT DECODE (msik.lot_control_code, 2, 'Y', 'N')
              INTO l_validation_status
              FROM mtl_system_items_b msik
                 , mtl_transaction_lots_temp mln
                 , mtl_material_transactions_temp mmtt
             WHERE mmtt.organization_id = p_organization_id
               AND mmtt.inventory_item_id = p_inventory_item_id
               AND mmtt.transaction_temp_id = mln.transaction_temp_id
               AND mln.lot_number = p_lot_number
               AND mmtt.organization_id = msik.organization_id
               AND mmtt.inventory_item_id = msik.inventory_item_id;
Line: 1018

      SELECT lot_number_uniqueness
        INTO l_lot_uniqueness
        FROM mtl_parameters
       WHERE organization_id = p_organization_id;
Line: 1045

          SELECT COUNT (1)
            INTO l_lot_count
            FROM mtl_lot_numbers
           WHERE inventory_item_id <> p_inventory_item_id
             AND organization_id = p_organization_id
             AND lot_number = p_rs_lot_num_tbl (i);
Line: 1062

          SELECT COUNT (1)
            INTO l_lot_count
            FROM mtl_transaction_lots_temp mtlt
               , mtl_material_transactions_temp mmtt
           WHERE mmtt.inventory_item_id <> p_inventory_item_id
             AND mmtt.organization_id = p_organization_id
             AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
             AND mtlt.lot_number = p_rs_lot_num_tbl (i);
Line: 1108

        SELECT COUNT (1)
          INTO l_lot_count
          FROM mtl_lot_numbers
         WHERE inventory_item_id <> p_inventory_item_id
           AND organization_id = p_organization_id
           AND lot_number = p_rs_lot_num_tbl (1);
Line: 1128

        SELECT COUNT (1)
          INTO l_lot_count
          FROM mtl_transaction_lots_temp mtlt
             , mtl_material_transactions_temp mmtt
         WHERE mmtt.inventory_item_id <> p_inventory_item_id
           AND mmtt.organization_id = p_organization_id
           AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
           AND mtlt.lot_number = p_rs_lot_num_tbl (1);
Line: 1154

        SELECT COUNT (1)
          INTO l_lot_count
          FROM mtl_lot_numbers
         WHERE inventory_item_id = p_inventory_item_id
           AND organization_id = p_organization_id
           AND lot_number = p_rs_lot_num_tbl (i);
Line: 1172

        SELECT COUNT (1)
          INTO l_lot_count
          FROM wip_entities
         WHERE wip_entity_name = p_rs_lot_num_tbl (i)
           AND organization_id = p_organization_id;
Line: 1188

        SELECT COUNT (1)
          INTO l_lot_count
          FROM mtl_transaction_lots_temp mtlt
             , mtl_material_transactions_temp mmtt
         WHERE mmtt.inventory_item_id = p_inventory_item_id
           AND mmtt.organization_id = p_organization_id
           AND mmtt.transaction_temp_id = mtlt.transaction_temp_id
           AND mtlt.lot_number = p_rs_lot_num_tbl (i);
Line: 1242

        SELECT COUNT (1)
          INTO l_lot_count
          FROM wip_entities
         WHERE organization_id = p_organization_id
           AND wip_entity_name = p_rs_lot_num_tbl (1);
Line: 1288

  SELECT count(1)
  INTO l_lot_count
  FROM mtl_lot_numbers
  WHERE inventory_item_id = p_inventory_item_id
  AND   organization_id = p_organization_id
  AND lot_number = p_rs_lot_num_tbl(1);
Line: 1299

      SELECT count(1)
      INTO l_lot_count
      FROM   WIP_ENTITIES
      WHERE  organization_id = p_organization_id
      AND    wip_entity_name = p_rs_lot_num_tbl(1);
Line: 1309

          SELECT COUNT(1)
          INTO   l_lot_count
          FROM   MTL_TRANSACTION_LOTS_TEMP MTLT, MTL_MATERIAL_TRANSACTIONS_TEMP MMTT
          WHERE  mmtt.inventory_item_id = p_inventory_item_id
          AND    mmtt.organization_id = p_organization_id
          AND    Mmtt.transaction_temp_id = MTLT.transaction_temp_id
          AND    mtlt.lot_number = p_rs_lot_num_tbl(1);
Line: 1534

          SELECT lpn_context
            INTO l_lpn_context
            FROM wms_license_plate_numbers
            WHERE lpn_id = p_st_lpn_id_tbl(i);
Line: 1559

          SELECT lpn_context
                ,subinventory_code
                ,locator_id
                ,organization_id
            INTO l_lpn_context
                ,l_sub_code
                ,l_locator_id
                ,l_org_id
            FROM wms_license_plate_numbers
            WHERE lpn_id = p_rs_lpn_id_tbl(i);
Line: 1741

        SELECT status_id
          INTO l_status_id
          FROM mtl_lot_numbers
         WHERE organization_id = p_organization_id
           AND inventory_item_id = p_inventory_item_id
           AND lot_number = p_lot_number;
Line: 1906

        SELECT status_id
          INTO l_status_id
          FROM mtl_serial_numbers
         WHERE current_organization_id = p_organization_id
           AND inventory_item_id = p_inventory_item_id
           AND serial_number = p_serial_number;
Line: 2049

     /* SELECT   column_name
             , data_type
          FROM all_tab_columns
         WHERE table_name = p_table_name AND owner = p_owner
               AND column_id > 22
      ORDER BY column_id; */
Line: 2056

     SELECT   col.column_name
             , col.data_type
       FROM user_synonyms syn , all_tab_columns col
      WHERE syn.synonym_name = p_table_name AND col.owner = p_owner
        and col.owner      = syn.table_owner
        and col.table_name  = syn.table_name
        and col.column_id > 22
      ORDER BY column_id;
Line: 2900

      /* SELECT   column_name
             , data_type
          FROM all_tab_columns
         WHERE table_name = p_table_name AND owner = p_owner */
               /*Bug:4724150. Commented the following condition 1 as the attribute
                 columns becomes out of range of 20 to 91 when some extraneous attributes are added*/
               --AND column_id BETWEEN 20 AND 91
     -- ORDER BY column_id;
Line: 2909

      SELECT   col.column_name
             , col.data_type
        FROM user_synonyms syn , all_tab_columns col
       WHERE syn.synonym_name = p_table_name AND col.owner = p_owner
         and col.owner      = syn.table_owner
         and col.table_name  = syn.table_name
      ORDER BY column_id;
Line: 3545

   *   get cost group by calling inv_cost_group_update.proc_get_costgroup;
Line: 3576

   *   call INV_COST_GROUP_UPDATE.PROC_GET_COSTGROUP to get cost group
   *     end if;
Line: 3706

      print_debug ('calling inv_cost_group_update.proc_get_costgroup'
                 , 'Validate_Cost_Group'
                  );
Line: 3711

    inv_cost_group_update.proc_get_costgroup
                          (p_organization_id           => l_organization_id
                         , p_inventory_item_id         => l_inventory_item_id
                         , p_subinventory_code         => l_subinventory_code
                         , p_locator_id                => l_locator_id
                         , p_revision                  => l_revision
                         , p_lot_number                => l_lot_number
                         , p_serial_number             => NULL
                         , p_containerized_flag        => l_containerized_flag
                         , p_lpn_id                    => l_lpn_id
                         , p_transaction_action_id     => p_transaction_action_id
                         , x_cost_group_id             => v_cost_group_id
                         , x_return_status             => l_return_status
                          );
Line: 3730

        print_debug ('error from inv_cost_group_update.proc_get_costgroup'
                   , 'Validate_cost_group'
                    );
Line: 3828

          inv_cost_group_update.proc_get_costgroup
                          (p_organization_id           => l_organization_id
                         , p_inventory_item_id         => l_inventory_item_id
                         , p_subinventory_code         => l_subinventory_code
                         , p_locator_id                => l_locator_id
                         , p_revision                  => l_revision
                         , p_lot_number                => l_lot_number
                         , p_serial_number             => NULL
                         , p_containerized_flag        => l_containerized_flag
                         , p_lpn_id                    => l_lpn_id
                         , p_transaction_action_id     => p_transaction_action_id
                         , x_cost_group_id             => l_current_cost_group_id
                         , x_return_status             => l_return_status
                          );
Line: 4089

      SELECT primary_uom_code
           , DECODE (revision_qty_control_code, 1, 'FALSE', 'TRUE')
        INTO l_start_primary_uom
           , l_revision_control
        FROM mtl_system_items
       WHERE organization_id = l_organization_id
         AND inventory_item_id = l_inventory_item_id;
Line: 4115

      SELECT serial_number_control_code
        INTO l_serial_code
        FROM mtl_system_items
       WHERE organization_id = l_organization_id
         AND inventory_item_id = l_inventory_item_id;
Line: 4998

       shelf life code and depending on the type of lot transaction update
       the interface table with the correct shelf life code and shelf life dates
     *********************************************************************************************/
  PROCEDURE compute_lot_expiration (
    x_return_status         OUT NOCOPY      VARCHAR2
  , x_msg_count             OUT NOCOPY     NUMBER
  , x_msg_data              OUT NOCOPY     VARCHAR2
  , p_parent_id             IN       NUMBER
  , p_transaction_type_id   IN       NUMBER
  , p_item_id               IN       NUMBER
  , p_organization_id       IN       NUMBER
  , p_st_lot_num            IN       VARCHAR2
  , p_rs_lot_num_tbl        IN       lot_number_table
  , p_rs_lot_exp_tbl        IN OUT NOCOPY  date_table
  )
  IS
    l_shelf_life_code   NUMBER;
Line: 5017

    l_update            BOOLEAN;
Line: 5020

      SELECT shelf_life_code
           , shelf_life_days
        INTO l_shelf_life_code
           , l_shelf_life_days
        FROM mtl_system_items
       WHERE inventory_item_id = p_item_id
         AND organization_id = p_organization_id;
Line: 5050

          SELECT fnd_date.date_to_canonical (expiration_date)
            INTO l_lotexpdate
            FROM mtl_lot_numbers
           WHERE inventory_item_id = p_item_id
             AND organization_id = p_organization_id
             AND lot_number = p_st_lot_num;
Line: 5086

          UPDATE mtl_transaction_lots_interface mtli
             SET lot_expiration_date =
                                     fnd_date.canonical_to_date (l_lotexpdate)
           WHERE transaction_interface_id IN (
                   SELECT transaction_interface_id
                     FROM mtl_transactions_interface mti
                    WHERE mti.parent_id = p_parent_id
                      AND mti.transaction_interface_id =
                                                 mtli.transaction_interface_id);
Line: 5098

            fnd_message.set_name ('INV', 'INV_UPDATE_ERROR');
Line: 5117

          SELECT fnd_date.date_to_canonical (expiration_date)
            INTO l_lotexpdate
            FROM mtl_lot_numbers
           WHERE inventory_item_id = p_item_id
             AND organization_id = p_organization_id
             AND lot_number = p_rs_lot_num_tbl (1);
Line: 5127

            SELECT fnd_date.date_to_canonical (expiration_date)
              INTO l_lotexpdate
              FROM mtl_lot_numbers
             WHERE inventory_item_id = p_item_id
               AND organization_id = p_organization_id
               AND lot_number = p_st_lot_num;              -- We only pass one
Line: 5151

          UPDATE mtl_transaction_lots_interface mtli
             SET lot_expiration_date =
                                     fnd_date.canonical_to_date (l_lotexpdate)
           WHERE transaction_interface_id IN (
                   SELECT transaction_interface_id
                     FROM mtl_transactions_interface mti
                    WHERE mti.parent_id = p_parent_id
                      AND mti.parent_id = mti.transaction_interface_id
                      AND mti.transaction_interface_id =
                                                 mtli.transaction_interface_id);
Line: 5164

            fnd_message.set_name ('INV', 'INV_UPDATE_ERROR');
Line: 5172

        print_debug ('Lot exp date update merge2 ' || l_lotexpdate
                   , 'Compute Lot Exp'
                    );
Line: 5180

          SELECT fnd_date.date_to_canonical (expiration_date)
            INTO l_lotexpdate
            FROM mtl_lot_numbers
           WHERE inventory_item_id = p_item_id
             AND organization_id = p_organization_id
             AND lot_number = p_st_lot_num;
Line: 5206

          UPDATE mtl_transaction_lots_interface mtli
             SET lot_expiration_date =
                                     fnd_date.canonical_to_date (l_lotexpdate)
           WHERE transaction_interface_id IN (
                   SELECT transaction_interface_id
                     FROM mtl_transactions_interface mti
                    WHERE mti.parent_id = p_parent_id
                      AND mti.transaction_interface_id =
                                                 mtli.transaction_interface_id);
Line: 5218

            fnd_message.set_name ('INV', 'INV_UPDATE_ERROR');
Line: 5226

        print_debug ('Lot exp date update translate2 ' || l_lotexpdate
                   , 'Compute Lot Exp'
                    );
Line: 5238

          SELECT fnd_date.date_to_canonical (expiration_date)
            INTO l_lotexpdate
            FROM mtl_lot_numbers
           WHERE inventory_item_id = p_item_id
             AND organization_id = p_organization_id
             AND lot_number = p_st_lot_num;
Line: 5277

          UPDATE mtl_transaction_lots_interface mtli
             SET lot_expiration_date =
                                     fnd_date.canonical_to_date (l_lotexpdate)
           WHERE transaction_interface_id IN (
                   SELECT transaction_interface_id
                     FROM mtl_transactions_interface mti
                    WHERE mti.parent_id = p_parent_id
                      AND mti.transaction_interface_id =
                                                 mtli.transaction_interface_id
                      AND mtli.lot_expiration_date IS NULL);
Line: 5290

            fnd_message.set_name ('INV', 'INV_UPDATE_ERROR');
Line: 5298

        print_debug (   'Lot exp date user defined : after update split3 '
                     || l_lotexpdate
                   , 'Compute Lot Exp'
                    );
Line: 5306

        l_update := TRUE;
Line: 5309

          SELECT fnd_date.date_to_canonical (expiration_date)
            INTO l_lotexpdate
            FROM mtl_lot_numbers
           WHERE inventory_item_id = p_item_id
             AND organization_id = p_organization_id
             AND lot_number = p_rs_lot_num_tbl (1);
Line: 5325

                SELECT fnd_date.date_to_canonical (expiration_date)
                  INTO l_lotexpdate
                  FROM mtl_lot_numbers
                 WHERE inventory_item_id = p_item_id
                   AND organization_id = p_organization_id
                   AND lot_number = p_st_lot_num;
Line: 5348

              l_update := FALSE;
Line: 5356

        IF l_update
        THEN
          IF (l_lotexpdate IS NULL)
          THEN
            fnd_message.set_name ('INV', 'INV_INVALID_LOT_EXP');
Line: 5366

            UPDATE mtl_transaction_lots_interface mtli
               SET lot_expiration_date =
                                     fnd_date.canonical_to_date (l_lotexpdate)
             WHERE transaction_interface_id IN (
                     SELECT transaction_interface_id
                       FROM mtl_transactions_interface mti
                      WHERE mti.parent_id = p_parent_id
                        AND mti.parent_id = mti.transaction_interface_id
                        AND mti.transaction_interface_id =
                                                 mtli.transaction_interface_id);
Line: 5379

              fnd_message.set_name ('INV', 'INV_UPDATE_ERROR');
Line: 5387

          print_debug (   'Lot exp date user defined : after update Merge6 '
                       || l_lotexpdate
                     , 'Compute Lot Exp'
                      );
Line: 5399

            SELECT fnd_date.date_to_canonical (expiration_date)
              INTO l_lotexpdate
              FROM mtl_lot_numbers
             WHERE inventory_item_id = p_item_id
               AND organization_id = p_organization_id
               AND lot_number = p_st_lot_num;
Line: 5426

            UPDATE mtl_transaction_lots_interface mtli
               SET lot_expiration_date =
                                     fnd_date.canonical_to_date (l_lotexpdate)
             WHERE transaction_interface_id IN (
                     SELECT transaction_interface_id
                       FROM mtl_transactions_interface mti
                      WHERE mti.parent_id = p_parent_id
                        AND mti.transaction_interface_id =
                                                 mtli.transaction_interface_id
                        AND mtli.lot_expiration_date IS NULL);
Line: 5439

              fnd_message.set_name ('INV', 'INV_UPDATE_ERROR');
Line: 5448

                     (   'Lot exp date user defined : after update Translate'
                      || l_lotexpdate
                    , 'Compute Lot Exp'
                     );
Line: 5482

  PROCEDURE update_item_serial (
    x_msg_count                  OUT NOCOPY      VARCHAR2
  , x_return_status              OUT NOCOPY      VARCHAR2
  , x_msg_data                   OUT NOCOPY      VARCHAR2
  , x_validation_status          OUT NOCOPY      VARCHAR2
  , p_org_id                     IN              NUMBER
  , p_item_id                    IN              NUMBER
  , p_to_item_id                 IN              NUMBER DEFAULT NULL
  , p_wip_entity_id              IN              NUMBER
  , p_to_wip_entity_id           IN              NUMBER DEFAULT NULL
  , p_to_operation_sequence      IN              NUMBER DEFAULT NULL
  , p_intraoperation_step_type   IN              NUMBER DEFAULT NULL
  )
  IS
    l_restrict_serial_rcpt       NUMBER;
Line: 5497

    rollback_serial_update     EXCEPTION;
Line: 5506

    l_update_attr                BOOLEAN       := FALSE;
Line: 5520

                 , 'update_item_serial'
                  );
Line: 5523

                 , 'update_item_serial'
                  );
Line: 5526

                 , 'update_item_serial'
                  );
Line: 5529

                 , 'update_item_serial'
                  );
Line: 5532

                 , 'update_item_serial'
                  );
Line: 5536

                 , 'update_item_serial'
                  );
Line: 5545

                   , 'update_item_serial'
                    );
Line: 5560

                 , 'update_item_serial'
                  );
Line: 5564

    SELECT serial_number
    BULK COLLECT INTO l_ser_number_tbl
      FROM mtl_serial_numbers msn
     WHERE msn.inventory_item_id = p_item_id
       AND msn.wip_entity_id = p_wip_entity_id
       AND (   msn.intraoperation_step_type IS NULL
            OR msn.intraoperation_step_type <> 5
           )
       AND (   (msn.current_status IN (1, 6))
            OR (    l_restrict_serial_rcpt = 2
                AND msn.current_status = 4
                AND msn.last_txn_source_id = p_wip_entity_id
                AND NVL (msn.last_txn_source_type_id, -9999) = 5
               )
           );
Line: 5585

                   , 'update_item_serial'
                    );
Line: 5587

        print_debug ('returning..', 'update_item_serial');
Line: 5600

          SELECT descriptive_flex_context_code
            INTO l_context_value_item
            FROM mtl_flex_context
           WHERE organization_id = p_org_id
             AND context_column_name = 'ITEM'
             AND descriptive_flexfield_name = 'Serial Attributes'
             AND context_column_value_id = p_item_id;
Line: 5614

          SELECT descriptive_flex_context_code
            INTO l_context_value_to_item
            FROM mtl_flex_context
           WHERE organization_id = p_org_id
             AND context_column_name = 'ITEM'
             AND descriptive_flexfield_name = 'Serial Attributes'
             AND context_column_value_id = p_to_item_id;
Line: 5642

           , 'update_item_serial'
            );
Line: 5646

        l_update_attr := TRUE;
Line: 5657

                     , 'update_item_serial'
                      );
Line: 5671

                     , 'update_item_serial'
                      );
Line: 5681

                       , 'update_item_serial'
                        );
Line: 5695

        IF (l_update_attr) THEN
          BEGIN
            IF (l_debug)
            THEN
              print_debug ('Null out the attributes and update the MSN'
                         , 'update_item_serial'
                          );
Line: 5704

            UPDATE mtl_serial_numbers
               SET inventory_item_id = NVL (p_to_item_id, inventory_item_id)
                 , wip_entity_id = NVL (p_to_wip_entity_id, wip_entity_id)
                 , operation_seq_num = p_to_operation_sequence
                 , intraoperation_step_type = p_intraoperation_step_type
                 , serial_attribute_category = NULL
                 , c_attribute1 = NULL
                 , c_attribute2 = NULL
                 , c_attribute3 = NULL
                 , c_attribute4 = NULL
                 , c_attribute5 = NULL
                 , c_attribute6 = NULL
                 , c_attribute7 = NULL
                 , c_attribute8 = NULL
                 , c_attribute9 = NULL
                 , c_attribute10 = NULL
                 , c_attribute11 = NULL
                 , c_attribute12 = NULL
                 , c_attribute13 = NULL
                 , c_attribute14 = NULL
                 , c_attribute15 = NULL
                 , c_attribute16 = NULL
                 , c_attribute17 = NULL
                 , c_attribute18 = NULL
                 , c_attribute19 = NULL
                 , c_attribute20 = NULL
                 , d_attribute1 = NULL
                 , d_attribute2 = NULL
                 , d_attribute3 = NULL
                 , d_attribute4 = NULL
                 , d_attribute5 = NULL
                 , d_attribute6 = NULL
                 , d_attribute7 = NULL
                 , d_attribute8 = NULL
                 , d_attribute9 = NULL
                 , d_attribute10 = NULL
                 , n_attribute1 = NULL
                 , n_attribute2 = NULL
                 , n_attribute3 = NULL
                 , n_attribute4 = NULL
                 , n_attribute5 = NULL
                 , n_attribute6 = NULL
                 , n_attribute7 = NULL
                 , n_attribute8 = NULL
                 , n_attribute9 = NULL
                 , n_attribute10 = NULL
                 , attribute_category = NULL
                 , attribute1 = NULL
                 , attribute2 = NULL
                 , attribute3 = NULL
                 , attribute4 = NULL
                 , attribute5 = NULL
                 , attribute6 = NULL
                 , attribute7 = NULL
                 , attribute8 = NULL
                 , attribute9 = NULL
                 , attribute10 = NULL
                 , attribute11 = NULL
                 , attribute12 = NULL
                 , attribute13 = NULL
                 , attribute14 = NULL
                 , attribute15 = NULL
                 , territory_code = NULL
                 , time_since_new = NULL
                 , cycles_since_new = NULL
                 , time_since_overhaul = NULL
                 , cycles_since_overhaul = NULL
                 , time_since_repair = NULL
                 , cycles_since_repair = NULL
                 , time_since_visit = NULL
                 , cycles_since_visit = NULL
                 , time_since_mark = NULL
                 , cycles_since_mark = NULL
                 , number_of_repairs = NULL
             WHERE inventory_item_id = p_item_id
               AND current_organization_id = p_org_id
               AND wip_entity_id = p_wip_entity_id
               AND serial_number = l_ser_number_tbl (i);
Line: 5787

              RAISE rollback_serial_update;
Line: 5792

              print_debug ('Update MSN when p_to_item_id <> p_item_id', 'update_item_serial');
Line: 5795

            UPDATE mtl_serial_numbers
               SET inventory_item_id = NVL (p_to_item_id, inventory_item_id)
                 , wip_entity_id = NVL (p_to_wip_entity_id, wip_entity_id)
                 , operation_seq_num = p_to_operation_sequence
                 , intraoperation_step_type = p_intraoperation_step_type
             WHERE inventory_item_id = p_item_id
               AND current_organization_id = p_org_id
               AND wip_entity_id = p_wip_entity_id
               AND serial_number = l_ser_number_tbl (i);
Line: 5807

              RAISE rollback_serial_update;
Line: 5809

        END IF;   --END IF (l_update_attr)
Line: 5815

            print_debug ('Update MSN when p_to_item_id = p_item_id', 'update_item_serial');
Line: 5818

          UPDATE mtl_serial_numbers
             SET inventory_item_id = NVL (p_to_item_id, inventory_item_id)
               , wip_entity_id = NVL (p_to_wip_entity_id, wip_entity_id)
               , operation_seq_num = p_to_operation_sequence
               , intraoperation_step_type = p_intraoperation_step_type
           WHERE inventory_item_id = p_item_id
             AND current_organization_id = p_org_id
             AND wip_entity_id = p_wip_entity_id
             AND serial_number = l_ser_number_tbl (i);
Line: 5830

            RAISE rollback_serial_update;
Line: 5836

      print_debug ('All updations done, Exitting the procedure', 'update_item_serial');
Line: 5850

    WHEN rollback_serial_update
    THEN
      ROLLBACK TO initial_state_svpt;
Line: 5859

        fnd_msg_pub.add_exc_msg (g_pkg_name, 'update_item_serial');