The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT order_value_discount_type
FROM ozf_offers
WHERE qp_list_header_id = p_list_header_id;
SELECT discount , discount_type_code , uom_code , volume_type , tier_value_from , active,tier_value_to FROM ozf_volume_offer_tiers
WHERE qp_list_header_id = p_list_header_id
AND tier_value_from = (SELECT min(tier_value_from) FROM ozf_volume_offer_tiers WHERE qp_list_header_id = p_list_header_id ) ;
SELECT offer_type
FROM ozf_offers
WHERE qp_list_header_id = p_list_header_id;
SELECT arithmetic_operator,operand,list_line_type_code FROM qp_list_lines
WHERE list_line_id = p_list_line_id;
p_offadj_line_rec.last_update_date := sysdate;
p_offadj_line_rec.last_updated_by := 1;
p_offadj_line_rec.last_update_login := 1;
SELECT ozf_offer_adjustment_lines_s.NEXTVAL
FROM dual;
SELECT 1
FROM ozf_OFFER_ADJUSTMENT_LINES
WHERE offer_adjustment_line_id = l_id;
Ozf_Offer_Adj_Line_Pkg.Insert_Row(
px_offer_adjustment_line_id => l_offer_adjustment_line_id,
p_offer_adjustment_id => p_offadj_line_rec.offer_adjustment_id,
p_list_line_id => p_offadj_line_rec.list_line_id,
p_arithmetic_operator => p_offadj_line_rec.arithmetic_operator,
p_original_discount => p_offadj_line_rec.original_discount,
p_modified_discount => p_offadj_line_rec.modified_discount,
p_last_update_date => SYSDATE,
p_last_updated_by => FND_GLOBAL.USER_ID,
p_creation_date => SYSDATE,
p_created_by => FND_GLOBAL.USER_ID,
p_last_update_login => FND_GLOBAL.conc_login_id,
px_object_version_number => l_object_version_number,
p_list_header_id => p_offadj_line_rec.list_header_id,
p_accrual_flag => p_offadj_line_rec.accrual_flag,
p_list_line_id_td => p_offadj_line_rec.list_line_id_td,
p_original_discount_td => p_offadj_line_rec.original_discount_td,
p_modified_discount_td => p_offadj_line_rec.modified_discount_td,
p_quantity => p_offadj_line_rec.quantity,
p_created_from_adjustments => p_offadj_line_rec.created_from_adjustments,
p_discount_end_date => p_offadj_line_rec.discount_end_date
);
SELECT offer_type
FROM ozf_offers
WHERE qp_list_header_id = p_list_header_id;
SELECT order_value_discount_type
FROM ozf_offers
WHERE qp_list_header_id = p_list_header_id;
PROCEDURE Update_Offer_Adj_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_offadj_line_rec IN offadj_line_rec_type,
x_object_version_number OUT NOCOPY NUMBER
)
IS
CURSOR c_get_offer_adj_line(offer_adjustment_line_id NUMBER) IS
SELECT *
FROM ozf_OFFER_ADJUSTMENT_LINES
WHERE offer_adjustment_line_id = p_offadj_line_rec.offer_adjustment_line_id;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Offer_Adj_Line';
SAVEPOINT update_offer_adj_line_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 => 'Offer_Adj_Line') ;
p_token_value => 'Last_Update_Date') ;
p_validation_mode => JTF_PLSQL_API.g_update,
p_offadj_line_rec => p_offadj_line_rec,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
debug_message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW || 'Private API: Calling update table handler');
debug_message('b4 update off inv discount='||p_offadj_line_rec.modified_discount);
debug_message('b4 update off acc discount='||p_offadj_line_rec.modified_discount_td);
Ozf_Offer_Adj_Line_Pkg.Update_Row(
p_offer_adjustment_line_id => p_offadj_line_rec.offer_adjustment_line_id,
p_offer_adjustment_id => p_offadj_line_rec.offer_adjustment_id,
p_list_line_id => p_offadj_line_rec.list_line_id,
p_arithmetic_operator => p_offadj_line_rec.arithmetic_operator,
p_original_discount => p_offadj_line_rec.original_discount,
p_modified_discount => p_offadj_line_rec.modified_discount,
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_list_header_id => p_offadj_line_rec.list_header_id,
p_accrual_flag => p_offadj_line_rec.accrual_flag,
p_list_line_id_td => p_offadj_line_rec.list_line_id_td,
p_original_discount_td => p_offadj_line_rec.original_discount_td,
p_modified_discount_td => p_offadj_line_rec.modified_discount_td,
p_quantity => p_offadj_line_rec.quantity,
p_created_from_adjustments => p_offadj_line_rec.created_from_adjustments,
p_discount_end_date => p_offadj_line_rec.discount_end_date
);
ROLLBACK TO UPDATE_Offer_Adj_Line_PVT;
ROLLBACK TO UPDATE_Offer_Adj_Line_PVT;
ROLLBACK TO UPDATE_Offer_Adj_Line_PVT;
End Update_Offer_Adj_Line;
PROCEDURE Update_New_Offer_Adj_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_offadj_line_rec IN offadj_line_rec_type,
p_list_line_rec IN offadj_new_line_rec_type,
x_object_version_number OUT NOCOPY NUMBER
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'Update_New_Offer_Adj_Line';
SELECT offer_type
FROM ozf_offers
WHERE qp_list_header_id = p_list_header_id;
SAVEPOINT update_new_offer_adj_line_pvt;
l_modifier_line_tbl(i).operation := 'UPDATE';
Update qp_list_lines with the entered information
*/
-- flipping automatic flag to active coz the update does not go thru, if the automatic fLAG is N
--update qp_list_lines set automatic_flag = 'Y' where list_line_id = p_list_line_rec.list_line_id;
update adjustment_lines with entered information
*/
-- initialize update recird
--==========================================================================
-- populate adjustment record
--==========================================================================
l_offadj_line_rec.list_line_id := p_list_line_rec.list_line_id;
Update_Offer_Adj_Line(
p_api_version_number => 1.0 ,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_FALSE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_offadj_line_rec =>l_offadj_line_rec,
x_object_version_number => l_object_version_number
);
debug_message('Updated adjustment line id is '||l_offer_adjustment_line_id);
ROLLBACK TO Update_new_Offer_Adj_Line_PVT;
ROLLBACK TO Update_New_Offer_Adj_Line_PVT;
ROLLBACK TO Update_New_Offer_Adj_Line_PVT;
PROCEDURE Delete_Offer_Adj_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_adjustment_line_id IN NUMBER,
p_object_version_number IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_Offer_Adj_Line';
SAVEPOINT delete_offer_adj_line_pvt;
debug_message( 'Private API: Calling delete table handler');
Ozf_Offer_Adj_Line_Pkg.Delete_Row(
p_offer_adjustment_line_id => p_offer_adjustment_line_id,
p_object_version_number => p_object_version_number );
ROLLBACK TO DELETE_Offer_Adj_Line_PVT;
ROLLBACK TO DELETE_Offer_Adj_Line_PVT;
ROLLBACK TO DELETE_Offer_Adj_Line_PVT;
End Delete_Offer_Adj_Line;
SELECT offer_type from ozf_offers where qp_list_header_id = p_list_header_id;
select list_line_type_code from qp_list_lines where list_line_id = p_list_line_id;
SELECT *
FROM ozf_offer_adjustment_lines
WHERE offer_adjustment_line_id = p_offadj_line_rec.offer_adjustment_line_id and offer_adjustment_id = p_offadj_line_rec.offer_adjustment_id;
IF p_offadj_line_rec.last_update_date IS NULL THEN
x_complete_rec.last_update_date := l_offadj_line_rec.last_update_date;
IF p_offadj_line_rec.last_updated_by IS NULL THEN
x_complete_rec.last_updated_by := l_offadj_line_rec.last_updated_by;
IF p_offadj_line_rec.last_update_login IS NULL THEN
x_complete_rec.last_update_login := l_offadj_line_rec.last_update_login;
x_offadj_line_rec.last_update_date := p_offadj_line_rec.last_update_date;
x_offadj_line_rec.last_updated_by := p_offadj_line_rec.last_updated_by;
x_offadj_line_rec.last_update_login := p_offadj_line_rec.last_update_login;
SELECT name FROM qp_list_headers_vl
WHERE list_header_id = (SELECT list_header_id FROM qp_list_lines WHERE list_line_id = p_list_line_id);