DBA Data[Home] [Help]

APPS.OZF_DISC_LINE_PVT SQL Statements

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

Line: 71

FUNCTION is_delete_valid(p_offer_id IN NUMBER)
RETURN VARCHAR2
IS
    CURSOR c_offer_status(p_offer_id NUMBER) IS
    SELECT status_code FROM ozf_offers where offer_id = p_offer_id;
Line: 232

select tier_level FROM ozf_offers where offer_id = p_offer_id;
Line: 457

 SELECT transaction_currency_code
 FROM ozf_offers
 WHERE offer_id = cp_offerId;
Line: 548

      SELECT *
      FROM ozf_offer_discount_lines
      WHERE offer_discount_line_id = p_ozf_offer_line_rec.offer_discount_line_id;
Line: 681

   IF p_ozf_offer_line_rec.last_update_date IS NULL THEN
      x_complete_rec.last_update_date := l_ozf_offer_line_rec.last_update_date;
Line: 686

   IF p_ozf_offer_line_rec.last_updated_by IS NULL THEN
      x_complete_rec.last_updated_by := l_ozf_offer_line_rec.last_updated_by;
Line: 691

   IF p_ozf_offer_line_rec.last_update_login IS NULL THEN
      x_complete_rec.last_update_login := l_ozf_offer_line_rec.last_update_login;
Line: 963

      SELECT ozf_offer_discount_lines_s.NEXTVAL
      FROM dual;
Line: 967

      SELECT 1
      FROM OZF_OFFER_DISCOUNT_LINES
      WHERE offer_discount_line_id = l_id;
Line: 1056

      OZF_DISC_LINE_PKG.Insert_Row(
          px_offer_discount_line_id  => l_offer_discount_line_id,
          p_parent_discount_line_id  => l_ozf_offer_line_rec.parent_discount_line_id,
          p_volume_from  => l_ozf_offer_line_rec.volume_from,
          p_volume_to  => l_ozf_offer_line_rec.volume_to,
          p_volume_operator  => l_ozf_offer_line_rec.volume_operator,
          p_volume_type  => l_ozf_offer_line_rec.volume_type,
          p_volume_break_type  => l_ozf_offer_line_rec.volume_break_type,
          p_discount  => l_ozf_offer_line_rec.discount,
          p_discount_type  => l_ozf_offer_line_rec.discount_type,
          p_tier_type  => l_ozf_offer_line_rec.tier_type,
          p_tier_level  => l_ozf_offer_line_rec.tier_level,
          p_incompatibility_group  => l_ozf_offer_line_rec.incompatibility_group,
          p_precedence  => l_ozf_offer_line_rec.precedence,
          p_bucket  => l_ozf_offer_line_rec.bucket,
          p_scan_value  => l_ozf_offer_line_rec.scan_value,
          p_scan_data_quantity  => l_ozf_offer_line_rec.scan_data_quantity,
          p_scan_unit_forecast  => l_ozf_offer_line_rec.scan_unit_forecast,
          p_channel_id  => l_ozf_offer_line_rec.channel_id,
          p_adjustment_flag  => l_ozf_offer_line_rec.adjustment_flag,
          p_start_date_active  => l_ozf_offer_line_rec.start_date_active,
          p_end_date_active  => l_ozf_offer_line_rec.end_date_active,
          p_uom_code  => l_ozf_offer_line_rec.uom_code,
          p_creation_date  => SYSDATE,
          p_created_by  => FND_GLOBAL.USER_ID,
          p_last_update_date  => SYSDATE,
          p_last_updated_by  => FND_GLOBAL.USER_ID,
          p_last_update_login  => FND_GLOBAL.conc_login_id,
          px_object_version_number  => l_object_version_number,
           p_context     => l_ozf_offer_line_rec.context,
           p_attribute1  => l_ozf_offer_line_rec.attribute1,
           p_attribute2  => l_ozf_offer_line_rec.attribute2,
           p_attribute3  => l_ozf_offer_line_rec.attribute3,
           p_attribute4  => l_ozf_offer_line_rec.attribute4,
           p_attribute5  => l_ozf_offer_line_rec.attribute5,
           p_attribute6  => l_ozf_offer_line_rec.attribute6,
           p_attribute7  => l_ozf_offer_line_rec.attribute7,
           p_attribute8  => l_ozf_offer_line_rec.attribute8,
           p_attribute9  => l_ozf_offer_line_rec.attribute9,
           p_attribute10 => l_ozf_offer_line_rec.attribute10,
           p_attribute11 => l_ozf_offer_line_rec.attribute11,
           p_attribute12 => l_ozf_offer_line_rec.attribute12,
           p_attribute13 => l_ozf_offer_line_rec.attribute13,
           p_attribute14 => l_ozf_offer_line_rec.attribute14,
           p_attribute15 => l_ozf_offer_line_rec.attribute15,
          p_offer_id  => l_ozf_offer_line_rec.offer_id
);
Line: 1202

