DBA Data[Home] [Help]

APPS.AHL_OSP_SHIPMENT_PUB dependencies on AHL_OSP_ORDERS_PVT

Line 495: Added by jaramana on January 11, 2008 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure

491: x_del_oe_lines_tbl => l_del_oe_lines_tbl -- Additional Parameter to get the lines to be deleted
492: );
493:
494: /*
495: Added by jaramana on January 11, 2008 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure
496: We do not have any warning messages hence if the message count is > 0 then it means there are validation errors and since
497: we call a Public API in this procedure, its better we throw the error here itself.
498: */
499: l_msg_count := FND_MSG_PUB.count_msg;

Line 729: IF(p_x_lines_tbl(i).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

725: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'p_x_lines_tbl(i).order_type :' ||p_x_lines_tbl(i).order_type);
726: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'p_x_lines_tbl(i).line_id :' ||p_x_lines_tbl(i).line_id);
727: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'p_x_lines_tbl(i).ship_from_org_id :' ||p_x_lines_tbl(i).ship_from_org_id);
728: END IF;
729: IF(p_x_lines_tbl(i).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
730: /*
731: For exchange orders, the return line's sub-transaction record is to be created by ourselves even though
732: the instance is not updated as part of the order line's exchange instance. Otherwise OM creates it with
733: the default sub-transction and not use the AHL IB profile.

Line 830: Note that in this case, AHL_OSP_ORDERS_PVT will not populate the p_x_lines_tbl if a shipment already exists for the first line

826: /* Modified by jaramana on January 11, 2008 to fix the Bug 5688387/5842229
827: p_x_header_rec will have the osp_order_id when
828: 1. "Create Shipment" action from Edit Osp Order is used
829: 2. If user is creating multiple services for the same physical item from the "Create Item Order Line" on the Edit Osp Order UI.
830: Note that in this case, AHL_OSP_ORDERS_PVT will not populate the p_x_lines_tbl if a shipment already exists for the first line
831:
832: p_x_lines_tbl will have the osp_order_id when "Create Shipment Line" UI is used for creating the ship lines.
833: In this case, the p_x_header_rec will not have been populated.
834: Instead of the l_osp_order_id we were directly using p_x_header_rec.osp_order_id before.

Line 1001: Added by jaramana on January 11, 2008 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure

997: END LOOP;
998: END IF;
999:
1000: /*
1001: Added by jaramana on January 11, 2008 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure
1002: We do not have any warning messages hence if the message count is > 0 then it means there are validation errors and since
1003: we call a Public API in this procedure, its better we throw the error here itself.
1004: */
1005: l_msg_count := FND_MSG_PUB.count_msg;

Line 1297: Added by jaramana on January 11, 2008 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure

1293: END IF; -- Elsif line table count > 0
1294:
1295: --
1296: /*
1297: Added by jaramana on January 11, 2008 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure
1298: We do not have any warning messages hence if the message count is > 0 then it means there are validation errors and since
1299: we call a Public API in this procedure, its better we throw the error here itself.
1300: */
1301: l_msg_count := FND_MSG_PUB.count_msg;

Line 2773: (p_x_line_tbl(i).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN

2769:
2770: -- For Exchange Order Return lines, use the exchange instance id instead
2771: IF (p_x_line_tbl(i).operation <> 'D') AND
2772: ((p_x_line_tbl(i).line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID')) AND
2773: (p_x_line_tbl(i).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN
2774:
2775: -- yazhou 26-Apr-2006 ends
2776: /*
2777: IF (l_wo_rec.exchange_instance_id IS NULL OR l_wo_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN

Line 3022: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

3018: END IF;
3019: RAISE Fnd_Api.g_exc_error;
3020: END IF;
3021: -- For exchange orders, the ship date can be after the return date (Advance Exchange)
3022: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
3023: --For others, ship date must be before return date
3024: IF (l_return_date < p_x_line_tbl(i).schedule_ship_date) THEN
3025: CLOSE ahl_oe_schedule_date_csr;
3026: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN

Line 3098: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

3094: END IF;
3095: RAISE Fnd_Api.g_exc_error;
3096: END IF;
3097: -- For exchange orders, the ship date can be after the return date (Advance Exchange)
3098: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
3099: --For others, return date must be after the ship date
3100: IF (l_ship_date > p_x_line_tbl(i).schedule_ship_date) THEN
3101: CLOSE ahl_oe_schedule_date_csr;
3102: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN

Line 3174: (p_x_line_tbl(i).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN

3170:
3171: -- For Exchange Order Return lines, use the exchange instance id instead
3172: IF (p_x_line_tbl(i).operation <> 'D') AND
3173: ((p_x_line_tbl(i).line_type_id = FND_PROFILE.VALUE('AHL_OSP_OE_RETURN_ID')) AND
3174: (p_x_line_tbl(i).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN
3175:
3176: -- yazhou 26-Apr-2006 ends
3177:
3178: /*

Line 3439: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

3435: END IF;
3436: RAISE Fnd_Api.g_exc_error;
3437: END IF;
3438: -- For exchange orders, the ship date can be after the return date (Advance Exchange)
3439: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
3440: --For others, ship date must be before return date
3441: IF (l_return_date < p_x_line_tbl(i).schedule_ship_date) THEN
3442: CLOSE ahl_oe_Inv_schedule_date_csr;
3443: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN

Line 3532: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

3528: END IF;
3529: RAISE Fnd_Api.g_exc_error;
3530: END IF;
3531: -- For exchange orders, the ship date can be after the return date (Advance Exchange)
3532: ELSIF (p_x_line_tbl(i).order_type <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
3533: --For others, return date must be after the ship date
3534: IF (l_ship_date > p_x_line_tbl(i).schedule_ship_date) THEN
3535: CLOSE ahl_oe_Inv_schedule_date_csr;
3536: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN

Line 3839: IF (p_x_line_tbl(l_index).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

3835:
3836: /* For Exchange Orders, the return lines must reflect the exchange instance.
3837: l_index corresponds to the index of the return line
3838: */
3839: IF (p_x_line_tbl(l_index).order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
3840: -- Get the exchange instance and the instance details
3841: OPEN exchange_instance_dtls_csr(p_x_line_tbl(l_index).osp_line_id);
3842: FETCH exchange_instance_dtls_csr INTO l_exchange_inst_dtls;
3843:

Line 5064: (p_OSP_order_type NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,

5060:
5061: -- Check input order and line types.
5062: -- If types not valid , return.
5063: IF (p_oe_line_type NOT IN ('ORDER','RETURN')) OR
5064: (p_OSP_order_type NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5065: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_LOAN,
5066: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW,
5067: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN
5068: RETURN;

Line 5065: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_LOAN,

5061: -- Check input order and line types.
5062: -- If types not valid , return.
5063: IF (p_oe_line_type NOT IN ('ORDER','RETURN')) OR
5064: (p_OSP_order_type NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5065: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_LOAN,
5066: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW,
5067: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN
5068: RETURN;
5069: END IF;

Line 5066: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW,

5062: -- If types not valid , return.
5063: IF (p_oe_line_type NOT IN ('ORDER','RETURN')) OR
5064: (p_OSP_order_type NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5065: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_LOAN,
5066: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW,
5067: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN
5068: RETURN;
5069: END IF;
5070:

Line 5067: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN

5063: IF (p_oe_line_type NOT IN ('ORDER','RETURN')) OR
5064: (p_OSP_order_type NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5065: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_LOAN,
5066: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW,
5067: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) THEN
5068: RETURN;
5069: END IF;
5070:
5071: IF (p_oe_line_type = 'ORDER') THEN

Line 5087: IF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE THEN

5083: END IF;
5084: CLOSE csi_txn_types_csr;
5085:
5086: -- get csi transaction ID for sub type based on OSP Order type
5087: IF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE THEN
5088: --l_subtxn_name := G_SUBTXN_EXC_ORDER; --for ER 4746426
5089: l_subtxn_id := FND_PROFILE.VALUE('AHL_OSP_IB_SUBTXN_EXC_SHIP');
5090: IF l_subtxn_id IS NULL THEN
5091: --FND_MESSAGE.Set_Name('AHL','AHL_OSP_IB_SUBTXN_NOTFOUND');

Line 5152: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE THEN

5148: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, ' ACCOUNT_ID = ' || l_party_account_rec.ACCOUNT_ID);
5149: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, ' RELATIONSHIP_TYPE_CODE = ' || l_party_account_rec.RELATIONSHIP_TYPE_CODE);
5150: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, ' TXN_PARTY_DETAILS_INDEX = ' || l_party_account_rec.TXN_PARTY_DETAILS_INDEX);
5151: END IF;
5152: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE THEN
5153: l_subtxn_id := FND_PROFILE.VALUE('AHL_OSP_IB_SUBTXN_SER_SHIP');
5154: IF l_subtxn_id IS NULL THEN
5155: --FND_MESSAGE.Set_Name('AHL','AHL_OSP_IB_SUBTXN_NOTFOUND');
5156: --FND_MESSAGE.Set_Token('TYPE','Service Order Ship');

Line 5163: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW THEN

5159: FND_MSG_PUB.ADD;
5160: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5161: RETURN;
5162: END IF;
5163: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW THEN
5164: --l_subtxn_name := G_SUBTXN_ORDER;
5165: l_subtxn_id := FND_PROFILE.VALUE('AHL_OSP_IB_SUBTXN_BOR_SHIP');
5166: IF l_subtxn_id IS NULL THEN
5167: --FND_MESSAGE.Set_Name('AHL','AHL_OSP_IB_SUBTXN_NOTFOUND');

Line 5206: IF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE THEN

5202: END IF;
5203: CLOSE csi_txn_types_csr;
5204:
5205: -- get csi transaction ID for sub type based on OSP Order type
5206: IF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE THEN
5207: --l_subtxn_name := G_SUBTXN_EXC_RETURN; --for ER 4746426
5208: l_subtxn_id := fnd_profile.VALUE('AHL_OSP_IB_SUBTXN_EXC_RETURN');
5209: IF l_subtxn_id IS NULL THEN
5210: --FND_MESSAGE.Set_Name('AHL','AHL_OSP_IB_SUBTXN_NOTFOUND');

Line 5264: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE THEN

5260: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, ' CONTACT_FLAG = ' || l_party_dtl_rec.CONTACT_FLAG);
5261: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, ' TXN_LINE_DETAILS_INDEX = ' || l_party_dtl_rec.TXN_LINE_DETAILS_INDEX);
5262: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, ' INSTANCE_PARTY_ID = ' || l_party_dtl_rec.INSTANCE_PARTY_ID);
5263: END IF;
5264: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE THEN
5265: l_subtxn_id := FND_PROFILE.VALUE('AHL_OSP_IB_SUBTXN_SER_RETURN');
5266: IF l_subtxn_id IS NULL THEN
5267: --FND_MESSAGE.Set_Name('AHL','AHL_OSP_IB_SUBTXN_NOTFOUND');
5268: --FND_MESSAGE.Set_Token('TYPE','Service Order Return');

Line 5275: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW THEN

5271: FND_MSG_PUB.ADD;
5272: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5273: RETURN;
5274: END IF;
5275: ELSIF p_OSP_order_type = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_BORROW THEN
5276: l_subtxn_id := FND_PROFILE.VALUE('AHL_OSP_IB_SUBTXN_BOR_RETURN');
5277: IF l_subtxn_id IS NULL THEN
5278: --FND_MESSAGE.Set_Name('AHL','AHL_OSP_IB_SUBTXN_NOTFOUND');
5279: --FND_MESSAGE.Set_Token('TYPE','Borrow Order Return');

Line 5543: status_code <> AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS and

5539:
5540: CURSOR validate_osp_id_csr (p_osp_order_id IN NUMBER) IS
5541: SELECT 'X' from ahl_osp_orders_b where
5542: OSP_ORDER_ID = p_osp_order_id and
5543: status_code <> AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS and
5544: ORDER_TYPE_CODE IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5545: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE);
5546:
5547: CURSOR get_return_line_ids_csr (p_osp_order_id IN NUMBER) IS

Line 5544: ORDER_TYPE_CODE IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,

5540: CURSOR validate_osp_id_csr (p_osp_order_id IN NUMBER) IS
5541: SELECT 'X' from ahl_osp_orders_b where
5542: OSP_ORDER_ID = p_osp_order_id and
5543: status_code <> AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS and
5544: ORDER_TYPE_CODE IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5545: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE);
5546:
5547: CURSOR get_return_line_ids_csr (p_osp_order_id IN NUMBER) IS
5548: --mpothuku added distinct on 13-Feb-2007 for implementing the Osp Receiving feature.

Line 5545: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE);

5541: SELECT 'X' from ahl_osp_orders_b where
5542: OSP_ORDER_ID = p_osp_order_id and
5543: status_code <> AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS and
5544: ORDER_TYPE_CODE IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5545: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE);
5546:
5547: CURSOR get_return_line_ids_csr (p_osp_order_id IN NUMBER) IS
5548: --mpothuku added distinct on 13-Feb-2007 for implementing the Osp Receiving feature.
5549: --If there are multiple services for the same physical item, the following query will return the same return line id multiple

