The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_batch_step_rec Output updated batch step record.
x_exception_material_tbl Table of records of exceptions found while releasing the step, any dependent steps
and possibly the batch (if it was released).
x_return_status outcome of the API call
S - Success
E - Error
U - Unexpected error
X - Exceptions found
=============================================================================================*/
PROCEDURE release_step (
p_batch_step_rec IN gme_batch_steps%ROWTYPE
,p_batch_header_rec IN gme_batch_header%ROWTYPE
,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
,x_return_status OUT NOCOPY VARCHAR2)
IS
l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_STEP';
x_batch_step_rec Output updated batch step record.
x_exception_material_tbl Table of records of exceptions found while releasing the step, any dependent steps
x_return_status outcome of the API call
S - Success
E - Error
U - Unexpected error
X - Exception found
=============================================================================================*/
PROCEDURE release_step_recursive (
p_batch_step_rec IN gme_batch_steps%ROWTYPE
,p_batch_header_rec IN gme_batch_header%ROWTYPE
,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
,x_return_status OUT NOCOPY VARCHAR2)
IS
l_api_name CONSTANT VARCHAR2 (30) := 'release_step_recursive';
update_step_qty_error EXCEPTION;
,p_update_inv_ind => p_batch_header_rec.update_inventory_ind
,x_exception_material_tbl => x_exception_material_tbl
,x_return_status => l_return_status);
/* Invoke the update step qty API to update the step quantities and the */
/* quantities of the succeeding steps */
l_in_batch_step_rec := x_batch_step_rec;
gme_update_step_qty_pvt.update_step_qty
(p_batch_step_rec => l_in_batch_step_rec
,x_message_count => l_msg_count
,x_message_list => l_msg_stack
,x_return_status => l_return_status
,x_batch_step_rec => x_batch_step_rec);
RAISE update_step_qty_error;
WHEN update_step_qty_error THEN
x_return_status := l_return_status;
SELECT d.dep_step_id, d.dep_type, d.standard_delay
,s.steprelease_type, s.step_status
FROM gme_batch_step_dependencies d, gme_batch_steps s
WHERE d.batchstep_id = v_batchstep_id
AND s.batchstep_id = d.dep_step_id
AND s.batch_id = v_batch_id
AND d.batch_id = s.batch_id;
This procedure releases the step and updates actual dates for activity and resource.
Parameters
p_batch_step_rec Input Batch Step Line
p_batch_header_rec Batch Header that step belongs to
x_batch_step_rec Output Batch Step Line
x_return_status outcome of the API call
S - Success
E - Error
U - Unexpected error
History
=============================================================================================*/
PROCEDURE release_step_line (
p_batch_step_rec IN gme_batch_steps%ROWTYPE
,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
,x_return_status OUT NOCOPY VARCHAR2)
IS
l_api_name CONSTANT VARCHAR2 (30) := 'release_step_line';
/* Update the Batch Step Status to WIP */
x_batch_step_rec.step_status := gme_common_pvt.g_step_wip;
IF NOT (gme_batch_steps_dbl.update_row (x_batch_step_rec) ) THEN
RAISE batch_step_upd_err;
x_batch_step_rec.last_updated_by := gme_common_pvt.g_user_ident;
x_batch_step_rec.last_update_date := gme_common_pvt.g_timestamp;
x_batch_step_rec.last_update_login := gme_common_pvt.g_login_id;
UPDATE gme_batch_step_activities
SET actual_start_date = x_batch_step_rec.actual_start_date
,last_updated_by = gme_common_pvt.g_user_ident
,last_update_date = gme_common_pvt.g_timestamp
,last_update_login = gme_common_pvt.g_login_id
WHERE batchstep_id = x_batch_step_rec.batchstep_id;
UPDATE gme_batch_step_resources
SET actual_start_date = x_batch_step_rec.actual_start_date
,last_updated_by = gme_common_pvt.g_user_ident
,last_update_date = gme_common_pvt.g_timestamp
,last_update_login = gme_common_pvt.g_login_id
WHERE batchstep_id = x_batch_step_rec.batchstep_id;
,p_update_inv_ind IN VARCHAR2
,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
,x_return_status OUT NOCOPY VARCHAR2)
IS
CURSOR cur_step_ingredients (v_batchstep_id NUMBER)
IS
SELECT matl.*
FROM gme_material_details matl, gme_batch_step_items item
WHERE item.batchstep_id = v_batchstep_id
AND item.material_detail_id = matl.material_detail_id
AND matl.line_type = gme_common_pvt.g_line_type_ing
AND matl.release_type = gme_common_pvt.g_mtl_autobystep_release;
,p_update_inv_ind => p_update_inv_ind
,x_exception_material_tbl => x_exception_material_tbl
,x_return_status => l_return_status);
SELECT *
FROM gmd_recipe_validity_rules
WHERE recipe_validity_rule_id = v_recipe_validity_rule_id;
SELECT status_type
FROM gmd_status
WHERE status_code=v_validity_rule_status;