The following lines contain the word 'select', 'insert', 'update' or 'delete':
csd_generic_errmsgs_pkg.insert_row
(px_generic_errmsgs_id => l_generic_errmsgs_id,
p_module_code => p_module_code,
p_source_entity_id1 => p_source_entity_id1,
p_source_entity_id2 => p_source_entity_id2,
p_source_entity_type_code => p_source_entity_type_code,
p_msg_type_code => l_msg_type,
p_msg => l_msg,
p_msg_status => l_msg_status,
p_created_by => fnd_global.user_id,
p_creation_date => SYSDATE,
p_last_updated_by => fnd_global.user_id,
p_last_update_date => SYSDATE,
p_last_update_login => fnd_global.login_id,
p_object_version_number => 1 -- not needed
);
'Insert into generic error successful,id['
|| l_generic_errmsgs_id
|| ']'
);
/* description : Deletes a singel generic message record */
/* Called from : */
/* Input Parm : p_api_version NUMBER Required Api Version number */
/* p_generic_errmsgs_id NUMBER Required KEy field for the messages table */
/* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
/* fnd_api.g_ret_sts_success (success) */
/* fnd_api.g_ret_sts_error (error) */
/* fnd_api.g_ret_sts_unexp_error (unexpected) */
/* x_msg_count NUMBER Number of messages in the message stack */
/* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
/*-----------------------------------------------------------------------------------------------------------*/
PROCEDURE purge_msg (
p_api_version IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_generic_errmsgs_id IN NUMBER
)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
DELETE FROM csd_generic_errmsgs
WHERE generic_errmsgs_id = p_generic_errmsgs_id;
/* description : This API will delete the messages for the given module,entity codes */
/* Called from : */
/* Input Parm : p_api_version NUMBER Required Api Version number */
/* p_module_code VARCHAR2 Required module which is saving the message. */
/* p_source_entity_id_1 NUMBER optional source entity_id 1. */
/* This is usually the repair line id. */
/* p_source_entity_type_code VARCHAR2 Optional Seeded entity type code. */
/* Valid values are 'SERIAL_NUMBER', */
/* 'SERVICE_CODE', */
/* 'SOLUTION', */
/* 'ESTIMATE', */
/* 'TASK', */
/* 'WIP', */
/* p_source_entity_id_2 NUMBER Optional source entity_id 2. */
/* Output Parm : x_return_status VARCHAR2 Return status after the call. The status can be*/
/* fnd_api.g_ret_sts_success (success) */
/* fnd_api.g_ret_sts_error (error) */
/* fnd_api.g_ret_sts_unexp_error (unexpected) */
/* x_msg_count NUMBER Number of messages in the message stack */
/* x_msg_data VARCHAR2 Message text if x_msg_count >= 1 */
/*-----------------------------------------------------------------------------------------------------------*/
PROCEDURE purge_entity_msgs (
p_api_version IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_module_code IN VARCHAR2,
p_source_entity_id1 IN NUMBER,
p_source_entity_type_code IN VARCHAR2,
p_source_entity_id2 IN NUMBER
)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
DELETE FROM csd_generic_errmsgs
WHERE module_code = p_module_code
AND ( source_entity_id1 = p_source_entity_id1
OR p_source_entity_id1 IS NULL
)
AND ( source_entity_type_code = p_source_entity_type_code
OR p_source_entity_type_code IS NULL
)
AND ( source_entity_id2 = p_source_entity_id2
OR p_source_entity_id2 IS NULL
);
SELECT b.repair_number, c.meaning source_entity_type,
a.source_entity_type_code source_entity_type_code,
d.meaning msg_type, a.msg, a.generic_errmsgs_id,
a.source_entity_id2
FROM csd_generic_errmsgs a,
csd_repairs_v b,
fnd_lookups c,
fnd_lookups d
WHERE b.repair_line_id = a.source_entity_id1
AND c.lookup_code = a.source_entity_type_code
AND c.lookup_type = lc_msg_entity_lkp_typ
AND d.lookup_code = a.msg_type_code
AND d.lookup_type = lc_msg_typ_lkp_typ
AND a.module_code = p_module
AND a.source_entity_id1 = p_entity_id1
AND ( a.source_entity_type_code = p_entity_type
OR p_entity_type IS NULL
)
AND (a.source_entity_id2 = p_entity_id2 OR p_entity_id2 IS NULL);
SELECT serial_number
FROM csd_mass_ro_sn
WHERE mass_ro_sn_id = p_entity_id;
SELECT service_code
FROM csd_service_codes_vl
WHERE service_code_id = p_entity_id;
SELECT NVL (set_name, set_id)
FROM cs_kb_sets_vl
WHERE set_id = p_entity_id;
SELECT NVL (work_summary, repair_estimate_id)
FROM csd_repair_estimate
WHERE repair_estimate_id = p_entity_id;
SELECT NVL (wip_entity_name, wip_entity_id) --- AAA not required
FROM wip_entities
WHERE wip_entity_id = p_entity_id;
SELECT NVL (task_name, task_number) ---AAA nvl not required
FROM csf_debrief_headers_v
WHERE task_id = p_entity_id;
/* description : This API will delete the messages for the given module,entity codes */
/* Called from : */
/* Input Parm : p_module_code VARCHAR2 Required module which is saving the message. */
/* p_source_entity_id_1 NUMBER optional source entity_id 1. */
/* This is usually the repair line id. */
/* p_source_entity_type_code VARCHAR2 Optional Seeded entity type code. */
/* Valid values are 'SERIAL_NUMBER', */
/* 'SERVICE_CODE', */
/* 'SOLUTION', */
/* 'ESTIMATE', */
/* 'TASK', */
/* 'WIP', */
/* p_source_entity_id_2 NUMBER Optional source entity_id 2. */
/* Output Parm : errbuf VARCHAR2 Return status after the call. The status can be*/
/* fnd_api.g_ret_sts_success (success) */
/* fnd_api.g_ret_sts_error (error) */
/* fnd_api.g_ret_sts_unexp_error (unexpected) */
/* retcode NUMBER Number of messages in the message stack */
/*-----------------------------------------------------------------------------------------------------------*/
PROCEDURE purge_entity_msgs_cp (
errbuf OUT NOCOPY VARCHAR2,
retcode OUT NOCOPY NUMBER,
p_module_code IN VARCHAR2
)
IS
l_return_status VARCHAR2 (30);
SELECT 'x'
FROM fnd_lookups
WHERE lookup_type = lc_module_code_lkp_typ
AND lookup_code = p_module_code
AND enabled_flag = lc_enabled
AND ( TRUNC (SYSDATE) >= TRUNC (start_date_active)
OR start_date_active IS NULL
)
AND ( TRUNC (SYSDATE) < TRUNC (end_date_active)
OR end_date_active IS NULL
);