PROCEDURE Update_Ozf_Disc_Line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN  NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_ozf_offer_line_rec               IN    ozf_offer_line_rec_type
    )

 IS


CURSOR c_get_ozf_disc_line(offer_discount_line_id NUMBER) IS
    SELECT *
    FROM  OZF_OFFER_DISCOUNT_LINES
    WHERE  offer_discount_line_id = p_ozf_offer_line_rec.offer_discount_line_id;
Line: 1225

L_API_NAME                  CONSTANT VARCHAR2(30) := 'Update_Ozf_Disc_Line';
Line: 1236

      SAVEPOINT update_ozf_disc_line_pvt;
Line: 1265

      OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
Line: 1270

  OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
   p_token_name   => 'INFO',
 p_token_value  => 'Ozf_Disc_Line') ;
Line: 1283

 p_token_value  => 'Last_Update_Date') ;
Line: 1305

            p_validation_mode => JTF_PLSQL_API.g_update,
            p_ozf_offer_line_rec  =>  p_ozf_offer_line_rec,
            x_return_status    => x_return_status,
            x_msg_count        => x_msg_count,
            x_msg_data         => x_msg_data);
Line: 1319

      OZF_DISC_LINE_PKG.Update_Row(
          p_offer_discount_line_id  => p_ozf_offer_line_rec.offer_discount_line_id,
          p_parent_discount_line_id  => p_ozf_offer_line_rec.parent_discount_line_id,
          p_volume_from  => p_ozf_offer_line_rec.volume_from,
          p_volume_to  => p_ozf_offer_line_rec.volume_to,
          p_volume_operator  => p_ozf_offer_line_rec.volume_operator,
          p_volume_type  => p_ozf_offer_line_rec.volume_type,
          p_volume_break_type  => p_ozf_offer_line_rec.volume_break_type,
          p_discount  => p_ozf_offer_line_rec.discount,
          p_discount_type  => p_ozf_offer_line_rec.discount_type,
          p_tier_type  => p_ozf_offer_line_rec.tier_type,
          p_tier_level  => p_ozf_offer_line_rec.tier_level,
          p_incompatibility_group  => p_ozf_offer_line_rec.incompatibility_group,
          p_precedence  => p_ozf_offer_line_rec.precedence,
          p_bucket  => p_ozf_offer_line_rec.bucket,
          p_scan_value  => p_ozf_offer_line_rec.scan_value,
          p_scan_data_quantity  => p_ozf_offer_line_rec.scan_data_quantity,
          p_scan_unit_forecast  => p_ozf_offer_line_rec.scan_unit_forecast,
          p_channel_id  => p_ozf_offer_line_rec.channel_id,
          p_adjustment_flag  => p_ozf_offer_line_rec.adjustment_flag,
          p_start_date_active  => p_ozf_offer_line_rec.start_date_active,
          p_end_date_active  => p_ozf_offer_line_rec.end_date_active,
          p_uom_code  => p_ozf_offer_line_rec.uom_code,
          p_last_update_date  => SYSDATE,
          p_last_updated_by  => FND_GLOBAL.USER_ID,
          p_last_update_login  => FND_GLOBAL.conc_login_id,
          p_object_version_number  => p_ozf_offer_line_rec.object_version_number,
           p_context     => p_ozf_offer_line_rec.context,
           p_attribute1  => p_ozf_offer_line_rec.attribute1,
           p_attribute2  => p_ozf_offer_line_rec.attribute2,
           p_attribute3  => p_ozf_offer_line_rec.attribute3,
           p_attribute4  => p_ozf_offer_line_rec.attribute4,
           p_attribute5  => p_ozf_offer_line_rec.attribute5,
           p_attribute6  => p_ozf_offer_line_rec.attribute6,
           p_attribute7  => p_ozf_offer_line_rec.attribute7,
           p_attribute8  => p_ozf_offer_line_rec.attribute8,
           p_attribute9  => p_ozf_offer_line_rec.attribute9,
           p_attribute10 => p_ozf_offer_line_rec.attribute10,
           p_attribute11 => p_ozf_offer_line_rec.attribute11,
           p_attribute12 => p_ozf_offer_line_rec.attribute12,
           p_attribute13 => p_ozf_offer_line_rec.attribute13,
           p_attribute14 => p_ozf_offer_line_rec.attribute14,
           p_attribute15 => p_ozf_offer_line_rec.attribute15,
          p_offer_id  => p_ozf_offer_line_rec.offer_id
);
Line: 1392

     ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
