DBA Data[Home] [Help]

APPS.OZF_DISC_LINE_PVT SQL Statements

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

Line: 70

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: 231

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

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

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

   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: 685

   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: 690

   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: 962

      SELECT ozf_offer_discount_lines_s.NEXTVAL
      FROM dual;
Line: 966

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

      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: 1201

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: 1224

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

      SAVEPOINT update_ozf_disc_line_pvt;
Line: 1264

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

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

 p_token_value  => 'Last_Update_Date') ;
Line: 1304

            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: 1318

      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: 1391

     ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
Line: 1401

     ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
Line: 1411

     ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
Line: 1423

End Update_Ozf_Disc_Line;
Line: 1460

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: 1479

      SAVEPOINT delete_ozf_disc_line_pvt;
Line: 1511

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

      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: 1544

     ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
Line: 1554

     ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
Line: 1564

     ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
Line: 1576

End Delete_Ozf_Disc_Line;
Line: 1721

    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: 1986

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

   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: 2059

   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: 2064

   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: 2324

      SELECT ozf_offer_discount_products_s.NEXTVAL
      FROM dual;
Line: 2328

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

      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: 2541

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: 2564

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

      SAVEPOINT Update_Ozf_Prod_Line_pvt;
Line: 2604

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

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

 p_token_value  => 'Last_Update_Date') ;
Line: 2647

            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: 2663

      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: 2706

     ROLLBACK TO Update_Ozf_Prod_Line_PVT;
Line: 2716

     ROLLBACK TO Update_Ozf_Prod_Line_PVT;
Line: 2726

     ROLLBACK TO Update_Ozf_Prod_Line_PVT;
Line: 2738

End Update_Ozf_Prod_Line;
Line: 2745

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: 2758

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

SAVEPOINT Delete_Exclusions_sp;
Line: 2768

    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: 2775

     ROLLBACK TO Delete_Exclusions_sp;
Line: 2785

     ROLLBACK TO Delete_Exclusions_sp;
Line: 2795

     ROLLBACK TO Delete_Exclusions_sp;
Line: 2808

END DELETE_EXCLUSIONS;
Line: 2845

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: 2863

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

      SAVEPOINT Delete_Ozf_Prod_Line_pvt;
Line: 2900

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

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

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: 2923

      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: 2953

     ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
Line: 2963

     ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
Line: 2973

     ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
Line: 2985

End Delete_Ozf_Prod_Line;
Line: 3312

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

   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: 3355

   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: 3360

   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: 3627

      SELECT ozf_discount_product_reln_s.NEXTVAL
      FROM dual;
Line: 3631

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

      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: 3833

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: 3856

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

      SAVEPOINT update_prod_reln_pvt;
Line: 3896

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

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

 p_token_value  => 'Last_Update_Date') ;
Line: 3939

            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: 3955

      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: 3991

     ROLLBACK TO UPDATE_Prod_Reln_PVT;
Line: 4001

     ROLLBACK TO UPDATE_Prod_Reln_PVT;
Line: 4011

     ROLLBACK TO UPDATE_Prod_Reln_PVT;
Line: 4023

End Update_Prod_Reln;
Line: 4060

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: 4079

      SAVEPOINT delete_prod_reln_pvt;
Line: 4111

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

      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: 4144

     ROLLBACK TO DELETE_Prod_Reln_PVT;
Line: 4154

     ROLLBACK TO DELETE_Prod_Reln_PVT;
Line: 4164

     ROLLBACK TO DELETE_Prod_Reln_PVT;
Line: 4176

End Delete_Prod_Reln;
Line: 4189

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: 4584

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

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

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

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

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

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

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

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

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: 4874

      SAVEPOINT Update_offer_line_pvt;
Line: 4899

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: 4918

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: 4952

     ROLLBACK TO Update_offer_line_pvt;
Line: 4962

     ROLLBACK TO Update_offer_line_pvt;
Line: 4972

     ROLLBACK TO Update_offer_line_pvt;
Line: 4985

END Update_offer_line;
Line: 4987

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: 5013

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

      SAVEPOINT Update_discount_line_pvt;
Line: 5057

 p_token_value  => 'Last_Update_Date') ;
Line: 5074

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: 5113

     ROLLBACK TO Update_discount_line_pvt;
Line: 5123

     ROLLBACK TO Update_discount_line_pvt;
Line: 5133

     ROLLBACK TO Update_discount_line_pvt;
Line: 5172

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

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

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

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: 5237

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: 5244

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

      SAVEPOINT Update_product_Pvt;
Line: 5273

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: 5304

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: 5337

     ROLLBACK TO Update_product_Pvt;
Line: 5347

     ROLLBACK TO Update_product_Pvt;
Line: 5357

     ROLLBACK TO Update_product_Pvt;
Line: 5370

END Update_Product;
Line: 5406

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: 5424

      SAVEPOINT Delete_Relation_Pvt;
Line: 5450

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

     ROLLBACK TO Delete_Relation_Pvt;
Line: 5483

     ROLLBACK TO Delete_Relation_Pvt;
Line: 5493

     ROLLBACK TO Delete_Relation_Pvt;
Line: 5505

    END Delete_Relation;
Line: 5539

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: 5563

      SAVEPOINT Delete_Product_Pvt;
Line: 5589

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: 5602

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

     ROLLBACK TO Delete_Product_Pvt;
Line: 5636

     ROLLBACK TO Delete_Product_Pvt;
Line: 5646

     ROLLBACK TO Delete_Product_Pvt;
Line: 5658

END Delete_Product;
Line: 5696

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: 5721

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

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

      SAVEPOINT Delete_offer_line_Pvt;
Line: 5760

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

    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: 5787

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: 5801

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: 5836

     ROLLBACK TO Delete_offer_line_pvt;
Line: 5846

     ROLLBACK TO Delete_offer_line_pvt;
Line: 5856

     ROLLBACK TO Delete_offer_line_pvt;
Line: 5868

END Delete_offer_line;
Line: 5879

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: 5965

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

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: 6122

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

      SAVEPOINT Update_Product_Exclusion_PVT;
Line: 6161

 p_token_value  => 'Last_Update_Date') ;
Line: 6184

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: 6204

     ROLLBACK TO Update_Product_Exclusion_PVT;
Line: 6214

     ROLLBACK TO Update_Product_Exclusion_PVT;
Line: 6224

     ROLLBACK TO Update_Product_Exclusion_PVT;
Line: 6237

END Update_Product_Exclusion;
Line: 6246

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

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: 6308

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

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

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

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: 6624

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

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

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

        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: 6737

END Update_Disc_tiers;
Line: 6739

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: 6758

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

      SAVEPOINT Delete_Disc_tiers_PVT;
Line: 6799

    OZF_DISC_LINE_PKG.delete_tiers(p_parent_discount_line_id);
Line: 6803

     ROLLBACK TO Delete_Disc_tiers_PVT;
Line: 6813

     ROLLBACK TO Delete_Disc_tiers_PVT;
Line: 6823

     ROLLBACK TO Delete_Disc_tiers_PVT;
Line: 6836

END Delete_Disc_tiers;
Line: 6874

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: 6894

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: 6901

      SAVEPOINT Delete_tier_line_Pvt;
Line: 6941

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: 6976

     ROLLBACK TO Delete_tier_line_pvt;
Line: 6986

     ROLLBACK TO Delete_tier_line_pvt;
Line: 6996

     ROLLBACK TO Delete_tier_line_pvt;
Line: 7008

END Delete_Tier_line;