The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT MIN(start_date_active) FROM ozf_funds_all_b
WHERE fund_id IN ( SELECT budget_source_id FROM ozf_act_budgets where arc_act_budget_used_by = 'OFFR' and act_budget_used_by_id = p_qp_list_header_id);
SELECT nvl(budget_offer_yn,'N')
FROM ozf_offers
WHERE qp_list_header_id = cp_listHeaderId;
SELECT ozf_offer_adjustments_b_s.NEXTVAL
FROM dual;
SELECT 1
FROM OZF_OFFER_ADJUSTMENTS_B
WHERE offer_adjustment_id = l_id;
OZF_Offer_Adjustment_Pkg.Insert_Row(
px_offer_adjustment_id => l_offer_adjustment_id,
p_effective_date => p_offer_adj_rec.effective_date,
p_approved_date => p_offer_adj_rec.approved_date,
p_settlement_code => p_offer_adj_rec.settlement_code,
p_status_code => p_offer_adj_rec.status_code,
p_list_header_id => p_offer_adj_rec.list_header_id,
p_version => p_offer_adj_rec.version,
p_budget_adjusted_flag => p_offer_adj_rec.budget_adjusted_flag,
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_attribute1 => p_offer_adj_rec.attribute1,
p_attribute2 => p_offer_adj_rec.attribute2,
p_attribute3 => p_offer_adj_rec.attribute3,
p_attribute4 => p_offer_adj_rec.attribute4,
p_attribute5 => p_offer_adj_rec.attribute5,
p_attribute6 => p_offer_adj_rec.attribute6,
p_attribute7 => p_offer_adj_rec.attribute7,
p_attribute8 => p_offer_adj_rec.attribute8,
p_attribute9 => p_offer_adj_rec.attribute9,
p_attribute10 => p_offer_adj_rec.attribute10,
p_attribute11 => p_offer_adj_rec.attribute11,
p_attribute12 => p_offer_adj_rec.attribute12,
p_attribute13 => p_offer_adj_rec.attribute13,
p_attribute14 => p_offer_adj_rec.attribute14,
p_attribute15 => p_offer_adj_rec.attribute15
,p_offer_adjustment_name => p_offer_adj_rec.offer_adjustment_name,
p_description => p_offer_adj_rec.description
);
PROCEDURE Update_Offer_Adjustment(
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_adj_rec IN offer_adj_rec_type,
x_object_version_number OUT NOCOPY NUMBER
)
IS
CURSOR c_get_offer_adjustment(offer_adjustment_id NUMBER) IS
SELECT *
FROM OZF_OFFER_ADJUSTMENTS_B
WHERE offer_adjustment_id = p_offer_adj_rec.offer_adjustment_id;
select 1
from ozf_offer_adjustment_lines
where offer_adjustment_id = p_offer_adjustment_id
union
select 1
from ozf_offer_adjustment_tiers
where offer_adjustment_id= p_offer_adjustment_id
union
SELECT 1
FROM ozf_offer_adj_new_lines
WHERE offer_adjustment_id = p_offer_adjustment_id
UNION
SELECT 1
FROM ozf_offer_adjustment_products
WHERE offer_adjustment_id = p_offer_adjustment_id;
SELECT status_code
FROM ozf_offer_adjustments_b
WHERE offer_adjustment_id = p_offer_adjustment_id ;
SELECT custom_setup_id ,NVL(budget_offer_yn, 'N')
FROM ozf_offers
WHERE qp_list_header_id=p_list_header_id;
SELECT attr_available_flag
FROM ams_custom_setup_attr
WHERE custom_setup_id = p_custom_setup_id
AND object_attribute = 'ADJA';
SELECT 1
FROM OZF_OFFER_ADJUSTMENTS_VL
WHERE (p_effective_date
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Offer_Adjustment';
SAVEPOINT update_offer_adjustment_pvt;
OZF_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_Adjustment') ;
p_token_value => 'Last_Update_Date') ;
p_validation_mode => JTF_PLSQL_API.g_update,
p_offer_adj_rec => p_offer_adj_rec,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
OZF_Offer_Backdate_PVT.Update_Offer_Discounts (
p_init_msg_list => FND_API.G_FALSE
,p_api_version => 1.0
,p_commit => FND_API.G_FALSE
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
,p_offer_adjustment_id => p_offer_adj_rec.offer_adjustment_id
-- ,p_close_adj => 'Y'
) ;
OZF_Offer_Adj_Line_PVT.debug_message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW||'Private API: Calling update table handler');
OZF_Offer_Adjustment_Pkg.Update_Row(
p_offer_adjustment_id => p_offer_adj_rec.offer_adjustment_id,
p_effective_date => p_offer_adj_rec.effective_date,
p_approved_date => l_approve_date,--p_offer_adj_rec.approved_date,
p_settlement_code => p_offer_adj_rec.settlement_code,
p_status_code => l_new_status_code, -- p_offer_adj_rec.status_code,
p_list_header_id => p_offer_adj_rec.list_header_id,
p_version => p_offer_adj_rec.version,
p_budget_adjusted_flag => l_budgetAdjFlag,
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_attribute1 => p_offer_adj_rec.attribute1,
p_attribute2 => p_offer_adj_rec.attribute2,
p_attribute3 => p_offer_adj_rec.attribute3,
p_attribute4 => p_offer_adj_rec.attribute4,
p_attribute5 => p_offer_adj_rec.attribute5,
p_attribute6 => p_offer_adj_rec.attribute6,
p_attribute7 => p_offer_adj_rec.attribute7,
p_attribute8 => p_offer_adj_rec.attribute8,
p_attribute9 => p_offer_adj_rec.attribute9,
p_attribute10 => p_offer_adj_rec.attribute10,
p_attribute11 => p_offer_adj_rec.attribute11,
p_attribute12 => p_offer_adj_rec.attribute12,
p_attribute13 => p_offer_adj_rec.attribute13,
p_attribute14 => p_offer_adj_rec.attribute14,
p_attribute15 => p_offer_adj_rec.attribute15
,p_offer_adjustment_name => p_offer_adj_rec.offer_adjustment_name,
p_description => p_offer_adj_rec.description
);
ROLLBACK TO UPDATE_Offer_Adjustment_PVT;
ROLLBACK TO UPDATE_Offer_Adjustment_PVT;
ROLLBACK TO UPDATE_Offer_Adjustment_PVT;
End Update_Offer_Adjustment;
PROCEDURE Delete_Offer_Adjustment(
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_id IN NUMBER,
p_object_version_number IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_Offer_Adjustment';
SAVEPOINT delete_offer_adjustment_pvt;
OZF_Offer_Adj_Line_PVT.debug_message( 'Private API: Calling delete table handler');
OZF_Offer_Adjustment_Pkg.Delete_Row(
p_offer_adjustment_id => p_offer_adjustment_id,
p_object_version_number => p_object_version_number );
ROLLBACK TO DELETE_Offer_Adjustment_PVT;
ROLLBACK TO DELETE_Offer_Adjustment_PVT;
ROLLBACK TO DELETE_Offer_Adjustment_PVT;
End Delete_Offer_Adjustment;
SELECT 1
FROM OZF_OFFER_ADJUSTMENTS_B
WHERE list_header_id = l_objid
AND effective_date = l_effdt
AND status_code NOT IN ('CANCELLED' ,'CLOSED');
CURSOR c_adj_exists_onupdate (l_objid IN NUMBER, l_adjid IN NUMBER, l_effdt IN DATE) IS
SELECT 1
FROM OZF_OFFER_ADJUSTMENTS_B
WHERE list_header_id = l_objid
AND offer_adjustment_id <> l_adjid
AND effective_date = l_effdt
AND status_code NOT IN ('CANCELLED' ,'CLOSED');
SELECT 1 from ozf_offer_adjustments_vl
WHERE offer_adjustment_name = p_offer_adj_rec.offer_adjustment_name
AND list_header_id = p_offer_adj_rec.list_header_id;
CURSOR c_check_uniqeness_update
IS
SELECT 1 from ozf_offer_adjustments_vl
WHERE offer_adjustment_name = p_offer_adj_rec.offer_adjustment_name
AND list_header_id = p_offer_adj_rec.list_header_id
AND offer_adjustment_id <> p_offer_adj_rec.offer_adjustment_id;
OPEN c_check_uniqeness_update;
FETCH c_check_uniqeness_update INTO l_valid_flag;
CLOSE c_check_uniqeness_update;
OPEN c_adj_exists_onupdate(p_offer_adj_rec.list_header_id, p_offer_adj_rec.offer_adjustment_id, p_offer_adj_rec.effective_date);
FETCH c_adj_exists_onupdate INTO l_dup_effective_dt ;
CLOSE c_adj_exists_onupdate;
SELECT *
FROM ozf_offer_adjustments_b
WHERE offer_adjustment_id = p_offer_adj_rec.offer_adjustment_id;
IF p_offer_adj_rec.last_update_date IS NULL THEN
x_complete_rec.last_update_date := l_offer_adj_rec.last_update_date;
IF p_offer_adj_rec.last_updated_by IS NULL THEN
x_complete_rec.last_updated_by := l_offer_adj_rec.last_updated_by;
IF p_offer_adj_rec.last_update_login IS NULL THEN
x_complete_rec.last_update_login := l_offer_adj_rec.last_update_login;