Line: 1402

     ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
Line: 1412

     ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
Line: 1424

End Update_Ozf_Disc_Line;
Line: 1461

PROCEDURE Delete_Ozf_Disc_Line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_offer_discount_line_id                   IN  NUMBER,
    p_object_version_number      IN   NUMBER
    )

 IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_Ozf_Disc_Line';
Line: 1480

      SAVEPOINT delete_ozf_disc_line_pvt;
Line: 1512

      OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
Line: 1515

      OZF_DISC_LINE_PKG.Delete_Row(
          p_offer_discount_line_id  => p_offer_discount_line_id,
          p_object_version_number => p_object_version_number     );
Line: 1545

     ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
Line: 1555

     ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
Line: 1565

     ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
Line: 1577

End Delete_Ozf_Disc_Line;
Line: 1722

    SELECT 1 from ozf_offer_discount_products
                                WHERE   product_level = p_item_level
                                AND product_id = p_item_number
                                AND excluder_flag = p_excluder_flag
                                AND offer_id = p_offer_id ;
Line: 1987

      SELECT *
      FROM ozf_offer_discount_products
      WHERE off_discount_product_id = p_ozf_prod_rec.off_discount_product_id;
Line: 2055

   IF p_ozf_prod_rec.last_update_date IS NULL THEN
      x_complete_rec.last_update_date := l_ozf_prod_rec.last_update_date;
Line: 2060

   IF p_ozf_prod_rec.last_updated_by IS NULL THEN
      x_complete_rec.last_updated_by := l_ozf_prod_rec.last_updated_by;
Line: 2065

   IF p_ozf_prod_rec.last_update_login IS NULL THEN
      x_complete_rec.last_update_login := l_ozf_prod_rec.last_update_login;
Line: 2325

      SELECT ozf_offer_discount_products_s.NEXTVAL
      FROM dual;
Line: 2329

      SELECT 1
      FROM OZF_OFFER_DISCOUNT_PRODUCTS
      WHERE off_discount_product_id = l_id;
Line: 2424

      Ozf_Create_Ozf_Prod_Line_Pkg.Insert_Row(
          px_off_discount_product_id  => l_off_discount_product_id,
          p_parent_off_disc_prod_id => l_ozf_prod_rec.parent_off_disc_prod_id,
          p_product_level  => l_ozf_prod_rec.product_level,
          p_product_id  => l_ozf_prod_rec.product_id,
          p_excluder_flag  => l_ozf_prod_rec.excluder_flag,
          p_uom_code  => l_ozf_prod_rec.uom_code,
          p_start_date_active  => l_ozf_prod_rec.start_date_active,
          p_end_date_active  => l_ozf_prod_rec.end_date_active,
          p_offer_discount_line_id  => l_ozf_prod_rec.offer_discount_line_id,
          p_offer_id  => l_ozf_prod_rec.offer_id,
          p_creation_date  => SYSDATE,
          p_created_by  => FND_GLOBAL.USER_ID,
          p_last_update_date  => SYSDATE,
          p_last_updated_by  => FND_GLOBAL.USER_ID,
          p_last_update_login  => FND_GLOBAL.conc_login_id,
          px_object_version_number  => l_object_version_number
);
Line: 2542

PROCEDURE Update_Ozf_Prod_Line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN  NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_ozf_prod_rec               IN    ozf_prod_rec_type
    )

 IS


CURSOR c_get_create_ozf_prod_line(off_discount_product_id NUMBER) IS
    SELECT *
    FROM  OZF_OFFER_DISCOUNT_PRODUCTS
    WHERE  off_discount_product_id = p_ozf_prod_rec.off_discount_product_id;
Line: 2565

L_API_NAME                  CONSTANT VARCHAR2(30) := 'Update_Ozf_Prod_Line';
Line: 2576

      SAVEPOINT Update_Ozf_Prod_Line_pvt;
Line: 2605

      OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
Line: 2612

  OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
   p_token_name   => 'INFO',
 p_token_value  => 'Create_Ozf_Prod_Line') ;
Line: 2626

 p_token_value  => 'Last_Update_Date') ;
