DBA Data[Home] [Help]

APPS.CSD_ESTIMATE_UTILS_PVT dependencies on FND_API

Line 529: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 546: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 591: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 628: RAISE Fnd_Api.G_EXC_ERROR;

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

Line 639: RAISE Fnd_Api.G_EXC_ERROR;

635: IF (p_estimate_hdr_rec.lead_time is not null or
636: p_estimate_hdr_rec.lead_time_uom is not null) THEN
637: IF (NOT VALIDATE_LEAD_TIME_UOM(p_estimate_hdr_rec.lead_time_uom)) THEN
638: debug('Invalid lead time uom[' || p_estimate_hdr_rec.lead_time_uom || ']');
639: RAISE Fnd_Api.G_EXC_ERROR;
640: END IF;
641: END IF;
642:
643: END VALIDATE_DEFAULTED_EST_HDR;

Line 900: RAISE Fnd_Api.G_EXC_ERROR;

896: --------------------------------------------------------------------
897: IF (NOT VALIDATE_REP_LINE_ID(p_estimate_line_rec.repair_line_id)) THEN
898: debug('Invalid repair order line[' ||
899: p_estimate_line_rec.repair_line_id || ']');
900: RAISE Fnd_Api.G_EXC_ERROR;
901: END IF;
902:
903: --------------------------------------------------------------------
904: -- Validate estiamate hdr id repair line id combination

Line 911: RAISE Fnd_Api.G_EXC_ERROR;

907: p_estimate_line_rec.repair_line_id)) THEN
908: debug('Invalid estiamte header, rep line[' ||
909: p_estimate_line_rec.repair_line_id || ']estimate[' ||
910: p_estimate_line_rec.repair_estimate_id || ']');
911: RAISE Fnd_Api.G_EXC_ERROR;
912: END IF;
913:
914: --------------------------------------------------------------------
915: -- Validate inventory item id

Line 921: RAISE Fnd_Api.G_EXC_ERROR;

917: IF (NOT
918: Csd_Process_Util.VALIDATE_INVENTORY_ITEM_ID(p_estimate_line_rec.inventory_item_id)) THEN
919: debug('Invalid Inventory item[' ||
920: p_estimate_line_rec.inventory_item_id || ']');
921: RAISE Fnd_Api.G_EXC_ERROR;
922: END IF;
923:
924: --------------------------------------------------------------------
925: -- Validate UOM

Line 931: RAISE Fnd_Api.G_EXC_ERROR;

927:
928: IF (NOT VALIDATE_UOM_CODE(p_estimate_line_rec.unit_of_measure_code,
929: p_estimate_line_rec.inventory_item_id)) THEN
930: debug('Invalid uom[' || p_estimate_line_rec.unit_of_measure_code || ']');
931: RAISE Fnd_Api.G_EXC_ERROR;
932: END IF;
933:
934: --------------------------------------------------------------------
935: -- Validate Price list

Line 940: RAISE Fnd_Api.G_EXC_ERROR;

936: --------------------------------------------------------------------
937:
938: IF (NOT VALIDATE_PRICE_LIST(p_estimate_line_rec.price_list_id)) THEN
939: debug('Invalid uom[' || p_estimate_line_rec.price_list_id || ']');
940: RAISE Fnd_Api.G_EXC_ERROR;
941: END IF;
942:
943: --------------------------------------------------------------------
944: -- Validate add to order (order _header id and order_line_Id)

Line 949: l_order_number = Fnd_Api.G_MISS_CHAR) THEN

945: --------------------------------------------------------------------
946: IF (p_estimate_line_rec.add_to_order_flag = 'Y') THEN
947: l_order_number := VALIDATE_ORDER(p_estimate_line_rec.order_header_id);
948: IF (l_order_number IS NULL OR
949: l_order_number = Fnd_Api.G_MISS_CHAR) THEN
950: debug('Invalid order header id[' ||
951: p_estimate_line_rec.order_header_id || '] ');
952: RAISE Fnd_Api.G_EXC_ERROR;
953: END IF;

Line 952: RAISE Fnd_Api.G_EXC_ERROR;

948: IF (l_order_number IS NULL OR
949: l_order_number = Fnd_Api.G_MISS_CHAR) THEN
950: debug('Invalid order header id[' ||
951: p_estimate_line_rec.order_header_id || '] ');
952: RAISE Fnd_Api.G_EXC_ERROR;
953: END IF;
954: END IF;
955:
956: -- Validate override charge flag.

Line 961: RAISE Fnd_Api.G_EXC_ERROR;

957: IF (p_estimate_line_rec.override_charge_flag = 'Y') THEN
958: IF (NVL(Fnd_Profile.value('CSD_ALLOW_CHARGE_OVERRIDE'), 'N') <> 'Y') THEN
959: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_OVERRIDE_FLAG');
960: Fnd_Msg_Pub.ADD;
961: RAISE Fnd_Api.G_EXC_ERROR;
962: END IF;
963: END IF;
964:
965: END VALIDATE_EST_LINE_REC;

