228: l_rec_count NUMBER(10);
229: l_tpformula_id NUMBER(10);
230:
231: l_recipe_validity_out GMD_VALIDITY_RULES.recipe_validity_tbl;
232: l_reservations_tbl gme_common_pvt.reservations_tab;
233: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
234: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
235: BEGIN
236: gmd_debug.log_initialize ('simul');
229: l_tpformula_id NUMBER(10);
230:
231: l_recipe_validity_out GMD_VALIDITY_RULES.recipe_validity_tbl;
232: l_reservations_tbl gme_common_pvt.reservations_tab;
233: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
234: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
235: BEGIN
236: gmd_debug.log_initialize ('simul');
237: /* Inserting the item and lot data from batch material tables to temp tables*/
230:
231: l_recipe_validity_out GMD_VALIDITY_RULES.recipe_validity_tbl;
232: l_reservations_tbl gme_common_pvt.reservations_tab;
233: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
234: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
235: BEGIN
236: gmd_debug.log_initialize ('simul');
237: /* Inserting the item and lot data from batch material tables to temp tables*/
238: l_user_id := TO_NUMBER (fnd_profile.VALUE ('USER_ID'));
927: l_msg_data VARCHAR2(2000);
928: X_return_status VARCHAR2(1);
929: l_rec Cur_get_materials%ROWTYPE;
930: l_batch Cur_get_batch%ROWTYPE;
931: l_materials gme_common_pvt.material_details_tab;
932: l_materials_out gme_common_pvt.material_details_tab;
933: l_trolin inv_move_order_pub.trolin_tbl_type;
934:
935: create_mo_line_err EXCEPTION;
928: X_return_status VARCHAR2(1);
929: l_rec Cur_get_materials%ROWTYPE;
930: l_batch Cur_get_batch%ROWTYPE;
931: l_materials gme_common_pvt.material_details_tab;
932: l_materials_out gme_common_pvt.material_details_tab;
933: l_trolin inv_move_order_pub.trolin_tbl_type;
934:
935: create_mo_line_err EXCEPTION;
936: setup_failure EXCEPTION;
935: create_mo_line_err EXCEPTION;
936: setup_failure EXCEPTION;
937: BEGIN
938: l_user_id := TO_NUMBER (fnd_profile.VALUE ('USER_ID'));
939: IF NOT (gme_common_pvt.setup(P_org_id => V_orgn_id)) THEN
940: RAISE setup_failure;
941: END IF;
942: /* Inserting the item and lot data for the item entered in the form*/
943: OPEN Cur_line_id;
997: l_materials(1).plan_qty := 0;
998: l_materials(1).dtl_um := l_rec.detail_uom;
999: l_materials(1).line_type := V_line_type;
1000: l_materials(1).batch_id := V_entity_id;
1001: l_materials(1).creation_date := gme_common_pvt.g_timestamp;
1002: l_materials(1).created_by := gme_common_pvt.g_user_ident;
1003: l_materials(1).last_update_date := gme_common_pvt.g_timestamp;
1004: l_materials(1).last_updated_by := gme_common_pvt.g_user_ident;
1005:
998: l_materials(1).dtl_um := l_rec.detail_uom;
999: l_materials(1).line_type := V_line_type;
1000: l_materials(1).batch_id := V_entity_id;
1001: l_materials(1).creation_date := gme_common_pvt.g_timestamp;
1002: l_materials(1).created_by := gme_common_pvt.g_user_ident;
1003: l_materials(1).last_update_date := gme_common_pvt.g_timestamp;
1004: l_materials(1).last_updated_by := gme_common_pvt.g_user_ident;
1005:
1006: gme_move_orders_pvt.create_move_order_lines (p_move_order_header_id => v_move_order_header_id
999: l_materials(1).line_type := V_line_type;
1000: l_materials(1).batch_id := V_entity_id;
1001: l_materials(1).creation_date := gme_common_pvt.g_timestamp;
1002: l_materials(1).created_by := gme_common_pvt.g_user_ident;
1003: l_materials(1).last_update_date := gme_common_pvt.g_timestamp;
1004: l_materials(1).last_updated_by := gme_common_pvt.g_user_ident;
1005:
1006: gme_move_orders_pvt.create_move_order_lines (p_move_order_header_id => v_move_order_header_id
1007: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
1000: l_materials(1).batch_id := V_entity_id;
1001: l_materials(1).creation_date := gme_common_pvt.g_timestamp;
1002: l_materials(1).created_by := gme_common_pvt.g_user_ident;
1003: l_materials(1).last_update_date := gme_common_pvt.g_timestamp;
1004: l_materials(1).last_updated_by := gme_common_pvt.g_user_ident;
1005:
1006: gme_move_orders_pvt.create_move_order_lines (p_move_order_header_id => v_move_order_header_id
1007: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
1008: ,p_material_details_tbl => l_materials
1003: l_materials(1).last_update_date := gme_common_pvt.g_timestamp;
1004: l_materials(1).last_updated_by := gme_common_pvt.g_user_ident;
1005:
1006: gme_move_orders_pvt.create_move_order_lines (p_move_order_header_id => v_move_order_header_id
1007: ,p_move_order_type => gme_common_pvt.g_invis_move_order_type
1008: ,p_material_details_tbl => l_materials
1009: ,x_material_details_tbl => l_materials_out
1010: ,x_trolin_tbl => l_trolin
1011: ,x_return_status => l_return_status);