Line: 2648

            p_validation_mode => JTF_PLSQL_API.g_update,
            p_ozf_prod_rec  =>  p_ozf_prod_rec,
            x_return_status    => x_return_status,
            x_msg_count        => x_msg_count,
            x_msg_data         => x_msg_data);
Line: 2664

      Ozf_Create_Ozf_Prod_Line_Pkg.Update_Row(
          p_off_discount_product_id  => p_ozf_prod_rec.off_discount_product_id,
          p_parent_off_disc_prod_id => p_ozf_prod_rec.parent_off_disc_prod_id,
          p_product_level  => p_ozf_prod_rec.product_level,
          p_product_id  => p_ozf_prod_rec.product_id,
          p_excluder_flag  => p_ozf_prod_rec.excluder_flag,
          p_uom_code  => p_ozf_prod_rec.uom_code,
          p_start_date_active  => p_ozf_prod_rec.start_date_active,
          p_end_date_active  => p_ozf_prod_rec.end_date_active,
          p_offer_discount_line_id  => p_ozf_prod_rec.offer_discount_line_id,
          p_offer_id  => p_ozf_prod_rec.offer_id,
          p_last_update_date  => SYSDATE,
          p_last_updated_by  => FND_GLOBAL.USER_ID,
          p_last_update_login  => FND_GLOBAL.conc_login_id,
          p_object_version_number  => p_ozf_prod_rec.object_version_number
);
Line: 2707

     ROLLBACK TO Update_Ozf_Prod_Line_PVT;
Line: 2717

     ROLLBACK TO Update_Ozf_Prod_Line_PVT;
Line: 2727

     ROLLBACK TO Update_Ozf_Prod_Line_PVT;
Line: 2739

End Update_Ozf_Prod_Line;
Line: 2746

PROCEDURE DELETE_EXCLUSIONS(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_parent_off_disc_prod_id    IN NUMBER
)
IS
CURSOR c_excl_id IS
select * FROM ozf_offer_discount_products where parent_off_disc_prod_id = p_parent_off_disc_prod_id;
Line: 2759

L_API_NAME                  CONSTANT VARCHAR2(30) := 'DELETE_EXCLUSIONS';
Line: 2763

SAVEPOINT Delete_Exclusions_sp;
Line: 2769

    OZF_Create_Ozf_Prod_Line_PKG.Delete_row(
                                            p_off_discount_product_id  => excl_rec.off_discount_product_id,
                                            p_object_version_number  => excl_rec.object_version_number);
Line: 2776

     ROLLBACK TO Delete_Exclusions_sp;
Line: 2786

     ROLLBACK TO Delete_Exclusions_sp;
Line: 2796

     ROLLBACK TO Delete_Exclusions_sp;
Line: 2809

END DELETE_EXCLUSIONS;
Line: 2846

PROCEDURE Delete_Ozf_Prod_Line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_off_discount_product_id                   IN  NUMBER,
    p_object_version_number      IN   NUMBER
    )

 IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_Ozf_Prod_Line';
Line: 2864

select offer_id FROM ozf_offer_discount_products where off_discount_product_id = p_off_discount_product_id;
Line: 2869

      SAVEPOINT Delete_Ozf_Prod_Line_pvt;
Line: 2901

      OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
Line: 2906

        IF is_delete_valid(l_offer_id) = 'N' THEN
            OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_OFFR_CANT_DELETE_LINE');
Line: 2910

DELETE_EXCLUSIONS(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,
    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,
    p_parent_off_disc_prod_id    => p_off_discount_product_id
);
Line: 2924

      Ozf_Create_Ozf_Prod_Line_Pkg.Delete_Row(
          p_off_discount_product_id  => p_off_discount_product_id,
          p_object_version_number => p_object_version_number     );
Line: 2954

     ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
Line: 2964

     ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
Line: 2974

     ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
Line: 2986

End Delete_Ozf_Prod_Line;
Line: 3313

      SELECT *
      FROM ozf_discount_product_reln
      WHERE discount_product_reln_id = p_prod_reln_rec.discount_product_reln_id;
Line: 3351

   IF p_prod_reln_rec.last_update_date IS NULL THEN
      x_complete_rec.last_update_date := l_prod_reln_rec.last_update_date;
Line: 3356

   IF p_prod_reln_rec.last_updated_by IS NULL THEN
      x_complete_rec.last_updated_by := l_prod_reln_rec.last_updated_by;
