The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT requisition_line_id,
line_location_id
FROM po_requisition_lines_all
WHERE requisition_header_id = hdr_id;
SELECT requisition_line_id,
line_location_id
FROM po_requisition_lines_all
WHERE requisition_header_id = hdr_id;
SELECT Count(*)
INTO l_line_to_withdraw_count
FROM po_requisition_lines_all
WHERE REQUISITION_HEADER_ID = p_req_hdr_id
AND LINE_LOCATION_ID IS NULL
AND nvl(CANCEL_FLAG,'N') = 'N'
AND nvl(CLOSED_CODE,'OPEN') NOT IN ('FINALLY CLOSED');
PROCEDURE update_reqcancel_from_so(
p_api_version IN NUMBER
, p_req_line_id_tbl IN Dbms_Sql.number_table
, p_req_can_qty_tbl IN Dbms_Sql.number_table
, p_req_can_all IN Boolean
, x_return_status OUT NOCOPY VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'update_ReqCancel_from_SO';
END update_reqcancel_from_so;
PROCEDURE update_reqcancel_from_so(
p_api_version IN NUMBER
, x_return_status OUT NOCOPY VARCHAR2
, p_req_line_id_tbl IN Dbms_Sql.number_table --this needs to be table of number
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'update_ReqCancel_from_SO';
SAVEPOINT update_reqcancel_from_so_sp;
po_debug.debug_stmt(l_log_head, l_progress,'After Private Procedure update_ReqCancel_from_SO');
ROLLBACK TO update_reqcancel_from_so_sp;
ROLLBACK TO update_reqcancel_from_so_sp;
ROLLBACK TO update_reqcancel_from_so_sp;
END update_reqcancel_from_so;
PROCEDURE update_reqchange_from_so(
p_api_version IN NUMBER
, x_return_status OUT NOCOPY VARCHAR2
, p_req_line_id IN NUMBER
, p_delta_quantity IN NUMBER
, p_new_need_by_date IN DATE
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'update_ReqChange_from_SO';
END update_reqchange_from_so;
* Procedure to update the cancel qty in req line from SO
* This method is called when a SO initiated partial
* cancellation of Qty (Primary or Secondary) or cancellation of line.
*
* @param p_api_version of the procedure api
* @param p_req_line_id_tbl number table of canceled req lines
* @param p_req_can_prim_qty_tbl number table of canceled Prim Qty of req lines
* @param p_req_can_sec_qty_tbl number table of canceled Secondary Qty of req lines
* @param p_req_can_all boolean to hole weather req line cancelation flag
* @param x_return_status returns the tstatus of the api.
*/
PROCEDURE update_reqcancel_from_so(
p_api_version IN NUMBER
, p_req_line_id_tbl IN Dbms_Sql.number_table
, p_req_can_prim_qty_tbl IN Dbms_Sql.number_table
, p_req_can_sec_qty_tbl IN Dbms_Sql.number_table
, p_req_can_all IN Boolean
, x_return_status OUT NOCOPY VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'update_reqcancel_from_so';
SAVEPOINT update_reqcancel_from_so_sp;
po_debug.debug_stmt(l_log_head, l_progress,'Procedure update_ReqCancel_from_SO called with no req line id from OM');
po_debug.debug_stmt(l_log_head, l_progress,'Calling Private Procedure update_ReqCancel_from_SO table count ='|| p_req_line_id_tbl.Count);
po_rco_validation_pvt.update_reqcancel_from_so(p_req_line_id => p_req_line_id_tbl(i)
, p_req_cancel_prim_qty => p_prim_qty
, p_req_cancel_sec_qty => p_sec_qty
, p_req_cancel_all => p_req_can_all
,x_return_status => x_return_status);
po_debug.debug_stmt(l_log_head, l_progress,'After Private Procedure update_ReqCancel_from_SO');
ROLLBACK TO update_reqcancel_from_so_sp;
ROLLBACK TO update_reqcancel_from_so_sp;
ROLLBACK TO update_reqcancel_from_so_sp;
END update_reqcancel_from_so;
* Procedure to update the Qty changes on req line from SO changes
* This method is called when a SO initiated change in Qty (Primary or Secondary).
*
* @param p_api_version of the procedure api
* @param x_return_status returns the tstatus of the api.
* @param p_req_line_id number holds the req line number
* @param p_delta_quantity_prim number changed Prim Qty of SO
* @param p_delta_quantity_sec number changed Secondary Qty of SO
* @param p_new_need_by_date date need by date of SO.
*/
PROCEDURE update_reqchange_from_so(
p_api_version IN NUMBER
, x_return_status OUT NOCOPY VARCHAR2
, p_req_line_id IN NUMBER
, p_delta_quantity_prim IN NUMBER
, p_delta_quantity_sec IN NUMBER
, p_new_need_by_date IN DATE
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'update_reqchange_from_so';
SAVEPOINT update_reqchange_from_so_sp;
po_debug.debug_stmt(l_log_head, l_progress,'Calling Private Procedure update_reqchange_from_so');
po_rco_validation_pvt.update_reqchange_from_so(
p_req_line_id => p_req_line_id
, p_delta_quantity_prim => p_delta_quantity_prim
, p_delta_quantity_sec => p_delta_quantity_sec
, p_new_need_by_date => p_new_need_by_date
, x_return_status => x_return_status);
po_debug.debug_stmt(l_log_head, l_progress,'After Private Procedure update_ReqChange_from_SO');
ROLLBACK TO update_reqchange_from_so_sp;
ROLLBACK TO update_reqchange_from_so_sp;
ROLLBACK TO update_reqchange_from_so_sp;
END update_reqchange_from_so;