The following lines contain the word 'select', 'insert', 'update' or 'delete':
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;
select tier_level FROM ozf_offers where offer_id = p_offer_id;
SELECT transaction_currency_code
FROM ozf_offers
WHERE offer_id = cp_offerId;
SELECT *
FROM ozf_offer_discount_lines
WHERE offer_discount_line_id = p_ozf_offer_line_rec.offer_discount_line_id;
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;
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;
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;
SELECT ozf_offer_discount_lines_s.NEXTVAL
FROM dual;
SELECT 1
FROM OZF_OFFER_DISCOUNT_LINES
WHERE offer_discount_line_id = l_id;
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
);
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;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Ozf_Disc_Line';
SAVEPOINT update_ozf_disc_line_pvt;
OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'Ozf_Disc_Line') ;
p_token_value => 'Last_Update_Date') ;
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);
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
);
ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
ROLLBACK TO UPDATE_Ozf_Disc_Line_PVT;
End Update_Ozf_Disc_Line;
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';
SAVEPOINT delete_ozf_disc_line_pvt;
OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
OZF_DISC_LINE_PKG.Delete_Row(
p_offer_discount_line_id => p_offer_discount_line_id,
p_object_version_number => p_object_version_number );
ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
ROLLBACK TO DELETE_Ozf_Disc_Line_PVT;
End Delete_Ozf_Disc_Line;
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 ;
SELECT *
FROM ozf_offer_discount_products
WHERE off_discount_product_id = p_ozf_prod_rec.off_discount_product_id;
IF p_ozf_prod_rec.last_update_date IS NULL THEN
x_complete_rec.last_update_date := l_ozf_prod_rec.last_update_date;
IF p_ozf_prod_rec.last_updated_by IS NULL THEN
x_complete_rec.last_updated_by := l_ozf_prod_rec.last_updated_by;
IF p_ozf_prod_rec.last_update_login IS NULL THEN
x_complete_rec.last_update_login := l_ozf_prod_rec.last_update_login;
SELECT ozf_offer_discount_products_s.NEXTVAL
FROM dual;
SELECT 1
FROM OZF_OFFER_DISCOUNT_PRODUCTS
WHERE off_discount_product_id = l_id;
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
);
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;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Ozf_Prod_Line';
SAVEPOINT Update_Ozf_Prod_Line_pvt;
OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'Create_Ozf_Prod_Line') ;
p_token_value => 'Last_Update_Date') ;
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);
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
);
ROLLBACK TO Update_Ozf_Prod_Line_PVT;
ROLLBACK TO Update_Ozf_Prod_Line_PVT;
ROLLBACK TO Update_Ozf_Prod_Line_PVT;
End Update_Ozf_Prod_Line;
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;
L_API_NAME CONSTANT VARCHAR2(30) := 'DELETE_EXCLUSIONS';
SAVEPOINT Delete_Exclusions_sp;
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);
ROLLBACK TO Delete_Exclusions_sp;
ROLLBACK TO Delete_Exclusions_sp;
ROLLBACK TO Delete_Exclusions_sp;
END DELETE_EXCLUSIONS;
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';
select offer_id FROM ozf_offer_discount_products where off_discount_product_id = p_off_discount_product_id;
SAVEPOINT Delete_Ozf_Prod_Line_pvt;
OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
IF is_delete_valid(l_offer_id) = 'N' THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_OFFR_CANT_DELETE_LINE');
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
);
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 );
ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
ROLLBACK TO Delete_Ozf_Prod_Line_PVT;
End Delete_Ozf_Prod_Line;
SELECT *
FROM ozf_discount_product_reln
WHERE discount_product_reln_id = p_prod_reln_rec.discount_product_reln_id;
IF p_prod_reln_rec.last_update_date IS NULL THEN
x_complete_rec.last_update_date := l_prod_reln_rec.last_update_date;
IF p_prod_reln_rec.last_updated_by IS NULL THEN
x_complete_rec.last_updated_by := l_prod_reln_rec.last_updated_by;
IF p_prod_reln_rec.last_update_login IS NULL THEN
x_complete_rec.last_update_login := l_prod_reln_rec.last_update_login;
SELECT ozf_discount_product_reln_s.NEXTVAL
FROM dual;
SELECT 1
FROM OZF_DISCOUNT_PRODUCT_RELN
WHERE discount_product_reln_id = l_id;
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
);
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;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Prod_Reln';
SAVEPOINT update_prod_reln_pvt;
OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select');
OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'Prod_Reln') ;
p_token_value => 'Last_Update_Date') ;
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);
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
);
ROLLBACK TO UPDATE_Prod_Reln_PVT;
ROLLBACK TO UPDATE_Prod_Reln_PVT;
ROLLBACK TO UPDATE_Prod_Reln_PVT;
End Update_Prod_Reln;
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';
SAVEPOINT delete_prod_reln_pvt;
OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
Ozf_Prod_Reln_Pkg.Delete_Row(
p_discount_product_reln_id => p_discount_product_reln_id,
p_object_version_number => p_object_version_number );
ROLLBACK TO DELETE_Prod_Reln_PVT;
ROLLBACK TO DELETE_Prod_Reln_PVT;
ROLLBACK TO DELETE_Prod_Reln_PVT;
End Delete_Prod_Reln;
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
);
SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
p_discount_rec.last_update_date := p_offer_rec.last_update_date;
p_discount_rec.last_updated_by := p_offer_rec.last_updated_by;
p_discount_rec.last_update_login := p_offer_rec.last_update_login;
SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
p_product_rec.last_update_date := p_offer_rec.last_update_date ;
p_product_rec.last_updated_by := p_offer_rec.last_updated_by ;
p_product_rec.last_update_login := p_offer_rec.last_update_login ;
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';
SAVEPOINT Update_offer_line_pvt;
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
);
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
);
ROLLBACK TO Update_offer_line_pvt;
ROLLBACK TO Update_offer_line_pvt;
ROLLBACK TO Update_offer_line_pvt;
END Update_offer_line;
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';
SELECT *
FROM OZF_OFFER_DISCOUNT_LINES
WHERE offer_discount_line_id = p_ozf_offer_line_rec.offer_discount_line_id;
SAVEPOINT Update_discount_line_pvt;
p_token_value => 'Last_Update_Date') ;
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
);
ROLLBACK TO Update_discount_line_pvt;
ROLLBACK TO Update_discount_line_pvt;
ROLLBACK TO Update_discount_line_pvt;
p_ozf_offer_line_rec.last_update_date := FND_API.G_MISS_DATE;
p_ozf_offer_line_rec.last_updated_by := FND_API.G_MISS_NUM;
p_ozf_offer_line_rec.last_update_login := FND_API.G_MISS_NUM;
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';
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;
SELECT offer_discount_line_id FROM ozf_offer_discount_products
WHERE off_discount_product_id = p_off_discount_product_id;
SAVEPOINT Update_product_Pvt;
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
);
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
);
ROLLBACK TO Update_product_Pvt;
ROLLBACK TO Update_product_Pvt;
ROLLBACK TO Update_product_Pvt;
END Update_Product;
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';
SAVEPOINT Delete_Relation_Pvt;
Ozf_Prod_Reln_Pkg.Delete(
p_offer_discount_line_id => p_offer_discount_line_id
);
ROLLBACK TO Delete_Relation_Pvt;
ROLLBACK TO Delete_Relation_Pvt;
ROLLBACK TO Delete_Relation_Pvt;
END Delete_Relation;
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';
SAVEPOINT Delete_Product_Pvt;
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
);
OZF_Create_Ozf_Prod_Line_PKG.Delete_product(p_offer_discount_line_id => p_offer_discount_line_id);
ROLLBACK TO Delete_Product_Pvt;
ROLLBACK TO Delete_Product_Pvt;
ROLLBACK TO Delete_Product_Pvt;
END Delete_Product;
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';
SELECT * FROM ozf_offer_discount_lines
WHERE offer_discount_line_id = p_offer_discount_line_id;
select offer_id FROM ozf_offer_discount_lines where offer_discount_line_id = p_offer_discount_line_id;
SAVEPOINT Delete_offer_line_Pvt;
IF is_delete_valid(l_offer_id) = 'N' THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_OFFR_CANT_DELETE_LINE');
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
);
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
);
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
);
ROLLBACK TO Delete_offer_line_pvt;
ROLLBACK TO Delete_offer_line_pvt;
ROLLBACK TO Delete_offer_line_pvt;
END Delete_offer_line;
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'
);
SELECT *
FROM ozf_offer_discount_products
WHERE off_discount_product_id = p_off_discount_product_id;
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';
SELECT * FROM ozf_offer_discount_products
WHERE off_discount_product_id = p_off_discount_product_id;
SAVEPOINT Update_Product_Exclusion_PVT;
p_token_value => 'Last_Update_Date') ;
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
);
ROLLBACK TO Update_Product_Exclusion_PVT;
ROLLBACK TO Update_Product_Exclusion_PVT;
ROLLBACK TO Update_Product_Exclusion_PVT;
END Update_Product_Exclusion;
SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
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'
);
SELECT tier_level FROM ozf_offers
where offer_id = p_offer_id;
SELECT tier_level FROM ozf_offers
WHERE offer_id = p_offer_id;
SELECT * FROM ozf_offer_discount_lines
WHERE offer_discount_line_id = p_offer_discount_line_id;
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';
SELECT * FROM ozf_offer_discount_lines
WHERE offer_discount_line_id = p_offer_discount_line_id;
p_validation_mode => JTF_PLSQL_API.g_update,
x_return_status => x_return_status
);
p_validation_mode => JTF_PLSQL_API.g_update,
x_return_status => x_return_status
);
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
);
END Update_Disc_tiers;
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';
SELECT * FROM ozf_offer_discount_lines
WHERE offer_discount_line_id = p_offer_discount_line_id;
SAVEPOINT Delete_Disc_tiers_PVT;
OZF_DISC_LINE_PKG.delete_tiers(p_parent_discount_line_id);
ROLLBACK TO Delete_Disc_tiers_PVT;
ROLLBACK TO Delete_Disc_tiers_PVT;
ROLLBACK TO Delete_Disc_tiers_PVT;
END Delete_Disc_tiers;
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';
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 );
SAVEPOINT Delete_tier_line_Pvt;
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
);
ROLLBACK TO Delete_tier_line_pvt;
ROLLBACK TO Delete_tier_line_pvt;
ROLLBACK TO Delete_tier_line_pvt;
END Delete_Tier_line;