Line: 3361

   IF p_prod_reln_rec.last_update_login IS NULL THEN
      x_complete_rec.last_update_login := l_prod_reln_rec.last_update_login;
Line: 3628

      SELECT ozf_discount_product_reln_s.NEXTVAL
      FROM dual;
Line: 3632

      SELECT 1
      FROM OZF_DISCOUNT_PRODUCT_RELN
      WHERE discount_product_reln_id = l_id;
Line: 3723

      Ozf_Prod_Reln_Pkg.Insert_Row(
          px_discount_product_reln_id  => l_discount_product_reln_id,
          p_offer_discount_line_id  => l_prod_reln_rec.offer_discount_line_id,
          p_off_discount_product_id  => l_prod_reln_rec.off_discount_product_id,
          p_creation_date  => SYSDATE,
          p_created_by  => FND_GLOBAL.USER_ID,
          p_last_update_date  => SYSDATE,
          p_last_updated_by  => FND_GLOBAL.USER_ID,
          p_last_update_login  => FND_GLOBAL.conc_login_id,
          px_object_version_number  => l_object_version_number
);
Line: 3834

PROCEDURE Update_Prod_Reln(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN  NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_prod_reln_rec               IN    prod_reln_rec_type
    )

 IS


CURSOR c_get_prod_reln(discount_product_reln_id NUMBER) IS
    SELECT *
    FROM  OZF_DISCOUNT_PRODUCT_RELN
    WHERE  discount_product_reln_id = p_prod_reln_rec.discount_product_reln_id;
Line: 3857

L_API_NAME                  CONSTANT VARCHAR2(30) := 'Update_Prod_Reln';
Line: 3868

      SAVEPOINT update_prod_reln_pvt;
Line: 3897

      OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
Line: 3904

  OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
   p_token_name   => 'INFO',
 p_token_value  => 'Prod_Reln') ;
Line: 3918

 p_token_value  => 'Last_Update_Date') ;
Line: 3940

            p_validation_mode => JTF_PLSQL_API.g_update,
            p_prod_reln_rec  =>  p_prod_reln_rec,
            x_return_status    => x_return_status,
            x_msg_count        => x_msg_count,
            x_msg_data         => x_msg_data);
Line: 3956

      Ozf_Prod_Reln_Pkg.Update_Row(
          p_discount_product_reln_id  => p_prod_reln_rec.discount_product_reln_id,
          p_offer_discount_line_id  => p_prod_reln_rec.offer_discount_line_id,
          p_off_discount_product_id  => p_prod_reln_rec.off_discount_product_id,
          p_last_update_date  => SYSDATE,
          p_last_updated_by  => FND_GLOBAL.USER_ID,
          p_last_update_login  => FND_GLOBAL.conc_login_id,
          p_object_version_number  => p_prod_reln_rec.object_version_number
);
Line: 3992

     ROLLBACK TO UPDATE_Prod_Reln_PVT;
Line: 4002

     ROLLBACK TO UPDATE_Prod_Reln_PVT;
Line: 4012

     ROLLBACK TO UPDATE_Prod_Reln_PVT;
Line: 4024

End Update_Prod_Reln;
Line: 4061

PROCEDURE Delete_Prod_Reln(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_discount_product_reln_id                   IN  NUMBER,
    p_object_version_number      IN   NUMBER
    )

 IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_Prod_Reln';
Line: 4080

      SAVEPOINT delete_prod_reln_pvt;
Line: 4112

      OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
Line: 4115

      Ozf_Prod_Reln_Pkg.Delete_Row(
          p_discount_product_reln_id  => p_discount_product_reln_id,
          p_object_version_number => p_object_version_number     );
Line: 4145

     ROLLBACK TO DELETE_Prod_Reln_PVT;
Line: 4155

     ROLLBACK TO DELETE_Prod_Reln_PVT;
Line: 4165

     ROLLBACK TO DELETE_Prod_Reln_PVT;
Line: 4177

End Delete_Prod_Reln;
Line: 4190

SELECT 1 FROM dual WHERE EXISTS
    (
    SELECT 1 FROM OZF_OFFER_DISCOUNT_LINES
    WHERE offer_id = p_offer_id
    AND offer_discount_line_id = p_offer_discount_line_id
    );
Line: 4585

SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
Line: 4627

       p_discount_rec.last_update_date                := p_offer_rec.last_update_date;
Line: 4628

       p_discount_rec.last_updated_by                 := p_offer_rec.last_updated_by;
Line: 4629

       p_discount_rec.last_update_login               := p_offer_rec.last_update_login;
Line: 4657

SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
Line: 4684

       p_product_rec.last_update_date                := p_offer_rec.last_update_date                ;
Line: 4685

       p_product_rec.last_updated_by                 := p_offer_rec.last_updated_by                 ;
Line: 4686

       p_product_rec.last_update_login               := p_offer_rec.last_update_login               ;
Line: 4868

PROCEDURE Update_offer_line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_ozf_offer_line_rec        IN   ozf_offer_line_rec_type  ,
    p_ozf_prod_rec              IN   ozf_prod_rec_type
)
IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Update_offer_line';
Line: 4893

      SAVEPOINT Update_offer_line_pvt;
Line: 4918

Update_Ozf_Disc_Line(
    p_api_version_number => p_api_version_number,
    p_init_msg_list => p_init_msg_list,
    p_commit => p_commit,
    p_validation_level => p_validation_level,
    x_return_status    => l_return_status,
    x_msg_count        => l_msg_count,
    x_msg_data         => l_msg_data,
    p_ozf_offer_line_rec => p_ozf_offer_line_rec
    );
Line: 4937

Update_Ozf_Prod_Line(
    p_api_version_number => p_api_version_number,
    p_init_msg_list => p_init_msg_list,
    p_commit => p_commit,
    p_validation_level => p_validation_level,
    x_return_status    => l_return_status,
    x_msg_count        => l_msg_count,
    x_msg_data         => l_msg_data,
    p_ozf_prod_rec =>l_ozf_prod_rec
    );
Line: 4971

     ROLLBACK TO Update_offer_line_pvt;
Line: 4981

     ROLLBACK TO Update_offer_line_pvt;
Line: 4991

     ROLLBACK TO Update_offer_line_pvt;
Line: 5004

END Update_offer_line;
Line: 5006

PROCEDURE Update_discount_line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_ozf_discount_line_rec              IN   ozf_discount_line_rec_type
)
IS
l_api_name                  CONSTANT VARCHAR2(30) := 'Update_discount_line';
Line: 5032

    SELECT *
    FROM  OZF_OFFER_DISCOUNT_LINES
    WHERE  offer_discount_line_id = p_ozf_offer_line_rec.offer_discount_line_id;
Line: 5038

      SAVEPOINT Update_discount_line_pvt;
Line: 5076

 p_token_value  => 'Last_Update_Date') ;
Line: 5093

Update_offer_line(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,

    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,

    p_ozf_offer_line_rec        => l_ozf_offer_line_rec,
    p_ozf_prod_rec              => l_ozf_prod_rec
);
Line: 5132

     ROLLBACK TO Update_discount_line_pvt;
Line: 5142

     ROLLBACK TO Update_discount_line_pvt;
Line: 5152

     ROLLBACK TO Update_discount_line_pvt;
Line: 5191

       p_ozf_offer_line_rec.last_update_date        := FND_API.G_MISS_DATE;
Line: 5192

       p_ozf_offer_line_rec.last_updated_by         := FND_API.G_MISS_NUM;
Line: 5193

       p_ozf_offer_line_rec.last_update_login       := FND_API.G_MISS_NUM;
Line: 5233

PROCEDURE Update_Product
(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_ozf_prod_rec              IN   ozf_prod_rec_type

)
IS
    l_api_name                  CONSTANT VARCHAR2(30) := 'Update_Product';
Line: 5256

SELECT offer_discount_line_id,offer_id,object_version_number
FROM ozf_offer_discount_lines
WHERE offer_discount_line_id = p_offer_discount_line_id;
Line: 5263

SELECT offer_discount_line_id FROM ozf_offer_discount_products
WHERE off_discount_product_id = p_off_discount_product_id;
Line: 5267

      SAVEPOINT Update_product_Pvt;
Line: 5292

Update_Ozf_Prod_Line(
    p_api_version_number => p_api_version_number,
    p_init_msg_list => p_init_msg_list,
    p_commit => p_commit,
    p_validation_level => p_validation_level,
    x_return_status    => x_return_status,
    x_msg_count        => l_msg_count,
    x_msg_data         => l_msg_data,
    p_ozf_prod_rec =>p_ozf_prod_rec
    );
Line: 5323

Update_Ozf_Disc_Line(
    p_api_version_number => p_api_version_number,
    p_init_msg_list => p_init_msg_list,
    p_commit => p_commit,
    p_validation_level => p_validation_level,
    x_return_status    => x_return_status,
    x_msg_count        => l_msg_count,
    x_msg_data         => l_msg_data,
    p_ozf_offer_line_rec => l_ozf_offer_line_rec
    );