Line 5611: (p_old_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,

5607: -- Validate the type codes
5608: IF ((p_old_order_type_code IS NULL) OR
5609: (p_new_order_type_code IS NULL) OR
5610: (p_old_order_type_code = p_new_order_type_code) OR
5611: (p_old_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5612: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) OR
5613: (p_new_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5614: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE))) THEN
5615: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN

Line 5612: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) OR

5608: IF ((p_old_order_type_code IS NULL) OR
5609: (p_new_order_type_code IS NULL) OR
5610: (p_old_order_type_code = p_new_order_type_code) OR
5611: (p_old_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5612: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) OR
5613: (p_new_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5614: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE))) THEN
5615: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
5616: Fnd_Message.set_name('AHL', 'AHL_OSP_INV_TYPE_CHANGE');

Line 5613: (p_new_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,

5609: (p_new_order_type_code IS NULL) OR
5610: (p_old_order_type_code = p_new_order_type_code) OR
5611: (p_old_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5612: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) OR
5613: (p_new_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5614: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE))) THEN
5615: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
5616: Fnd_Message.set_name('AHL', 'AHL_OSP_INV_TYPE_CHANGE');
5617: Fnd_Msg_Pub.ADD;

Line 5614: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE))) THEN

5610: (p_old_order_type_code = p_new_order_type_code) OR
5611: (p_old_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5612: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE)) OR
5613: (p_new_order_type_code NOT IN (AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
5614: AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE))) THEN
5615: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
5616: Fnd_Message.set_name('AHL', 'AHL_OSP_INV_TYPE_CHANGE');
5617: Fnd_Msg_Pub.ADD;
5618: IF (FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 5886: IF (p_new_order_type_code = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE) THEN

5882: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5883: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Got current owner, l_curr_pty_id = ' || l_curr_pty_id || ', l_curr_inst_pty_id = ' || l_curr_inst_pty_id);
5884: END IF;
5885:
5886: IF (p_new_order_type_code = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE) THEN
5887: -- Exchange to Service conversion: New owner will be internal
5888: l_new_party_id := l_internal_party_id;
5889: -- l_new_party_acc_id will be null
5890: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 5893: ELSIF (p_new_order_type_code = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN

5889: -- l_new_party_acc_id will be null
5890: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5891: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Exchange to Service conversion: New internal owner = ' || l_new_party_id);
5892: END IF;
5893: ELSIF (p_new_order_type_code = AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE) THEN
5894: -- Service to Exchange conversion: New owner will be the ship to org
5895: -- Determine the id of this party
5896: OPEN get_sold_to_org(l_oe_ship_line_id);
5897: FETCH get_sold_to_org INTO l_new_party_id, l_new_party_acc_id;

Line 6170: --Added by mpothuku on 11-Jul-06 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure

6166: G_PKG_NAME) THEN
6167: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6168: END IF;
6169:
6170: --Added by mpothuku on 11-Jul-06 to raise any validation errors that may have been accumulated by the AHL_OSP_ORDERS_PVT procedure
6171: --We do not have any warning messages hence if the message count is > 0 then it means there are validation errors and since
6172: --we call a Public API in this procedure, its better we throw the errore here itself.
6173:
6174: IF FND_MSG_PUB.count_msg > 0 THEN

Line 6328: If this is not done, AHL_OSP_ORDERS_PVT assumes that there is an error if the message stack count is > 0

6324: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6325: /*
6326: If success is returned by the Public API, clear the message stack to eat up any warning messages from OM API.
6327: Note that we may need to revise this approach at a later point to show the warning messages too
6328: If this is not done, AHL_OSP_ORDERS_PVT assumes that there is an error if the message stack count is > 0
6329: Also note that had there been any validation errors that had been accumulated we would have thrown at the beginning
6330: of this procedure
6331: */
6332:

Line 6488: IF(l_get_order_details.order_type_code <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE OR

6484: 'osp_header_status_code -> ' ||l_get_order_details.osp_header_status_code ||
6485: 'osp_line_status_code -> ' ||l_get_order_details.osp_line_status_code);
6486: END IF;
6487:
6488: IF(l_get_order_details.order_type_code <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE OR
6489: l_get_order_details.osp_header_status_code = AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS OR
6490: l_get_order_details.osp_line_status_code is not NULL) THEN
6491: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6492: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Invalid Osp Order Type or Status');

Line 6489: l_get_order_details.osp_header_status_code = AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS OR

6485: 'osp_line_status_code -> ' ||l_get_order_details.osp_line_status_code);
6486: END IF;
6487:
6488: IF(l_get_order_details.order_type_code <> AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE OR
6489: l_get_order_details.osp_header_status_code = AHL_OSP_ORDERS_PVT.G_OSP_CLOSED_STATUS OR
6490: l_get_order_details.osp_line_status_code is not NULL) THEN
6491: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6492: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Invalid Osp Order Type or Status');
6493: END IF;

Line 7362: p_osp_order_type => AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,

7358: p_validation_level => p_validation_level,
7359: x_return_status => x_return_status,
7360: x_msg_count => x_msg_count,
7361: x_msg_data => x_msg_data,
7362: p_osp_order_type => AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_SERVICE,
7363: p_oe_line_type => 'RETURN',
7364: p_oe_line_id => l_osp_order_line_dtls.oe_return_line_id,
7365: p_csi_instance_id => l_serialnum_change_rec.instance_id);
7366: