The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT PV_LEAD_PSS_LINES_S.NEXTVAL
FROM DUAL;
SELECT 'X'
FROM pv_lead_pss_lines
WHERE lead_pss_line_id = cv_lead_pss_line_id;
PVX_Utility_PVT.debug_message(l_full_name ||': insert');
INSERT INTO PV_LEAD_PSS_LINES (
lead_pss_line_id
,last_update_date
,last_updated_by
,creation_date
,created_by
,last_update_login
,request_id
,program_application_id
,program_id
,program_update_date
,attr_code_id
,lead_id
,uom_code
,quantity
,amount
,attribute_category
,attribute1
,attribute2
,attribute3
,attribute4
,attribute5
,attribute6
,attribute7
,attribute8
,attribute9
,attribute10
,attribute11
,attribute12
,attribute13
,attribute14
,attribute15
,object_name
,object_version_number
,partner_id
,object_id
)
VALUES (
l_lead_pss_lines_rec.lead_pss_line_id
,SYSDATE -- LAST_UPDATE_DATE
,NVL(FND_GLOBAL.user_id,-1) -- LAST_UPDATED_BY
,SYSDATE -- CREATION_DATE
,NVL(FND_GLOBAL.user_id,-1) -- CREATED_BY
,NVL(FND_GLOBAL.conc_login_id,-1) -- LAST_UPDATE_LOGIN
, l_lead_pss_lines_rec.request_id
,l_lead_pss_lines_rec.program_application_id
,l_lead_pss_lines_rec.program_id
,l_lead_pss_lines_rec.program_update_date
,l_lead_pss_lines_rec.attr_code_id
,l_lead_pss_lines_rec.lead_id
,l_lead_pss_lines_rec.uom_code
,l_lead_pss_lines_rec.quantity
,l_lead_pss_lines_rec.amount
,l_lead_pss_lines_rec.attribute_category
,l_lead_pss_lines_rec.attribute1
,l_lead_pss_lines_rec.attribute2
,l_lead_pss_lines_rec.attribute3
,l_lead_pss_lines_rec.attribute4
,l_lead_pss_lines_rec.attribute5
,l_lead_pss_lines_rec.attribute6
,l_lead_pss_lines_rec.attribute7
,l_lead_pss_lines_rec.attribute8
,l_lead_pss_lines_rec.attribute9
,l_lead_pss_lines_rec.attribute10
,l_lead_pss_lines_rec.attribute11
,l_lead_pss_lines_rec.attribute12
,l_lead_pss_lines_rec.attribute13
,l_lead_pss_lines_rec.attribute14
,l_lead_pss_lines_rec.attribute15
,l_lead_pss_lines_rec.object_name
,l_object_version_number -- object_version_number
,l_lead_pss_lines_rec.partner_id
,l_lead_pss_lines_rec.object_id
);
PROCEDURE Delete_lead_pss_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
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
,p_lead_pss_line_id IN NUMBER
,p_object_version IN NUMBER
)
IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'Delete_lead_pss_line';
SAVEPOINT Delete_lead_pss_line;
PVX_Utility_PVT.debug_message(l_full_name ||': delete');
DELETE FROM PV_LEAD_PSS_LINES
WHERE lead_pss_line_id = p_lead_pss_line_id
AND object_version_number = p_object_version;
ROLLBACK TO Delete_lead_pss_line;
ROLLBACK TO Delete_lead_pss_line;
ROLLBACK TO Delete_lead_pss_line;
END Delete_lead_pss_line;
SELECT lead_pss_line_id
FROM pv_lead_pss_lines
WHERE lead_pss_line_id = p_lead_pss_line_id
AND object_version_number = p_object_version
FOR UPDATE OF lead_pss_line_id NOWAIT;
PROCEDURE Update_lead_pss_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_lead_pss_lines_rec IN lead_pss_lines_rec_type
)
IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'Update_lead_pss_line';
l_mode VARCHAR2(30) := 'UPDATE';
SAVEPOINT Update_lead_pss_line;
p_validation_mode => JTF_PLSQL_API.g_update,
x_return_status => l_return_status
);
PVX_Utility_PVT.debug_message(l_full_name ||': update');
UPDATE PV_LEAD_PSS_LINES SET
last_update_date = SYSDATE
,last_updated_by = NVL(FND_GLOBAL.user_id,-1)
,last_update_login = NVL(FND_GLOBAL.conc_login_id,-1)
,request_id = l_lead_pss_lines_rec.request_id
,program_application_id = l_lead_pss_lines_rec.program_application_id
,program_id = l_lead_pss_lines_rec.program_id
,program_update_date = l_lead_pss_lines_rec.program_update_date
,attr_code_id = l_lead_pss_lines_rec.attr_code_id
,lead_id = l_lead_pss_lines_rec.lead_id
,uom_code = l_lead_pss_lines_rec.uom_code
,quantity = l_lead_pss_lines_rec.quantity
,amount = l_lead_pss_lines_rec.amount
,attribute_category = l_lead_pss_lines_rec.attribute_category
,attrIbute1 = l_lead_pss_lines_rec.attribute1
,attribute2 = l_lead_pss_lines_rec.attribute2
,attribute3 = l_lead_pss_lines_rec.attribute3
,attribute4 = l_lead_pss_lines_rec.attribute4
,attribute5 = l_lead_pss_lines_rec.attribute5
,attribute6 = l_lead_pss_lines_rec.attribute6
,attribute7 = l_lead_pss_lines_rec.attribute7
,attribute8 = l_lead_pss_lines_rec.attribute8
,attribute9 = l_lead_pss_lines_rec.attribute9
,attribute10 = l_lead_pss_lines_rec.attribute10
,attribute11 = l_lead_pss_lines_rec.attribute11
,attribute12 = l_lead_pss_lines_rec.attribute12
,attribute13 = l_lead_pss_lines_rec.attribute13
,attribute14 = l_lead_pss_lines_rec.attribute14
,attribute15 = l_lead_pss_lines_rec.attribute15
,object_name = l_lead_pss_lines_rec.object_name
,object_version_number = l_lead_pss_lines_rec.object_version_number + 1
,partner_id = l_lead_pss_lines_rec.partner_id
,object_id = l_lead_pss_lines_rec.object_id
WHERE lead_pss_line_id = l_lead_pss_lines_rec.lead_pss_line_id
AND object_version_number = l_lead_pss_lines_rec.object_version_number;
ROLLBACK TO Update_lead_pss_line;
ROLLBACK TO Update_lead_pss_line;
ROLLBACK TO Update_lead_pss_line;
END Update_lead_pss_line;
,p_mode IN VARCHAR2 := 'INSERT'
,x_return_status OUT NOCOPY VARCHAR2
)
IS
BEGIN
x_return_status := FND_API.g_ret_sts_success;
x_lead_pss_lines_rec.last_update_date := FND_API.G_MISS_DATE;
x_lead_pss_lines_rec.last_updated_by := FND_API.G_MISS_NUM;
x_lead_pss_lines_rec.last_update_login := FND_API.G_MISS_NUM;
x_lead_pss_lines_rec.program_update_date := FND_API.G_MISS_DATE;
SELECT *
FROM PV_lead_pss_lines
WHERE lead_pss_line_id = p_lead_pss_lines_rec.lead_pss_line_id;
IF p_lead_pss_lines_rec.program_update_date = FND_API.G_MISS_DATE THEN
x_complete_rec.program_update_date := l_lead_pss_lines_rec.program_update_date;