DBA Data[Home] [Help]

APPS.CSD_ESTIMATE_UTILS_PVT dependencies on FND_API

Line 527: RAISE Fnd_Api.G_EXC_ERROR;

523: -- Validate repair line id
524: IF (NOT VALIDATE_REP_LINE_ID(p_estimate_hdr_rec.repair_line_id)) THEN
525: debug('Invalid repair order line[' ||
526: p_estimate_hdr_rec.repair_line_id || ']');
527: RAISE Fnd_Api.G_EXC_ERROR;
528: END IF;
529:
530: -- Check if the repair line has already an estimate record.
531: -- if so then return failure with warning message.

Line 544: RAISE Fnd_Api.G_EXC_ERROR;

540: p_estimate_hdr_rec.repair_line_id);
541: Fnd_Msg_Pub.ADD;
542: Fnd_Msg_Pub.ADD_DETAIL(p_message_type => Fnd_Msg_Pub.G_WARNING_MSG);
543: debug('Estimate header already exists');
544: RAISE Fnd_Api.G_EXC_ERROR;
545: END IF;
546:
547: END VALIDATE_EST_HDR_REC;
548:

Line 589: RAISE Fnd_Api.G_EXC_ERROR;

585: -- Validate incident id status. Ensure that the SR status is not closed.
586: --------------------------------------------------------------------
587: IF (NOT VALIDATE_INCIDENT_ID(l_incident_id)) THEN
588: debug('Invalid incident id[' || l_incident_id || ']');
589: RAISE Fnd_Api.G_EXC_ERROR;
590: END IF;
591:
592: -- Defualt the estiamte date to sysdate if it is null
593: IF (p_estimate_hdr_rec.estimate_date IS NULL) THEN

Line 626: RAISE Fnd_Api.G_EXC_ERROR;

622: --Validate input status
623: IF (NOT VALIDATE_EST_STATUS(p_estimate_hdr_rec.estimate_status)) THEN
624: debug('Invalid estimate status[' ||
625: p_estimate_hdr_rec.estimate_status || ']');
626: RAISE Fnd_Api.G_EXC_ERROR;
627: END IF;
628:
629: -- Validate lead time UOM
630:

Line 633: RAISE Fnd_Api.G_EXC_ERROR;

629: -- Validate lead time UOM
630:
631: IF (NOT VALIDATE_LEAD_TIME_UOM(p_estimate_hdr_rec.lead_time_uom)) THEN
632: debug('Invalid lead time uom[' || p_estimate_hdr_rec.lead_time_uom || ']');
633: RAISE Fnd_Api.G_EXC_ERROR;
634: END IF;
635:
636: END VALIDATE_DEFAULTED_EST_HDR;
637:

Line 875: RAISE Fnd_Api.G_EXC_ERROR;

871: --------------------------------------------------------------------
872: IF (NOT VALIDATE_REP_LINE_ID(p_estimate_line_rec.repair_line_id)) THEN
873: debug('Invalid repair order line[' ||
874: p_estimate_line_rec.repair_line_id || ']');
875: RAISE Fnd_Api.G_EXC_ERROR;
876: END IF;
877:
878: --------------------------------------------------------------------
879: -- Validate estiamate hdr id repair line id combination

Line 886: RAISE Fnd_Api.G_EXC_ERROR;

882: p_estimate_line_rec.repair_line_id)) THEN
883: debug('Invalid estiamte header, rep line[' ||
884: p_estimate_line_rec.repair_line_id || ']estimate[' ||
885: p_estimate_line_rec.repair_estimate_id || ']');
886: RAISE Fnd_Api.G_EXC_ERROR;
887: END IF;
888:
889: --------------------------------------------------------------------
890: -- Validate inventory item id

Line 896: RAISE Fnd_Api.G_EXC_ERROR;

892: IF (NOT
893: Csd_Process_Util.VALIDATE_INVENTORY_ITEM_ID(p_estimate_line_rec.inventory_item_id)) THEN
894: debug('Invalid Inventory item[' ||
895: p_estimate_line_rec.inventory_item_id || ']');
896: RAISE Fnd_Api.G_EXC_ERROR;
897: END IF;
898:
899: --------------------------------------------------------------------
900: -- Validate UOM

