DBA Data[Home] [Help]

APPS.WIP_SO_RESERVATIONS dependencies on WIP_CONSTANTS

Line 93: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

89: ----------------------
90: IF(p_table_type = 'MMTT') THEN
91: get_transaction_lines(
92: p_transaction_header_id => p_transaction_header_id,
93: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
94: p_txn_temp_id => p_txn_temp_id,
95: x_return_status => l_return_status,
96: x_transaction_tbl => l_transaction_tbl);
97: ELSE -- get lines from wip_lpn_completions table

Line 103: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

99: p_header_id => p_transaction_header_id,
100: p_primary_quantity => p_primary_quantity,
101: p_lpn_id => p_lpn_id,
102: p_lot_number => p_lot_number,
103: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
104: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
105: x_return_status => l_return_status,
106: x_transaction_tbl => l_transaction_tbl);
107: END IF;

Line 104: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,

100: p_primary_quantity => p_primary_quantity,
101: p_lpn_id => p_lpn_id,
102: p_lot_number => p_lot_number,
103: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
104: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
105: x_return_status => l_return_status,
106: x_transaction_tbl => l_transaction_tbl);
107: END IF;
108:

Line 131: IF (l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT

127: -------------
128: -- validation
129: -------------
130: -- if item under lot control, there must be lot number
131: IF (l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT
132: AND l_transaction_tbl(i).lot_number IS NULL) THEN
133: fnd_message.set_name('WIP', 'WIP_NO_LOT_NUMBER');
134: fnd_msg_pub.add;
135: RAISE fnd_api.g_exc_error;

Line 153: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

149: l_reservation_found :=
150: validate_txn_line_against_rsv(
151: p_transaction_rec => l_transaction_tbl(i),
152: p_reservation_rec => l_reservation_tbl(j),
153: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
154: x_return_status => l_return_status,
155: x_query_reservation => l_query_reservation);
156:
157: IF (l_return_status = fnd_api.g_ret_sts_success) THEN

Line 193: AND l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT)THEN

189: END LOOP; -- l_rsv_tbl_count
190:
191: IF(l_reservation_found) THEN
192: IF(l_transaction_tbl(i).lot_number is NOT null
193: AND l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT)THEN
194: l_lotcount := 0 ;
195:
196: SELECT count(1)
197: INTO l_lotcount

Line 214: p_transaction_Action_id => WIP_CONSTANTS.CPLASSY_ACTION,

210: p_organization_id => l_transaction_tbl(i).organization_id,
211: p_lot_number => l_transaction_tbl(i).lot_number,
212: p_expiration_date => l_transaction_tbl(i).lot_expiration_date,
213: p_transaction_temp_id => l_transaction_tbl(i).transaction_temp_id,
214: p_transaction_Action_id => WIP_CONSTANTS.CPLASSY_ACTION,
215: p_transfer_organization_id => NULL,
216: x_object_id => l_object_id,
217: x_return_status => l_return_status,
218: x_msg_count => l_msg_count,

Line 233: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

229:
230: transfer_reservation(
231: p_transaction_rec => l_transaction_tbl(i),
232: p_reservation_rec => l_reservation_tbl(l_reservation_index),
233: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
234: x_return_status => l_return_status);
235:
236: IF (l_return_status = fnd_api.g_ret_sts_success) THEN
237: -- we have already validated that txn line primary quantity

Line 266: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

262: l_reservation_found :=
263: validate_txn_line_against_rsv(
264: p_transaction_rec => l_transaction_tbl(i),
265: p_reservation_rec => l_reservation_tbl(j),
266: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
267: x_return_status => l_return_status,
268: x_query_reservation => l_query_reservation);
269:
270: IF(l_return_status = fnd_api.g_ret_sts_success) THEN

Line 288: l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT )THEN

284: *l_transaction_tbl(i).lot_number does not exist. */
285:
286: IF(l_transaction_tbl(i).lot_number is NOT null
287: AND
288: l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT )THEN
289: l_lotcount := 0 ;
290:
291: SELECT count(1)
292: INTO l_lotcount

Line 309: p_transaction_Action_id => WIP_CONSTANTS.CPLASSY_ACTION,

305: p_organization_id => l_transaction_tbl(i).organization_id,
306: p_lot_number => l_transaction_tbl(i).lot_number,
307: p_expiration_date => l_transaction_tbl(i).lot_expiration_date,
308: p_transaction_temp_id => l_transaction_tbl(i).transaction_temp_id,
309: p_transaction_Action_id => WIP_CONSTANTS.CPLASSY_ACTION,
310: p_transfer_organization_id => NULL,
311: x_object_id => l_object_id,
312: x_return_status => l_return_status,
313: x_msg_count => l_msg_count,