Line: 5356

     ROLLBACK TO Update_product_Pvt;
Line: 5366

     ROLLBACK TO Update_product_Pvt;
Line: 5376

     ROLLBACK TO Update_product_Pvt;
Line: 5389

END Update_Product;
Line: 5425

PROCEDURE Delete_Relation(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_offer_discount_line_id    IN  NUMBER
    )
    IS
    L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_Relation';
Line: 5443

      SAVEPOINT Delete_Relation_Pvt;
Line: 5469

      Ozf_Prod_Reln_Pkg.Delete(
          p_offer_discount_line_id => p_offer_discount_line_id
);
Line: 5492

     ROLLBACK TO Delete_Relation_Pvt;
Line: 5502

     ROLLBACK TO Delete_Relation_Pvt;
Line: 5512

     ROLLBACK TO Delete_Relation_Pvt;
Line: 5524

    END Delete_Relation;
Line: 5558

PROCEDURE Delete_Product(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,
    p_offer_discount_line_id     IN NUMBER
)
    IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_Product';
Line: 5582

      SAVEPOINT Delete_Product_Pvt;
Line: 5608

Delete_Relation(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,
    x_return_status              => x_return_status,
    x_msg_count                  => l_msg_count,
    x_msg_data                   => l_msg_data,
    p_offer_discount_line_id    => p_offer_discount_line_id
    );
Line: 5621

OZF_Create_Ozf_Prod_Line_PKG.Delete_product(p_offer_discount_line_id => p_offer_discount_line_id);
Line: 5645

     ROLLBACK TO Delete_Product_Pvt;
Line: 5655

     ROLLBACK TO Delete_Product_Pvt;
Line: 5665

     ROLLBACK TO Delete_Product_Pvt;
Line: 5677

END Delete_Product;
Line: 5715

PROCEDURE Delete_offer_line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_offer_discount_line_id     IN NUMBER,
    p_object_version_number      IN NUMBER
)
IS
L_API_NAME                  CONSTANT VARCHAR2(30) := 'Delete_offer_line';
Line: 5740

    SELECT * FROM ozf_offer_discount_lines
    WHERE offer_discount_line_id = p_offer_discount_line_id;
Line: 5746

    select offer_id FROM ozf_offer_discount_lines where offer_discount_line_id = p_offer_discount_line_id;
Line: 5751

      SAVEPOINT Delete_offer_line_Pvt;
Line: 5779

        IF is_delete_valid(l_offer_id) = 'N' THEN
            OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_OFFR_CANT_DELETE_LINE');
Line: 5789

    delete_disc_tiers(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,
    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,
    p_parent_discount_line_id    => p_offer_discount_line_id
    );
Line: 5806

Delete_Product(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,
    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,
    p_offer_discount_line_id     => p_offer_discount_line_id
);
Line: 5820

delete_Ozf_Disc_Line
(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,
    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,
    p_offer_discount_line_id     => p_offer_discount_line_id,
    p_object_version_number      => p_object_version_number
    );
Line: 5855

     ROLLBACK TO Delete_offer_line_pvt;
Line: 5865

     ROLLBACK TO Delete_offer_line_pvt;
Line: 5875

     ROLLBACK TO Delete_offer_line_pvt;
Line: 5887

END Delete_offer_line;
Line: 5898

SELECT 1 FROM dual WHERE EXISTS
    (
    SELECT 1 FROM OZF_OFFER_DISCOUNT_PRODUCTS
    WHERE offer_id = p_offer_id
    AND off_discount_product_id = p_off_discount_product_id
--    AND offer_discount_line_id = p_offer_discount_line_id
    AND excluder_flag = 'N'
    );
Line: 5984

    SELECT *
    FROM ozf_offer_discount_products
    WHERE off_discount_product_id = p_off_discount_product_id;
Line: 6116

PROCEDURE Update_Product_Exclusion(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_ozf_excl_rec               IN   ozf_excl_rec_type
     )
IS
    l_api_name                  CONSTANT VARCHAR2(30) := 'Update_Product_Exclusion';
Line: 6141

    SELECT * FROM ozf_offer_discount_products
    WHERE off_discount_product_id = p_off_discount_product_id;
Line: 6147

      SAVEPOINT Update_Product_Exclusion_PVT;
Line: 6180

 p_token_value  => 'Last_Update_Date') ;
Line: 6203