Line 906: RAISE Fnd_Api.G_EXC_ERROR;

902:
903: IF (NOT VALIDATE_UOM_CODE(p_estimate_line_rec.unit_of_measure_code,
904: p_estimate_line_rec.inventory_item_id)) THEN
905: debug('Invalid uom[' || p_estimate_line_rec.unit_of_measure_code || ']');
906: RAISE Fnd_Api.G_EXC_ERROR;
907: END IF;
908:
909: --------------------------------------------------------------------
910: -- Validate Price list

Line 915: RAISE Fnd_Api.G_EXC_ERROR;

911: --------------------------------------------------------------------
912:
913: IF (NOT VALIDATE_PRICE_LIST(p_estimate_line_rec.price_list_id)) THEN
914: debug('Invalid uom[' || p_estimate_line_rec.price_list_id || ']');
915: RAISE Fnd_Api.G_EXC_ERROR;
916: END IF;
917:
918: --------------------------------------------------------------------
919: -- Validate add to order (order _header id and order_line_Id)

Line 924: l_order_number = Fnd_Api.G_MISS_CHAR) THEN

920: --------------------------------------------------------------------
921: IF (p_estimate_line_rec.add_to_order_flag = 'Y') THEN
922: l_order_number := VALIDATE_ORDER(p_estimate_line_rec.order_header_id);
923: IF (l_order_number IS NULL OR
924: l_order_number = Fnd_Api.G_MISS_CHAR) THEN
925: debug('Invalid order header id[' ||
926: p_estimate_line_rec.order_header_id || '] ');
927: RAISE Fnd_Api.G_EXC_ERROR;
928: END IF;

Line 927: RAISE Fnd_Api.G_EXC_ERROR;

923: IF (l_order_number IS NULL OR
924: l_order_number = Fnd_Api.G_MISS_CHAR) THEN
925: debug('Invalid order header id[' ||
926: p_estimate_line_rec.order_header_id || '] ');
927: RAISE Fnd_Api.G_EXC_ERROR;
928: END IF;
929: END IF;
930:
931: -- Validate override charge flag.

Line 936: RAISE Fnd_Api.G_EXC_ERROR;

932: IF (p_estimate_line_rec.override_charge_flag = 'Y') THEN
933: IF (NVL(Fnd_Profile.value('CSD_ALLOW_CHARGE_OVERRIDE'), 'N') <> 'Y') THEN
934: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_OVERRIDE_FLAG');
935: Fnd_Msg_Pub.ADD;
936: RAISE Fnd_Api.G_EXC_ERROR;
937: END IF;
938: END IF;
939:
940: END VALIDATE_EST_LINE_REC;

Line 1042: RAISE Fnd_Api.G_EXC_ERROR;

