24: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
25: l_errors c_errors%ROWTYPE;
26: BEGIN
27:
28: IF(l_logLevel <= WIP_CONSTANTS.TRACE_LOGGING) THEN
29: l_params(1).paramName := 'p_txn_id';
30: l_params(1).paramValue := p_txn_id;
31: wip_logger.entryPoint(p_procName => 'wip_movProc_pub.processInterface',
32: p_params => l_params,
37: SELECT group_id
38: INTO l_groupID
39: FROM wip_move_txn_interface
40: WHERE transaction_id = p_txn_id
41: AND process_phase = WIP_CONSTANTS.MOVE_VAL
42: AND process_status = WIP_CONSTANTS.RUNNING
43: AND group_id IS NOT NULL;
44:
45: IF (p_do_backflush = fnd_api.g_false) THEN
38: INTO l_groupID
39: FROM wip_move_txn_interface
40: WHERE transaction_id = p_txn_id
41: AND process_phase = WIP_CONSTANTS.MOVE_VAL
42: AND process_status = WIP_CONSTANTS.RUNNING
43: AND group_id IS NOT NULL;
44:
45: IF (p_do_backflush = fnd_api.g_false) THEN
46: l_do_backflush := fnd_api.g_false;
50:
51: wip_movProc_priv.processIntf(p_group_id => l_groupID,
52: p_child_txn_id => -1,
53: p_mtl_header_id => -1,
54: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
55: p_time_out => 0,
56: p_move_mode => WIP_CONSTANTS.BACKGROUND,
57: p_bf_mode => WIP_CONSTANTS.ONLINE,
58: p_mtl_mode => WIP_CONSTANTS.ONLINE,
52: p_child_txn_id => -1,
53: p_mtl_header_id => -1,
54: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
55: p_time_out => 0,
56: p_move_mode => WIP_CONSTANTS.BACKGROUND,
57: p_bf_mode => WIP_CONSTANTS.ONLINE,
58: p_mtl_mode => WIP_CONSTANTS.ONLINE,
59: p_endDebug => fnd_api.g_false,
60: p_initMsgList => fnd_api.g_true,
53: p_mtl_header_id => -1,
54: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
55: p_time_out => 0,
56: p_move_mode => WIP_CONSTANTS.BACKGROUND,
57: p_bf_mode => WIP_CONSTANTS.ONLINE,
58: p_mtl_mode => WIP_CONSTANTS.ONLINE,
59: p_endDebug => fnd_api.g_false,
60: p_initMsgList => fnd_api.g_true,
61: p_insertAssy => fnd_api.g_true,
54: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
55: p_time_out => 0,
56: p_move_mode => WIP_CONSTANTS.BACKGROUND,
57: p_bf_mode => WIP_CONSTANTS.ONLINE,
58: p_mtl_mode => WIP_CONSTANTS.ONLINE,
59: p_endDebug => fnd_api.g_false,
60: p_initMsgList => fnd_api.g_true,
61: p_insertAssy => fnd_api.g_true,
62: p_do_backflush => l_do_backflush,
69: IF(fnd_api.to_boolean(p_commit)) THEN
70: COMMIT;
71: END IF;
72:
73: IF (l_logLevel <= wip_constants.trace_logging) THEN
74: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
75: p_procReturnStatus => x_returnStatus,
76: p_msg => 'procedure complete',
77: x_returnStatus => l_returnStatus);
86: l_errors.error_message || '; ';
87: END LOOP;
88: x_errorMsg := substr(x_errorMsg, 1, 1000);
89:
90: IF (l_logLevel <= wip_constants.trace_logging) THEN
91: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
92: p_procReturnStatus => x_returnStatus,
93: p_msg => 'wip_movProc_priv.processIntf failed',
94: x_returnStatus => l_returnStatus);
100: fnd_message.set_name('WIP', 'WIP_NOT_VALID');
101: fnd_message.set_token('ENTITY', 'TRANSACTION_ID');
102: x_errorMsg := substr(fnd_message.get, 1, 1000);
103:
104: IF (l_logLevel <= wip_constants.trace_logging) THEN
105: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
106: p_procReturnStatus => x_returnStatus,
107: p_msg => 'to many rows: ' || SQLERRM,
108: x_returnStatus => l_returnStatus);
115: fnd_message.set_token('ENTITY',
116: 'TRANSACTION_ID/GROUP_ID/PROCESS_PHASE/PROCESS_STATUS');
117: x_errorMsg := substr(fnd_message.get, 1, 1000);
118:
119: IF (l_logLevel <= wip_constants.trace_logging) THEN
120: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
121: p_procReturnStatus => x_returnStatus,
122: p_msg => 'no data found: ' || SQLERRM,
123: x_returnStatus => l_returnStatus);
126:
127: WHEN others THEN
128: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
129: x_errorMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
130: IF (l_logLevel <= wip_constants.trace_logging) THEN
131: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
132: p_procReturnStatus => x_returnStatus,
133: p_msg => x_errorMsg,
134: x_returnStatus => l_returnStatus);
151: l_groupID NUMBER;
152: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
153: BEGIN
154:
155: IF(l_logLevel <= WIP_CONSTANTS.TRACE_LOGGING) THEN
156: l_params(1).paramName := 'p_group_id';
157: l_params(1).paramValue := p_group_id;
158: wip_logger.entryPoint(p_procName => 'wip_movProc_pub.processInterface',
159: p_params => l_params,
169:
170: wip_movProc_priv.processIntf(p_group_id => p_group_id,
171: p_child_txn_id => -1,
172: p_mtl_header_id => -1,
173: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
174: p_time_out => 0,
175: p_move_mode => WIP_CONSTANTS.BACKGROUND,
176: p_bf_mode => WIP_CONSTANTS.ONLINE,
177: p_mtl_mode => WIP_CONSTANTS.ONLINE,
171: p_child_txn_id => -1,
172: p_mtl_header_id => -1,
173: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
174: p_time_out => 0,
175: p_move_mode => WIP_CONSTANTS.BACKGROUND,
176: p_bf_mode => WIP_CONSTANTS.ONLINE,
177: p_mtl_mode => WIP_CONSTANTS.ONLINE,
178: p_endDebug => fnd_api.g_false,
179: p_initMsgList => fnd_api.g_true,
172: p_mtl_header_id => -1,
173: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
174: p_time_out => 0,
175: p_move_mode => WIP_CONSTANTS.BACKGROUND,
176: p_bf_mode => WIP_CONSTANTS.ONLINE,
177: p_mtl_mode => WIP_CONSTANTS.ONLINE,
178: p_endDebug => fnd_api.g_false,
179: p_initMsgList => fnd_api.g_true,
180: p_insertAssy => fnd_api.g_true,
173: p_proc_phase => WIP_CONSTANTS.MOVE_VAL,
174: p_time_out => 0,
175: p_move_mode => WIP_CONSTANTS.BACKGROUND,
176: p_bf_mode => WIP_CONSTANTS.ONLINE,
177: p_mtl_mode => WIP_CONSTANTS.ONLINE,
178: p_endDebug => fnd_api.g_false,
179: p_initMsgList => fnd_api.g_true,
180: p_insertAssy => fnd_api.g_true,
181: p_do_backflush => l_do_backflush,
188: IF(fnd_api.to_boolean(p_commit)) THEN
189: COMMIT;
190: END IF;
191:
192: IF (l_logLevel <= wip_constants.trace_logging) THEN
193: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
194: p_procReturnStatus => x_returnStatus,
195: p_msg => 'no record in this group error out',
196: x_returnStatus => l_returnStatus);
200:
201: WHEN fnd_api.g_exc_error THEN
202: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
203:
204: IF (l_logLevel <= wip_constants.trace_logging) THEN
205: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
206: p_procReturnStatus => x_returnStatus,
207: p_msg => 'some records in this group error out',
208: x_returnStatus => l_returnStatus);
211:
212: WHEN others THEN
213: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
214:
215: IF (l_logLevel <= wip_constants.trace_logging) THEN
216: wip_logger.exitPoint(p_procName => 'wip_movProc_pub.processInterface',
217: p_procReturnStatus => x_returnStatus,
218: p_msg => 'unexpected error: ' || SQLERRM,
219: x_returnStatus => l_returnStatus);