Update_Product
(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,

    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,
    p_ozf_prod_rec              => l_ozf_prod_rec
);
Line: 6223

     ROLLBACK TO Update_Product_Exclusion_PVT;
Line: 6233

     ROLLBACK TO Update_Product_Exclusion_PVT;
Line: 6243

     ROLLBACK TO Update_Product_Exclusion_PVT;
Line: 6256

END Update_Product_Exclusion;
Line: 6265

SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
Line: 6270

SELECT 1 FROM dual WHERE EXISTS
    (
    SELECT 1 FROM OZF_OFFER_DISCOUNT_LINES
    WHERE offer_discount_line_id = p_offer_discount_line_id
    AND tier_type = 'PBH'
    );
Line: 6345

    SELECT tier_level FROM ozf_offers
    where offer_id = p_offer_id;
Line: 6371

SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
Line: 6520

    SELECT * FROM ozf_offer_discount_lines
    WHERE offer_discount_line_id = p_offer_discount_line_id;
Line: 6641

PROCEDURE Update_Disc_Tiers(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_tier_rec               IN   ozf_offer_tier_rec_type
)
IS
    l_api_name                  CONSTANT VARCHAR2(30) := 'Create_Disc_tiers';
Line: 6661

    SELECT * FROM ozf_offer_discount_lines
    WHERE offer_discount_line_id = p_offer_discount_line_id;
Line: 6703

                                p_validation_mode => JTF_PLSQL_API.g_update,
                                x_return_status	   => x_return_status
                                );
Line: 6711

                    p_validation_mode => JTF_PLSQL_API.g_update,
                    x_return_status	  => x_return_status
                  );
Line: 6721

        Update_Ozf_Disc_Line(
            p_api_version_number => p_api_version_number,
            p_init_msg_list => p_init_msg_list,
            p_commit => p_commit,
            p_validation_level => p_validation_level,
            x_return_status    => x_return_status,
            x_msg_count        => x_msg_count,
            x_msg_data         => x_msg_data,
            p_ozf_offer_line_rec =>l_disc_rec
             );
Line: 6774

END Update_Disc_tiers;
Line: 6776

PROCEDURE Delete_Disc_tiers(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_parent_discount_line_id     IN NUMBER
)
IS
    l_api_name                  CONSTANT VARCHAR2(30) := 'Delete_Disc_tiers';
Line: 6795

    SELECT * FROM ozf_offer_discount_lines
    WHERE offer_discount_line_id = p_offer_discount_line_id;
Line: 6801

      SAVEPOINT Delete_Disc_tiers_PVT;
Line: 6836

    OZF_DISC_LINE_PKG.delete_tiers(p_parent_discount_line_id);
Line: 6840

     ROLLBACK TO Delete_Disc_tiers_PVT;
Line: 6850

     ROLLBACK TO Delete_Disc_tiers_PVT;
Line: 6860

     ROLLBACK TO Delete_Disc_tiers_PVT;
Line: 6873

END Delete_Disc_tiers;
Line: 6911

PROCEDURE Delete_Tier_line(
    p_api_version_number         IN   NUMBER,
    p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
    p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
    p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,

    x_return_status              OUT NOCOPY  VARCHAR2,
    x_msg_count                  OUT NOCOPY  NUMBER,
    x_msg_data                   OUT NOCOPY  VARCHAR2,

    p_offer_discount_line_id     IN NUMBER,
    p_object_version_number      IN NUMBER
)
IS
l_api_name                  CONSTANT VARCHAR2(30) := 'Delete_tier_line';
Line: 6931

SELECT tier_level FROM ozf_offers where offer_id =
    (SELECT offer_id FROM ozf_offer_discount_lines
        WHERE offer_discount_line_id = p_offer_discount_line_id );
Line: 6938

      SAVEPOINT Delete_tier_line_Pvt;
Line: 6978

delete_Ozf_Disc_Line
(
    p_api_version_number         => p_api_version_number,
    p_init_msg_list              => p_init_msg_list,
    p_commit                     => p_commit,
    p_validation_level           => p_validation_level,
    x_return_status              => x_return_status,
    x_msg_count                  => x_msg_count,
    x_msg_data                   => x_msg_data,
    p_offer_discount_line_id     => p_offer_discount_line_id,
    p_object_version_number      => p_object_version_number
    );
Line: 7013

     ROLLBACK TO Delete_tier_line_pvt;
Line: 7023

     ROLLBACK TO Delete_tier_line_pvt;
Line: 7033

     ROLLBACK TO Delete_tier_line_pvt;
Line: 7045

END Delete_Tier_line;