Line 1067: RAISE Fnd_Api.G_EXC_ERROR;

1063: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_TRANSACTION_TYPE');
1064: Fnd_Message.SET_TOKEN('TXN_BILLING_TYPE_ID',
1065: px_estimate_line_rec.txn_billing_Type_id);
1066: Fnd_Msg_Pub.ADD;
1067: RAISE Fnd_Api.G_EXC_ERROR;
1068: END IF;
1069:
1070: IF (px_estimate_line_rec.no_charge_flag = 'Y' AND
1071: (px_estimate_line_rec.override_charge_flag IS NULL OR

Line 1075: RAISE Fnd_Api.G_EXC_ERROR;

1071: (px_estimate_line_rec.override_charge_flag IS NULL OR
1072: px_estimate_line_rec.override_charge_flag <> 'Y')) THEN
1073: Fnd_Message.SET_NAME('CSD', 'CSD_API_INV_NOCHARGE_FLAG');
1074: Fnd_Msg_Pub.ADD;
1075: RAISE Fnd_Api.G_EXC_ERROR;
1076: ELSIF (px_estimate_line_rec.no_charge_flag IS NULL OR
1077: px_estimate_line_rec.no_charge_flag <> 'Y') THEN
1078: debug('No charge flag is not Y, deriving from txn_billing_type[' ||
1079: px_estimate_line_rec.txn_billing_Type_id || ']');

Line 1120: RAISE Fnd_Api.G_EXC_ERROR;

1116: px_estimate_line_rec.organization_id := Csd_Process_Util.get_org_id(px_estimate_line_rec.incident_id);
1117: IF (px_estimate_line_rec.organization_id = -1) THEN
1118: debug('incident_id[' || px_estimate_line_rec.incident_id ||
1119: '] is invlaid');
1120: RAISE Fnd_Api.G_EXC_ERROR;
1121: END IF;
1122:
1123: -- Get the billing type from the item.
1124: FOR c1_rec IN CUR_BILLING_TYPE(px_estimate_line_rec.inventory_item_id) LOOP

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

1184: x_return_status => l_return_status,
1185: x_msg_data => l_msg_data,
1186: x_msg_count => l_msg_count);
1187:
1188: IF(l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1189: RAISE Fnd_Api.G_EXC_ERROR;
1190: END IF;
1191: END IF;
1192:

Line 1189: RAISE Fnd_Api.G_EXC_ERROR;

1185: x_msg_data => l_msg_data,
1186: x_msg_count => l_msg_count);
1187:
1188: IF(l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1189: RAISE Fnd_Api.G_EXC_ERROR;
1190: END IF;
1191: END IF;
1192:
1193: IF (px_estimate_line_rec.override_charge_flag <> 'Y') THEN

Line 1202: p_init_msg_list => Fnd_Api.G_TRUE,

1198: -- Get the discounted price by applying the contract defaulted from the
1199: --- repair order
1200: -----------------------------------------------------------------------
1201: Csd_Charge_Line_Util.GET_DISCOUNTEDPRICE(p_api_version => 1.0,
1202: p_init_msg_list => Fnd_Api.G_TRUE,
1203: p_contract_line_id => l_contract_line_id,
1204: p_repair_type_id => l_repair_type_id,
1205: p_txn_billing_type_id => px_estimate_line_rec.txn_billing_Type_id,
1206: p_coverage_txn_grp_id => px_estimate_line_rec.coverage_txn_group_id,

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

1211: x_return_status => l_return_status,
1212: x_msg_count => l_msg_count,
1213: x_msg_data => l_msg_data);
1214:
1215: IF (l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1216: Fnd_Message.set_name('CSD', 'CSD_EST_ESTIMATED_CHARGE_ERR');
1217: Fnd_Message.set_token('CONTRACT_NUMBER', px_estimate_line_rec.CONTRACT_NUMBER);
1218: Fnd_Msg_Pub.ADD ;
1219: RAISE Fnd_Api.G_EXC_ERROR;

Line 1219: RAISE Fnd_Api.G_EXC_ERROR;

1215: IF (l_return_status <> Fnd_Api.G_RET_STS_SUCCESS) THEN
1216: Fnd_Message.set_name('CSD', 'CSD_EST_ESTIMATED_CHARGE_ERR');
1217: Fnd_Message.set_token('CONTRACT_NUMBER', px_estimate_line_rec.CONTRACT_NUMBER);
1218: Fnd_Msg_Pub.ADD ;
1219: RAISE Fnd_Api.G_EXC_ERROR;
1220: END IF;
1221: END IF; END IF;
1222:
1223: IF (px_estimate_line_rec.no_Charge_flag = 'Y') THEN

Line 1240: RAISE Fnd_Api.G_EXC_ERROR;

1236: -- billing tpye and repair type_id
1237: --------------------------------------------------------------------
1238: IF (NOT VALIDATE_BILLING_TYPE(l_billing_Type)) THEN
1239: debug('Invalid billing_type[' || l_billing_Type || ']');
1240: RAISE Fnd_Api.G_EXC_ERROR;
1241: END IF;
1242: px_estimate_line_rec.txn_billing_type_id := -1;
1243: FOR c1_rec IN CUR_TXN_BILLING_TYPE(l_repair_type_id, px_estimate_line_rec.billing_category, l_billing_type) LOOP
1244: px_estimate_line_rec.txn_billing_type_id := c1_rec.txn_billing_type_id;

Line 1249: RAISE Fnd_Api.G_EXC_ERROR;

1245: END LOOP;
1246: IF (px_estimate_line_rec.txn_billing_type_id = -1) THEN
1247: 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');
1248: Fnd_Msg_Pub.ADD;
1249: RAISE Fnd_Api.G_EXC_ERROR;
1250: END IF;
1251:
1252: -- Get the reference number from
1253: -- csi table and populate the instance_id/customer_product_id

Line 1304: RAISE Fnd_Api.G_EXC_ERROR;

1300: -- Validate incident id status. Ensure that the SR status is not closed.
1301: --------------------------------------------------------------------
1302: IF (NOT VALIDATE_INCIDENT_ID(p_estimate_line_rec.incident_id)) THEN
1303: debug('Invalid incident id[' || p_estimate_line_rec.incident_id || ']');
1304: RAISE Fnd_Api.G_EXC_ERROR;
1305: END IF;
1306:
1307: --------------------------------------------------------------------
1308: -- Get the item attributes and validate revision, serial number,

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

1327: ']serial control[' || l_serial_control || ']');
1328:
1329: /****
1330: IF (p_estimate_line_rec.unit_of_measure_code IS NULL OR
1331: p_estimate_line_rec.unit_of_measure_code = Fnd_Api.G_MISS_CHAR) THEN
1332: p_estimate_line_rec.unit_of_measure_code := l_uom_Code;
1333: END IF;
1334: ***********/
1335:

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

1335:
1336: debug('serial number[' || p_estimate_line_rec.serial_number || ']');
1337: IF (l_revision_control = 'Y') THEN
1338: IF (p_estimate_line_rec.item_revision IS NOT NULL AND
1339: p_estimate_line_rec.item_revision <> Fnd_Api.G_MISS_CHAR AND
1340: NOT VALIDATE_REVISION(p_estimate_line_rec.item_revision,
1341: p_estimate_line_rec.inventory_item_id,
1342: Cs_Std.GET_ITEM_VALDN_ORGZN_ID)) THEN
1343: debug('Invalid revision[' || p_estimate_line_rec.item_revision || ']');

Line 1344: RAISE Fnd_Api.G_EXC_ERROR;

1340: NOT VALIDATE_REVISION(p_estimate_line_rec.item_revision,
1341: p_estimate_line_rec.inventory_item_id,
1342: Cs_Std.GET_ITEM_VALDN_ORGZN_ID)) THEN
1343: debug('Invalid revision[' || p_estimate_line_rec.item_revision || ']');
1344: RAISE Fnd_Api.G_EXC_ERROR;
1345: END IF;
1346: END IF;
1347:
1348: IF (l_serial_control = 'Y') THEN

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

1346: END IF;
1347:
1348: IF (l_serial_control = 'Y') THEN
1349: IF (p_estimate_line_rec.serial_number IS NOT NULL AND
1350: p_estimate_line_rec.serial_number <> Fnd_Api.G_MISS_CHAR AND NOT
1351: VALIDATE_SERIAL_NUMBER(p_estimate_line_rec.serial_number,
1352: p_estimate_line_rec.inventory_item_id)) THEN
1353: debug('Invalid serial number[' || p_estimate_line_rec.serial_number || ']');
1354: RAISE Fnd_Api.G_EXC_ERROR;

Line 1354: RAISE Fnd_Api.G_EXC_ERROR;

1350: p_estimate_line_rec.serial_number <> Fnd_Api.G_MISS_CHAR AND NOT
1351: VALIDATE_SERIAL_NUMBER(p_estimate_line_rec.serial_number,
1352: p_estimate_line_rec.inventory_item_id)) THEN
1353: debug('Invalid serial number[' || p_estimate_line_rec.serial_number || ']');
1354: RAISE Fnd_Api.G_EXC_ERROR;
1355: END IF;
1356: END IF;
1357:
1358: END VALIDATE_DEFAULTED_EST_LINE;