1038: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_TRANSACTION_TYPE');
1039: Fnd_Message.SET_TOKEN('TXN_BILLING_TYPE_ID',
1040: px_estimate_line_rec.txn_billing_Type_id);
1041: Fnd_Msg_Pub.ADD;
1042: RAISE Fnd_Api.G_EXC_ERROR;
1043: END IF;
1044:
1045: IF (px_estimate_line_rec.no_charge_flag = 'Y' AND
1046: (px_estimate_line_rec.override_charge_flag IS NULL OR

Line 1050: RAISE Fnd_Api.G_EXC_ERROR;

1046: (px_estimate_line_rec.override_charge_flag IS NULL OR
1047: px_estimate_line_rec.override_charge_flag <> 'Y')) THEN
1048: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_NOCHARGE_FLAG');
1049: Fnd_Msg_Pub.ADD;
1050: RAISE Fnd_Api.G_EXC_ERROR;
1051: ELSIF (px_estimate_line_rec.no_charge_flag IS NULL OR
1052: px_estimate_line_rec.no_charge_flag <> 'Y') THEN
1053: debug('No charge flag is not Y, deriving from txn_billing_type[' ||
1054: px_estimate_line_rec.txn_billing_Type_id || ']');

Line 1095: RAISE Fnd_Api.G_EXC_ERROR;

1091: px_estimate_line_rec.organization_id := Csd_Process_Util.get_org_id(px_estimate_line_rec.incident_id);
1092: IF (px_estimate_line_rec.organization_id = -1) THEN
1093: debug('incident_id[' || px_estimate_line_rec.incident_id ||
1094: '] is invlaid');
1095: RAISE Fnd_Api.G_EXC_ERROR;
1096: END IF;
1097:
1098: -- Get the billing type from the item.
1099: FOR c1_rec IN CUR_BILLING_TYPE(px_estimate_line_rec.inventory_item_id) LOOP

Line 1163: IF(l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN

1159: x_return_status => l_return_status,
1160: x_msg_data => l_msg_data,
1161: x_msg_count => l_msg_count);
1162:
1163: IF(l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1164: RAISE Fnd_Api.G_EXC_ERROR;
1165: END IF;
1166: END IF;
1167:

Line 1164: RAISE Fnd_Api.G_EXC_ERROR;

1160: x_msg_data => l_msg_data,
1161: x_msg_count => l_msg_count);
1162:
1163: IF(l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1164: RAISE Fnd_Api.G_EXC_ERROR;
1165: END IF;
1166: END IF;
1167:
1168: IF (px_estimate_line_rec.override_charge_flag <> 'Y') THEN

Line 1177: p_init_msg_list => Fnd_Api.G_TRUE,

1173: -- Get the discounted price by applying the contract defaulted from the
1174: --- repair order
1175: -----------------------------------------------------------------------
1176: Csd_Charge_Line_Util.GET_DISCOUNTEDPRICE(p_api_version => 1.0,
1177: p_init_msg_list => Fnd_Api.G_TRUE,
1178: p_contract_line_id => l_contract_line_id,
1179: p_repair_type_id => l_repair_type_id,
1180: p_txn_billing_type_id => px_estimate_line_rec.txn_billing_Type_id,
1181: p_coverage_txn_grp_id => px_estimate_line_rec.coverage_txn_group_id,

Line 1190: IF (l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN

1186: x_return_status => l_return_status,
1187: x_msg_count => l_msg_count,
1188: x_msg_data => l_msg_data);
1189:
1190: IF (l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1191: Fnd_Message.set_name('CSD', 'CSD_EST_ESTIMATED_CHARGE_ERR');
1192: Fnd_Message.set_token('CONTRACT_NUMBER', px_estimate_line_rec.CONTRACT_NUMBER);
1193: Fnd_Msg_Pub.ADD ;
1194: RAISE Fnd_Api.G_EXC_ERROR;

Line 1194: RAISE Fnd_Api.G_EXC_ERROR;

1190: IF (l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1191: Fnd_Message.set_name('CSD', 'CSD_EST_ESTIMATED_CHARGE_ERR');
1192: Fnd_Message.set_token('CONTRACT_NUMBER', px_estimate_line_rec.CONTRACT_NUMBER);
1193: Fnd_Msg_Pub.ADD ;
1194: RAISE Fnd_Api.G_EXC_ERROR;
1195: END IF;
1196: END IF; END IF;
1197:
1198: IF (px_estimate_line_rec.no_Charge_flag = 'Y') THEN

Line 1215: RAISE Fnd_Api.G_EXC_ERROR;

1211: -- billing tpye and repair type_id
1212: --------------------------------------------------------------------
1213: IF (NOT VALIDATE_BILLING_TYPE(l_billing_Type)) THEN
1214: debug('Invalid billing_type[' || l_billing_Type || ']');
1215: RAISE Fnd_Api.G_EXC_ERROR;
1216: END IF;
1217: px_estimate_line_rec.txn_billing_type_id := -1;
1218: FOR c1_rec IN CUR_TXN_BILLING_TYPE(l_repair_type_id, px_estimate_line_rec.billing_category, l_billing_type) LOOP
1219: px_estimate_line_rec.txn_billing_type_id := c1_rec.txn_billing_type_id;

Line 1224: RAISE Fnd_Api.G_EXC_ERROR;

1220: END LOOP;
1221: IF (px_estimate_line_rec.txn_billing_type_id = -1) THEN
1222: debug('txn billing_type_id[' || px_estimate_line_rec.txn_billing_type_id || '] is invlaid'); Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_TXN_BILLING_TYPE');
1223: Fnd_Msg_Pub.ADD;
1224: RAISE Fnd_Api.G_EXC_ERROR;
1225: END IF;
1226:
1227: -- Get the reference number from
1228: -- csi table and populate the instance_id/customer_product_id

Line 1279: RAISE Fnd_Api.G_EXC_ERROR;

1275: -- Validate incident id status. Ensure that the SR status is not closed.
1276: --------------------------------------------------------------------
1277: IF (NOT VALIDATE_INCIDENT_ID(p_estimate_line_rec.incident_id)) THEN
1278: debug('Invalid incident id[' || p_estimate_line_rec.incident_id || ']');
1279: RAISE Fnd_Api.G_EXC_ERROR;
1280: END IF;
1281:
1282: --------------------------------------------------------------------
1283: -- Get the item attributes and validate revision, serial number,

Line 1306: p_estimate_line_rec.unit_of_measure_code = Fnd_Api.G_MISS_CHAR) THEN

1302: ']serial control[' || l_serial_control || ']');
1303:
1304: /****
1305: IF (p_estimate_line_rec.unit_of_measure_code IS NULL OR
1306: p_estimate_line_rec.unit_of_measure_code = Fnd_Api.G_MISS_CHAR) THEN
1307: p_estimate_line_rec.unit_of_measure_code := l_uom_Code;
1308: END IF;
1309: ***********/
1310:

Line 1314: p_estimate_line_rec.item_revision <> Fnd_Api.G_MISS_CHAR AND

1310:
1311: debug('serial number[' || p_estimate_line_rec.serial_number || ']');
1312: IF (l_revision_control = 'Y') THEN
1313: IF (p_estimate_line_rec.item_revision IS NOT NULL AND
1314: p_estimate_line_rec.item_revision <> Fnd_Api.G_MISS_CHAR AND
1315: NOT VALIDATE_REVISION(p_estimate_line_rec.item_revision,
1316: p_estimate_line_rec.inventory_item_id,
1317: Cs_Std.GET_ITEM_VALDN_ORGZN_ID)) THEN
1318: debug('Invalid revision[' || p_estimate_line_rec.item_revision || ']');

Line 1319: RAISE Fnd_Api.G_EXC_ERROR;

1315: NOT VALIDATE_REVISION(p_estimate_line_rec.item_revision,
1316: p_estimate_line_rec.inventory_item_id,
1317: Cs_Std.GET_ITEM_VALDN_ORGZN_ID)) THEN
1318: debug('Invalid revision[' || p_estimate_line_rec.item_revision || ']');
1319: RAISE Fnd_Api.G_EXC_ERROR;
1320: END IF;
1321: END IF;
1322:
1323: IF (l_serial_control = 'Y') THEN

Line 1325: p_estimate_line_rec.serial_number <> Fnd_Api.G_MISS_CHAR AND NOT

1321: END IF;
1322:
1323: IF (l_serial_control = 'Y') THEN
1324: IF (p_estimate_line_rec.serial_number IS NOT NULL AND
1325: p_estimate_line_rec.serial_number <> Fnd_Api.G_MISS_CHAR AND NOT
1326: VALIDATE_SERIAL_NUMBER(p_estimate_line_rec.serial_number,
1327: p_estimate_line_rec.inventory_item_id)) THEN
1328: debug('Invalid serial number[' || p_estimate_line_rec.serial_number || ']');
1329: RAISE Fnd_Api.G_EXC_ERROR;

Line 1329: RAISE Fnd_Api.G_EXC_ERROR;

1325: p_estimate_line_rec.serial_number <> Fnd_Api.G_MISS_CHAR AND NOT
1326: VALIDATE_SERIAL_NUMBER(p_estimate_line_rec.serial_number,
1327: p_estimate_line_rec.inventory_item_id)) THEN
1328: debug('Invalid serial number[' || p_estimate_line_rec.serial_number || ']');
1329: RAISE Fnd_Api.G_EXC_ERROR;
1330: END IF;
1331: END IF;
1332:
1333: END VALIDATE_DEFAULTED_EST_LINE;