Line 329: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

325: /* End of fix for bug 2861429 */
326: transfer_reservation(
327: p_transaction_rec => l_transaction_tbl(i),
328: p_reservation_rec => l_reservation_tbl(l_reservation_index),
329: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
330: x_return_status => l_return_status);
331:
332: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
333: IF(l_transaction_tbl(i).primary_quantity <

Line 481: if l_wip_entity_type = WIP_CONSTANTS.EAM then

477: into l_wip_entity_type
478: from wip_entities we
479: where we.wip_entity_id = p_wip_entity_id ;
480:
481: if l_wip_entity_type = WIP_CONSTANTS.EAM then
482: x_return_status := fnd_api.g_ret_sts_success;
483: return ;
484: end if ;
485:

Line 522: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,

518: -- Get form txn lines
519: ----------------------
520: get_transaction_lines(
521: p_transaction_header_id => p_transaction_header_id,
522: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,
523: p_txn_temp_id => p_txn_temp_id,
524: x_return_status => l_return_status,
525: x_transaction_tbl => l_transaction_tbl);
526:

Line 541: IF(l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT

537: -------------------------------------
538: l_valid_reservation := FALSE; /* ER 4163405 */
539: FOR i in 1 .. l_transaction_tbl.COUNT LOOP
540: -- if item under lot control, there must be lot number
541: IF(l_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT
542: AND l_transaction_tbl(i).lot_number IS NULL) THEN
543: fnd_message.set_name('WIP', 'WIP_NO_LOT_NUMBER');
544: fnd_msg_pub.add;
545: RAISE fnd_api.g_exc_error;

Line 561: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,

557: l_reservation_found :=
558: validate_txn_line_against_rsv(
559: p_transaction_rec => l_transaction_tbl(i),
560: p_reservation_rec => l_reservation_tbl(j),
561: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,
562: x_return_status => l_return_status,
563: x_query_reservation => l_query_reservation);
564:
565: IF(l_return_status = fnd_api.g_ret_sts_success) THEN

Line 590: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,

586:
587: transfer_reservation(
588: p_transaction_rec => l_transaction_tbl(i),
589: p_reservation_rec => l_reservation_tbl(l_reservation_index),
590: p_transaction_type => WIP_CONSTANTS.WASSY_RETURN,
591: x_return_status => l_return_status);
592:
593: IF(l_return_status = fnd_api.g_ret_sts_success) THEN
594: -- we have already validated that txn line primary quantity

Line 702: if(l_logLevel <= wip_constants.trace_logging) then

698: l_skip_flag BOOLEAN; /* Bug 2976994 */
699: begin
700: x_return_status := fnd_api.g_ret_sts_success;
701: SAVEPOINT transfer_flow_lines_0;
702: if(l_logLevel <= wip_constants.trace_logging) then
703: l_params(1).paramName := 'not logging params';
704: l_params(1).paramValue := null;
705:
706: wip_logger.entryPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',

Line 721: if(l_logLevel <= wip_constants.full_logging) then

717: -- Also since get_transaction_lines sort the lines with
718: -- demand source header id, the rest of lines won't have sales
719: -- order specified either. We are done.
720: IF (p_transaction_tbl(i).demand_source_header_id IS NULL) THEN
721: if(l_logLevel <= wip_constants.full_logging) then
722: wip_logger.log('no SO found', l_return_status);
723: end if;
724: EXIT;
725: END IF;

Line 730: IF (p_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT AND

726:
727:
728: -- validation
729: -- if item under lot control, there must be lot number
730: IF (p_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT AND
731: p_transaction_tbl(i).lot_number IS NULL) THEN
732: if(l_logLevel <= wip_constants.full_logging) then
733: wip_logger.log('no lot', l_return_status);
734: end if;

Line 732: if(l_logLevel <= wip_constants.full_logging) then

728: -- validation
729: -- if item under lot control, there must be lot number
730: IF (p_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT AND
731: p_transaction_tbl(i).lot_number IS NULL) THEN
732: if(l_logLevel <= wip_constants.full_logging) then
733: wip_logger.log('no lot', l_return_status);
734: end if;
735: fnd_message.set_name('WIP', 'WIP_NO_LOT_NUMBER');
736: fnd_msg_pub.add;

Line 744: if(l_logLevel <= wip_constants.full_logging) then

740: IF (p_transaction_tbl(i).primary_quantity IS NULL OR
741: p_transaction_tbl(i).transaction_quantity IS NULL OR
742: p_transaction_tbl(i).primary_quantity = 0 OR
743: p_transaction_tbl(i).transaction_quantity = 0) THEN
744: if(l_logLevel <= wip_constants.full_logging) then
745: wip_logger.log('no qty', l_return_status);
746: end if;
747: fnd_message.set_name('WIP', 'WIP_ZERO_TRANSACTION_QUANTITY');
748: fnd_msg_pub.add;

Line 794: if(l_logLevel <= wip_constants.full_logging) then

790: WHEN NO_DATA_FOUND THEN
791: /* Fix for bug 2976994: Instead of flagging error, we complete the
792: flow schedule to inventory without reserving. */
793: l_skip_flag := TRUE;
794: if(l_logLevel <= wip_constants.full_logging) then
795: wip_logger.log('Bad SO info or no open demand. Skipping reservation.', l_return_status);
796: end if;
797: /* fnd_message.set_name('WIP', 'WIP_INVALID_SO_TXN_INFO');
798: fnd_msg_pub.add;

Line 812: if(l_logLevel <= wip_constants.full_logging) then

808: ----------------------------------
809: -- ** now we allow overcompletion against sales order
810: -- the over completed qty will not be reserved
811: l_reservation_qty := p_transaction_tbl(i).primary_quantity;
812: if(l_logLevel <= wip_constants.full_logging) then
813: wip_logger.log('rsv qty:' || l_reservation_qty, l_return_status);
814: end if;
815: IF (p_transaction_tbl(i).primary_quantity > l_primary_open_quantity) THEN
816: l_reservation_qty := l_primary_open_quantity;

Line 837: if(l_logLevel <= wip_constants.full_logging) then

833: inv_salesorder.get_oeheader_for_salesorder(p_transaction_tbl(i).demand_source_header_id,
834: l_oe_header_id,
835: x_return_status);
836: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
837: if(l_logLevel <= wip_constants.full_logging) then
838: wip_logger.log('inv_salesorder errorred', l_return_status);
839: end if;
840: RAISE fnd_api.g_exc_error;
841: END IF;

Line 923: (p_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT) AND

919:
920: l_expiration_date := p_transaction_tbl(i).lot_expiration_date;
921:
922: if(l_reservation_rec.lot_number is NOT null) AND
923: (p_transaction_tbl(i).lot_control_code = WIP_CONSTANTS.LOT) AND
924: (p_table_type = 'MMTT') then
925:
926: l_lotcount := 0 ;
927:

Line 936: if(l_logLevel <= wip_constants.full_logging) then

932: AND ORGANIZATION_ID = l_reservation_rec.organization_id
933: AND LOT_NUMBER = l_reservation_rec.lot_number;
934:
935: if (l_lotcount=0) then
936: if(l_logLevel <= wip_constants.full_logging) then
937: wip_logger.log('inserting log', l_return_status);
938: end if;
939:
940: INV_LOT_API_PUB.InsertLot(p_api_version => 1.0,

Line 949: p_transaction_Action_id => wip_constants.cplassy_action,

945: p_organization_id => l_reservation_rec.organization_id,
946: p_lot_number => l_reservation_rec.lot_number,
947: p_expiration_date => l_expiration_date,
948: p_transaction_temp_id => p_table_line_id,
949: p_transaction_Action_id => wip_constants.cplassy_action,
950: p_transfer_organization_id => NULL,
951: x_object_id => l_object_id,
952: x_return_status => l_return_status,
953: x_msg_count => l_msg_count,

Line 968: if(l_logLevel <= wip_constants.full_logging) then

964:
965: -- Fix for Bug#2268499
966: inv_quantity_tree_grp.clear_quantity_cache ;
967:
968: if(l_logLevel <= wip_constants.full_logging) then
969: wip_logger.log('creating reservation', l_return_status);
970: wip_logger.log('item' || l_reservation_rec.inventory_item_id, l_return_status);
971: wip_logger.log('sub' || l_reservation_rec.subinventory_code, l_return_status);
972: wip_logger.log('loc' || l_reservation_rec.locator_id, l_return_status);

Line 993: if(l_logLevel <= wip_constants.full_logging) then

989: x_reservation_id => l_reservation_id);
990:
991:
992: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
993: if(l_logLevel <= wip_constants.full_logging) then
994: wip_logger.log('reservation creation failed:' || l_msg_data, l_return_status);
995: end if;
996: x_msg_count := l_msg_count;
997: x_msg_data := l_msg_data;

Line 1007: if (l_logLevel <= wip_constants.trace_logging) then

1003:
1004: END LOOP; -- loop through each completion form line
1005:
1006: x_return_status := fnd_api.g_ret_sts_success;
1007: if (l_logLevel <= wip_constants.trace_logging) then
1008: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1009: p_procReturnStatus => x_return_status,
1010: p_msg => 'succeeded',
1011: x_returnStatus => l_return_status); --discard logging return status

Line 1017: if (l_logLevel <= wip_constants.trace_logging) then

1013: exception
1014: WHEN g_need_to_rollback_exception THEN
1015: x_return_status := fnd_api.g_ret_sts_error;
1016: rollback to transfer_flow_lines_0;
1017: if (l_logLevel <= wip_constants.trace_logging) then
1018: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1019: p_procReturnStatus => x_return_status,
1020: p_msg => 'error1',
1021: x_returnStatus => l_return_status); --discard logging return status

Line 1030: if (l_logLevel <= wip_constants.trace_logging) then

1026: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1027: p_count => x_msg_count,
1028: p_data => x_msg_data);
1029: rollback to transfer_flow_lines_0;
1030: if (l_logLevel <= wip_constants.trace_logging) then
1031: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1032: p_procReturnStatus => x_return_status,
1033: p_msg => 'error2',
1034: x_returnStatus => l_return_status); --discard logging return status

Line 1043: if (l_logLevel <= wip_constants.trace_logging) then

1039: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1040: p_count => x_msg_count,
1041: p_data => x_msg_data);
1042: rollback to transfer_flow_lines_0;
1043: if (l_logLevel <= wip_constants.trace_logging) then
1044: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1045: p_procReturnStatus => x_return_status,
1046: p_msg => 'error3',
1047: x_returnStatus => l_return_status); --discard logging return status

Line 1062: if (l_logLevel <= wip_constants.trace_logging) then

1058: p_count => x_msg_count,
1059: p_data => x_msg_data);
1060:
1061: rollback to transfer_flow_lines_0;
1062: if (l_logLevel <= wip_constants.trace_logging) then
1063: wip_logger.exitPoint(p_procName => 'wip_so_reservations.transfer_flow_lines',
1064: p_procReturnStatus => x_return_status,
1065: p_msg => 'error4',
1066: x_returnStatus => l_return_status); --discard logging return status

Line 1089: if(l_logLevel <= wip_constants.trace_logging) then

1085: l_params wip_logger.param_tbl_t;
1086: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1087: begin
1088: x_return_status := fnd_api.g_ret_sts_success;
1089: if(l_logLevel <= wip_constants.trace_logging) then
1090: l_params(1).paramName := 'p_header_id';
1091: l_params(1).paramValue := p_header_id;
1092: l_params(2).paramName := 'p_lpn_id';
1093: l_params(2).paramValue := p_lpn_id;

Line 1109: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

1105: get_transaction_lines(p_header_id => p_header_id,
1106: p_primary_quantity => p_primary_quantity,
1107: p_lpn_id => p_lpn_id,
1108: p_lot_number => p_lot_number,
1109: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
1110: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
1111: x_return_status => l_return_status,
1112: x_transaction_tbl => l_transaction_tbl);
1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN

Line 1110: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,

1106: p_primary_quantity => p_primary_quantity,
1107: p_lpn_id => p_lpn_id,
1108: p_lot_number => p_lot_number,
1109: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
1110: p_transaction_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
1111: x_return_status => l_return_status,
1112: x_transaction_tbl => l_transaction_tbl);
1113: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
1114: IF (l_return_status = fnd_api.g_ret_sts_error) THEN

Line 1121: if(l_logLevel <= wip_constants.full_logging) then

1117: RAISE fnd_api.g_exc_unexpected_error;
1118: END IF;
1119: END IF;
1120:
1121: if(l_logLevel <= wip_constants.full_logging) then
1122: wip_logger.log(l_transaction_tbl.count || ' lines fetched for so rsv xfer', l_return_status);
1123: end if;
1124:
1125: transfer_flow_lines(p_transaction_tbl => l_transaction_tbl,

Line 1140: if (l_logLevel <= wip_constants.trace_logging) then

1136: RAISE fnd_api.g_exc_unexpected_error;
1137: END IF;
1138: END IF;
1139:
1140: if (l_logLevel <= wip_constants.trace_logging) then
1141: wip_logger.exitPoint(p_procName => 'wip_so_reservations.complete_flow_sched_to_so',
1142: p_procReturnStatus => x_return_status,
1143: p_msg => 'succeeded',
1144: x_returnStatus => l_return_status); --discard logging return status

Line 1148: if(l_logLevel <= wip_constants.trace_logging) then

1144: x_returnStatus => l_return_status); --discard logging return status
1145: end if;
1146: EXCEPTION
1147: WHEN g_need_to_rollback_exception THEN
1148: if(l_logLevel <= wip_constants.trace_logging) then
1149: wip_logger.exitPoint(p_procName => 'wip_so_reservations.complete_flow_sched_to_so',
1150: p_procReturnStatus => x_return_status,
1151: p_msg => 'error1',
1152: x_returnStatus => l_return_status); --discard logging return status

Line 1165: if(l_logLevel <= wip_constants.trace_logging) then

1161: x_msg_data := l_msg_data;
1162: x_msg_count := l_msg_count;
1163: end if;
1164: rollback to complete_flow_sched_to_so_1;
1165: if(l_logLevel <= wip_constants.trace_logging) then
1166: wip_logger.exitPoint(p_procName => 'wip_so_reservations.complete_flow_sched_to_so',
1167: p_procReturnStatus => x_return_status,
1168: p_msg => 'error2',
1169: x_returnStatus => l_return_Status); --discard logging return status

Line 1177: if(l_logLevel <= wip_constants.trace_logging) then

1173: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1174: p_count => x_msg_count,
1175: p_data => x_msg_data);
1176: rollback to complete_flow_sched_to_so_1;
1177: if(l_logLevel <= wip_constants.trace_logging) then
1178: wip_logger.exitPoint(p_procName => 'wip_so_reservations.complete_flow_sched_to_so',
1179: p_procReturnStatus => x_return_Status,
1180: p_msg => 'error3',
1181: x_returnStatus => l_return_Status); --discard logging return status

Line 1193: if(l_logLevel <= wip_constants.trace_logging) then

1189: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
1190: p_count => x_msg_count,
1191: p_data => x_msg_data);
1192: rollback to complete_flow_sched_to_so_1;
1193: if(l_logLevel <= wip_constants.trace_logging) then
1194: wip_logger.exitPoint(p_procName => 'wip_so_reservations.complete_flow_sched_to_so',
1195: p_procReturnStatus => x_return_Status,
1196: p_msg => 'error4',
1197: x_returnStatus => l_return_Status); --discard logging return status

Line 1275: exit when l_trx_action_id = WIP_CONSTANTS.CPLASSY_ACTION

1271: /*Bug 5676680: Added one extra parameter p_transaction_temp_id*/
1272: open get_group_recs (p_transaction_header_id, p_transaction_temp_id);
1273: loop
1274: fetch get_group_recs into l_cp_transaction_id, l_trx_action_id,l_trx_temp_id;
1275: exit when l_trx_action_id = WIP_CONSTANTS.CPLASSY_ACTION
1276: or get_group_recs%NOTFOUND;
1277:
1278: end loop;
1279: close get_group_recs;

Line 1282: if (l_trx_action_id <> WIP_CONSTANTS.CPLASSY_ACTION) then

1278: end loop;
1279: close get_group_recs;
1280:
1281: -- this method should only be called for completion transactions
1282: if (l_trx_action_id <> WIP_CONSTANTS.CPLASSY_ACTION) then
1283: return;
1284: end if;
1285:
1286: get_transaction_lines(

Line 1288: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,

1284: end if;
1285:
1286: get_transaction_lines(
1287: p_transaction_header_id => l_cp_transaction_id,
1288: p_transaction_type => WIP_CONSTANTS.WASSY_COMPLETION,
1289: x_return_status => l_return_status,
1290: x_transaction_tbl => l_transaction_tbl);
1291:
1292:

Line 1409: -- note: using WIP_CONSTANTS.NO_LOT in the group by expression causes

1405: --
1406: --
1407: -- Internal helper
1408: -- ---------------------------------------------------------------------------
1409: -- note: using WIP_CONSTANTS.NO_LOT in the group by expression causes
1410: -- ORA-3113. So I am hardcoding the number instead.
1411: -- HISTORY:
1412: -- 02-MAR-2006 spondalu ER 4163405: For returns of lot-controlled assemblies,
1413: -- qty was coming as +ve due to bug in cursor c_transaction_lines.

Line 1439: 2 /*WIP_CONSTANTS.LOT*/, mtlt.primary_quantity*sign(mmtt.primary_quantity), /* ER 4163405 */

1435: mmtt.transaction_source_id,
1436: mmtt.transaction_uom,
1437: mmtt.transaction_date,
1438: sum(decode(msi.lot_control_code,
1439: 2 /*WIP_CONSTANTS.LOT*/, mtlt.primary_quantity*sign(mmtt.primary_quantity), /* ER 4163405 */
1440: mmtt.primary_quantity)),
1441: sum(decode(msi.lot_control_code,
1442: 2 /*WIP_CONSTANTS.LOT*/, mtlt.transaction_quantity*sign(mmtt.transaction_quantity),
1443: mmtt.transaction_quantity)),

Line 1442: 2 /*WIP_CONSTANTS.LOT*/, mtlt.transaction_quantity*sign(mmtt.transaction_quantity),

1438: sum(decode(msi.lot_control_code,
1439: 2 /*WIP_CONSTANTS.LOT*/, mtlt.primary_quantity*sign(mmtt.primary_quantity), /* ER 4163405 */
1440: mmtt.primary_quantity)),
1441: sum(decode(msi.lot_control_code,
1442: 2 /*WIP_CONSTANTS.LOT*/, mtlt.transaction_quantity*sign(mmtt.transaction_quantity),
1443: mmtt.transaction_quantity)),
1444: mmtt.demand_class,
1445: mtlt.lot_expiration_date,
1446: mmtt.transaction_temp_id,

Line 1489: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN

1485:
1486: BEGIN
1487: x_return_status := fnd_api.g_ret_sts_unexp_error;
1488:
1489: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN
1490: l_transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION; /* 31, completion */
1491: ELSE
1492: l_transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION; /* 32, return */
1493: END IF;

Line 1490: l_transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION; /* 31, completion */

1486: BEGIN
1487: x_return_status := fnd_api.g_ret_sts_unexp_error;
1488:
1489: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN
1490: l_transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION; /* 31, completion */
1491: ELSE
1492: l_transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION; /* 32, return */
1493: END IF;
1494:

Line 1492: l_transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION; /* 32, return */

1488:
1489: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN
1490: l_transaction_action_id := WIP_CONSTANTS.CPLASSY_ACTION; /* 31, completion */
1491: ELSE
1492: l_transaction_action_id := WIP_CONSTANTS.RETASSY_ACTION; /* 32, return */
1493: END IF;
1494:
1495: OPEN c_transaction_lines(p_transaction_header_id, l_transaction_action_id);
1496: LOOP

Line 1527: -- note: using WIP_CONSTANTS.NO_LOT in the group by expression causes

1523: --
1524: --
1525: -- Internal helper
1526: -- ---------------------------------------------------------------------------
1527: -- note: using WIP_CONSTANTS.NO_LOT in the group by expression causes
1528: -- ORA-3113. So I am hardcoding the number instead.
1529:
1530: PROCEDURE get_transaction_lines (
1531: p_header_id IN NUMBER,

Line 1669: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION AND

1665: x_query_reservation := 'N';
1666:
1667:
1668: IF (p_transaction_rec.demand_source_header_id IS NOT NULL) THEN
1669: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION AND
1670: ((p_transaction_rec.demand_source_header_id <> p_reservation_rec.demand_source_header_id) or
1671: (p_transaction_rec.demand_source_line_id <> p_reservation_rec.demand_source_line_id) or
1672: (p_transaction_rec.wip_entity_id <> nvl(p_reservation_rec.supply_source_header_id,-1)) or
1673: (p_transaction_rec.lot_control_code = WIP_CONSTANTS.LOT AND /* ER 4163405 */

Line 1673: (p_transaction_rec.lot_control_code = WIP_CONSTANTS.LOT AND /* ER 4163405 */

1669: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION AND
1670: ((p_transaction_rec.demand_source_header_id <> p_reservation_rec.demand_source_header_id) or
1671: (p_transaction_rec.demand_source_line_id <> p_reservation_rec.demand_source_line_id) or
1672: (p_transaction_rec.wip_entity_id <> nvl(p_reservation_rec.supply_source_header_id,-1)) or
1673: (p_transaction_rec.lot_control_code = WIP_CONSTANTS.LOT AND /* ER 4163405 */
1674: p_transaction_rec.lot_number <> p_reservation_rec.lot_number))) THEN
1675: RETURN FALSE;
1676: END IF;
1677:

Line 1678: IF (p_transaction_type = WIP_CONSTANTS.WASSY_RETURN AND

1674: p_transaction_rec.lot_number <> p_reservation_rec.lot_number))) THEN
1675: RETURN FALSE;
1676: END IF;
1677:
1678: IF (p_transaction_type = WIP_CONSTANTS.WASSY_RETURN AND
1679: ((p_transaction_rec.demand_source_header_id <> p_reservation_rec.demand_source_header_id) or
1680: (p_transaction_rec.demand_source_line_id <> p_reservation_rec.demand_source_line_id) or
1681: (p_transaction_rec.lot_control_code = WIP_CONSTANTS.LOT AND /* ER 4163405 */
1682: p_transaction_rec.lot_number <> p_reservation_rec.lot_number))) THEN

Line 1681: (p_transaction_rec.lot_control_code = WIP_CONSTANTS.LOT AND /* ER 4163405 */

1677:
1678: IF (p_transaction_type = WIP_CONSTANTS.WASSY_RETURN AND
1679: ((p_transaction_rec.demand_source_header_id <> p_reservation_rec.demand_source_header_id) or
1680: (p_transaction_rec.demand_source_line_id <> p_reservation_rec.demand_source_line_id) or
1681: (p_transaction_rec.lot_control_code = WIP_CONSTANTS.LOT AND /* ER 4163405 */
1682: p_transaction_rec.lot_number <> p_reservation_rec.lot_number))) THEN
1683: RETURN FALSE;
1684: END IF;
1685:

Line 1694: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION

1690: -- quantity is only checked when the transaction record has
1691: -- a sales order line specified.
1692: -- in the allocation case, quantity is not checked.
1693:
1694: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION
1695: AND p_transaction_rec.primary_quantity >
1696: p_reservation_rec.primary_reservation_quantity) THEN
1697:
1698: -- Check for overcompletion tolerance.

Line 1889: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION

1885:
1886: END IF; -- if p_transaction_rec_.demand_source_header_id IS NOT NULL
1887:
1888:
1889: IF (p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION
1890: and p_reservation_rec.subinventory_code IS NOT NULL
1891: and p_transaction_rec.subinventory_code <>
1892: p_reservation_rec.subinventory_code) THEN
1893: fnd_message.set_name('WIP', 'WIP_INVALID_SUBINV');

Line 1945: IF(p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN

1941: l_to_serial_number inv_reservation_global.serial_number_tbl_type;
1942: l_wip_cfg_rsv_level NUMBER;
1943:
1944: BEGIN
1945: IF(p_transaction_type = WIP_CONSTANTS.WASSY_COMPLETION) THEN
1946: l_quantity := p_transaction_rec.primary_quantity;
1947:
1948: l_to_reservation_rec.supply_source_type_id :=
1949: inv_reservation_global.g_source_type_inv;

Line 2115: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED, WIP_CONSTANTS.RELEASED,

2111: cursor l_always_cursor IS
2112: SELECT wip_entity_id
2113: FROM wip_discrete_jobs wdj
2114: WHERE wdj.organization_id = p_org_id
2115: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED, WIP_CONSTANTS.RELEASED,
2116: WIP_CONSTANTS.COMP_CHRG)
2117: AND wdj.wip_entity_id IN (SELECT wip_entity_id
2118: FROM wip_reservations_v
2119: WHERE demand_source_line_id = p_line_id

Line 2116: WIP_CONSTANTS.COMP_CHRG)

2112: SELECT wip_entity_id
2113: FROM wip_discrete_jobs wdj
2114: WHERE wdj.organization_id = p_org_id
2115: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED, WIP_CONSTANTS.RELEASED,
2116: WIP_CONSTANTS.COMP_CHRG)
2117: AND wdj.wip_entity_id IN (SELECT wip_entity_id
2118: FROM wip_reservations_v
2119: WHERE demand_source_line_id = p_line_id
2120: AND demand_source_header_id = p_header_id

Line 2132: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED, WIP_CONSTANTS.RELEASED,

2128: cursor l_1to1_cursor IS
2129: SELECT wip_entity_id
2130: FROM wip_discrete_jobs wdj
2131: WHERE wdj.organization_id = p_org_id
2132: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED, WIP_CONSTANTS.RELEASED,
2133: WIP_CONSTANTS.COMP_CHRG)
2134: AND wdj.wip_entity_id IN (SELECT wip_entity_id
2135: FROM wip_reservations_v
2136: WHERE demand_source_line_id = p_line_id

Line 2133: WIP_CONSTANTS.COMP_CHRG)

2129: SELECT wip_entity_id
2130: FROM wip_discrete_jobs wdj
2131: WHERE wdj.organization_id = p_org_id
2132: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED, WIP_CONSTANTS.RELEASED,
2133: WIP_CONSTANTS.COMP_CHRG)
2134: AND wdj.wip_entity_id IN (SELECT wip_entity_id
2135: FROM wip_reservations_v
2136: WHERE demand_source_line_id = p_line_id
2137: AND demand_source_header_id = p_header_id

Line 2158: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED,

2154: SELECT wdj.wip_entity_id
2155: FROM wip_discrete_jobs wdj, wip_reservations_v wrv
2156: WHERE wdj.organization_id = p_org_id
2157: AND wdj.organization_id = wrv.organization_id
2158: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED,
2159: WIP_CONSTANTS.RELEASED,
2160: WIP_CONSTANTS.COMP_CHRG)
2161: AND wdj.wip_entity_id = wrv.wip_entity_id
2162: AND wrv.demand_source_line_id = p_line_id

Line 2159: WIP_CONSTANTS.RELEASED,

2155: FROM wip_discrete_jobs wdj, wip_reservations_v wrv
2156: WHERE wdj.organization_id = p_org_id
2157: AND wdj.organization_id = wrv.organization_id
2158: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED,
2159: WIP_CONSTANTS.RELEASED,
2160: WIP_CONSTANTS.COMP_CHRG)
2161: AND wdj.wip_entity_id = wrv.wip_entity_id
2162: AND wrv.demand_source_line_id = p_line_id
2163: AND wrv.demand_source_header_id = p_header_id

Line 2160: WIP_CONSTANTS.COMP_CHRG)

2156: WHERE wdj.organization_id = p_org_id
2157: AND wdj.organization_id = wrv.organization_id
2158: AND wdj.status_type IN (WIP_CONSTANTS.UNRELEASED,
2159: WIP_CONSTANTS.RELEASED,
2160: WIP_CONSTANTS.COMP_CHRG)
2161: AND wdj.wip_entity_id = wrv.wip_entity_id
2162: AND wrv.demand_source_line_id = p_line_id
2163: AND wrv.demand_source_header_id = p_header_id
2164: AND NOT EXISTS (SELECT 1

Line 2183: IF (l_response_code = WIP_CONSTANTS.NEVER) THEN

2179: INTO l_response_code
2180: FROM wip_parameters
2181: WHERE organization_id = p_org_id;
2182:
2183: IF (l_response_code = WIP_CONSTANTS.NEVER) THEN
2184: x_status := fnd_api.g_ret_sts_success;
2185: RETURN; -- reponse type is never
2186:
2187: ELSIF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN

Line 2187: ELSIF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN

2183: IF (l_response_code = WIP_CONSTANTS.NEVER) THEN
2184: x_status := fnd_api.g_ret_sts_success;
2185: RETURN; -- reponse type is never
2186:
2187: ELSIF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN
2188: OPEN l_always_cursor; -- response type is always
2189:
2190: ELSE
2191: OPEN l_1to1_cursor; -- response type is when linked 1-1

Line 2195: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN

2191: OPEN l_1to1_cursor; -- response type is when linked 1-1
2192: END IF;
2193:
2194: LOOP
2195: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN
2196: FETCH l_always_cursor INTO
2197: l_wip_entity_id;
2198: EXIT WHEN l_always_cursor%NOTFOUND;
2199: ELSE

Line 2213: SET status_type = WIP_CONSTANTS.HOLD,

2209: END LOOP;
2210:
2211: -- set any job still in the wip interface to status hold
2212: UPDATE wip_job_schedule_interface
2213: SET status_type = WIP_CONSTANTS.HOLD,
2214: last_update_date = SYSDATE
2215: WHERE organization_id = p_org_id
2216: AND source_code = 'WICDOL'
2217: AND source_line_id = p_line_id;

Line 2219: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN

2215: WHERE organization_id = p_org_id
2216: AND source_code = 'WICDOL'
2217: AND source_line_id = p_line_id;
2218:
2219: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN
2220: CLOSE l_always_cursor;
2221: ELSE
2222: CLOSE l_1to1_cursor;
2223: END IF;

Line 2232: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN

2228: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false,
2229: p_count => x_msg_count,
2230: p_data => x_msg_data);
2231: x_status := fnd_api.g_ret_sts_error;
2232: IF (l_response_code = WIP_CONSTANTS.ALWAYS) THEN
2233: CLOSE l_always_cursor;
2234: ELSE
2235: CLOSE l_1to1_cursor;
2236: END IF;

Line 2420: If ((l_move_transaction_tbl(i).to_intraoperation_step_type = WIP_CONSTANTS.SCRAP) and

2416: -- dbms_output.put_line('transaction record count: '|| move_txn_count );
2417:
2418: For i in 1 .. move_txn_count
2419: Loop
2420: If ((l_move_transaction_tbl(i).to_intraoperation_step_type = WIP_CONSTANTS.SCRAP) and
2421: (l_move_transaction_tbl(i).to_intraoperation_step_type <> l_move_transaction_tbl(i).fm_intraoperation_step_type)) then
2422: l_scrap_primary_txn_quantity := l_move_transaction_tbl(i).primary_quantity;
2423:
2424: -- dbms_output.put_line ('l_scrap_primary_txn_quantity : '|| l_scrap_primary_txn_quantity );