1: PACKAGE BODY MRP_GET_ONHAND AS
2: /* $Header: MRPGEOHB.pls 120.0 2005/05/24 19:18:55 appldev noship $ */
3:
4: -- =========== Private Functions =============
5:
82: ', P_ORG_ID => :org_id '||
83: ', P_SUBINV => NULL '||
84: ', P_ITEM_ID => :item_id '||
85: ', x_planning_qty => x_planning_qty '||'); '||
86: ' MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
87: ' MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
88: ' MRP_GET_ONHAND.g_x_qoh := x_planning_qty; '||
89: 'end; ';
90:
83: ', P_SUBINV => NULL '||
84: ', P_ITEM_ID => :item_id '||
85: ', x_planning_qty => x_planning_qty '||'); '||
86: ' MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
87: ' MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
88: ' MRP_GET_ONHAND.g_x_qoh := x_planning_qty; '||
89: 'end; ';
90:
91: execute immediate l_stmt using include_nonnet, org_id, item_id;
84: ', P_ITEM_ID => :item_id '||
85: ', x_planning_qty => x_planning_qty '||'); '||
86: ' MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
87: ' MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
88: ' MRP_GET_ONHAND.g_x_qoh := x_planning_qty; '||
89: 'end; ';
90:
91: execute immediate l_stmt using include_nonnet, org_id, item_id;
92:
141: ', x_qr =>x_qr '||
142: ', x_qs =>x_qs '||
143: ', x_att =>x_att '||
144: ', x_atr =>x_atr '||'); '||
145: ' MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
146: ' MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
147: ' MRP_GET_ONHAND.g_x_qoh := x_qoh; '||
148: 'end; ';
149:
142: ', x_qs =>x_qs '||
143: ', x_att =>x_att '||
144: ', x_atr =>x_atr '||'); '||
145: ' MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
146: ' MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
147: ' MRP_GET_ONHAND.g_x_qoh := x_qoh; '||
148: 'end; ';
149:
150: execute immediate l_stmt using org_id, item_id, l_sysdate, l_onhand_source;
143: ', x_att =>x_att '||
144: ', x_atr =>x_atr '||'); '||
145: ' MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
146: ' MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
147: ' MRP_GET_ONHAND.g_x_qoh := x_qoh; '||
148: 'end; ';
149:
150: execute immediate l_stmt using org_id, item_id, l_sysdate, l_onhand_source;
151:
189: ', x_att => x_att '||
190: ', x_voh => x_voh '||
191: ', x_vatt => x_vatt '||
192: '); '||
193: 'MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
194: 'MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
195: 'MRP_GET_ONHAND.g_x_qoh := nvl(x_qoh,0) - nvl(x_voh,0); '||
196: 'end;';
197:
190: ', x_voh => x_voh '||
191: ', x_vatt => x_vatt '||
192: '); '||
193: 'MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
194: 'MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
195: 'MRP_GET_ONHAND.g_x_qoh := nvl(x_qoh,0) - nvl(x_voh,0); '||
196: 'end;';
197:
198: execute immediate l_stmt using org_id, item_id, l_sysdate, l_onhand_source;
191: ', x_vatt => x_vatt '||
192: '); '||
193: 'MRP_GET_ONHAND.g_x_return_status := x_return_status; '||
194: 'MRP_GET_ONHAND.g_x_msg_data := x_msg_data; '||
195: 'MRP_GET_ONHAND.g_x_qoh := nvl(x_qoh,0) - nvl(x_voh,0); '||
196: 'end;';
197:
198: execute immediate l_stmt using org_id, item_id, l_sysdate, l_onhand_source;
199:
372:
373: IF (G_MRP_DEBUG = 'Y') THEN
374:
375: -- Print the Input parameters
376: log_debug ('Input Parameters to mrp_get_onhand.do_restock ..');
377: log_debug ('--------------------------------------------------------');
378: log_debug ('Item ID: ' || to_char(p_item_id));
379: log_debug ('Make/Buy Flag: ' || to_char(p_mbf));
380: log_debug ('Handle Repetitive Item: ' ||
509: , p_pur_revision;
510:
511: EXCEPTION
512: WHEN OTHERS THEN
513: log_error ('error in mrp_get_onhand.do_restock.');
514: log_error (SQLERRM);
515: x_return_status := 'E';
516: ROLLBACK;
517: END;
517: END;
518:
519: END do_restock;
520:
521: end MRP_GET_ONHAND;