DBA Data[Home] [Help]

APPS.AHL_OSP_ORDERS_PVT dependencies on FND_API

Line 135: p_cancel_flag IN VARCHAR2 := FND_API.G_FALSE

131: TYPE del_cancel_so_lines_tbl_type IS TABLE OF del_cancel_so_line_rec INDEX BY BINARY_INTEGER;
132: PROCEDURE delete_cancel_so(
133: p_oe_header_id IN NUMBER,
134: p_del_cancel_so_lines_tbl IN del_cancel_so_lines_tbl_type,
135: p_cancel_flag IN VARCHAR2 := FND_API.G_FALSE
136: );
137: PROCEDURE process_order_status_change(
138: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type
139: );

Line 239: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

235: -- Declare Local Procedures --
236: ------------------------------
237: /*
238: PROCEDURE process_order_header(
239: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
240: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type
241: );
242: PROCEDURE process_order_lines(
243: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

Line 243: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

239: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
240: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type
241: );
242: PROCEDURE process_order_lines(
243: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
244: p_osp_order_rec IN osp_order_rec_type,
245: p_x_osp_order_lines_tbl IN OUT NOCOPY osp_order_lines_tbl_type
246: );
247: PROCEDURE convert_order_lines_val_to_id(

Line 349: RAISE FND_API.G_EXC_ERROR;

345: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
346: FND_MSG_PUB.ADD;
347: END IF;
348: IF FND_MSG_PUB.count_msg > 0 THEN
349: RAISE FND_API.G_EXC_ERROR;
350: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
351: END IF;
352: IF(g_module_type = 'JSP')THEN
353: -- conversion of value to id for Vendor name

Line 350: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

346: FND_MSG_PUB.ADD;
347: END IF;
348: IF FND_MSG_PUB.count_msg > 0 THEN
349: RAISE FND_API.G_EXC_ERROR;
350: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
351: END IF;
352: IF(g_module_type = 'JSP')THEN
353: -- conversion of value to id for Vendor name
354: IF(p_x_osp_order_rec.vendor_name IS NULL) THEN

Line 356: ELSIF (p_x_osp_order_rec.vendor_name = FND_API.G_MISS_CHAR) THEN

352: IF(g_module_type = 'JSP')THEN
353: -- conversion of value to id for Vendor name
354: IF(p_x_osp_order_rec.vendor_name IS NULL) THEN
355: p_x_osp_order_rec.vendor_id := NULL;
356: ELSIF (p_x_osp_order_rec.vendor_name = FND_API.G_MISS_CHAR) THEN
357: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
358: p_x_osp_order_rec.vendor_id := FND_API.G_MISS_NUM;
359: ELSE
360: p_x_osp_order_rec.vendor_id := NULL;

Line 358: p_x_osp_order_rec.vendor_id := FND_API.G_MISS_NUM;

354: IF(p_x_osp_order_rec.vendor_name IS NULL) THEN
355: p_x_osp_order_rec.vendor_id := NULL;
356: ELSIF (p_x_osp_order_rec.vendor_name = FND_API.G_MISS_CHAR) THEN
357: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
358: p_x_osp_order_rec.vendor_id := FND_API.G_MISS_NUM;
359: ELSE
360: p_x_osp_order_rec.vendor_id := NULL;
361: END IF;
362: END IF;

Line 365: ELSIF (p_x_osp_order_rec.vendor_site_code = FND_API.G_MISS_CHAR) THEN

361: END IF;
362: END IF;
363: IF(p_x_osp_order_rec.vendor_site_code IS NULL) THEN
364: p_x_osp_order_rec.vendor_site_id := NULL;
365: ELSIF (p_x_osp_order_rec.vendor_site_code = FND_API.G_MISS_CHAR) THEN
366: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
367: p_x_osp_order_rec.vendor_site_id := FND_API.G_MISS_NUM;
368: ELSE
369: p_x_osp_order_rec.vendor_site_id := NULL;

Line 367: p_x_osp_order_rec.vendor_site_id := FND_API.G_MISS_NUM;

363: IF(p_x_osp_order_rec.vendor_site_code IS NULL) THEN
364: p_x_osp_order_rec.vendor_site_id := NULL;
365: ELSIF (p_x_osp_order_rec.vendor_site_code = FND_API.G_MISS_CHAR) THEN
366: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
367: p_x_osp_order_rec.vendor_site_id := FND_API.G_MISS_NUM;
368: ELSE
369: p_x_osp_order_rec.vendor_site_id := NULL;
370: END IF;
371: END IF;

Line 374: ELSIF (p_x_osp_order_rec.buyer_name = FND_API.G_MISS_CHAR) THEN

370: END IF;
371: END IF;
372: IF(p_x_osp_order_rec.buyer_name IS NULL) THEN
373: p_x_osp_order_rec.po_agent_id := NULL;
374: ELSIF (p_x_osp_order_rec.buyer_name = FND_API.G_MISS_CHAR) THEN
375: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
376: p_x_osp_order_rec.po_agent_id := FND_API.G_MISS_NUM;
377: ELSE
378: p_x_osp_order_rec.po_agent_id := NULL;

Line 376: p_x_osp_order_rec.po_agent_id := FND_API.G_MISS_NUM;

372: IF(p_x_osp_order_rec.buyer_name IS NULL) THEN
373: p_x_osp_order_rec.po_agent_id := NULL;
374: ELSIF (p_x_osp_order_rec.buyer_name = FND_API.G_MISS_CHAR) THEN
375: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
376: p_x_osp_order_rec.po_agent_id := FND_API.G_MISS_NUM;
377: ELSE
378: p_x_osp_order_rec.po_agent_id := NULL;
379: END IF;
380: END IF;

Line 383: ELSIF (p_x_osp_order_rec.customer_name = FND_API.G_MISS_CHAR) THEN

379: END IF;
380: END IF;
381: IF(p_x_osp_order_rec.customer_name IS NULL) THEN
382: p_x_osp_order_rec.customer_id := NULL;
383: ELSIF (p_x_osp_order_rec.customer_name = FND_API.G_MISS_CHAR) THEN
384: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
385: p_x_osp_order_rec.customer_id := FND_API.G_MISS_NUM;
386: ELSE
387: p_x_osp_order_rec.customer_id := NULL;

Line 385: p_x_osp_order_rec.customer_id := FND_API.G_MISS_NUM;

381: IF(p_x_osp_order_rec.customer_name IS NULL) THEN
382: p_x_osp_order_rec.customer_id := NULL;
383: ELSIF (p_x_osp_order_rec.customer_name = FND_API.G_MISS_CHAR) THEN
384: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
385: p_x_osp_order_rec.customer_id := FND_API.G_MISS_NUM;
386: ELSE
387: p_x_osp_order_rec.customer_id := NULL;
388: END IF;
389: END IF;

Line 392: ELSIF (p_x_osp_order_rec.contract_number = FND_API.G_MISS_CHAR) THEN

388: END IF;
389: END IF;
390: IF(p_x_osp_order_rec.contract_number IS NULL) THEN
391: p_x_osp_order_rec.contract_id := NULL;
392: ELSIF (p_x_osp_order_rec.contract_number = FND_API.G_MISS_CHAR) THEN
393: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
394: p_x_osp_order_rec.contract_id := FND_API.G_MISS_NUM;
395: ELSE
396: p_x_osp_order_rec.contract_id := NULL;

Line 394: p_x_osp_order_rec.contract_id := FND_API.G_MISS_NUM;

390: IF(p_x_osp_order_rec.contract_number IS NULL) THEN
391: p_x_osp_order_rec.contract_id := NULL;
392: ELSIF (p_x_osp_order_rec.contract_number = FND_API.G_MISS_CHAR) THEN
393: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
394: p_x_osp_order_rec.contract_id := FND_API.G_MISS_NUM;
395: ELSE
396: p_x_osp_order_rec.contract_id := NULL;
397: END IF;
398: END IF;

Line 402: IF (p_x_osp_order_rec.vendor_name IS NOT NULL AND p_x_osp_order_rec.vendor_name <> FND_API.G_MISS_CHAR) THEN

398: END IF;
399: --dbms_output.put_line('Done nulling out order header ids');
400: END IF;
401: -- conversion of value to id for Vendor name
402: IF (p_x_osp_order_rec.vendor_name IS NOT NULL AND p_x_osp_order_rec.vendor_name <> FND_API.G_MISS_CHAR) THEN
403: l_count := 0;
404: --dbms_output.put_line('converting vendor_name to id');
405: OPEN vendor_id_csr(p_x_osp_order_rec.vendor_name);
406: LOOP

Line 433: IF (p_x_osp_order_rec.vendor_site_code IS NOT NULL AND p_x_osp_order_rec.vendor_site_code <> FND_API.G_MISS_CHAR) THEN

429: END IF;
430: --dbms_output.put_line('done converting vendor_name to id');
431: END IF;
432: -- conversion of value to id for vendor site code
433: IF (p_x_osp_order_rec.vendor_site_code IS NOT NULL AND p_x_osp_order_rec.vendor_site_code <> FND_API.G_MISS_CHAR) THEN
434: l_count := 0;
435: OPEN vendor_site_id_csr(p_x_osp_order_rec.vendor_site_code);
436: LOOP
437: FETCH vendor_site_id_csr INTO l_vendor_site_id;

Line 461: IF (p_x_osp_order_rec.buyer_name IS NOT NULL AND p_x_osp_order_rec.buyer_name <> FND_API.G_MISS_CHAR) THEN

457: p_x_osp_order_rec.vendor_site_id := l_vendor_site_id;
458: END IF;
459: END IF;
460: -- conversion of value to id for buyer name
461: IF (p_x_osp_order_rec.buyer_name IS NOT NULL AND p_x_osp_order_rec.buyer_name <> FND_API.G_MISS_CHAR) THEN
462: l_count := 0;
463: OPEN po_agent_id_csr(p_x_osp_order_rec.buyer_name);
464: LOOP
465: FETCH po_agent_id_csr INTO l_po_agent_id;

Line 489: IF (p_x_osp_order_rec.customer_name IS NOT NULL AND p_x_osp_order_rec.customer_name <> FND_API.G_MISS_CHAR) THEN

485: p_x_osp_order_rec.po_agent_id := l_po_agent_id;
486: END IF;
487: END IF;
488: -- conversion of value to id for customer name
489: IF (p_x_osp_order_rec.customer_name IS NOT NULL AND p_x_osp_order_rec.customer_name <> FND_API.G_MISS_CHAR) THEN
490: --dbms_output.put_line('converting customer_name to id');
491: l_count := 0;
492: OPEN customer_id_csr(p_x_osp_order_rec.customer_name);
493: LOOP

Line 518: IF (p_x_osp_order_rec.contract_number IS NOT NULL AND p_x_osp_order_rec.contract_number <> FND_API.G_MISS_CHAR) THEN

514: p_x_osp_order_rec.customer_id := l_customer_id;
515: END IF;
516: END IF;
517: -- conversion of value to id for contract number
518: IF (p_x_osp_order_rec.contract_number IS NOT NULL AND p_x_osp_order_rec.contract_number <> FND_API.G_MISS_CHAR) THEN
519: --dbms_output.put_line('converting contract_number to id');
520: OPEN contract_id_csr(p_x_osp_order_rec.contract_number);
521: FETCH contract_id_csr INTO l_contract_id;
522: IF(contract_id_csr%NOTFOUND) THEN

Line 532: RAISE FND_API.G_EXC_ERROR;

528: END IF;
529: CLOSE contract_id_csr;
530: END IF;
531: IF FND_MSG_PUB.count_msg > 0 THEN
532: RAISE FND_API.G_EXC_ERROR;
533: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
534: END IF;
535: -- finding unique key osp_order_id when operation flag is not 'C'
536: IF (p_x_osp_order_rec.osp_order_id IS NULL) THEN

Line 533: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

529: CLOSE contract_id_csr;
530: END IF;
531: IF FND_MSG_PUB.count_msg > 0 THEN
532: RAISE FND_API.G_EXC_ERROR;
533: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
534: END IF;
535: -- finding unique key osp_order_id when operation flag is not 'C'
536: IF (p_x_osp_order_rec.osp_order_id IS NULL) THEN
537: --dbms_output.put_line('finding osp_order_id');

Line 553: ELSIF (p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

549: END IF;
550: CLOSE osp_order_on_csr;
551: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
552: /*
553: ELSIF (p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
554: OPEN osp_order_po_csr(p_x_osp_order_rec.po_header_id);
555: FETCH osp_order_po_csr INTO l_osp_order_id,l_object_version_number;
556: IF(osp_order_po_csr%NOTFOUND) THEN
557: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_HEADER_INV');

Line 565: ELSIF (p_x_osp_order_rec.oe_header_id IS NOT NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN

561: p_x_osp_order_rec.osp_order_id := l_osp_order_id;
562: p_x_osp_order_rec.object_version_number := l_object_version_number;
563: END IF;
564: CLOSE osp_order_po_csr;
565: ELSIF (p_x_osp_order_rec.oe_header_id IS NOT NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN
566: OPEN osp_order_oe_csr(p_x_osp_order_rec.oe_header_id);
567: FETCH osp_order_oe_csr INTO l_osp_order_id,l_object_version_number;
568: IF(osp_order_oe_csr%NOTFOUND) THEN
569: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_OE_HEADER_INV');

Line 586: RAISE FND_API.G_EXC_ERROR;

582: END IF;
583: END IF;
584: END IF;
585: IF FND_MSG_PUB.count_msg > 0 THEN
586: RAISE FND_API.G_EXC_ERROR;
587: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
588: END IF;
589: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
590: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 587: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

583: END IF;
584: END IF;
585: IF FND_MSG_PUB.count_msg > 0 THEN
586: RAISE FND_API.G_EXC_ERROR;
587: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
588: END IF;
589: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
590: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
591: END IF;

Line 616: IF(p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN

612: BEGIN
613: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
614: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
615: END IF;
616: IF(p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN
617: OPEN val_vendor_id_csr(p_vendor_id);
618: FETCH val_vendor_id_csr INTO l_exist;
619: IF(val_vendor_id_csr%NOTFOUND) THEN
620: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_INV');

Line 661: IF (p_vendor_id IS NULL OR p_vendor_id = FND_API.G_MISS_NUM) THEN

657: BEGIN
658: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
659: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
660: END IF;
661: IF (p_vendor_id IS NULL OR p_vendor_id = FND_API.G_MISS_NUM) THEN
662: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
663: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_ID_NLL');
664: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_vendor_site_id);
665: FND_MSG_PUB.ADD;

Line 662: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN

658: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
659: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
660: END IF;
661: IF (p_vendor_id IS NULL OR p_vendor_id = FND_API.G_MISS_NUM) THEN
662: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
663: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_ID_NLL');
664: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_vendor_site_id);
665: FND_MSG_PUB.ADD;
666: END IF;

Line 668: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM)THEN

664: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_vendor_site_id);
665: FND_MSG_PUB.ADD;
666: END IF;
667: ELSE
668: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM)THEN
669: OPEN val_vendor_site_id_csr(p_vendor_id, p_vendor_site_id);
670: FETCH val_vendor_site_id_csr INTO l_exist;
671: IF(val_vendor_site_id_csr%NOTFOUND) THEN
672: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_INV');

Line 705: IF(p_customer_id IS NOT NULL AND p_customer_id <> FND_API.G_MISS_NUM) THEN

701: BEGIN
702: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
703: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
704: END IF;
705: IF(p_customer_id IS NOT NULL AND p_customer_id <> FND_API.G_MISS_NUM) THEN
706: OPEN val_customer_id_csr(p_customer_id);
707: FETCH val_customer_id_csr INTO l_exist;
708: IF(val_customer_id_csr%NOTFOUND) THEN
709: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUST_ID_INV');

Line 733: IF(p_po_agent_id IS NOT NULL AND p_po_agent_id <> FND_API.G_MISS_NUM) THEN

729: BEGIN
730: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
731: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
732: END IF;
733: IF(p_po_agent_id IS NOT NULL AND p_po_agent_id <> FND_API.G_MISS_NUM) THEN
734: OPEN val_po_agent_id_csr(p_po_agent_id);
735: FETCH val_po_agent_id_csr INTO l_exist;
736: IF(val_po_agent_id_csr%NOTFOUND) THEN
737: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_INV');

Line 782: IF(p_party_vendor_id IS NULL OR p_party_vendor_id = FND_API.G_MISS_NUM) THEN

778: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CTRCT');
779: FND_MSG_PUB.ADD;
780: RETURN;
781: END IF;
782: IF(p_party_vendor_id IS NULL OR p_party_vendor_id = FND_API.G_MISS_NUM) THEN
783: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN
784: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_PTY_ID_NLL');
785: FND_MESSAGE.Set_Token('CONTRACT_ID', p_contract_id);
786: FND_MSG_PUB.ADD;

Line 783: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN

779: FND_MSG_PUB.ADD;
780: RETURN;
781: END IF;
782: IF(p_party_vendor_id IS NULL OR p_party_vendor_id = FND_API.G_MISS_NUM) THEN
783: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN
784: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_PTY_ID_NLL');
785: FND_MESSAGE.Set_Token('CONTRACT_ID', p_contract_id);
786: FND_MSG_PUB.ADD;
787: END IF;

Line 789: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN

785: FND_MESSAGE.Set_Token('CONTRACT_ID', p_contract_id);
786: FND_MSG_PUB.ADD;
787: END IF;
788: ELSE
789: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN
790: OPEN val_contract_id_csr(p_contract_id, p_party_vendor_id, l_buy_or_sell, p_authoring_org_id, l_object_code);
791: FETCH val_contract_id_csr INTO l_exist;
792: IF(val_contract_id_csr%NOTFOUND) THEN
793: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CTRCT');

Line 821: IF(p_osp_order_id IS NULL OR p_osp_order_id = FND_API.G_MISS_NUM) THEN

817: BEGIN
818: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
819: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
820: END IF;
821: IF(p_osp_order_id IS NULL OR p_osp_order_id = FND_API.G_MISS_NUM) THEN
822: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_HEADER_INV');
823: FND_MSG_PUB.ADD;
824: RETURN;
825: END IF;

Line 826: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM) THEN

822: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_HEADER_INV');
823: FND_MSG_PUB.ADD;
824: RETURN;
825: END IF;
826: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM) THEN
827: OPEN val_po_header_id_csr(p_po_header_id, p_osp_order_id);
828: FETCH val_po_header_id_csr INTO l_exist;
829: IF(val_po_header_id_csr%NOTFOUND) THEN
830: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_HEADER_INV');

Line 895: RAISE FND_API.G_EXC_ERROR;

891: FND_MESSAGE.Set_Name('AHL', 'AHL_OSP_ORG_NOT_SET');
892: FND_MSG_PUB.ADD;
893: END IF;
894: IF FND_MSG_PUB.count_msg > 0 THEN
895: RAISE FND_API.G_EXC_ERROR;
896: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
897: END IF;
898: -- Note added by jaramana on January 8, 2008 for the Requisition ER 6034236
899: -- Note that p_x_osp_order_rec.operation_flag will never be NULL in the call to this API. As an operation_flag of NULL

Line 896: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

892: FND_MSG_PUB.ADD;
893: END IF;
894: IF FND_MSG_PUB.count_msg > 0 THEN
895: RAISE FND_API.G_EXC_ERROR;
896: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
897: END IF;
898: -- Note added by jaramana on January 8, 2008 for the Requisition ER 6034236
899: -- Note that p_x_osp_order_rec.operation_flag will never be NULL in the call to this API. As an operation_flag of NULL
900: -- means, there need to be no change in the osp_order_header, hence no validation is necessary.

Line 1012: IF(p_x_osp_order_rec.contract_terms IS NOT NULL AND p_x_osp_order_rec.contract_terms <> FND_API.G_MISS_NUM) THEN

1008: p_x_osp_order_rec.single_instance_flag := l_osp_order_rec.single_instance_flag;
1009: END IF;
1010: */
1011: -- contract terms should be null.
1012: IF(p_x_osp_order_rec.contract_terms IS NOT NULL AND p_x_osp_order_rec.contract_terms <> FND_API.G_MISS_NUM) THEN
1013: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CO');
1014: FND_MSG_PUB.ADD;
1015: END IF;
1016: -- shipping info is not allowed to update in this API

Line 1018: IF(l_osp_order_rec.oe_header_id IS NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN

1014: FND_MSG_PUB.ADD;
1015: END IF;
1016: -- shipping info is not allowed to update in this API
1017: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL ) THEN
1018: IF(l_osp_order_rec.oe_header_id IS NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN
1019: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_OE'); FND_MSG_PUB.ADD;
1020: ELSIF(p_x_osp_order_rec.oe_header_id <> l_osp_order_rec.oe_header_id) THEN
1021: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_OE');
1022: FND_MSG_PUB.ADD;

Line 1036: IF(p_x_osp_order_rec.osp_order_id IS NOT NULL AND p_x_osp_order_rec.osp_order_id <> FND_API.G_MISS_NUM) THEN

1032:
1033: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1034: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.create', 'operation is create');
1035: END IF;
1036: IF(p_x_osp_order_rec.osp_order_id IS NOT NULL AND p_x_osp_order_rec.osp_order_id <> FND_API.G_MISS_NUM) THEN
1037: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_NNLL');
1038: FND_MSG_PUB.ADD;
1039: END IF;
1040: IF(p_x_osp_order_rec.object_version_number IS NOT NULL AND p_x_osp_order_rec.object_version_number <> FND_API.G_MISS_NUM) THEN

Line 1040: IF(p_x_osp_order_rec.object_version_number IS NOT NULL AND p_x_osp_order_rec.object_version_number <> FND_API.G_MISS_NUM) THEN

1036: IF(p_x_osp_order_rec.osp_order_id IS NOT NULL AND p_x_osp_order_rec.osp_order_id <> FND_API.G_MISS_NUM) THEN
1037: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_NNLL');
1038: FND_MSG_PUB.ADD;
1039: END IF;
1040: IF(p_x_osp_order_rec.object_version_number IS NOT NULL AND p_x_osp_order_rec.object_version_number <> FND_API.G_MISS_NUM) THEN
1041: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OBJV_NNLL');
1042: FND_MSG_PUB.ADD;
1043: END IF;
1044: -- populate order number

Line 1045: IF(p_x_osp_order_rec.osp_order_number IS NOT NULL AND p_x_osp_order_rec.osp_order_number <> FND_API.G_MISS_NUM) THEN

1041: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OBJV_NNLL');
1042: FND_MSG_PUB.ADD;
1043: END IF;
1044: -- populate order number
1045: IF(p_x_osp_order_rec.osp_order_number IS NOT NULL AND p_x_osp_order_rec.osp_order_number <> FND_API.G_MISS_NUM) THEN
1046: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_NUM_INV');
1047: FND_MESSAGE.Set_Token('ORDER_NUMBER', p_x_osp_order_rec.osp_order_number);
1048: FND_MSG_PUB.ADD;
1049: END IF;

Line 1051: IF(p_x_osp_order_rec.order_date IS NOT NULL AND p_x_osp_order_rec.order_date <> FND_API.G_MISS_DATE) THEN

1047: FND_MESSAGE.Set_Token('ORDER_NUMBER', p_x_osp_order_rec.osp_order_number);
1048: FND_MSG_PUB.ADD;
1049: END IF;
1050: -- populate order_date
1051: IF(p_x_osp_order_rec.order_date IS NOT NULL AND p_x_osp_order_rec.order_date <> FND_API.G_MISS_DATE) THEN
1052: IF(TRUNC(p_x_osp_order_rec.order_date) <> TRUNC(SYSDATE)) THEN
1053: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_ORD_DAT');
1054: FND_MESSAGE.Set_Token('ORDER_DATE', p_x_osp_order_rec.order_date);
1055: FND_MSG_PUB.ADD;

Line 1061: IF(p_x_osp_order_rec.operating_unit_id IS NOT NULL AND p_x_osp_order_rec.operating_unit_id <> FND_API.G_MISS_NUM) THEN

1057: ELSE
1058: p_x_osp_order_rec.order_date := TRUNC(SYSDATE);
1059: END IF;
1060: -- populate operating_unit_id
1061: IF(p_x_osp_order_rec.operating_unit_id IS NOT NULL AND p_x_osp_order_rec.operating_unit_id <> FND_API.G_MISS_NUM) THEN
1062: IF(p_x_osp_order_rec.operating_unit_id <> l_operating_unit_id) THEN
1063: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_OP_UNIT');
1064: FND_MSG_PUB.ADD;
1065: END IF;

Line 1070: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1066: ELSE
1067: p_x_osp_order_rec.operating_unit_id := l_operating_unit_id;
1068: END IF;
1069: -- po_header_id, oe_header_id, po_batch_id, po_request_id, po_interface_header_id, contract_terms should be null for CREATE.
1070: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1071: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1072: FND_MSG_PUB.ADD;
1073: END IF;
1074: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN

Line 1074: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN

1070: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1071: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1072: FND_MSG_PUB.ADD;
1073: END IF;
1074: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN
1075: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OE_NNLL');
1076: FND_MSG_PUB.ADD;
1077: END IF;
1078: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN

Line 1078: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN

1074: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL AND p_x_osp_order_rec.oe_header_id <> FND_API.G_MISS_NUM) THEN
1075: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OE_NNLL');
1076: FND_MSG_PUB.ADD;
1077: END IF;
1078: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN
1079: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1080: FND_MSG_PUB.ADD;
1081: END IF;
1082: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN

Line 1082: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN

1078: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN
1079: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1080: FND_MSG_PUB.ADD;
1081: END IF;
1082: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN
1083: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1084: FND_MSG_PUB.ADD;
1085: END IF;
1086: IF(p_x_osp_order_rec.po_interface_header_id IS NOT NULL AND p_x_osp_order_rec.po_interface_header_id <> FND_API.G_MISS_NUM) THEN

Line 1086: IF(p_x_osp_order_rec.po_interface_header_id IS NOT NULL AND p_x_osp_order_rec.po_interface_header_id <> FND_API.G_MISS_NUM) THEN

1082: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN
1083: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1084: FND_MSG_PUB.ADD;
1085: END IF;
1086: IF(p_x_osp_order_rec.po_interface_header_id IS NOT NULL AND p_x_osp_order_rec.po_interface_header_id <> FND_API.G_MISS_NUM) THEN
1087: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1088: FND_MSG_PUB.ADD;
1089: END IF;
1090: -- status_code should be null or 'ENTERED'. IF null, default to 'ENTERED'

Line 1091: IF(p_x_osp_order_rec.status_code IS NOT NULL AND p_x_osp_order_rec.status_code <> FND_API.G_MISS_CHAR

1087: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1088: FND_MSG_PUB.ADD;
1089: END IF;
1090: -- status_code should be null or 'ENTERED'. IF null, default to 'ENTERED'
1091: IF(p_x_osp_order_rec.status_code IS NOT NULL AND p_x_osp_order_rec.status_code <> FND_API.G_MISS_CHAR
1092: AND p_x_osp_order_rec.status_code <> G_OSP_ENTERED_STATUS) THEN
1093: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_STATUS');
1094: FND_MSG_PUB.ADD;
1095: ELSE

Line 1104: RAISE FND_API.G_EXC_ERROR;

1100: --dbms_output.put_line('Create mode defaulting done');
1101: */
1102: END IF;
1103: IF FND_MSG_PUB.count_msg > 0 THEN
1104: RAISE FND_API.G_EXC_ERROR;
1105: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1106: END IF;
1107: ----------------------------
1108: -- forcing null column rules

Line 1105: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1101: */
1102: END IF;
1103: IF FND_MSG_PUB.count_msg > 0 THEN
1104: RAISE FND_API.G_EXC_ERROR;
1105: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1106: END IF;
1107: ----------------------------
1108: -- forcing null column rules
1109: ----------------------------

Line 1116: IF(p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN

1112: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1113: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.type', 'Update Order type is Service or Exchange');
1114: END IF;
1115: -- contract_id and customer_id must be null for SERVICE or EXCHANGE
1116: IF(p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN
1117: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CTRCT');
1118: FND_MESSAGE.Set_Token('CONTRACT_ID', p_x_osp_order_rec.contract_id);
1119: FND_MSG_PUB.ADD;
1120: END IF;

Line 1121: IF(p_x_osp_order_rec.customer_id IS NOT NULL AND p_x_osp_order_rec.customer_id <> FND_API.G_MISS_NUM) THEN

1117: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CTRCT');
1118: FND_MESSAGE.Set_Token('CONTRACT_ID', p_x_osp_order_rec.contract_id);
1119: FND_MSG_PUB.ADD;
1120: END IF;
1121: IF(p_x_osp_order_rec.customer_id IS NOT NULL AND p_x_osp_order_rec.customer_id <> FND_API.G_MISS_NUM) THEN
1122: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUST_ID_INV');
1123: FND_MESSAGE.Set_Token('CUSTOMER_ID', p_x_osp_order_rec.customer_id);
1124: FND_MSG_PUB.ADD;
1125: END IF;

Line 1126: IF(p_x_osp_order_rec.contract_terms IS NOT NULL AND p_x_osp_order_rec.contract_terms <> FND_API.G_MISS_NUM) THEN

1122: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUST_ID_INV');
1123: FND_MESSAGE.Set_Token('CUSTOMER_ID', p_x_osp_order_rec.customer_id);
1124: FND_MSG_PUB.ADD;
1125: END IF;
1126: IF(p_x_osp_order_rec.contract_terms IS NOT NULL AND p_x_osp_order_rec.contract_terms <> FND_API.G_MISS_NUM) THEN
1127: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CO');
1128: FND_MSG_PUB.ADD;
1129: END IF;
1130: ELSIF (p_x_osp_order_rec.order_type_code IN( G_OSP_ORDER_TYPE_LOAN,G_OSP_ORDER_TYPE_BORROW) ) THEN

Line 1135: IF(p_x_osp_order_rec.po_agent_id IS NOT NULL AND p_x_osp_order_rec.po_agent_id <> FND_API.G_MISS_NUM) THEN

1131: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1132: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.type', 'Update Order type is Loan or Borrow');
1133: END IF;
1134: -- po_agent_id,vendor_id(FOR LOAN only) and vendor_site_id must be null.
1135: IF(p_x_osp_order_rec.po_agent_id IS NOT NULL AND p_x_osp_order_rec.po_agent_id <> FND_API.G_MISS_NUM) THEN
1136: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_INV');
1137: FND_MESSAGE.Set_Token('BUYER_ID', p_x_osp_order_rec.po_agent_id);
1138: FND_MSG_PUB.ADD;
1139: END IF;

Line 1140: IF(p_x_osp_order_rec.vendor_site_id IS NOT NULL AND p_x_osp_order_rec.vendor_site_id <> FND_API.G_MISS_NUM) THEN

1136: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_INV');
1137: FND_MESSAGE.Set_Token('BUYER_ID', p_x_osp_order_rec.po_agent_id);
1138: FND_MSG_PUB.ADD;
1139: END IF;
1140: IF(p_x_osp_order_rec.vendor_site_id IS NOT NULL AND p_x_osp_order_rec.vendor_site_id <> FND_API.G_MISS_NUM) THEN
1141: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_INV');
1142: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_x_osp_order_rec.vendor_site_id);
1143: FND_MSG_PUB.ADD;
1144: END IF;

Line 1146: IF(p_x_osp_order_rec.vendor_id IS NOT NULL AND p_x_osp_order_rec.vendor_id <> FND_API.G_MISS_NUM) THEN

1142: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_x_osp_order_rec.vendor_site_id);
1143: FND_MSG_PUB.ADD;
1144: END IF;
1145: IF(p_x_osp_order_rec.order_type_code = G_OSP_ORDER_TYPE_LOAN) THEN
1146: IF(p_x_osp_order_rec.vendor_id IS NOT NULL AND p_x_osp_order_rec.vendor_id <> FND_API.G_MISS_NUM) THEN
1147: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_INV');
1148: FND_MESSAGE.Set_Token('VENDOR_ID', p_x_osp_order_rec.vendor_id);
1149: FND_MSG_PUB.ADD;
1150: END IF;

Line 1153: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1149: FND_MSG_PUB.ADD;
1150: END IF;
1151: END IF;
1152: -- po_header_id, po_batch_id, po_request_id, po_interface_header_id, contract_terms should be null
1153: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1154: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1155: FND_MSG_PUB.ADD;
1156: END IF;
1157: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN

Line 1157: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN

1153: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1154: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1155: FND_MSG_PUB.ADD;
1156: END IF;
1157: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN
1158: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1159: FND_MSG_PUB.ADD;
1160: END IF;
1161: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN

Line 1161: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN

1157: IF(p_x_osp_order_rec.po_batch_id IS NOT NULL AND p_x_osp_order_rec.po_batch_id <> FND_API.G_MISS_NUM) THEN
1158: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1159: FND_MSG_PUB.ADD;
1160: END IF;
1161: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN
1162: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1163: FND_MSG_PUB.ADD;
1164: END IF;
1165: IF(p_x_osp_order_rec.po_interface_header_id IS NOT NULL AND p_x_osp_order_rec.po_interface_header_id <> FND_API.G_MISS_NUM) THEN

Line 1165: IF(p_x_osp_order_rec.po_interface_header_id IS NOT NULL AND p_x_osp_order_rec.po_interface_header_id <> FND_API.G_MISS_NUM) THEN

1161: IF(p_x_osp_order_rec.po_request_id IS NOT NULL AND p_x_osp_order_rec.po_request_id <> FND_API.G_MISS_NUM) THEN
1162: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1163: FND_MSG_PUB.ADD;
1164: END IF;
1165: IF(p_x_osp_order_rec.po_interface_header_id IS NOT NULL AND p_x_osp_order_rec.po_interface_header_id <> FND_API.G_MISS_NUM) THEN
1166: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1167: FND_MSG_PUB.ADD;
1168: END IF;
1169:

Line 1171: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN

1167: FND_MSG_PUB.ADD;
1168: END IF;
1169:
1170: -- Added by jaramana on January 8, 2008 for the Requisition ER 6034236
1171: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN
1172: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_REQ_NNLL');
1173: FND_MSG_PUB.ADD;
1174: END IF;
1175: -- jaramana End

Line 1177: IF(p_x_osp_order_rec.contract_terms IS NOT NULL AND p_x_osp_order_rec.contract_terms <> FND_API.G_MISS_NUM) THEN

1173: FND_MSG_PUB.ADD;
1174: END IF;
1175: -- jaramana End
1176:
1177: IF(p_x_osp_order_rec.contract_terms IS NOT NULL AND p_x_osp_order_rec.contract_terms <> FND_API.G_MISS_NUM) THEN
1178: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CO');
1179: FND_MSG_PUB.ADD;
1180: END IF;
1181:

Line 1185: RAISE FND_API.G_EXC_ERROR;

1181:
1182: END IF;
1183: --dbms_output.put_line('ensured null columns');
1184: IF FND_MSG_PUB.count_msg > 0 THEN
1185: RAISE FND_API.G_EXC_ERROR;
1186: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1187: END IF;
1188: IF (p_x_osp_order_rec.order_type_code IN ( G_OSP_ORDER_TYPE_SERVICE, G_OSP_ORDER_TYPE_EXCHANGE)) THEN --item exchange enhancement add G_OSP_ORDER_TYPE_EXCHANGE condition
1189: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236

Line 1186: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1182: END IF;
1183: --dbms_output.put_line('ensured null columns');
1184: IF FND_MSG_PUB.count_msg > 0 THEN
1185: RAISE FND_API.G_EXC_ERROR;
1186: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1187: END IF;
1188: IF (p_x_osp_order_rec.order_type_code IN ( G_OSP_ORDER_TYPE_SERVICE, G_OSP_ORDER_TYPE_EXCHANGE)) THEN --item exchange enhancement add G_OSP_ORDER_TYPE_EXCHANGE condition
1189: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
1190: -- This API is not being called during the create mode any more.

Line 1200: IF(p_x_osp_order_rec.single_instance_flag IS NULL OR p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN

1196: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.type.oper', 'Update Order type is Service or Exchange Operation is Create');
1197: END IF;
1198: --dbms_output.put_line('validate single_instance_flag');
1199: --set single_instance_flag
1200: IF(p_x_osp_order_rec.single_instance_flag IS NULL OR p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN
1201: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1202: ELSIF (p_x_osp_order_rec.single_instance_flag NOT IN(G_NO_FLAG,G_YES_FLAG))THEN
1203: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');
1204: FND_MESSAGE.Set_Token('INST_FLG', p_x_osp_order_rec.single_instance_flag);

Line 1210: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

1206: END IF;
1207: --dbms_output.put_line('validate vendor');
1208:
1209: -- validate vendor_id.
1210: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1211: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1212: FND_MSG_PUB.ADD;
1213: ELSE
1214: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1218: IF(p_x_osp_order_rec.vendor_site_id IS NULL OR p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN

1214: validate_vendor(p_x_osp_order_rec.vendor_id);
1215: END IF;
1216: --dbms_output.put_line('validate vendor site');
1217: -- validate vendor_site_id.
1218: IF(p_x_osp_order_rec.vendor_site_id IS NULL OR p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
1219: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_NLL');
1220: FND_MSG_PUB.ADD;
1221: ELSE
1222: validate_vendor_site(p_x_osp_order_rec.vendor_id, p_x_osp_order_rec.vendor_site_id);

Line 1230: IF(p_x_osp_order_rec.po_agent_id IS NULL OR p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN

1226: p_x_osp_order_rec.vendor_site_id,
1227: p_x_osp_order_rec.vendor_contact_id);
1228: -- validate po_agent_id.
1229: --dbms_output.put_line('validate buyer');
1230: IF(p_x_osp_order_rec.po_agent_id IS NULL OR p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
1231: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_NLL');
1232: FND_MSG_PUB.ADD;
1233: ELSE
1234: validate_buyer(p_x_osp_order_rec.po_agent_id);

Line 1250: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1246: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'
1247: || 'g_old_status_code' || g_old_status_code);
1248: END IF;
1249: -- po_header_id should be null.
1250: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1251: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1252: FND_MSG_PUB.ADD;
1253: END IF;
1254: -- Modified by jaramana on January 9, 2008 for the Requisition ER 6034236

Line 1256: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN

1252: FND_MSG_PUB.ADD;
1253: END IF;
1254: -- Modified by jaramana on January 9, 2008 for the Requisition ER 6034236
1255: -- req_header_id should be null.
1256: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN
1257: FND_MESSAGE.Set_Name(G_APP_NAME, 'AHL_OSP_ORD_REQ_NNLL');
1258: FND_MSG_PUB.ADD;
1259: END IF;
1260: -- jaramana End

Line 1300: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN

1296: END IF;
1297:
1298: --
1299: --set single_instance_flag
1300: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN
1301: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1302: ELSIF (p_x_osp_order_rec.single_instance_flag IS NOT NULL AND p_x_osp_order_rec.single_instance_flag NOT IN(G_NO_FLAG,G_YES_FLAG))THEN
1303: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');
1304: FND_MESSAGE.Set_Token('INST_FLG', p_x_osp_order_rec.single_instance_flag);

Line 1309: IF(p_x_osp_order_rec.vendor_id IS NOT NULL AND p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

1305: FND_MSG_PUB.ADD;
1306: END IF;
1307: /*
1308: -- validate vendor_id
1309: IF(p_x_osp_order_rec.vendor_id IS NOT NULL AND p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1310: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1311: FND_MSG_PUB.ADD;
1312: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1313: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1316: IF(p_x_osp_order_rec.vendor_site_id IS NOT NULL AND p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN

1312: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1313: validate_vendor(p_x_osp_order_rec.vendor_id);
1314: END IF;
1315: -- validate vendor_site_id.
1316: IF(p_x_osp_order_rec.vendor_site_id IS NOT NULL AND p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
1317: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_NLL');
1318: FND_MSG_PUB.ADD;
1319: ELSE
1320: p_x_osp_order_rec.vendor_site_id := NVL(p_x_osp_order_rec.vendor_site_id,l_osp_order_rec.vendor_site_id);

Line 1344: --IF(p_x_osp_order_rec.po_agent_id IS NOT NULL AND p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN

1340: p_x_osp_order_rec.vendor_site_id,
1341: p_x_osp_order_rec.vendor_contact_id);
1342: -- validate po_agent_id.
1343: --dbms_output.put_line('validate buyer in update');
1344: --IF(p_x_osp_order_rec.po_agent_id IS NOT NULL AND p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
1345: --G_MISS/Null conversion has already been made in default_unchanged_order_header
1346: IF(p_x_osp_order_rec.po_agent_id IS NULL) THEN
1347: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_NLL');
1348: FND_MSG_PUB.ADD;

Line 1379: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1375: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'
1376: || 'g_old_status_code: ' || g_old_status_code || 'new status: ' || p_x_osp_order_rec.status_code );
1377: END IF;
1378: -- po_header_id should be null.
1379: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1380: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1381: FND_MSG_PUB.ADD;
1382: END IF;
1383:

Line 1386: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN

1382: END IF;
1383:
1384: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
1385: -- req_header_id should be null.
1386: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN
1387: FND_MESSAGE.Set_Name(G_APP_NAME, 'AHL_OSP_ORD_REQ_NNLL');
1388: FND_MSG_PUB.ADD;
1389: END IF;
1390: -- jaramana End

Line 1430: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1426: --validation error.
1427: /*
1428: ELSIF (p_x_osp_order_rec.status_code = G_OSP_SUB_FAILED_STATUS) THEN
1429: -- po_header_id should be null.
1430: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1431: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1432: FND_MSG_PUB.ADD;
1433: END IF;
1434: --set single_instance_flag

Line 1435: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN

1431: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1432: FND_MSG_PUB.ADD;
1433: END IF;
1434: --set single_instance_flag
1435: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN
1436: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1437: ELSIF (p_x_osp_order_rec.single_instance_flag IS NOT NULL AND p_x_osp_order_rec.single_instance_flag NOT IN(G_NO_FLAG,G_YES_FLAG))THEN
1438: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');
1439: FND_MESSAGE.Set_Token('INST_FLG', p_x_osp_order_rec.single_instance_flag);

Line 1445: IF(p_x_osp_order_rec.vendor_id IS NOT NULL AND p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

1441: END IF;
1442: */
1443: /*
1444: -- validate vendor_id.
1445: IF(p_x_osp_order_rec.vendor_id IS NOT NULL AND p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1446: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1447: FND_MSG_PUB.ADD;
1448: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1449: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1452: IF(p_x_osp_order_rec.vendor_site_id IS NOT NULL AND p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN

1448: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1449: validate_vendor(p_x_osp_order_rec.vendor_id);
1450: END IF;
1451: -- validate vendor_site_id.
1452: IF(p_x_osp_order_rec.vendor_site_id IS NOT NULL AND p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
1453: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_NLL');
1454: FND_MSG_PUB.ADD;
1455: ELSE
1456: p_x_osp_order_rec.vendor_site_id := NVL(p_x_osp_order_rec.vendor_site_id,l_osp_order_rec.vendor_site_id);

Line 1467: IF(p_x_osp_order_rec.po_agent_id IS NOT NULL AND p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN

1463: p_x_osp_order_rec.vendor_site_id,
1464: p_x_osp_order_rec.vendor_contact_id);
1465: -- validate po_agent_id.
1466: --dbms_output.put_line('validate buyer in update');
1467: IF(p_x_osp_order_rec.po_agent_id IS NOT NULL AND p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
1468: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_NLL');
1469: FND_MSG_PUB.ADD;
1470: ELSIF (p_x_osp_order_rec.po_agent_id IS NOT NULL) THEN
1471: validate_buyer(p_x_osp_order_rec.po_agent_id);

Line 1481: IF(p_x_osp_order_rec.po_header_id IS NULL OR p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN

1477: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'
1478: || 'g_old_status_code: ' || g_old_status_code || 'new status: ' || p_x_osp_order_rec.status_code );
1479: END IF;
1480: -- po_header_id should be not be null.
1481: IF(p_x_osp_order_rec.po_header_id IS NULL OR p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
1482: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_PO_NLL');
1483: FND_MSG_PUB.ADD;
1484: ELSE
1485: validate_po_header(p_x_osp_order_rec.osp_order_id,p_x_osp_order_rec.po_header_id);

Line 1536: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN

1532: END IF;
1533:
1534: -- jaramana modified on January 9, 2008 for the Requisition ER 6034236
1535: -- req_header_id should be null.
1536: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN
1537: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_REQ_NNLL');
1538: FND_MSG_PUB.ADD;
1539: END IF;
1540: -- jaramana End

Line 1603: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1599: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'||
1600: 'g_old_status_code: ' || g_old_status_code || 'new status: ' || p_x_osp_order_rec.status_code );
1601: END IF;
1602: -- po_header_id should be null.
1603: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1604: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1605: FND_MSG_PUB.ADD;
1606: END IF;
1607:

Line 1609: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN

1605: FND_MSG_PUB.ADD;
1606: END IF;
1607:
1608: -- req_header_id should be null.
1609: IF(p_x_osp_order_rec.po_req_header_id IS NOT NULL AND p_x_osp_order_rec.po_req_header_id <> FND_API.G_MISS_NUM) THEN
1610: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_REQ_NNLL');
1611: FND_MSG_PUB.ADD;
1612: END IF;
1613:

Line 1658: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN

1654: FND_MSG_PUB.ADD;
1655: END IF;
1656:
1657: --po_header_id should be null
1658: IF(p_x_osp_order_rec.po_header_id IS NOT NULL AND p_x_osp_order_rec.po_header_id <> FND_API.G_MISS_NUM) THEN
1659: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1660: FND_MSG_PUB.ADD;
1661: END IF;
1662:

Line 1706: IF(p_x_osp_order_rec.single_instance_flag IS NULL OR p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR

1702: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1703: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.loan', 'Update order type is Loan');
1704: END IF;
1705: -- single_instance_flag can not be other than null, GMISS or G_NO_FLAG.
1706: IF(p_x_osp_order_rec.single_instance_flag IS NULL OR p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR
1707: OR p_x_osp_order_rec.single_instance_flag = G_NO_FLAG )THEN
1708: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1709: ELSE
1710: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');

Line 1716: IF(p_x_osp_order_rec.customer_id IS NULL OR p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN

1712: FND_MSG_PUB.ADD;
1713: END IF;
1714: IF(p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
1715: -- validate customer_id.
1716: IF(p_x_osp_order_rec.customer_id IS NULL OR p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
1717: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUSTOMER_ID_NLL');
1718: FND_MSG_PUB.ADD;
1719: ELSE
1720: validate_customer(p_x_osp_order_rec.customer_id);

Line 1728: IF (p_x_osp_order_rec.contract_id IS NULL OR p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN

1724: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1725: */
1726: -- Changes begin
1727: /*
1728: IF (p_x_osp_order_rec.contract_id IS NULL OR p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1729: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1730: FND_MSG_PUB.ADD;
1731: ELSE
1732: validate_contract(G_OSP_ORDER_TYPE_LOAN, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.customer_id , l_operating_unit_id);

Line 1734: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN

1730: FND_MSG_PUB.ADD;
1731: ELSE
1732: validate_contract(G_OSP_ORDER_TYPE_LOAN, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.customer_id , l_operating_unit_id);
1733: */
1734: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN
1735: validate_contract(G_OSP_ORDER_TYPE_LOAN, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.customer_id , l_operating_unit_id);
1736: END IF;
1737: --Changes by mpothuku End
1738: ELSIF(p_x_osp_order_rec.operation_flag = G_OP_UPDATE) THEN

Line 1749: IF(p_x_osp_order_rec.customer_id IS NOT NULL AND p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN

1745: FND_MSG_PUB.ADD;
1746: END IF;
1747: -- jaramana End
1748: -- validate customer_id.
1749: IF(p_x_osp_order_rec.customer_id IS NOT NULL AND p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
1750: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUSTOMER_ID_NLL');
1751: FND_MSG_PUB.ADD;
1752: ELSIF(p_x_osp_order_rec.customer_id IS NOT NULL) THEN
1753: validate_customer(p_x_osp_order_rec.customer_id);

Line 1761: IF(p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN

1757: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1758: */
1759: -- Changes begin
1760: /*
1761: IF(p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1762: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1763: FND_MSG_PUB.ADD;
1764: ELSIF ( p_x_osp_order_rec.contract_id IS NOT NULL) THEN
1765: validate_contract(G_OSP_ORDER_TYPE_LOAN, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.customer_id , l_operating_unit_id);

Line 1767: IF ( p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN

1763: FND_MSG_PUB.ADD;
1764: ELSIF ( p_x_osp_order_rec.contract_id IS NOT NULL) THEN
1765: validate_contract(G_OSP_ORDER_TYPE_LOAN, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.customer_id , l_operating_unit_id);
1766: */
1767: IF ( p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN
1768: validate_contract(G_OSP_ORDER_TYPE_LOAN, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.customer_id , l_operating_unit_id);
1769: END IF;
1770: --Changes by mpothuku End
1771: -- set status

Line 1799: IF(p_x_osp_order_rec.single_instance_flag IS NULL OR p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR

1795: END IF;
1796: -- validate BORROW order header
1797: ELSIF (p_x_osp_order_rec.order_type_code = G_OSP_ORDER_TYPE_BORROW) THEN
1798: -- single_instance_flag can not be other than null, GMISS or G_NO_FLAG.
1799: IF(p_x_osp_order_rec.single_instance_flag IS NULL OR p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR
1800: OR p_x_osp_order_rec.single_instance_flag = G_NO_FLAG )THEN
1801: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1802: ELSE
1803: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');

Line 1814: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

1810: validate_customer(p_x_osp_order_rec.customer_id);
1811: END IF;
1812: /*
1813: -- validate vendor_id.
1814: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1815: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1816: FND_MSG_PUB.ADD;
1817: ELSE
1818: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1830: IF (p_x_osp_order_rec.contract_id IS NULL OR p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN

1826: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1827: */
1828: -- Changes begin
1829: /*
1830: IF (p_x_osp_order_rec.contract_id IS NULL OR p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1831: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1832: FND_MSG_PUB.ADD;
1833: ELSE
1834: validate_contract(G_OSP_ORDER_TYPE_BORROW, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.vendor_id , l_operating_unit_id);

Line 1837: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN

1833: ELSE
1834: validate_contract(G_OSP_ORDER_TYPE_BORROW, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.vendor_id , l_operating_unit_id);
1835: END IF;
1836: */
1837: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN
1838: validate_contract(G_OSP_ORDER_TYPE_BORROW, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.vendor_id , l_operating_unit_id);
1839: END IF;
1840: --Changes by mpothuku End
1841: ELSIF(p_x_osp_order_rec.operation_flag = G_OP_UPDATE) THEN

Line 1850: IF(p_x_osp_order_rec.customer_id IS NOT NULL AND p_x_osp_order_rec.customer_id <> FND_API.G_MISS_NUM) THEN

1846: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_STATUS');
1847: FND_MSG_PUB.ADD;
1848: END IF;
1849: -- validate customer_id.
1850: IF(p_x_osp_order_rec.customer_id IS NOT NULL AND p_x_osp_order_rec.customer_id <> FND_API.G_MISS_NUM) THEN
1851: validate_customer(p_x_osp_order_rec.customer_id);
1852: END IF;
1853: /* Change made by mpothuku to make the contract_id optional on 12/16/04
1854: This is a work around and has to be revoked after PM comes up with the Service Contract Integration

Line 1858: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN

1854: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1855: */
1856: -- Changes begin
1857: /*
1858: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1859: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1860: FND_MSG_PUB.ADD;
1861: ELSIF(p_x_osp_order_rec.contract_id IS NOT NULL AND (p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM)) THEN
1862: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');

Line 1861: ELSIF(p_x_osp_order_rec.contract_id IS NOT NULL AND (p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM)) THEN

1857: /*
1858: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1859: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1860: FND_MSG_PUB.ADD;
1861: ELSIF(p_x_osp_order_rec.contract_id IS NOT NULL AND (p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM)) THEN
1862: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1863: FND_MSG_PUB.ADD;
1864: ELSIF(p_x_osp_order_rec.vendor_id IS NOT NULL OR p_x_osp_order_rec.contract_id IS NOT NULL) THEN
1865: -- validate vendor_id.

Line 1874: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

1870: END IF;
1871: */
1872: /*
1873: -- validate vendor_id.
1874: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1875: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1876: FND_MSG_PUB.ADD;
1877: ELSE
1878: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1887: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN

1883: p_x_osp_order_rec.vendor_contact_id);
1884:
1885: p_x_osp_order_rec.contract_id := NVL(p_x_osp_order_rec.contract_id, l_osp_order_rec.contract_id);
1886: --validate contract_id only if it is not null.
1887: IF (p_x_osp_order_rec.contract_id IS NOT NULL AND p_x_osp_order_rec.contract_id <> FND_API.G_MISS_NUM) THEN
1888: validate_contract(G_OSP_ORDER_TYPE_BORROW, p_x_osp_order_rec.contract_id , p_x_osp_order_rec.vendor_id , l_operating_unit_id);
1889: END IF;
1890: --Changes by mpothuku End
1891: -- set status

Line 1945: RAISE FND_API.G_EXC_ERROR;

1941: END IF;
1942: -- jaramana End
1943: END IF;
1944: IF FND_MSG_PUB.count_msg > 0 THEN
1945: RAISE FND_API.G_EXC_ERROR;
1946: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1947: END IF;
1948: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1949: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 1946: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1942: -- jaramana End
1943: END IF;
1944: IF FND_MSG_PUB.count_msg > 0 THEN
1945: RAISE FND_API.G_EXC_ERROR;
1946: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1947: END IF;
1948: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1949: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
1950: END IF;

Line 2006: ELSIF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN

2002: ELSE
2003: --dbms_output.put_line('l_osp_order_rec.osp_order_number ' || l_osp_order_rec.osp_order_number);
2004: IF (p_x_osp_order_rec.osp_order_number IS NULL) THEN
2005: p_x_osp_order_rec.osp_order_number := l_osp_order_rec.osp_order_number;
2006: ELSIF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN
2007: p_x_osp_order_rec.osp_order_number := null;
2008: END IF;
2009: IF (p_x_osp_order_rec.order_type_code IS NULL) THEN
2010: p_x_osp_order_rec.order_type_code := l_osp_order_rec.order_type_code;

Line 2011: ELSIF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN

2007: p_x_osp_order_rec.osp_order_number := null;
2008: END IF;
2009: IF (p_x_osp_order_rec.order_type_code IS NULL) THEN
2010: p_x_osp_order_rec.order_type_code := l_osp_order_rec.order_type_code;
2011: ELSIF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2012: p_x_osp_order_rec.order_type_code := null;
2013: END IF;
2014: IF (p_x_osp_order_rec.single_instance_flag IS NULL) THEN
2015: p_x_osp_order_rec.single_instance_flag := l_osp_order_rec.single_instance_flag;

Line 2016: ELSIF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN

2012: p_x_osp_order_rec.order_type_code := null;
2013: END IF;
2014: IF (p_x_osp_order_rec.single_instance_flag IS NULL) THEN
2015: p_x_osp_order_rec.single_instance_flag := l_osp_order_rec.single_instance_flag;
2016: ELSIF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2017: p_x_osp_order_rec.single_instance_flag := null;
2018: END IF;
2019: IF (p_x_osp_order_rec.po_header_id IS NULL) THEN
2020: p_x_osp_order_rec.po_header_id := l_osp_order_rec.po_header_id;

Line 2021: ELSIF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN

2017: p_x_osp_order_rec.single_instance_flag := null;
2018: END IF;
2019: IF (p_x_osp_order_rec.po_header_id IS NULL) THEN
2020: p_x_osp_order_rec.po_header_id := l_osp_order_rec.po_header_id;
2021: ELSIF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2022: p_x_osp_order_rec.po_header_id := null;
2023: END IF;
2024: IF (p_x_osp_order_rec.oe_header_id IS NULL) THEN
2025: p_x_osp_order_rec.oe_header_id := l_osp_order_rec.oe_header_id;

Line 2026: ELSIF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN

2022: p_x_osp_order_rec.po_header_id := null;
2023: END IF;
2024: IF (p_x_osp_order_rec.oe_header_id IS NULL) THEN
2025: p_x_osp_order_rec.oe_header_id := l_osp_order_rec.oe_header_id;
2026: ELSIF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2027: p_x_osp_order_rec.oe_header_id := null;
2028: END IF;
2029: IF (p_x_osp_order_rec.vendor_id IS NULL) THEN
2030: p_x_osp_order_rec.vendor_id := l_osp_order_rec.vendor_id;

Line 2031: ELSIF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

2027: p_x_osp_order_rec.oe_header_id := null;
2028: END IF;
2029: IF (p_x_osp_order_rec.vendor_id IS NULL) THEN
2030: p_x_osp_order_rec.vendor_id := l_osp_order_rec.vendor_id;
2031: ELSIF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2032: p_x_osp_order_rec.vendor_id := null;
2033: END IF;
2034: IF (p_x_osp_order_rec.vendor_site_id IS NULL) THEN
2035: p_x_osp_order_rec.vendor_site_id := l_osp_order_rec.vendor_site_id;

Line 2036: ELSIF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN

2032: p_x_osp_order_rec.vendor_id := null;
2033: END IF;
2034: IF (p_x_osp_order_rec.vendor_site_id IS NULL) THEN
2035: p_x_osp_order_rec.vendor_site_id := l_osp_order_rec.vendor_site_id;
2036: ELSIF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2037: p_x_osp_order_rec.vendor_site_id := null;
2038: END IF;
2039: IF (p_x_osp_order_rec.customer_id IS NULL) THEN
2040: p_x_osp_order_rec.customer_id := l_osp_order_rec.customer_id;

Line 2041: ELSIF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN

2037: p_x_osp_order_rec.vendor_site_id := null;
2038: END IF;
2039: IF (p_x_osp_order_rec.customer_id IS NULL) THEN
2040: p_x_osp_order_rec.customer_id := l_osp_order_rec.customer_id;
2041: ELSIF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2042: p_x_osp_order_rec.customer_id := null;
2043: END IF;
2044: IF (p_x_osp_order_rec.order_date IS NULL) THEN
2045: p_x_osp_order_rec.order_date := l_osp_order_rec.order_date;

Line 2046: ELSIF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN

2042: p_x_osp_order_rec.customer_id := null;
2043: END IF;
2044: IF (p_x_osp_order_rec.order_date IS NULL) THEN
2045: p_x_osp_order_rec.order_date := l_osp_order_rec.order_date;
2046: ELSIF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2047: p_x_osp_order_rec.order_date := null;
2048: END IF;
2049: IF (p_x_osp_order_rec.contract_id IS NULL) THEN
2050: p_x_osp_order_rec.contract_id := l_osp_order_rec.contract_id;

Line 2051: ELSIF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN

2047: p_x_osp_order_rec.order_date := null;
2048: END IF;
2049: IF (p_x_osp_order_rec.contract_id IS NULL) THEN
2050: p_x_osp_order_rec.contract_id := l_osp_order_rec.contract_id;
2051: ELSIF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2052: p_x_osp_order_rec.contract_id := null;
2053: END IF;
2054: IF (p_x_osp_order_rec.contract_terms IS NULL) THEN
2055: p_x_osp_order_rec.contract_terms := l_osp_order_rec.contract_terms;

Line 2056: ELSIF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN

2052: p_x_osp_order_rec.contract_id := null;
2053: END IF;
2054: IF (p_x_osp_order_rec.contract_terms IS NULL) THEN
2055: p_x_osp_order_rec.contract_terms := l_osp_order_rec.contract_terms;
2056: ELSIF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2057: p_x_osp_order_rec.contract_terms := null;
2058: END IF;
2059: IF (p_x_osp_order_rec.operating_unit_id IS NULL) THEN
2060: p_x_osp_order_rec.operating_unit_id := l_osp_order_rec.operating_unit_id;

Line 2061: ELSIF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN

2057: p_x_osp_order_rec.contract_terms := null;
2058: END IF;
2059: IF (p_x_osp_order_rec.operating_unit_id IS NULL) THEN
2060: p_x_osp_order_rec.operating_unit_id := l_osp_order_rec.operating_unit_id;
2061: ELSIF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2062: p_x_osp_order_rec.operating_unit_id := null;
2063: END IF;
2064: IF (p_x_osp_order_rec.po_synch_flag IS NULL) THEN
2065: p_x_osp_order_rec.po_synch_flag := l_osp_order_rec.po_synch_flag;

Line 2066: ELSIF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN

2062: p_x_osp_order_rec.operating_unit_id := null;
2063: END IF;
2064: IF (p_x_osp_order_rec.po_synch_flag IS NULL) THEN
2065: p_x_osp_order_rec.po_synch_flag := l_osp_order_rec.po_synch_flag;
2066: ELSIF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2067: p_x_osp_order_rec.po_synch_flag := null;
2068: END IF;
2069: IF (p_x_osp_order_rec.status_code IS NULL) THEN
2070: p_x_osp_order_rec.status_code := l_osp_order_rec.status_code;

Line 2071: ELSIF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN

2067: p_x_osp_order_rec.po_synch_flag := null;
2068: END IF;
2069: IF (p_x_osp_order_rec.status_code IS NULL) THEN
2070: p_x_osp_order_rec.status_code := l_osp_order_rec.status_code;
2071: ELSIF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2072: p_x_osp_order_rec.status_code := null;
2073: END IF;
2074: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2075: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin',

Line 2082: ELSIF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN

2078: 'interface_id='||p_x_osp_order_rec.po_interface_header_id);
2079: END IF;
2080: IF (p_x_osp_order_rec.po_batch_id IS NULL) THEN
2081: p_x_osp_order_rec.po_batch_id := l_osp_order_rec.po_batch_id;
2082: ELSIF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2083: p_x_osp_order_rec.po_batch_id := null;
2084: END IF;
2085: IF (p_x_osp_order_rec.po_request_id IS NULL) THEN
2086: p_x_osp_order_rec.po_request_id := l_osp_order_rec.po_request_id;

Line 2087: ELSIF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN

2083: p_x_osp_order_rec.po_batch_id := null;
2084: END IF;
2085: IF (p_x_osp_order_rec.po_request_id IS NULL) THEN
2086: p_x_osp_order_rec.po_request_id := l_osp_order_rec.po_request_id;
2087: ELSIF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2088: p_x_osp_order_rec.po_request_id := null;
2089: END IF;
2090: IF (p_x_osp_order_rec.po_agent_id IS NULL) THEN
2091: p_x_osp_order_rec.po_agent_id := l_osp_order_rec.po_agent_id;

Line 2092: ELSIF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN

2088: p_x_osp_order_rec.po_request_id := null;
2089: END IF;
2090: IF (p_x_osp_order_rec.po_agent_id IS NULL) THEN
2091: p_x_osp_order_rec.po_agent_id := l_osp_order_rec.po_agent_id;
2092: ELSIF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2093: p_x_osp_order_rec.po_agent_id := null;
2094: END IF;
2095: IF (p_x_osp_order_rec.po_interface_header_id IS NULL) THEN
2096: p_x_osp_order_rec.po_interface_header_id := l_osp_order_rec.po_interface_header_id;

Line 2097: ELSIF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN

2093: p_x_osp_order_rec.po_agent_id := null;
2094: END IF;
2095: IF (p_x_osp_order_rec.po_interface_header_id IS NULL) THEN
2096: p_x_osp_order_rec.po_interface_header_id := l_osp_order_rec.po_interface_header_id;
2097: ELSIF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2098: p_x_osp_order_rec.po_interface_header_id := null;
2099: END IF;
2100: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2101: IF (p_x_osp_order_rec.po_req_header_id IS NULL) THEN

Line 2103: ELSIF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN

2099: END IF;
2100: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2101: IF (p_x_osp_order_rec.po_req_header_id IS NULL) THEN
2102: p_x_osp_order_rec.po_req_header_id := l_osp_order_rec.po_req_header_id;
2103: ELSIF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN
2104: p_x_osp_order_rec.po_req_header_id := null;
2105: END IF;
2106: -- jaramana End
2107: IF (p_x_osp_order_rec.description IS NULL) THEN

Line 2109: ELSIF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN

2105: END IF;
2106: -- jaramana End
2107: IF (p_x_osp_order_rec.description IS NULL) THEN
2108: p_x_osp_order_rec.description := l_osp_order_rec.description;
2109: ELSIF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN
2110: p_x_osp_order_rec.description := null;
2111: END IF;
2112: IF (p_x_osp_order_rec.attribute_category IS NULL) THEN
2113: p_x_osp_order_rec.attribute_category := l_osp_order_rec.attribute_category;

Line 2114: ELSIF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN

2110: p_x_osp_order_rec.description := null;
2111: END IF;
2112: IF (p_x_osp_order_rec.attribute_category IS NULL) THEN
2113: p_x_osp_order_rec.attribute_category := l_osp_order_rec.attribute_category;
2114: ELSIF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2115: p_x_osp_order_rec.attribute_category := null;
2116: END IF;
2117: IF (p_x_osp_order_rec.attribute1 IS NULL) THEN
2118: p_x_osp_order_rec.attribute1 := l_osp_order_rec.attribute1;

Line 2119: ELSIF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN

2115: p_x_osp_order_rec.attribute_category := null;
2116: END IF;
2117: IF (p_x_osp_order_rec.attribute1 IS NULL) THEN
2118: p_x_osp_order_rec.attribute1 := l_osp_order_rec.attribute1;
2119: ELSIF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2120: p_x_osp_order_rec.attribute1 := null;
2121: END IF;
2122: IF (p_x_osp_order_rec.attribute2 IS NULL) THEN
2123: p_x_osp_order_rec.attribute2 := l_osp_order_rec.attribute2;

Line 2124: ELSIF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN

2120: p_x_osp_order_rec.attribute1 := null;
2121: END IF;
2122: IF (p_x_osp_order_rec.attribute2 IS NULL) THEN
2123: p_x_osp_order_rec.attribute2 := l_osp_order_rec.attribute2;
2124: ELSIF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2125: p_x_osp_order_rec.attribute2 := null;
2126: END IF;
2127: IF (p_x_osp_order_rec.attribute3 IS NULL) THEN
2128: p_x_osp_order_rec.attribute3 := l_osp_order_rec.attribute3;

Line 2129: ELSIF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN

2125: p_x_osp_order_rec.attribute2 := null;
2126: END IF;
2127: IF (p_x_osp_order_rec.attribute3 IS NULL) THEN
2128: p_x_osp_order_rec.attribute3 := l_osp_order_rec.attribute3;
2129: ELSIF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2130: p_x_osp_order_rec.attribute3 := null;
2131: END IF;
2132: IF (p_x_osp_order_rec.attribute4 IS NULL) THEN
2133: p_x_osp_order_rec.attribute4 := l_osp_order_rec.attribute4;

Line 2134: ELSIF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN

2130: p_x_osp_order_rec.attribute3 := null;
2131: END IF;
2132: IF (p_x_osp_order_rec.attribute4 IS NULL) THEN
2133: p_x_osp_order_rec.attribute4 := l_osp_order_rec.attribute4;
2134: ELSIF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2135: p_x_osp_order_rec.attribute4 := null;
2136: END IF;
2137: IF (p_x_osp_order_rec.attribute5 IS NULL) THEN
2138: p_x_osp_order_rec.attribute5 := l_osp_order_rec.attribute5;

Line 2139: ELSIF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN

2135: p_x_osp_order_rec.attribute4 := null;
2136: END IF;
2137: IF (p_x_osp_order_rec.attribute5 IS NULL) THEN
2138: p_x_osp_order_rec.attribute5 := l_osp_order_rec.attribute5;
2139: ELSIF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2140: p_x_osp_order_rec.attribute5 := null;
2141: END IF;
2142: IF (p_x_osp_order_rec.attribute6 IS NULL) THEN
2143: p_x_osp_order_rec.attribute6 := l_osp_order_rec.attribute6;

Line 2144: ELSIF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN

2140: p_x_osp_order_rec.attribute5 := null;
2141: END IF;
2142: IF (p_x_osp_order_rec.attribute6 IS NULL) THEN
2143: p_x_osp_order_rec.attribute6 := l_osp_order_rec.attribute6;
2144: ELSIF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2145: p_x_osp_order_rec.attribute6 := null;
2146: END IF;
2147: IF (p_x_osp_order_rec.attribute7 IS NULL) THEN
2148: p_x_osp_order_rec.attribute7 := l_osp_order_rec.attribute7;

Line 2149: ELSIF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN

2145: p_x_osp_order_rec.attribute6 := null;
2146: END IF;
2147: IF (p_x_osp_order_rec.attribute7 IS NULL) THEN
2148: p_x_osp_order_rec.attribute7 := l_osp_order_rec.attribute7;
2149: ELSIF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2150: p_x_osp_order_rec.attribute7 := null;
2151: END IF;
2152: IF (p_x_osp_order_rec.attribute8 IS NULL) THEN
2153: p_x_osp_order_rec.attribute8 := l_osp_order_rec.attribute8;

Line 2154: ELSIF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN

2150: p_x_osp_order_rec.attribute7 := null;
2151: END IF;
2152: IF (p_x_osp_order_rec.attribute8 IS NULL) THEN
2153: p_x_osp_order_rec.attribute8 := l_osp_order_rec.attribute8;
2154: ELSIF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2155: p_x_osp_order_rec.attribute8 := null;
2156: END IF;
2157: IF (p_x_osp_order_rec.attribute9 IS NULL) THEN
2158: p_x_osp_order_rec.attribute9 := l_osp_order_rec.attribute9;

Line 2159: ELSIF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN

2155: p_x_osp_order_rec.attribute8 := null;
2156: END IF;
2157: IF (p_x_osp_order_rec.attribute9 IS NULL) THEN
2158: p_x_osp_order_rec.attribute9 := l_osp_order_rec.attribute9;
2159: ELSIF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2160: p_x_osp_order_rec.attribute9 := null;
2161: END IF;
2162: IF (p_x_osp_order_rec.attribute10 IS NULL) THEN
2163: p_x_osp_order_rec.attribute10 := l_osp_order_rec.attribute10;

Line 2164: ELSIF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN

2160: p_x_osp_order_rec.attribute9 := null;
2161: END IF;
2162: IF (p_x_osp_order_rec.attribute10 IS NULL) THEN
2163: p_x_osp_order_rec.attribute10 := l_osp_order_rec.attribute10;
2164: ELSIF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2165: p_x_osp_order_rec.attribute10 := null;
2166: END IF;
2167: IF (p_x_osp_order_rec.attribute11 IS NULL) THEN
2168: p_x_osp_order_rec.attribute11 := l_osp_order_rec.attribute11;

Line 2169: ELSIF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN

2165: p_x_osp_order_rec.attribute10 := null;
2166: END IF;
2167: IF (p_x_osp_order_rec.attribute11 IS NULL) THEN
2168: p_x_osp_order_rec.attribute11 := l_osp_order_rec.attribute11;
2169: ELSIF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2170: p_x_osp_order_rec.attribute11 := null;
2171: END IF;
2172: IF (p_x_osp_order_rec.attribute12 IS NULL) THEN
2173: p_x_osp_order_rec.attribute12 := l_osp_order_rec.attribute12;

Line 2174: ELSIF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN

2170: p_x_osp_order_rec.attribute11 := null;
2171: END IF;
2172: IF (p_x_osp_order_rec.attribute12 IS NULL) THEN
2173: p_x_osp_order_rec.attribute12 := l_osp_order_rec.attribute12;
2174: ELSIF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2175: p_x_osp_order_rec.attribute12 := null;
2176: END IF;
2177: IF (p_x_osp_order_rec.attribute13 IS NULL) THEN
2178: p_x_osp_order_rec.attribute13 := l_osp_order_rec.attribute13;

Line 2179: ELSIF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN

2175: p_x_osp_order_rec.attribute12 := null;
2176: END IF;
2177: IF (p_x_osp_order_rec.attribute13 IS NULL) THEN
2178: p_x_osp_order_rec.attribute13 := l_osp_order_rec.attribute13;
2179: ELSIF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2180: p_x_osp_order_rec.attribute13 := null;
2181: END IF;
2182: IF (p_x_osp_order_rec.attribute14 IS NULL) THEN
2183: p_x_osp_order_rec.attribute14 := l_osp_order_rec.attribute14;

Line 2184: ELSIF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN

2180: p_x_osp_order_rec.attribute13 := null;
2181: END IF;
2182: IF (p_x_osp_order_rec.attribute14 IS NULL) THEN
2183: p_x_osp_order_rec.attribute14 := l_osp_order_rec.attribute14;
2184: ELSIF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2185: p_x_osp_order_rec.attribute14 := null;
2186: END IF;
2187: IF (p_x_osp_order_rec.attribute15 IS NULL) THEN
2188: p_x_osp_order_rec.attribute15 := l_osp_order_rec.attribute15;

Line 2189: ELSIF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN

2185: p_x_osp_order_rec.attribute14 := null;
2186: END IF;
2187: IF (p_x_osp_order_rec.attribute15 IS NULL) THEN
2188: p_x_osp_order_rec.attribute15 := l_osp_order_rec.attribute15;
2189: ELSIF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2190: p_x_osp_order_rec.attribute15 := null;
2191: END IF;
2192: IF (p_x_osp_order_rec.vendor_contact_id IS NULL) THEN
2193: p_x_osp_order_rec.vendor_contact_id := l_osp_order_rec.vendor_contact_id;

Line 2194: ELSIF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN

2190: p_x_osp_order_rec.attribute15 := null;
2191: END IF;
2192: IF (p_x_osp_order_rec.vendor_contact_id IS NULL) THEN
2193: p_x_osp_order_rec.vendor_contact_id := l_osp_order_rec.vendor_contact_id;
2194: ELSIF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN
2195: p_x_osp_order_rec.vendor_contact_id := null;
2196: END IF;
2197: END IF;
2198: CLOSE osp_order_csr;

Line 2200: IF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN

2196: END IF;
2197: END IF;
2198: CLOSE osp_order_csr;
2199: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
2200: IF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN
2201: p_x_osp_order_rec.osp_order_number := null;
2202: END IF;
2203: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2204: p_x_osp_order_rec.order_type_code := null;

Line 2203: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN

2199: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
2200: IF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN
2201: p_x_osp_order_rec.osp_order_number := null;
2202: END IF;
2203: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2204: p_x_osp_order_rec.order_type_code := null;
2205: END IF;
2206: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2207: p_x_osp_order_rec.single_instance_flag := null;

Line 2206: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN

2202: END IF;
2203: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2204: p_x_osp_order_rec.order_type_code := null;
2205: END IF;
2206: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2207: p_x_osp_order_rec.single_instance_flag := null;
2208: END IF;
2209: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2210: p_x_osp_order_rec.po_header_id := null;

Line 2209: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN

2205: END IF;
2206: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2207: p_x_osp_order_rec.single_instance_flag := null;
2208: END IF;
2209: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2210: p_x_osp_order_rec.po_header_id := null;
2211: END IF;
2212: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2213: p_x_osp_order_rec.oe_header_id := null;

Line 2212: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN

2208: END IF;
2209: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2210: p_x_osp_order_rec.po_header_id := null;
2211: END IF;
2212: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2213: p_x_osp_order_rec.oe_header_id := null;
2214: END IF;
2215: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2216: p_x_osp_order_rec.vendor_id := null;

Line 2215: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN

2211: END IF;
2212: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2213: p_x_osp_order_rec.oe_header_id := null;
2214: END IF;
2215: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2216: p_x_osp_order_rec.vendor_id := null;
2217: END IF;
2218: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2219: p_x_osp_order_rec.vendor_site_id := null;

Line 2218: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN

2214: END IF;
2215: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2216: p_x_osp_order_rec.vendor_id := null;
2217: END IF;
2218: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2219: p_x_osp_order_rec.vendor_site_id := null;
2220: END IF;
2221: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2222: p_x_osp_order_rec.customer_id := null;

Line 2221: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN

2217: END IF;
2218: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2219: p_x_osp_order_rec.vendor_site_id := null;
2220: END IF;
2221: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2222: p_x_osp_order_rec.customer_id := null;
2223: END IF;
2224: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2225: p_x_osp_order_rec.order_date := null;

Line 2224: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN

2220: END IF;
2221: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2222: p_x_osp_order_rec.customer_id := null;
2223: END IF;
2224: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2225: p_x_osp_order_rec.order_date := null;
2226: END IF;
2227: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2228: p_x_osp_order_rec.contract_id := null;

Line 2227: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN

2223: END IF;
2224: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2225: p_x_osp_order_rec.order_date := null;
2226: END IF;
2227: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2228: p_x_osp_order_rec.contract_id := null;
2229: END IF;
2230: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2231: p_x_osp_order_rec.contract_terms := null;

Line 2230: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN

2226: END IF;
2227: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2228: p_x_osp_order_rec.contract_id := null;
2229: END IF;
2230: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2231: p_x_osp_order_rec.contract_terms := null;
2232: END IF;
2233: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2234: p_x_osp_order_rec.operating_unit_id := null;

Line 2233: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN

2229: END IF;
2230: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2231: p_x_osp_order_rec.contract_terms := null;
2232: END IF;
2233: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2234: p_x_osp_order_rec.operating_unit_id := null;
2235: END IF;
2236: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2237: p_x_osp_order_rec.po_synch_flag := null;

Line 2236: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN

2232: END IF;
2233: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2234: p_x_osp_order_rec.operating_unit_id := null;
2235: END IF;
2236: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2237: p_x_osp_order_rec.po_synch_flag := null;
2238: END IF;
2239: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2240: p_x_osp_order_rec.status_code := null;

Line 2239: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN

2235: END IF;
2236: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2237: p_x_osp_order_rec.po_synch_flag := null;
2238: END IF;
2239: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2240: p_x_osp_order_rec.status_code := null;
2241: END IF;
2242: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2243: p_x_osp_order_rec.po_batch_id := null;

Line 2242: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN

2238: END IF;
2239: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2240: p_x_osp_order_rec.status_code := null;
2241: END IF;
2242: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2243: p_x_osp_order_rec.po_batch_id := null;
2244: END IF;
2245: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2246: p_x_osp_order_rec.po_request_id := null;

Line 2245: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN

2241: END IF;
2242: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2243: p_x_osp_order_rec.po_batch_id := null;
2244: END IF;
2245: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2246: p_x_osp_order_rec.po_request_id := null;
2247: END IF;
2248: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2249: p_x_osp_order_rec.po_agent_id := null;

Line 2248: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN

2244: END IF;
2245: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2246: p_x_osp_order_rec.po_request_id := null;
2247: END IF;
2248: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2249: p_x_osp_order_rec.po_agent_id := null;
2250: END IF;
2251: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2252: p_x_osp_order_rec.po_interface_header_id := null;

Line 2251: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN

2247: END IF;
2248: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2249: p_x_osp_order_rec.po_agent_id := null;
2250: END IF;
2251: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2252: p_x_osp_order_rec.po_interface_header_id := null;
2253: END IF;
2254: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2255: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN

Line 2255: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN

2251: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2252: p_x_osp_order_rec.po_interface_header_id := null;
2253: END IF;
2254: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2255: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN
2256: p_x_osp_order_rec.po_req_header_id := null;
2257: END IF;
2258: -- jaramana End
2259: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN

Line 2259: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN

2255: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN
2256: p_x_osp_order_rec.po_req_header_id := null;
2257: END IF;
2258: -- jaramana End
2259: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN
2260: p_x_osp_order_rec.description := null;
2261: END IF;
2262: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2263: p_x_osp_order_rec.attribute_category := null;

Line 2262: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN

2258: -- jaramana End
2259: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN
2260: p_x_osp_order_rec.description := null;
2261: END IF;
2262: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2263: p_x_osp_order_rec.attribute_category := null;
2264: END IF;
2265: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2266: p_x_osp_order_rec.attribute1 := null;

Line 2265: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN

2261: END IF;
2262: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2263: p_x_osp_order_rec.attribute_category := null;
2264: END IF;
2265: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2266: p_x_osp_order_rec.attribute1 := null;
2267: END IF;
2268: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2269: p_x_osp_order_rec.attribute2 := null;

Line 2268: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN

2264: END IF;
2265: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2266: p_x_osp_order_rec.attribute1 := null;
2267: END IF;
2268: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2269: p_x_osp_order_rec.attribute2 := null;
2270: END IF;
2271: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2272: p_x_osp_order_rec.attribute3 := null;

Line 2271: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN

2267: END IF;
2268: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2269: p_x_osp_order_rec.attribute2 := null;
2270: END IF;
2271: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2272: p_x_osp_order_rec.attribute3 := null;
2273: END IF;
2274: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2275: p_x_osp_order_rec.attribute4 := null;

Line 2274: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN

2270: END IF;
2271: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2272: p_x_osp_order_rec.attribute3 := null;
2273: END IF;
2274: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2275: p_x_osp_order_rec.attribute4 := null;
2276: END IF;
2277: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2278: p_x_osp_order_rec.attribute5 := null;

Line 2277: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN

2273: END IF;
2274: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2275: p_x_osp_order_rec.attribute4 := null;
2276: END IF;
2277: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2278: p_x_osp_order_rec.attribute5 := null;
2279: END IF;
2280: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2281: p_x_osp_order_rec.attribute6 := null;

Line 2280: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN

2276: END IF;
2277: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2278: p_x_osp_order_rec.attribute5 := null;
2279: END IF;
2280: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2281: p_x_osp_order_rec.attribute6 := null;
2282: END IF;
2283: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2284: p_x_osp_order_rec.attribute7 := null;

Line 2283: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN

2279: END IF;
2280: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2281: p_x_osp_order_rec.attribute6 := null;
2282: END IF;
2283: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2284: p_x_osp_order_rec.attribute7 := null;
2285: END IF;
2286: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2287: p_x_osp_order_rec.attribute8 := null;

Line 2286: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN

2282: END IF;
2283: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2284: p_x_osp_order_rec.attribute7 := null;
2285: END IF;
2286: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2287: p_x_osp_order_rec.attribute8 := null;
2288: END IF;
2289: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2290: p_x_osp_order_rec.attribute9 := null;

Line 2289: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN

2285: END IF;
2286: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2287: p_x_osp_order_rec.attribute8 := null;
2288: END IF;
2289: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2290: p_x_osp_order_rec.attribute9 := null;
2291: END IF;
2292: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2293: p_x_osp_order_rec.attribute10 := null;

Line 2292: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN

2288: END IF;
2289: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2290: p_x_osp_order_rec.attribute9 := null;
2291: END IF;
2292: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2293: p_x_osp_order_rec.attribute10 := null;
2294: END IF;
2295: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2296: p_x_osp_order_rec.attribute11 := null;

Line 2295: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN

2291: END IF;
2292: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2293: p_x_osp_order_rec.attribute10 := null;
2294: END IF;
2295: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2296: p_x_osp_order_rec.attribute11 := null;
2297: END IF;
2298: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2299: p_x_osp_order_rec.attribute12 := null;

Line 2298: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN

2294: END IF;
2295: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2296: p_x_osp_order_rec.attribute11 := null;
2297: END IF;
2298: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2299: p_x_osp_order_rec.attribute12 := null;
2300: END IF;
2301: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2302: p_x_osp_order_rec.attribute13 := null;

Line 2301: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN

2297: END IF;
2298: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2299: p_x_osp_order_rec.attribute12 := null;
2300: END IF;
2301: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2302: p_x_osp_order_rec.attribute13 := null;
2303: END IF;
2304: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2305: p_x_osp_order_rec.attribute14 := null;

Line 2304: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN

2300: END IF;
2301: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2302: p_x_osp_order_rec.attribute13 := null;
2303: END IF;
2304: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2305: p_x_osp_order_rec.attribute14 := null;
2306: END IF;
2307: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2308: p_x_osp_order_rec.attribute15 := null;

Line 2307: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN

2303: END IF;
2304: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2305: p_x_osp_order_rec.attribute14 := null;
2306: END IF;
2307: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2308: p_x_osp_order_rec.attribute15 := null;
2309: END IF;
2310: IF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN
2311: p_x_osp_order_rec.vendor_contact_id := null;

Line 2310: IF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN

2306: END IF;
2307: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2308: p_x_osp_order_rec.attribute15 := null;
2309: END IF;
2310: IF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN
2311: p_x_osp_order_rec.vendor_contact_id := null;
2312: END IF;
2313: END IF;
2314: IF FND_MSG_PUB.count_msg > 0 THEN

Line 2315: RAISE FND_API.G_EXC_ERROR;

2311: p_x_osp_order_rec.vendor_contact_id := null;
2312: END IF;
2313: END IF;
2314: IF FND_MSG_PUB.count_msg > 0 THEN
2315: RAISE FND_API.G_EXC_ERROR;
2316: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2317: END IF;
2318: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2319: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 2316: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2312: END IF;
2313: END IF;
2314: IF FND_MSG_PUB.count_msg > 0 THEN
2315: RAISE FND_API.G_EXC_ERROR;
2316: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2317: END IF;
2318: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2319: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
2320: END IF;

Line 2418: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN

2414: BEGIN
2415: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2416: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2417: END IF;
2418: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2419: OPEN val_service_item_id_inv_csr(p_service_item_id, p_workorder_id);
2420: FETCH val_service_item_id_inv_csr INTO l_exist;
2421: IF(val_service_item_id_inv_csr%NOTFOUND) THEN
2422: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_SVC_ITEM');

Line 2496: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN

2492: BEGIN
2493: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2494: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2495: END IF;
2496: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2497: OPEN val_service_item_desc_csr(p_service_item_id , p_service_item_description);
2498: FETCH val_service_item_desc_csr INTO l_exist;
2499: IF(val_service_item_desc_csr%NOTFOUND) THEN
2500: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_SVC_ITEM_DESC');

Line 2562: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN

2558: BEGIN
2559: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2560: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2561: END IF;
2562: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2563:
2564: OPEN val_service_item_id_inv_csr(p_service_item_id, p_workorder_id);
2565: FETCH val_service_item_id_inv_csr INTO l_exist;
2566: IF(val_service_item_id_inv_csr%NOTFOUND) THEN

Line 2647: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN

2643: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2644: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure'
2645: || '- Service Item Id: ' || p_service_item_id || 'uom_code' || p_service_item_uom_code );
2646: END IF;
2647: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2648: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
2649: OPEN val_service_item_uom_csr(p_service_item_id,p_service_item_uom_code,p_org_id);
2650: FETCH val_service_item_uom_csr INTO l_exist;
2651: IF(val_service_item_uom_csr%NOTFOUND) THEN

Line 2648: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN

2644: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure'
2645: || '- Service Item Id: ' || p_service_item_id || 'uom_code' || p_service_item_uom_code );
2646: END IF;
2647: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2648: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
2649: OPEN val_service_item_uom_csr(p_service_item_id,p_service_item_uom_code,p_org_id);
2650: FETCH val_service_item_uom_csr INTO l_exist;
2651: IF(val_service_item_uom_csr%NOTFOUND) THEN
2652: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_UOM');

Line 2660: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN

2656: END IF;
2657: CLOSE val_service_item_uom_csr;
2658: END IF;
2659: ELSE
2660: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
2661: OPEN val_uom_code_csr(p_service_item_uom_code);
2662: FETCH val_uom_code_csr INTO l_exist;
2663: IF(val_uom_code_csr%NOTFOUND) THEN
2664: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_UOM');

Line 2692: IF(p_po_line_type_id IS NOT NULL AND p_po_line_type_id <> FND_API.G_MISS_NUM) THEN

2688: BEGIN
2689: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2690: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2691: END IF;
2692: IF(p_po_line_type_id IS NOT NULL AND p_po_line_type_id <> FND_API.G_MISS_NUM) THEN
2693: OPEN val_po_line_type_id_csr(p_po_line_type_id);
2694: FETCH val_po_line_type_id_csr INTO l_exist;
2695: IF(val_po_line_type_id_csr%NOTFOUND) THEN
2696: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_LNTYP_ID');

Line 2730: IF(p_po_line_id IS NOT NULL AND p_po_line_id <> FND_API.G_MISS_NUM) THEN

2726: BEGIN
2727: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2728: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2729: END IF;
2730: IF(p_po_line_id IS NOT NULL AND p_po_line_id <> FND_API.G_MISS_NUM) THEN
2731: OPEN val_po_line_id_csr(p_po_line_id, p_osp_order_id);
2732: FETCH val_po_line_id_csr INTO l_exist;
2733: IF(val_po_line_id_csr%NOTFOUND) THEN
2734: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_LINE_INV');

Line 2763: IF(p_exchange_instance_id IS NOT NULL AND p_exchange_instance_id <> FND_API.G_MISS_NUM) THEN

2759: BEGIN
2760: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2761: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2762: END IF;
2763: IF(p_exchange_instance_id IS NOT NULL AND p_exchange_instance_id <> FND_API.G_MISS_NUM) THEN
2764: OPEN val_instance_id_csr(p_exchange_instance_id);
2765: FETCH val_instance_id_csr INTO l_exist;
2766: IF (val_instance_id_csr %NOTFOUND) THEN
2767: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INSTANCE_ID_INV');

Line 2935: RAISE FND_API.G_EXC_ERROR;

2931: END IF;
2932: END LOOP;
2933: CLOSE val_order_lines_csr;
2934: IF FND_MSG_PUB.count_msg > 0 THEN
2935: RAISE FND_API.G_EXC_ERROR;
2936: -- Changed by jaramana on January 9, 2008 for the Requisition ER 6034236
2937: ELSIF(p_x_osp_order_rec.status_code = G_OSP_SUBMITTED_STATUS) THEN
2938: -- jaramana End
2939: -- submit for PO creation

Line 2954: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS OR

2950: );
2951: OPEN get_old_status;
2952: FETCH get_old_status INTO l_temp_status_code, l_new_ovn;
2953: CLOSE get_old_status;
2954: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS OR
2955: l_new_ovn <> l_old_ovn+1) THEN
2956: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SUB_PO_FLD');
2957: FND_MSG_PUB.ADD;
2958: ELSE

Line 2986: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS OR

2982: );
2983: OPEN get_old_status;
2984: FETCH get_old_status INTO l_temp_status_code, l_new_ovn;
2985: CLOSE get_old_status;
2986: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS OR
2987: l_new_ovn <> l_old_ovn+1) THEN
2988: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SUB_REQ_FLD');
2989: FND_MSG_PUB.ADD;
2990: ELSE

Line 3031: IF NOT(FND_API.TO_BOOLEAN(AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id))) THEN

3027: END IF;
3028:
3029: -- ask SO whether can close
3030: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL) THEN
3031: IF NOT(FND_API.TO_BOOLEAN(AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id))) THEN
3032: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CL_SO_OPEN');
3033: FND_MSG_PUB.ADD;
3034: END IF;
3035: END IF;

Line 3102: RAISE FND_API.G_EXC_ERROR;

3098: FND_MSG_PUB.ADD;
3099: END IF;
3100: CLOSE val_order_has_ship_lines;
3101: IF FND_MSG_PUB.count_msg > 0 THEN
3102: RAISE FND_API.G_EXC_ERROR;
3103: ELSE
3104: l_shipment_IDs_Tbl(1) := p_x_osp_order_rec.oe_header_id;
3105: AHL_OSP_SHIPMENT_PUB.Book_Order(
3106: p_api_version => 1.0,

Line 3107: p_init_msg_list => FND_API.G_FALSE,

3103: ELSE
3104: l_shipment_IDs_Tbl(1) := p_x_osp_order_rec.oe_header_id;
3105: AHL_OSP_SHIPMENT_PUB.Book_Order(
3106: p_api_version => 1.0,
3107: p_init_msg_list => FND_API.G_FALSE,
3108: p_commit => FND_API.G_FALSE,
3109: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
3110: p_oe_header_tbl => l_shipment_IDs_Tbl,
3111: x_return_status => l_return_status,

Line 3108: p_commit => FND_API.G_FALSE,

3104: l_shipment_IDs_Tbl(1) := p_x_osp_order_rec.oe_header_id;
3105: AHL_OSP_SHIPMENT_PUB.Book_Order(
3106: p_api_version => 1.0,
3107: p_init_msg_list => FND_API.G_FALSE,
3108: p_commit => FND_API.G_FALSE,
3109: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
3110: p_oe_header_tbl => l_shipment_IDs_Tbl,
3111: x_return_status => l_return_status,
3112: x_msg_count => l_msg_count,

Line 3109: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

3105: AHL_OSP_SHIPMENT_PUB.Book_Order(
3106: p_api_version => 1.0,
3107: p_init_msg_list => FND_API.G_FALSE,
3108: p_commit => FND_API.G_FALSE,
3109: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
3110: p_oe_header_tbl => l_shipment_IDs_Tbl,
3111: x_return_status => l_return_status,
3112: x_msg_count => l_msg_count,
3113: x_msg_data => l_msg_data

Line 3115: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN

3111: x_return_status => l_return_status,
3112: x_msg_count => l_msg_count,
3113: x_msg_data => l_msg_data
3114: );
3115: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN
3116: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SUB_SO_FLD');
3117: FND_MSG_PUB.ADD;
3118: END IF;
3119: END IF;

Line 3129: IF NOT(FND_API.TO_BOOLEAN(AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id))) THEN

3125: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CL_OE_NLL');
3126: FND_MSG_PUB.ADD;
3127: ELSE
3128: --dbms_output.put_line('Sales order closed ' || AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id));
3129: IF NOT(FND_API.TO_BOOLEAN(AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id))) THEN
3130: --dbms_output.put_line('Sales order is not closed');
3131: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CL_SO_OPEN');
3132: FND_MSG_PUB.ADD;
3133: END IF;

Line 3146: RAISE FND_API.G_EXC_ERROR;

3142: END IF;
3143: END IF;
3144: END IF;
3145: IF FND_MSG_PUB.count_msg > 0 THEN
3146: RAISE FND_API.G_EXC_ERROR;
3147: END IF;
3148: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3149: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
3150: END IF;

Line 3157: p_cancel_flag IN VARCHAR2 := FND_API.G_FALSE

3153: --------------------------------------------------------------------------------------------------------------
3154: PROCEDURE delete_cancel_so(
3155: p_oe_header_id IN NUMBER,
3156: p_del_cancel_so_lines_tbl IN del_cancel_so_lines_tbl_type,
3157: p_cancel_flag IN VARCHAR2 := FND_API.G_FALSE
3158: ) IS
3159: l_Ship_ID_Tbl AHL_OSP_SHIPMENT_PUB.Ship_ID_Tbl_Type;
3160: l_return_status VARCHAR2(1);
3161: l_msg_count NUMBER;

Line 3199: IF(l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN

3195: x_return_status => l_return_status ,
3196: x_msg_count => l_msg_count ,
3197: x_msg_data => l_msg_data
3198: );
3199: IF(l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN
3200: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SO_CAN_FLD');
3201: FND_MSG_PUB.ADD;
3202: END IF;
3203: ELSIF ( p_del_cancel_so_lines_tbl IS NOT NULL) THEN

Line 3294: IF(l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN

3290: x_return_status => l_return_status ,
3291: x_msg_count => l_msg_count ,
3292: x_msg_data => l_msg_data
3293: );
3294: IF(l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN
3295: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SO_LN_CAN_FLD');
3296: FND_MSG_PUB.ADD;
3297: END IF;
3298: END IF;

Line 3301: RAISE FND_API.G_EXC_ERROR;

3297: END IF;
3298: END IF;
3299: END IF;
3300: IF FND_MSG_PUB.count_msg > 0 THEN
3301: RAISE FND_API.G_EXC_ERROR;
3302: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3303: END IF;
3304: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3305: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 3302: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3298: END IF;
3299: END IF;
3300: IF FND_MSG_PUB.count_msg > 0 THEN
3301: RAISE FND_API.G_EXC_ERROR;
3302: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3303: END IF;
3304: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3305: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
3306: END IF;

Line 3391: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM

3387: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3388: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3389: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_id: ' || p_vendor_id);
3390: END IF;
3391: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3392: AND p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN
3393: OPEN vendor_id_csr(p_po_header_id, p_vendor_id);
3394: FETCH vendor_id_csr INTO l_exist;
3395: IF(vendor_id_csr %FOUND) THEN

Line 3392: AND p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN

3388: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3389: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_id: ' || p_vendor_id);
3390: END IF;
3391: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3392: AND p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN
3393: OPEN vendor_id_csr(p_po_header_id, p_vendor_id);
3394: FETCH vendor_id_csr INTO l_exist;
3395: IF(vendor_id_csr %FOUND) THEN
3396: CLOSE vendor_id_csr;

Line 3419: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM

3415: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3416: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3417: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_site_id: ' || p_vendor_site_id);
3418: END IF;
3419: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3420: AND p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
3421: OPEN vendor_site_id_csr(p_po_header_id, p_vendor_site_id);
3422: FETCH vendor_site_id_csr INTO l_exist;
3423: IF(vendor_site_id_csr %FOUND) THEN

Line 3420: AND p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN

3416: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3417: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_site_id: ' || p_vendor_site_id);
3418: END IF;
3419: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3420: AND p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
3421: OPEN vendor_site_id_csr(p_po_header_id, p_vendor_site_id);
3422: FETCH vendor_site_id_csr INTO l_exist;
3423: IF(vendor_site_id_csr %FOUND) THEN
3424: CLOSE vendor_site_id_csr;

Line 3438: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,

3434: --It handles OSP order header Creation, Update, and Deletion, order lines Creation, Update
3435: --and Deletion.
3436: PROCEDURE process_osp_order(
3437: p_api_version IN NUMBER := 1.0,
3438: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
3439: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3440: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
3441: p_module_type IN VARCHAR2 := NULL,
3442: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type,

Line 3439: p_commit IN VARCHAR2 := FND_API.G_FALSE,

3435: --and Deletion.
3436: PROCEDURE process_osp_order(
3437: p_api_version IN NUMBER := 1.0,
3438: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
3439: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3440: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
3441: p_module_type IN VARCHAR2 := NULL,
3442: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type,
3443: p_x_osp_order_lines_tbl IN OUT NOCOPY osp_order_lines_tbl_type,

Line 3440: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

3436: PROCEDURE process_osp_order(
3437: p_api_version IN NUMBER := 1.0,
3438: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
3439: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3440: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
3441: p_module_type IN VARCHAR2 := NULL,
3442: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type,
3443: p_x_osp_order_lines_tbl IN OUT NOCOPY osp_order_lines_tbl_type,
3444: x_return_status OUT NOCOPY VARCHAR2,

Line 3479: x_return_status := FND_API.G_RET_STS_SUCCESS;

3475: FROM ahl_osp_order_lines
3476: WHERE osp_order_id = c_osp_order_id;
3477: BEGIN
3478: --Initialize API return status to success
3479: x_return_status := FND_API.G_RET_STS_SUCCESS;
3480:
3481: --Standard Start of API savepoint
3482: SAVEPOINT process_osp_order;
3483:

Line 3485: IF NOT FND_API.compatible_api_call(

3481: --Standard Start of API savepoint
3482: SAVEPOINT process_osp_order;
3483:
3484: --Standard call to check for call compatibility.
3485: IF NOT FND_API.compatible_api_call(
3486: l_api_version,
3487: p_api_version,
3488: l_api_name,
3489: G_PKG_NAME)

Line 3491: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3487: p_api_version,
3488: l_api_name,
3489: G_PKG_NAME)
3490: THEN
3491: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3492: END IF;
3493:
3494: --Initialize message list if p_init_msg_list is set to TRUE.
3495: IF FND_API.to_boolean(p_init_msg_list) THEN

Line 3495: IF FND_API.to_boolean(p_init_msg_list) THEN

3491: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3492: END IF;
3493:
3494: --Initialize message list if p_init_msg_list is set to TRUE.
3495: IF FND_API.to_boolean(p_init_msg_list) THEN
3496: FND_MSG_PUB.initialize;
3497: END IF;
3498:
3499: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 3511: RAISE FND_API.G_EXC_ERROR;

3507: IF (p_x_osp_order_rec.operation_flag IS NOT NULL AND
3508: p_x_osp_order_rec.operation_flag NOT IN (G_OP_CREATE, G_OP_UPDATE, G_OP_DELETE)) THEN
3509: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVOP');
3510: FND_MSG_PUB.add;
3511: RAISE FND_API.G_EXC_ERROR;
3512: END IF;
3513: --Validate the operation_flag of the line records and it couldn't be NULL
3514: --In case only header record is to be processed, then NULL is supposed to be passed
3515: --to the lines table

Line 3521: RAISE FND_API.G_EXC_ERROR;

3517: FOR i IN p_x_osp_order_lines_tbl.FIRST..p_x_osp_order_lines_tbl.LAST LOOP
3518: IF (p_x_osp_order_lines_tbl(i).operation_flag NOT IN (G_OP_CREATE, G_OP_UPDATE, G_OP_DELETE)) THEN
3519: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVOP');
3520: FND_MSG_PUB.add;
3521: RAISE FND_API.G_EXC_ERROR;
3522: END IF;
3523: END LOOP;
3524: END IF;
3525:

Line 3538: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

3534: p_osp_order_lines_tbl => p_x_osp_order_lines_tbl,
3535: x_msg_count => l_msg_count,
3536: x_msg_data => l_msg_data,
3537: x_return_status => l_return_status);
3538: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3539: RAISE FND_API.G_EXC_ERROR;
3540: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3541: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3542: END IF;

Line 3539: RAISE FND_API.G_EXC_ERROR;

3535: x_msg_count => l_msg_count,
3536: x_msg_data => l_msg_data,
3537: x_return_status => l_return_status);
3538: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3539: RAISE FND_API.G_EXC_ERROR;
3540: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3541: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3542: END IF;
3543: END IF;

Line 3540: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

3536: x_msg_data => l_msg_data,
3537: x_return_status => l_return_status);
3538: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3539: RAISE FND_API.G_EXC_ERROR;
3540: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3541: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3542: END IF;
3543: END IF;
3544:

Line 3541: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3537: x_return_status => l_return_status);
3538: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3539: RAISE FND_API.G_EXC_ERROR;
3540: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3541: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3542: END IF;
3543: END IF;
3544:
3545: IF (p_x_osp_order_rec.operation_flag IS NULL) THEN

Line 3570: RAISE FND_API.G_EXC_ERROR;

3566: WHEN NO_DATA_FOUND THEN
3567: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');
3568: FND_MESSAGE.Set_Token('OSP_LINE_ID',p_x_osp_order_lines_tbl(i).osp_order_line_id);
3569: FND_MSG_PUB.ADD;
3570: RAISE FND_API.G_EXC_ERROR;
3571: END;
3572: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
3573: IF (l_status_code IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS)) THEN
3574: -- jaramana End

Line 3605: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

3601: l_return_status);
3602: END IF;
3603:
3604: l_msg_count := Fnd_Msg_Pub.count_msg;
3605: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3606: x_msg_count := l_msg_count;
3607: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3608: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3609: END IF;

Line 3607: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3603:
3604: l_msg_count := Fnd_Msg_Pub.count_msg;
3605: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3606: x_msg_count := l_msg_count;
3607: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3608: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3609: END IF;
3610: -- salogan added the following for supplier warranty ends
3611:

Line 3608: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

3604: l_msg_count := Fnd_Msg_Pub.count_msg;
3605: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3606: x_msg_count := l_msg_count;
3607: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3608: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3609: END IF;
3610: -- salogan added the following for supplier warranty ends
3611:
3612: --Delete OSP line record first (it makes more sense to delete shipment lines first, but

Line 3623: RAISE FND_API.G_EXC_ERROR;

3619: p_del_cancel_so_lines_tbl => l_del_cancel_so_lines_tbl);
3620: ELSE
3621: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
3622: FND_MSG_PUB.ADD;
3623: RAISE FND_API.G_EXC_ERROR;
3624: END IF;
3625: ELSIF (p_x_osp_order_lines_tbl(i).operation_flag = G_OP_CREATE) THEN
3626: --Create(Add) new line record
3627: create_osp_order_line(p_x_osp_order_lines_tbl(i));

Line 3667: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

3663: l_return_status);
3664: END IF;
3665:
3666: l_msg_count := Fnd_Msg_Pub.count_msg;
3667: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3668: x_msg_count := l_msg_count;
3669: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3670: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3671: END IF;

Line 3669: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3665:
3666: l_msg_count := Fnd_Msg_Pub.count_msg;
3667: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3668: x_msg_count := l_msg_count;
3669: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3670: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3671: END IF;
3672: END IF;
3673: -- salogan added for supplier warranty ends

Line 3670: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

3666: l_msg_count := Fnd_Msg_Pub.count_msg;
3667: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3668: x_msg_count := l_msg_count;
3669: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3670: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3671: END IF;
3672: END IF;
3673: -- salogan added for supplier warranty ends
3674:

Line 3711: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

3707: l_return_status);
3708: END IF;
3709:
3710: l_msg_count := Fnd_Msg_Pub.count_msg;
3711: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3712: x_msg_count := l_msg_count;
3713: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3714: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3715: END IF;

Line 3713: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3709:
3710: l_msg_count := Fnd_Msg_Pub.count_msg;
3711: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3712: x_msg_count := l_msg_count;
3713: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3714: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3715: END IF;
3716: END IF;
3717: -- salogan added for supplier warranty ends

Line 3714: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

3710: l_msg_count := Fnd_Msg_Pub.count_msg;
3711: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3712: x_msg_count := l_msg_count;
3713: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3714: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3715: END IF;
3716: END IF;
3717: -- salogan added for supplier warranty ends
3718: END IF;

Line 3746: RAISE FND_API.G_EXC_ERROR;

3742: EXCEPTION
3743: WHEN NO_DATA_FOUND THEN
3744: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');
3745: FND_MSG_PUB.add;
3746: RAISE FND_API.G_EXC_ERROR;
3747: END;
3748:
3749: IF l_valid_vendors_tbl.count > 0 THEN
3750: IF (l_header_vendor_id IS NULL OR l_header_site_id IS NULL) THEN

Line 3764: RAISE FND_API.G_EXC_ERROR;

3760: END IF;
3761: IF NOT l_validate_pass_flag THEN
3762: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3763: FND_MSG_PUB.add;
3764: RAISE FND_API.G_EXC_ERROR;
3765: END IF;
3766: ELSE
3767: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3768: FND_MSG_PUB.add;

Line 3769: RAISE FND_API.G_EXC_ERROR;

3765: END IF;
3766: ELSE
3767: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3768: FND_MSG_PUB.add;
3769: RAISE FND_API.G_EXC_ERROR;
3770: END IF;
3771: END IF;
3772: END IF;
3773: --Call create_shipment. Create_shipment will check whether it will create

Line 3793: RAISE FND_API.G_EXC_ERROR;

3789: EXCEPTION
3790: WHEN NO_DATA_FOUND THEN
3791: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');
3792: FND_MSG_PUB.add;
3793: RAISE FND_API.G_EXC_ERROR;
3794: END;
3795: --check the osp order could be deleted, if Yes then
3796: --Delete OSP order Header/Line records
3797: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 3820: RAISE FND_API.G_EXC_ERROR;

3816: WHEN NO_DATA_FOUND THEN
3817: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');
3818: FND_MESSAGE.Set_Token('OSP_LINE_ID',l_get_order_lines.osp_order_line_id);
3819: FND_MSG_PUB.ADD;
3820: RAISE FND_API.G_EXC_ERROR;
3821: END;
3822: IF (l_oe_ship_line_id IS NOT NULL OR l_oe_return_line_id IS NOT NULL) THEN
3823: l_del_cancel_so_lines_tbl(i).osp_order_id := p_x_osp_order_rec.osp_order_id;
3824: l_del_cancel_so_lines_tbl(i).oe_ship_line_id := l_oe_ship_line_id;

Line 3865: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

3861: l_return_status);
3862: END IF;
3863:
3864: l_msg_count := Fnd_Msg_Pub.count_msg;
3865: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3866: x_msg_count := l_msg_count;
3867: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3868: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3869: END IF;

Line 3867: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3863:
3864: l_msg_count := Fnd_Msg_Pub.count_msg;
3865: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3866: x_msg_count := l_msg_count;
3867: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3868: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3869: END IF;
3870: -- salogan added the following for supplier warranty ends
3871:

Line 3868: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

3864: l_msg_count := Fnd_Msg_Pub.count_msg;
3865: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3866: x_msg_count := l_msg_count;
3867: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3868: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3869: END IF;
3870: -- salogan added the following for supplier warranty ends
3871:
3872: --Delete OSP order lines

Line 3888: RAISE FND_API.G_EXC_ERROR;

3884: END IF;
3885: ELSE
3886: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
3887: FND_MSG_PUB.ADD;
3888: RAISE FND_API.G_EXC_ERROR;
3889: END IF;
3890: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_UPDATE) THEN
3891: IF (FND_LOG.LEVEL_EVENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3892: FND_LOG.STRING(FND_LOG.LEVEL_EVENT,

Line 3921: RAISE FND_API.G_EXC_ERROR;

3917: WHEN NO_DATA_FOUND THEN
3918: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');
3919: FND_MESSAGE.Set_Token('OSP_LINE_ID',p_x_osp_order_lines_tbl(i).osp_order_line_id);
3920: FND_MSG_PUB.ADD;
3921: RAISE FND_API.G_EXC_ERROR;
3922: END;
3923: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
3924: IF (l_status_code IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS)) THEN
3925: -- jaramana End

Line 3958: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

3954: l_return_status);
3955: END IF;
3956:
3957: l_msg_count := Fnd_Msg_Pub.count_msg;
3958: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3959: x_msg_count := l_msg_count;
3960: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3961: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3962: END IF;

Line 3960: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

3956:
3957: l_msg_count := Fnd_Msg_Pub.count_msg;
3958: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3959: x_msg_count := l_msg_count;
3960: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3961: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3962: END IF;
3963: -- salogan added the following for supplier warranty ends
3964:

Line 3961: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

3957: l_msg_count := Fnd_Msg_Pub.count_msg;
3958: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
3959: x_msg_count := l_msg_count;
3960: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
3961: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3962: END IF;
3963: -- salogan added the following for supplier warranty ends
3964:
3965: --Delete line record first (it makes more sense to delete shipment lines first, but

Line 3976: RAISE FND_API.G_EXC_ERROR;

3972: p_del_cancel_so_lines_tbl => l_del_cancel_so_lines_tbl);
3973: ELSE
3974: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
3975: FND_MSG_PUB.ADD;
3976: RAISE FND_API.G_EXC_ERROR;
3977: END IF;
3978: --AHL_OSP_ORDER_LINES_PKG.delete_row(p_x_osp_order_lines_tbl(i).osp_order_line_id);
3979: ELSIF (p_x_osp_order_lines_tbl(i).operation_flag = G_OP_UPDATE) THEN
3980: --update osp order line

Line 4015: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

4011: l_return_status);
4012: END IF;
4013:
4014: l_msg_count := Fnd_Msg_Pub.count_msg;
4015: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4016: x_msg_count := l_msg_count;
4017: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4018: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4019: END IF;

Line 4017: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4013:
4014: l_msg_count := Fnd_Msg_Pub.count_msg;
4015: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4016: x_msg_count := l_msg_count;
4017: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4018: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4019: END IF;
4020: END IF;
4021: -- salogan added for supplier warranty ends

Line 4018: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

4014: l_msg_count := Fnd_Msg_Pub.count_msg;
4015: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4016: x_msg_count := l_msg_count;
4017: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4018: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4019: END IF;
4020: END IF;
4021: -- salogan added for supplier warranty ends
4022: ELSIF (p_x_osp_order_lines_tbl(i).operation_flag = G_OP_CREATE) THEN

Line 4062: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

4058: l_return_status);
4059: END IF;
4060:
4061: l_msg_count := Fnd_Msg_Pub.count_msg;
4062: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4063: x_msg_count := l_msg_count;
4064: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4065: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4066: END IF;

Line 4064: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4060:
4061: l_msg_count := Fnd_Msg_Pub.count_msg;
4062: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4063: x_msg_count := l_msg_count;
4064: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4065: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4066: END IF;
4067: END IF;
4068: -- salogan added for supplier warranty ends

Line 4065: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

4061: l_msg_count := Fnd_Msg_Pub.count_msg;
4062: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4063: x_msg_count := l_msg_count;
4064: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4065: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4066: END IF;
4067: END IF;
4068: -- salogan added for supplier warranty ends
4069: END IF;

Line 4091: RAISE FND_API.G_EXC_ERROR;

4087: EXCEPTION
4088: WHEN NO_DATA_FOUND THEN
4089: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');
4090: FND_MSG_PUB.add;
4091: RAISE FND_API.G_EXC_ERROR;
4092: END;
4093: IF l_any_vendor_flag <> 'Y' THEN
4094: IF l_valid_vendors_tbl.count > 0 THEN
4095: IF (l_header_vendor_id IS NULL OR l_header_site_id IS NULL) THEN

Line 4109: RAISE FND_API.G_EXC_ERROR;

4105: END IF;
4106: IF NOT l_validate_pass_flag THEN
4107: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
4108: FND_MSG_PUB.add;
4109: RAISE FND_API.G_EXC_ERROR;
4110: END IF;
4111: ELSE
4112: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
4113: FND_MSG_PUB.add;

Line 4114: RAISE FND_API.G_EXC_ERROR;

4110: END IF;
4111: ELSE
4112: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
4113: FND_MSG_PUB.add;
4114: RAISE FND_API.G_EXC_ERROR;
4115: END IF;
4116: END IF;
4117: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
4118: --Validate new line records first because in header record only one attribute needs validation

Line 4179: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN

4175: l_return_status);
4176: END IF;
4177:
4178: l_msg_count := Fnd_Msg_Pub.count_msg;
4179: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4180: x_msg_count := l_msg_count;
4181: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4182: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4183: END IF;

Line 4181: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;

4177:
4178: l_msg_count := Fnd_Msg_Pub.count_msg;
4179: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4180: x_msg_count := l_msg_count;
4181: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4182: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4183: END IF;
4184: END IF;
4185: -- salogan added for supplier warranty ends

Line 4182: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;

4178: l_msg_count := Fnd_Msg_Pub.count_msg;
4179: IF l_msg_count > 0 OR l_return_status <> Fnd_Api.g_ret_sts_success THEN
4180: x_msg_count := l_msg_count;
4181: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
4182: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4183: END IF;
4184: END IF;
4185: -- salogan added for supplier warranty ends
4186: END LOOP;

Line 4208: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

4204: p_osp_order_lines_tbl => p_x_osp_order_lines_tbl,
4205: x_msg_count => l_msg_count,
4206: x_msg_data => l_msg_data,
4207: x_return_status => l_return_status);
4208: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4209: RAISE FND_API.G_EXC_ERROR;
4210: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4211: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4212: END IF;

Line 4209: RAISE FND_API.G_EXC_ERROR;

4205: x_msg_count => l_msg_count,
4206: x_msg_data => l_msg_data,
4207: x_return_status => l_return_status);
4208: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4209: RAISE FND_API.G_EXC_ERROR;
4210: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4211: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4212: END IF;
4213: END IF;

Line 4210: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

4206: x_msg_data => l_msg_data,
4207: x_return_status => l_return_status);
4208: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4209: RAISE FND_API.G_EXC_ERROR;
4210: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4211: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4212: END IF;
4213: END IF;
4214:

Line 4211: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

4207: x_return_status => l_return_status);
4208: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4209: RAISE FND_API.G_EXC_ERROR;
4210: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4211: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4212: END IF;
4213: END IF;
4214:
4215: -- Get all the error messages from the previous steps (if any) and raise the appropriate Exception

Line 4219: RAISE FND_API.G_EXC_ERROR;

4215: -- Get all the error messages from the previous steps (if any) and raise the appropriate Exception
4216: l_msg_count := FND_MSG_PUB.count_msg;
4217: IF l_msg_count > 0 THEN
4218: x_msg_count := l_msg_count;
4219: RAISE FND_API.G_EXC_ERROR;
4220: END IF;
4221:
4222: -- Perform the Commit (if requested)
4223: IF FND_API.to_boolean(p_commit) THEN

Line 4223: IF FND_API.to_boolean(p_commit) THEN

4219: RAISE FND_API.G_EXC_ERROR;
4220: END IF;
4221:
4222: -- Perform the Commit (if requested)
4223: IF FND_API.to_boolean(p_commit) THEN
4224: COMMIT;
4225: END IF;
4226:
4227: -- Count and Get messages (optional)

Line 4229: p_encoded => FND_API.G_FALSE,

4225: END IF;
4226:
4227: -- Count and Get messages (optional)
4228: FND_MSG_PUB.count_and_get(
4229: p_encoded => FND_API.G_FALSE,
4230: p_count => x_msg_count,
4231: p_data => x_msg_data);
4232:
4233: EXCEPTION

Line 4234: WHEN FND_API.G_EXC_ERROR THEN

4230: p_count => x_msg_count,
4231: p_data => x_msg_data);
4232:
4233: EXCEPTION
4234: WHEN FND_API.G_EXC_ERROR THEN
4235: ROLLBACK TO process_osp_order;
4236: x_return_status := FND_API.G_RET_STS_ERROR;
4237: FND_MSG_PUB.count_and_get(
4238: p_encoded => FND_API.G_FALSE,

Line 4236: x_return_status := FND_API.G_RET_STS_ERROR;

4232:
4233: EXCEPTION
4234: WHEN FND_API.G_EXC_ERROR THEN
4235: ROLLBACK TO process_osp_order;
4236: x_return_status := FND_API.G_RET_STS_ERROR;
4237: FND_MSG_PUB.count_and_get(
4238: p_encoded => FND_API.G_FALSE,
4239: p_count => x_msg_count,
4240: p_data => x_msg_data);

Line 4238: p_encoded => FND_API.G_FALSE,

4234: WHEN FND_API.G_EXC_ERROR THEN
4235: ROLLBACK TO process_osp_order;
4236: x_return_status := FND_API.G_RET_STS_ERROR;
4237: FND_MSG_PUB.count_and_get(
4238: p_encoded => FND_API.G_FALSE,
4239: p_count => x_msg_count,
4240: p_data => x_msg_data);
4241:
4242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 4242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

4238: p_encoded => FND_API.G_FALSE,
4239: p_count => x_msg_count,
4240: p_data => x_msg_data);
4241:
4242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4243: ROLLBACK TO process_osp_order;
4244: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4245: FND_MSG_PUB.count_and_get(
4246: p_encoded => FND_API.G_FALSE,

Line 4244: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

4240: p_data => x_msg_data);
4241:
4242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4243: ROLLBACK TO process_osp_order;
4244: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4245: FND_MSG_PUB.count_and_get(
4246: p_encoded => FND_API.G_FALSE,
4247: p_count => x_msg_count,
4248: p_data => x_msg_data);

Line 4246: p_encoded => FND_API.G_FALSE,

4242: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4243: ROLLBACK TO process_osp_order;
4244: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4245: FND_MSG_PUB.count_and_get(
4246: p_encoded => FND_API.G_FALSE,
4247: p_count => x_msg_count,
4248: p_data => x_msg_data);
4249:
4250: WHEN OTHERS THEN

Line 4252: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

4248: p_data => x_msg_data);
4249:
4250: WHEN OTHERS THEN
4251: ROLLBACK TO process_osp_order;
4252: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4253: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
4254: THEN
4255: FND_MSG_PUB.add_exc_msg(
4256: p_pkg_name => G_PKG_NAME,

Line 4261: p_encoded => FND_API.G_FALSE,

4257: p_procedure_name => l_api_name,
4258: p_error_text => SUBSTRB(SQLERRM,1,240));
4259: END IF;
4260: FND_MSG_PUB.count_and_get(
4261: p_encoded => FND_API.G_FALSE,
4262: p_count => x_msg_count,
4263: p_data => x_msg_data);
4264: END process_osp_order;
4265:

Line 4322: RAISE FND_API.G_EXC_ERROR;

4318: l_operating_unit_id :=mo_global.get_current_org_id();
4319: IF (l_operating_unit_id IS NULL) THEN
4320: FND_MESSAGE.Set_Name('AHL', 'AHL_OSP_ORG_NOT_SET');
4321: FND_MSG_PUB.ADD;
4322: RAISE FND_API.G_EXC_ERROR;
4323: END IF;
4324: --Validate the only user passed parameter order_type_code
4325: IF (p_x_osp_order_rec.order_type_code IS NULL OR
4326: p_x_osp_order_rec.order_type_code NOT IN (G_OSP_ORDER_TYPE_SERVICE,

Line 4331: RAISE FND_API.G_EXC_ERROR;

4327: G_OSP_ORDER_TYPE_EXCHANGE,
4328: G_OSP_ORDER_TYPE_BORROW)) THEN
4329: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORDER_TYPE_INVALID');
4330: FND_MSG_PUB.add;
4331: RAISE FND_API.G_EXC_ERROR;
4332: END IF;
4333:
4334: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
4335: --This API nulls out the G_MISS info, if passed by the user in the create mode.

Line 4359: RAISE FND_API.G_EXC_ERROR;

4355: p_x_osp_order_rec.vendor_site_id,
4356: p_x_osp_order_rec.vendor_contact_id);
4357: IF FND_MSG_PUB.count_msg > 0 THEN
4358: -- Vendor/Vendor Site/Vendor Contact is Invalid
4359: RAISE FND_API.G_EXC_ERROR;
4360: END IF;
4361: -- If valid, use the input values
4362: l_vendor_id := p_x_osp_order_rec.vendor_id;
4363: l_vendor_site_id := p_x_osp_order_rec.vendor_site_id;

Line 4371: RAISE FND_API.G_EXC_ERROR;

4367: validate_vendor_site(p_x_osp_order_rec.vendor_id,
4368: p_x_osp_order_rec.vendor_site_id);
4369: IF FND_MSG_PUB.count_msg > 0 THEN
4370: -- Vendor/Vendor Site/Vendor Contact is Invalid
4371: RAISE FND_API.G_EXC_ERROR;
4372: END IF;
4373: -- If valid, use the input values
4374: l_vendor_id := p_x_osp_order_rec.vendor_id;
4375: l_vendor_site_id := p_x_osp_order_rec.vendor_site_id;

Line 4382: RAISE FND_API.G_EXC_ERROR;

4378: -- Validate the Vendor
4379: validate_vendor(p_x_osp_order_rec.vendor_id);
4380: IF FND_MSG_PUB.count_msg > 0 THEN
4381: -- Vendor/Vendor Site/Vendor Contact is Invalid
4382: RAISE FND_API.G_EXC_ERROR;
4383: END IF;
4384: -- If valid, use the input values
4385: l_vendor_id := p_x_osp_order_rec.vendor_id;
4386: END IF;

Line 4433: RAISE FND_API.G_EXC_ERROR;

4429: WHEN NO_DATA_FOUND THEN
4430: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_WO');
4431: FND_MESSAGE.Set_Token('WORKORDER_ID', p_x_osp_order_lines_tbl(i).workorder_id);
4432: FND_MSG_PUB.ADD;
4433: RAISE FND_API.G_EXC_ERROR;
4434: END;
4435: END LOOP;
4436: END IF;
4437: derive_default_vendor(l_item_service_rels_tbl,

Line 4462: RAISE FND_API.G_EXC_ERROR;

4458: -- The vendor or vendor + vendor site passed in is not a valid: Throw Error
4459: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_INV');
4460: FND_MESSAGE.Set_Token('VENDOR_ID', p_x_osp_order_rec.vendor_id);
4461: FND_MSG_PUB.ADD;
4462: RAISE FND_API.G_EXC_ERROR;
4463: END IF;
4464: IF (p_x_osp_order_rec.vendor_site_id IS NOT NULL) THEN
4465: IF (p_x_osp_order_rec.vendor_contact_id IS NOT NULL) THEN
4466: -- Check if p_x_osp_order_rec.vendor_contact_id is valid

Line 4472: RAISE FND_API.G_EXC_ERROR;

4468: p_x_osp_order_rec.vendor_site_id,
4469: p_x_osp_order_rec.vendor_contact_id);
4470: IF FND_MSG_PUB.count_msg > 0 THEN
4471: -- Vendor/Vendor Site/Vendor Contact is Invalid
4472: RAISE FND_API.G_EXC_ERROR;
4473: END IF;
4474: -- Vendor Contact is valid: Use it
4475: l_vendor_contact_id := p_x_osp_order_rec.vendor_contact_id;
4476: ELSE

Line 4492: RAISE FND_API.G_EXC_ERROR;

4488: -- Validate the buyer
4489: validate_buyer(p_x_osp_order_rec.po_agent_id);
4490: IF FND_MSG_PUB.count_msg > 0 THEN
4491: -- Buyer is Invalid
4492: RAISE FND_API.G_EXC_ERROR;
4493: END IF;
4494: -- Buyer is valid: Use it
4495: l_buyer_id := p_x_osp_order_rec.po_agent_id;
4496: ELSE

Line 4806: RAISE FND_API.G_EXC_ERROR;

4802: --yazhou 22-Aug-2006 starts
4803: -- Bug fix#5479266
4804:
4805: IF FND_MSG_PUB.count_msg > 0 THEN
4806: RAISE FND_API.G_EXC_ERROR;
4807: END IF;
4808:
4809: --yazhou 22-Aug-2006 ends
4810:

Line 5191: RAISE FND_API.G_EXC_ERROR;

5187: EXCEPTION
5188: WHEN NO_DATA_FOUND THEN
5189: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVALID');
5190: FND_MSG_PUB.ADD;
5191: RAISE FND_API.G_EXC_ERROR;
5192: END;
5193: l_oe_header_rec.header_id := l_oe_header_id;
5194: l_oe_header_rec.osp_order_id := l_osp_order_id;
5195: IF l_oe_header_id IS NULL THEN

Line 5302: p_init_msg_list => FND_API.G_FALSE,

5298: 'oe_line_operation='||l_oe_lines_tbl(1).operation);
5299: END IF;
5300: AHL_OSP_SHIPMENT_PUB.process_order(
5301: p_api_version => 1.0,
5302: p_init_msg_list => FND_API.G_FALSE,
5303: p_commit => FND_API.G_FALSE,
5304: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5305: --Changed by mpothuku on 14-Dec-05 to differentiate the call from here and from
5306: --Shipment Line Details UI. Note that Shipment Line Details will be using OAF as the p_module_type

Line 5303: p_commit => FND_API.G_FALSE,

5299: END IF;
5300: AHL_OSP_SHIPMENT_PUB.process_order(
5301: p_api_version => 1.0,
5302: p_init_msg_list => FND_API.G_FALSE,
5303: p_commit => FND_API.G_FALSE,
5304: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5305: --Changed by mpothuku on 14-Dec-05 to differentiate the call from here and from
5306: --Shipment Line Details UI. Note that Shipment Line Details will be using OAF as the p_module_type
5307: p_module_type => NULL,--G_OAF_MODULE,

Line 5304: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

5300: AHL_OSP_SHIPMENT_PUB.process_order(
5301: p_api_version => 1.0,
5302: p_init_msg_list => FND_API.G_FALSE,
5303: p_commit => FND_API.G_FALSE,
5304: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5305: --Changed by mpothuku on 14-Dec-05 to differentiate the call from here and from
5306: --Shipment Line Details UI. Note that Shipment Line Details will be using OAF as the p_module_type
5307: p_module_type => NULL,--G_OAF_MODULE,
5308: p_x_header_rec => l_oe_header_rec,

Line 5314: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

5310: x_return_status => l_return_status,
5311: x_msg_count => l_msg_count,
5312: x_msg_data => l_msg_data);
5313: END IF;
5314: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5315: RAISE FND_API.G_EXC_ERROR;
5316: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5318: END IF;

Line 5315: RAISE FND_API.G_EXC_ERROR;

5311: x_msg_count => l_msg_count,
5312: x_msg_data => l_msg_data);
5313: END IF;
5314: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5315: RAISE FND_API.G_EXC_ERROR;
5316: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5318: END IF;
5319: END IF;

Line 5316: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

5312: x_msg_data => l_msg_data);
5313: END IF;
5314: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5315: RAISE FND_API.G_EXC_ERROR;
5316: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5318: END IF;
5319: END IF;
5320:

Line 5317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5313: END IF;
5314: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5315: RAISE FND_API.G_EXC_ERROR;
5316: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5318: END IF;
5319: END IF;
5320:
5321: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 5780: IF (p_x_osp_order_line_rec.quantity IS NOT NULL AND p_x_osp_order_line_rec.quantity <> FND_API.G_MISS_NUM) THEN

5776: --it is not necessary to add the original one here.
5777: --validate sercice_item_uom (just borrowed the old one)
5778: validate_service_item_uom(p_x_osp_order_line_rec.service_item_id, p_x_osp_order_line_rec.service_item_uom_code, p_x_osp_order_line_rec.inventory_org_id);
5779: --validate sercice_item_quantity(quantity)
5780: IF (p_x_osp_order_line_rec.quantity IS NOT NULL AND p_x_osp_order_line_rec.quantity <> FND_API.G_MISS_NUM) THEN
5781: IF(p_x_osp_order_line_rec.quantity <=0) THEN
5782: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_VAL');
5783: FND_MESSAGE.Set_Token('QUANTITY', p_x_osp_order_line_rec.quantity);
5784: FND_MSG_PUB.ADD;

Line 5787: ELSIF (p_x_osp_order_line_rec.service_item_uom_code IS NOT NULL AND p_x_osp_order_line_rec.service_item_uom_code <> FND_API.G_MISS_CHAR) THEN

5783: FND_MESSAGE.Set_Token('QUANTITY', p_x_osp_order_line_rec.quantity);
5784: FND_MSG_PUB.ADD;
5785: END IF;
5786: --quantity cannot be null when UOM is not null
5787: ELSIF (p_x_osp_order_line_rec.service_item_uom_code IS NOT NULL AND p_x_osp_order_line_rec.service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
5788: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_NLL');
5789: FND_MSG_PUB.ADD;
5790: END IF;
5791:

Line 5903: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,

5899: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Before calling Delete_IB_Transaction ' );
5900: END IF;
5901:
5902: AHL_OSP_SHIPMENT_PUB.Delete_IB_Transaction(
5903: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
5904: p_commit => FND_API.G_FALSE,
5905: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5906: x_return_status => l_return_status,
5907: x_msg_count => l_msg_count,

Line 5904: p_commit => FND_API.G_FALSE,

5900: END IF;
5901:
5902: AHL_OSP_SHIPMENT_PUB.Delete_IB_Transaction(
5903: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
5904: p_commit => FND_API.G_FALSE,
5905: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5906: x_return_status => l_return_status,
5907: x_msg_count => l_msg_count,
5908: x_msg_data => l_msg_data,

Line 5905: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

5901:
5902: AHL_OSP_SHIPMENT_PUB.Delete_IB_Transaction(
5903: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
5904: p_commit => FND_API.G_FALSE,
5905: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5906: x_return_status => l_return_status,
5907: x_msg_count => l_msg_count,
5908: x_msg_data => l_msg_data,
5909: p_oe_line_id => p_x_osp_order_line_rec.oe_return_line_id);

Line 5913: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

5909: p_oe_line_id => p_x_osp_order_line_rec.oe_return_line_id);
5910: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5911: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'After calling Delete_IB_Transaction: Return status' || l_return_status );
5912: END IF;
5913: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5914: RAISE FND_API.G_EXC_ERROR;
5915: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5916: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5917: END IF;

Line 5914: RAISE FND_API.G_EXC_ERROR;

5910: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5911: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'After calling Delete_IB_Transaction: Return status' || l_return_status );
5912: END IF;
5913: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5914: RAISE FND_API.G_EXC_ERROR;
5915: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5916: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5917: END IF;
5918:

Line 5915: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

5911: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'After calling Delete_IB_Transaction: Return status' || l_return_status );
5912: END IF;
5913: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5914: RAISE FND_API.G_EXC_ERROR;
5915: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5916: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5917: END IF;
5918:
5919:

Line 5916: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5912: END IF;
5913: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5914: RAISE FND_API.G_EXC_ERROR;
5915: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5916: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5917: END IF;
5918:
5919:
5920: IF (p_x_osp_order_line_rec.exchange_instance_id is not null) THEN

Line 5927: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,

5923: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'Before calling Create_IB_Transaction ' );
5924: END IF;
5925:
5926: AHL_OSP_SHIPMENT_PUB.Create_IB_Transaction(
5927: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
5928: p_commit => FND_API.G_FALSE,
5929: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5930: x_return_status => l_return_status,
5931: x_msg_count => l_msg_count,

Line 5928: p_commit => FND_API.G_FALSE,

5924: END IF;
5925:
5926: AHL_OSP_SHIPMENT_PUB.Create_IB_Transaction(
5927: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
5928: p_commit => FND_API.G_FALSE,
5929: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5930: x_return_status => l_return_status,
5931: x_msg_count => l_msg_count,
5932: x_msg_data => l_msg_data,

Line 5929: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

5925:
5926: AHL_OSP_SHIPMENT_PUB.Create_IB_Transaction(
5927: p_init_msg_list => FND_API.G_FALSE, --p_init_msg_list,
5928: p_commit => FND_API.G_FALSE,
5929: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
5930: x_return_status => l_return_status,
5931: x_msg_count => l_msg_count,
5932: x_msg_data => l_msg_data,
5933: p_osp_order_type => AHL_OSP_ORDERS_PVT.G_OSP_ORDER_TYPE_EXCHANGE,

Line 5941: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN

5937:
5938: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5939: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'After calling Create_IB_Transaction: Return status' || l_return_status );
5940: END IF;
5941: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5942: RAISE FND_API.G_EXC_ERROR;
5943: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5944: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5945: END IF;

Line 5942: RAISE FND_API.G_EXC_ERROR;

5938: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5939: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'After calling Create_IB_Transaction: Return status' || l_return_status );
5940: END IF;
5941: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5942: RAISE FND_API.G_EXC_ERROR;
5943: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5944: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5945: END IF;
5946:

Line 5943: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN

5939: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY, 'After calling Create_IB_Transaction: Return status' || l_return_status );
5940: END IF;
5941: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5942: RAISE FND_API.G_EXC_ERROR;
5943: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5944: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5945: END IF;
5946:
5947:

Line 5944: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

5940: END IF;
5941: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
5942: RAISE FND_API.G_EXC_ERROR;
5943: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
5944: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5945: END IF;
5946:
5947:
5948: END IF;

Line 6399: IF (p_x_osp_order_line_rec.quantity IS NOT NULL AND p_x_osp_order_line_rec.quantity <> FND_API.G_MISS_NUM) THEN

6395: FROM ahl_osp_orders_b
6396: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
6397: */
6398: -- jaramana End
6399: IF (p_x_osp_order_line_rec.quantity IS NOT NULL AND p_x_osp_order_line_rec.quantity <> FND_API.G_MISS_NUM) THEN
6400: IF(p_x_osp_order_line_rec.quantity <= 0) THEN
6401: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_VAL');
6402: FND_MESSAGE.Set_Token('QUANTITY', p_x_osp_order_line_rec.quantity);
6403: FND_MSG_PUB.ADD;

Line 6418: ELSIF (p_x_osp_order_line_rec.service_item_uom_code IS NOT NULL AND p_x_osp_order_line_rec.service_item_uom_code <> FND_API.G_MISS_CHAR) THEN

6414: END IF;
6415: */
6416: -- jaramana End
6417: --quantity cannot be null when UOM is not null
6418: ELSIF (p_x_osp_order_line_rec.service_item_uom_code IS NOT NULL AND p_x_osp_order_line_rec.service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
6419: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_NLL');
6420: FND_MSG_PUB.ADD;
6421: END IF;
6422:

Line 6577: l_temp_rank_sum := FND_API.G_MISS_NUM; --Just want to use a big positive number

6573: END LOOP;
6574: --Pick up the common vendor_cert_id (exists in all the sets) with
6575: --the highest(least) summary rank
6576: l_vendor_cert_id := NULL;
6577: l_temp_rank_sum := FND_API.G_MISS_NUM; --Just want to use a big positive number
6578: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6579: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
6580: G_LOG_PREFIX || 'derive_default_vendor',
6581: 'Procedure begins and count2='||l_vendor_rank_count_tbl.count||

Line 6988: ELSIF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN

6984: FND_MSG_PUB.ADD;
6985: ELSE
6986: IF (p_x_osp_order_line_rec.osp_order_id IS NULL) THEN
6987: p_x_osp_order_line_rec.osp_order_id := l_osp_order_line_rec.osp_order_id;
6988: ELSIF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN
6989: p_x_osp_order_line_rec.osp_order_id := null;
6990: END IF;
6991: IF (p_x_osp_order_line_rec.osp_line_number IS NULL) THEN
6992: p_x_osp_order_line_rec.osp_line_number := l_osp_order_line_rec.osp_line_number;

Line 6993: ELSIF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN

6989: p_x_osp_order_line_rec.osp_order_id := null;
6990: END IF;
6991: IF (p_x_osp_order_line_rec.osp_line_number IS NULL) THEN
6992: p_x_osp_order_line_rec.osp_line_number := l_osp_order_line_rec.osp_line_number;
6993: ELSIF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
6994: p_x_osp_order_line_rec.osp_line_number := null;
6995: END IF;
6996: IF (p_x_osp_order_line_rec.status_code IS NULL) THEN
6997: p_x_osp_order_line_rec.status_code := l_osp_order_line_rec.status_code;

Line 6998: ELSIF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN

6994: p_x_osp_order_line_rec.osp_line_number := null;
6995: END IF;
6996: IF (p_x_osp_order_line_rec.status_code IS NULL) THEN
6997: p_x_osp_order_line_rec.status_code := l_osp_order_line_rec.status_code;
6998: ELSIF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
6999: p_x_osp_order_line_rec.status_code := null;
7000: END IF;
7001: IF (p_x_osp_order_line_rec.need_by_date IS NULL) THEN
7002: p_x_osp_order_line_rec.need_by_date := l_osp_order_line_rec.need_by_date;

Line 7003: ELSIF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN

6999: p_x_osp_order_line_rec.status_code := null;
7000: END IF;
7001: IF (p_x_osp_order_line_rec.need_by_date IS NULL) THEN
7002: p_x_osp_order_line_rec.need_by_date := l_osp_order_line_rec.need_by_date;
7003: ELSIF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
7004: p_x_osp_order_line_rec.need_by_date := null;
7005: END IF;
7006: IF (p_x_osp_order_line_rec.ship_by_date IS NULL) THEN
7007: p_x_osp_order_line_rec.ship_by_date := l_osp_order_line_rec.ship_by_date;

Line 7008: ELSIF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN

7004: p_x_osp_order_line_rec.need_by_date := null;
7005: END IF;
7006: IF (p_x_osp_order_line_rec.ship_by_date IS NULL) THEN
7007: p_x_osp_order_line_rec.ship_by_date := l_osp_order_line_rec.ship_by_date;
7008: ELSIF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
7009: p_x_osp_order_line_rec.ship_by_date := null;
7010: END IF;
7011: IF (p_x_osp_order_line_rec.service_item_id IS NULL) THEN
7012: p_x_osp_order_line_rec.service_item_id := l_osp_order_line_rec.service_item_id;

Line 7013: ELSIF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN

7009: p_x_osp_order_line_rec.ship_by_date := null;
7010: END IF;
7011: IF (p_x_osp_order_line_rec.service_item_id IS NULL) THEN
7012: p_x_osp_order_line_rec.service_item_id := l_osp_order_line_rec.service_item_id;
7013: ELSIF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
7014: p_x_osp_order_line_rec.service_item_id := null;
7015: END IF;
7016: IF (p_x_osp_order_line_rec.service_item_number IS NULL) THEN
7017: p_x_osp_order_line_rec.service_item_number := l_osp_order_line_rec.service_item_number;

Line 7018: ELSIF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN

7014: p_x_osp_order_line_rec.service_item_id := null;
7015: END IF;
7016: IF (p_x_osp_order_line_rec.service_item_number IS NULL) THEN
7017: p_x_osp_order_line_rec.service_item_number := l_osp_order_line_rec.service_item_number;
7018: ELSIF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
7019: p_x_osp_order_line_rec.service_item_number := null;
7020: END IF;
7021: IF (p_x_osp_order_line_rec.service_item_description IS NULL) THEN
7022: p_x_osp_order_line_rec.service_item_description := l_osp_order_line_rec.service_item_description;

Line 7023: ELSIF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN

7019: p_x_osp_order_line_rec.service_item_number := null;
7020: END IF;
7021: IF (p_x_osp_order_line_rec.service_item_description IS NULL) THEN
7022: p_x_osp_order_line_rec.service_item_description := l_osp_order_line_rec.service_item_description;
7023: ELSIF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
7024: p_x_osp_order_line_rec.service_item_description := null;
7025: END IF;
7026: IF (p_x_osp_order_line_rec.service_item_uom_code IS NULL) THEN
7027: p_x_osp_order_line_rec.service_item_uom_code := l_osp_order_line_rec.service_item_uom_code;

Line 7028: ELSIF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN

7024: p_x_osp_order_line_rec.service_item_description := null;
7025: END IF;
7026: IF (p_x_osp_order_line_rec.service_item_uom_code IS NULL) THEN
7027: p_x_osp_order_line_rec.service_item_uom_code := l_osp_order_line_rec.service_item_uom_code;
7028: ELSIF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
7029: p_x_osp_order_line_rec.service_item_uom_code := null;
7030: END IF;
7031: IF (p_x_osp_order_line_rec.quantity IS NULL) THEN
7032: p_x_osp_order_line_rec.quantity := l_osp_order_line_rec.quantity;

Line 7033: ELSIF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN

7029: p_x_osp_order_line_rec.service_item_uom_code := null;
7030: END IF;
7031: IF (p_x_osp_order_line_rec.quantity IS NULL) THEN
7032: p_x_osp_order_line_rec.quantity := l_osp_order_line_rec.quantity;
7033: ELSIF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
7034: p_x_osp_order_line_rec.quantity := null;
7035: END IF;
7036: IF (p_x_osp_order_line_rec.po_line_type_id IS NULL) THEN
7037: p_x_osp_order_line_rec.po_line_type_id := l_osp_order_line_rec.po_line_type_id;

Line 7038: ELSIF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN

7034: p_x_osp_order_line_rec.quantity := null;
7035: END IF;
7036: IF (p_x_osp_order_line_rec.po_line_type_id IS NULL) THEN
7037: p_x_osp_order_line_rec.po_line_type_id := l_osp_order_line_rec.po_line_type_id;
7038: ELSIF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
7039: p_x_osp_order_line_rec.po_line_type_id := null;
7040: END IF;
7041: IF (p_x_osp_order_line_rec.po_line_id IS NULL) THEN
7042: p_x_osp_order_line_rec.po_line_id := l_osp_order_line_rec.po_line_id;

Line 7043: ELSIF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN

7039: p_x_osp_order_line_rec.po_line_type_id := null;
7040: END IF;
7041: IF (p_x_osp_order_line_rec.po_line_id IS NULL) THEN
7042: p_x_osp_order_line_rec.po_line_id := l_osp_order_line_rec.po_line_id;
7043: ELSIF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
7044: p_x_osp_order_line_rec.po_line_id := null;
7045: END IF;
7046: IF (p_x_osp_order_line_rec.oe_ship_line_id IS NULL) THEN
7047: p_x_osp_order_line_rec.oe_ship_line_id := l_osp_order_line_rec.oe_ship_line_id;

Line 7048: ELSIF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN

7044: p_x_osp_order_line_rec.po_line_id := null;
7045: END IF;
7046: IF (p_x_osp_order_line_rec.oe_ship_line_id IS NULL) THEN
7047: p_x_osp_order_line_rec.oe_ship_line_id := l_osp_order_line_rec.oe_ship_line_id;
7048: ELSIF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
7049: p_x_osp_order_line_rec.oe_ship_line_id := null;
7050: END IF;
7051: IF (p_x_osp_order_line_rec.oe_return_line_id IS NULL) THEN
7052: p_x_osp_order_line_rec.oe_return_line_id := l_osp_order_line_rec.oe_return_line_id;

Line 7053: ELSIF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN

7049: p_x_osp_order_line_rec.oe_ship_line_id := null;
7050: END IF;
7051: IF (p_x_osp_order_line_rec.oe_return_line_id IS NULL) THEN
7052: p_x_osp_order_line_rec.oe_return_line_id := l_osp_order_line_rec.oe_return_line_id;
7053: ELSIF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
7054: p_x_osp_order_line_rec.oe_return_line_id := null;
7055: END IF;
7056: IF (p_x_osp_order_line_rec.workorder_id IS NULL) THEN
7057: p_x_osp_order_line_rec.workorder_id := l_osp_order_line_rec.workorder_id;

Line 7058: ELSIF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN

7054: p_x_osp_order_line_rec.oe_return_line_id := null;
7055: END IF;
7056: IF (p_x_osp_order_line_rec.workorder_id IS NULL) THEN
7057: p_x_osp_order_line_rec.workorder_id := l_osp_order_line_rec.workorder_id;
7058: ELSIF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
7059: p_x_osp_order_line_rec.workorder_id := null;
7060: END IF;
7061: IF (p_x_osp_order_line_rec.job_number IS NULL) THEN
7062: p_x_osp_order_line_rec.job_number := l_osp_order_line_rec.job_number;

Line 7063: ELSIF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN

7059: p_x_osp_order_line_rec.workorder_id := null;
7060: END IF;
7061: IF (p_x_osp_order_line_rec.job_number IS NULL) THEN
7062: p_x_osp_order_line_rec.job_number := l_osp_order_line_rec.job_number;
7063: ELSIF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
7064: p_x_osp_order_line_rec.job_number := null;
7065: END IF;
7066: IF (p_x_osp_order_line_rec.exchange_instance_id IS NULL) THEN
7067: p_x_osp_order_line_rec.exchange_instance_id := l_osp_order_line_rec.exchange_instance_id;

Line 7068: ELSIF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN

7064: p_x_osp_order_line_rec.job_number := null;
7065: END IF;
7066: IF (p_x_osp_order_line_rec.exchange_instance_id IS NULL) THEN
7067: p_x_osp_order_line_rec.exchange_instance_id := l_osp_order_line_rec.exchange_instance_id;
7068: ELSIF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
7069: p_x_osp_order_line_rec.exchange_instance_id := null;
7070: END IF;
7071: IF (p_x_osp_order_line_rec.exchange_instance_number IS NULL) THEN
7072: p_x_osp_order_line_rec.exchange_instance_number := l_osp_order_line_rec.exchange_instance_number;

Line 7073: ELSIF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN

7069: p_x_osp_order_line_rec.exchange_instance_id := null;
7070: END IF;
7071: IF (p_x_osp_order_line_rec.exchange_instance_number IS NULL) THEN
7072: p_x_osp_order_line_rec.exchange_instance_number := l_osp_order_line_rec.exchange_instance_number;
7073: ELSIF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
7074: p_x_osp_order_line_rec.exchange_instance_number := null;
7075: END IF;
7076: IF (p_x_osp_order_line_rec.inventory_item_id IS NULL) THEN
7077: p_x_osp_order_line_rec.inventory_item_id := l_osp_order_line_rec.inventory_item_id;

Line 7078: ELSIF(p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN

7074: p_x_osp_order_line_rec.exchange_instance_number := null;
7075: END IF;
7076: IF (p_x_osp_order_line_rec.inventory_item_id IS NULL) THEN
7077: p_x_osp_order_line_rec.inventory_item_id := l_osp_order_line_rec.inventory_item_id;
7078: ELSIF(p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
7079: p_x_osp_order_line_rec.inventory_item_id := null;
7080: END IF;
7081: IF (p_x_osp_order_line_rec.inventory_org_id IS NULL) THEN
7082: p_x_osp_order_line_rec.inventory_org_id := l_osp_order_line_rec.inventory_org_id;

Line 7083: ELSIF(p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN

7079: p_x_osp_order_line_rec.inventory_item_id := null;
7080: END IF;
7081: IF (p_x_osp_order_line_rec.inventory_org_id IS NULL) THEN
7082: p_x_osp_order_line_rec.inventory_org_id := l_osp_order_line_rec.inventory_org_id;
7083: ELSIF(p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
7084: p_x_osp_order_line_rec.inventory_org_id := null;
7085: END IF;
7086: IF (p_x_osp_order_line_rec.item_number IS NULL) THEN
7087: p_x_osp_order_line_rec.item_number := l_osp_order_line_rec.item_number;

Line 7088: ELSIF(p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN

7084: p_x_osp_order_line_rec.inventory_org_id := null;
7085: END IF;
7086: IF (p_x_osp_order_line_rec.item_number IS NULL) THEN
7087: p_x_osp_order_line_rec.item_number := l_osp_order_line_rec.item_number;
7088: ELSIF(p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
7089: p_x_osp_order_line_rec.item_number := null;
7090: END IF;
7091: IF (p_x_osp_order_line_rec.inventory_item_uom IS NULL) THEN
7092: p_x_osp_order_line_rec.inventory_item_uom := l_osp_order_line_rec.inventory_item_uom;

Line 7093: ELSIF(p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN

7089: p_x_osp_order_line_rec.item_number := null;
7090: END IF;
7091: IF (p_x_osp_order_line_rec.inventory_item_uom IS NULL) THEN
7092: p_x_osp_order_line_rec.inventory_item_uom := l_osp_order_line_rec.inventory_item_uom;
7093: ELSIF(p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
7094: p_x_osp_order_line_rec.inventory_item_uom := null;
7095: END IF;
7096: IF (p_x_osp_order_line_rec.inventory_item_quantity IS NULL) THEN
7097: p_x_osp_order_line_rec.inventory_item_quantity := l_osp_order_line_rec.inventory_item_quantity;

Line 7098: ELSIF(p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN

7094: p_x_osp_order_line_rec.inventory_item_uom := null;
7095: END IF;
7096: IF (p_x_osp_order_line_rec.inventory_item_quantity IS NULL) THEN
7097: p_x_osp_order_line_rec.inventory_item_quantity := l_osp_order_line_rec.inventory_item_quantity;
7098: ELSIF(p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
7099: p_x_osp_order_line_rec.inventory_item_quantity := null;
7100: END IF;
7101: IF (p_x_osp_order_line_rec.sub_inventory IS NULL) THEN
7102: p_x_osp_order_line_rec.sub_inventory := l_osp_order_line_rec.sub_inventory;

Line 7103: ELSIF(p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN

7099: p_x_osp_order_line_rec.inventory_item_quantity := null;
7100: END IF;
7101: IF (p_x_osp_order_line_rec.sub_inventory IS NULL) THEN
7102: p_x_osp_order_line_rec.sub_inventory := l_osp_order_line_rec.sub_inventory;
7103: ELSIF(p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
7104: p_x_osp_order_line_rec.sub_inventory := null;
7105: END IF;
7106: IF (p_x_osp_order_line_rec.lot_number IS NULL) THEN
7107: p_x_osp_order_line_rec.lot_number := l_osp_order_line_rec.lot_number;

Line 7108: ELSIF(p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN

7104: p_x_osp_order_line_rec.sub_inventory := null;
7105: END IF;
7106: IF (p_x_osp_order_line_rec.lot_number IS NULL) THEN
7107: p_x_osp_order_line_rec.lot_number := l_osp_order_line_rec.lot_number;
7108: ELSIF(p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
7109: p_x_osp_order_line_rec.lot_number := null;
7110: END IF;
7111: IF (p_x_osp_order_line_rec.serial_number IS NULL) THEN
7112: p_x_osp_order_line_rec.serial_number := l_osp_order_line_rec.serial_number;

Line 7113: ELSIF(p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN

7109: p_x_osp_order_line_rec.lot_number := null;
7110: END IF;
7111: IF (p_x_osp_order_line_rec.serial_number IS NULL) THEN
7112: p_x_osp_order_line_rec.serial_number := l_osp_order_line_rec.serial_number;
7113: ELSIF(p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
7114: p_x_osp_order_line_rec.serial_number := null;
7115: END IF;
7116:
7117: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236

Line 7120: ELSIF(p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN

7116:
7117: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
7118: IF (p_x_osp_order_line_rec.po_req_line_id IS NULL) THEN
7119: p_x_osp_order_line_rec.po_req_line_id := l_osp_order_line_rec.po_req_line_id;
7120: ELSIF(p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN
7121: p_x_osp_order_line_rec.po_req_line_id := null;
7122: END IF;
7123: -- jaramana End
7124:

Line 7127: ELSIF(p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN

7123: -- jaramana End
7124:
7125: IF (p_x_osp_order_line_rec.attribute_category IS NULL) THEN
7126: p_x_osp_order_line_rec.attribute_category := l_osp_order_line_rec.attribute_category;
7127: ELSIF(p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
7128: p_x_osp_order_line_rec.attribute_category := null;
7129: END IF;
7130: IF (p_x_osp_order_line_rec.attribute1 IS NULL) THEN
7131: p_x_osp_order_line_rec.attribute1 := l_osp_order_line_rec.attribute1;

Line 7132: ELSIF(p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN

7128: p_x_osp_order_line_rec.attribute_category := null;
7129: END IF;
7130: IF (p_x_osp_order_line_rec.attribute1 IS NULL) THEN
7131: p_x_osp_order_line_rec.attribute1 := l_osp_order_line_rec.attribute1;
7132: ELSIF(p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
7133: p_x_osp_order_line_rec.attribute1 := null;
7134: END IF;
7135: IF (p_x_osp_order_line_rec.attribute2 IS NULL) THEN
7136: p_x_osp_order_line_rec.attribute2 := l_osp_order_line_rec.attribute2;

Line 7137: ELSIF(p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN

7133: p_x_osp_order_line_rec.attribute1 := null;
7134: END IF;
7135: IF (p_x_osp_order_line_rec.attribute2 IS NULL) THEN
7136: p_x_osp_order_line_rec.attribute2 := l_osp_order_line_rec.attribute2;
7137: ELSIF(p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
7138: p_x_osp_order_line_rec.attribute2 := null;
7139: END IF;
7140: IF (p_x_osp_order_line_rec.attribute3 IS NULL) THEN
7141: p_x_osp_order_line_rec.attribute3 := l_osp_order_line_rec.attribute3;

Line 7142: ELSIF(p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN

7138: p_x_osp_order_line_rec.attribute2 := null;
7139: END IF;
7140: IF (p_x_osp_order_line_rec.attribute3 IS NULL) THEN
7141: p_x_osp_order_line_rec.attribute3 := l_osp_order_line_rec.attribute3;
7142: ELSIF(p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
7143: p_x_osp_order_line_rec.attribute3 := null;
7144: END IF;
7145: IF (p_x_osp_order_line_rec.attribute4 IS NULL) THEN
7146: p_x_osp_order_line_rec.attribute4 := l_osp_order_line_rec.attribute4;

Line 7147: ELSIF(p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN

7143: p_x_osp_order_line_rec.attribute3 := null;
7144: END IF;
7145: IF (p_x_osp_order_line_rec.attribute4 IS NULL) THEN
7146: p_x_osp_order_line_rec.attribute4 := l_osp_order_line_rec.attribute4;
7147: ELSIF(p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
7148: p_x_osp_order_line_rec.attribute4 := null;
7149: END IF;
7150: IF (p_x_osp_order_line_rec.attribute5 IS NULL) THEN
7151: p_x_osp_order_line_rec.attribute5 := l_osp_order_line_rec.attribute5;

Line 7152: ELSIF(p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN

7148: p_x_osp_order_line_rec.attribute4 := null;
7149: END IF;
7150: IF (p_x_osp_order_line_rec.attribute5 IS NULL) THEN
7151: p_x_osp_order_line_rec.attribute5 := l_osp_order_line_rec.attribute5;
7152: ELSIF(p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
7153: p_x_osp_order_line_rec.attribute5 := null;
7154: END IF;
7155: IF (p_x_osp_order_line_rec.attribute6 IS NULL) THEN
7156: p_x_osp_order_line_rec.attribute6 := l_osp_order_line_rec.attribute6;

Line 7157: ELSIF(p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN

7153: p_x_osp_order_line_rec.attribute5 := null;
7154: END IF;
7155: IF (p_x_osp_order_line_rec.attribute6 IS NULL) THEN
7156: p_x_osp_order_line_rec.attribute6 := l_osp_order_line_rec.attribute6;
7157: ELSIF(p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
7158: p_x_osp_order_line_rec.attribute6 := null;
7159: END IF;
7160: IF (p_x_osp_order_line_rec.attribute7 IS NULL) THEN
7161: p_x_osp_order_line_rec.attribute7 := l_osp_order_line_rec.attribute7;

Line 7162: ELSIF(p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN

7158: p_x_osp_order_line_rec.attribute6 := null;
7159: END IF;
7160: IF (p_x_osp_order_line_rec.attribute7 IS NULL) THEN
7161: p_x_osp_order_line_rec.attribute7 := l_osp_order_line_rec.attribute7;
7162: ELSIF(p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
7163: p_x_osp_order_line_rec.attribute7 := null;
7164: END IF;
7165: IF (p_x_osp_order_line_rec.attribute8 IS NULL) THEN
7166: p_x_osp_order_line_rec.attribute8 := l_osp_order_line_rec.attribute8;

Line 7167: ELSIF(p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN

7163: p_x_osp_order_line_rec.attribute7 := null;
7164: END IF;
7165: IF (p_x_osp_order_line_rec.attribute8 IS NULL) THEN
7166: p_x_osp_order_line_rec.attribute8 := l_osp_order_line_rec.attribute8;
7167: ELSIF(p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
7168: p_x_osp_order_line_rec.attribute8 := null;
7169: END IF;
7170: IF (p_x_osp_order_line_rec.attribute9 IS NULL) THEN
7171: p_x_osp_order_line_rec.attribute9 := l_osp_order_line_rec.attribute9;

Line 7172: ELSIF(p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN

7168: p_x_osp_order_line_rec.attribute8 := null;
7169: END IF;
7170: IF (p_x_osp_order_line_rec.attribute9 IS NULL) THEN
7171: p_x_osp_order_line_rec.attribute9 := l_osp_order_line_rec.attribute9;
7172: ELSIF(p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
7173: p_x_osp_order_line_rec.attribute9 := null;
7174: END IF;
7175: IF (p_x_osp_order_line_rec.attribute10 IS NULL) THEN
7176: p_x_osp_order_line_rec.attribute10 := l_osp_order_line_rec.attribute10;

Line 7177: ELSIF(p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN

7173: p_x_osp_order_line_rec.attribute9 := null;
7174: END IF;
7175: IF (p_x_osp_order_line_rec.attribute10 IS NULL) THEN
7176: p_x_osp_order_line_rec.attribute10 := l_osp_order_line_rec.attribute10;
7177: ELSIF(p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
7178: p_x_osp_order_line_rec.attribute10 := null;
7179: END IF;
7180: IF (p_x_osp_order_line_rec.attribute11 IS NULL) THEN
7181: p_x_osp_order_line_rec.attribute11 := l_osp_order_line_rec.attribute11;

Line 7182: ELSIF(p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN

7178: p_x_osp_order_line_rec.attribute10 := null;
7179: END IF;
7180: IF (p_x_osp_order_line_rec.attribute11 IS NULL) THEN
7181: p_x_osp_order_line_rec.attribute11 := l_osp_order_line_rec.attribute11;
7182: ELSIF(p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
7183: p_x_osp_order_line_rec.attribute11 := null;
7184: END IF;
7185: IF (p_x_osp_order_line_rec.attribute12 IS NULL) THEN
7186: p_x_osp_order_line_rec.attribute12 := l_osp_order_line_rec.attribute12;

Line 7187: ELSIF(p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN

7183: p_x_osp_order_line_rec.attribute11 := null;
7184: END IF;
7185: IF (p_x_osp_order_line_rec.attribute12 IS NULL) THEN
7186: p_x_osp_order_line_rec.attribute12 := l_osp_order_line_rec.attribute12;
7187: ELSIF(p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
7188: p_x_osp_order_line_rec.attribute12 := null;
7189: END IF;
7190: IF (p_x_osp_order_line_rec.attribute13 IS NULL) THEN
7191: p_x_osp_order_line_rec.attribute13 := l_osp_order_line_rec.attribute13;

Line 7192: ELSIF(p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN

7188: p_x_osp_order_line_rec.attribute12 := null;
7189: END IF;
7190: IF (p_x_osp_order_line_rec.attribute13 IS NULL) THEN
7191: p_x_osp_order_line_rec.attribute13 := l_osp_order_line_rec.attribute13;
7192: ELSIF(p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
7193: p_x_osp_order_line_rec.attribute13 := null;
7194: END IF;
7195: IF (p_x_osp_order_line_rec.attribute14 IS NULL) THEN
7196: p_x_osp_order_line_rec.attribute14 := l_osp_order_line_rec.attribute14;

Line 7197: ELSIF(p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN

7193: p_x_osp_order_line_rec.attribute13 := null;
7194: END IF;
7195: IF (p_x_osp_order_line_rec.attribute14 IS NULL) THEN
7196: p_x_osp_order_line_rec.attribute14 := l_osp_order_line_rec.attribute14;
7197: ELSIF(p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
7198: p_x_osp_order_line_rec.attribute14 := null;
7199: END IF;
7200: IF (p_x_osp_order_line_rec.attribute15 IS NULL) THEN
7201: p_x_osp_order_line_rec.attribute15 := l_osp_order_line_rec.attribute15;

Line 7202: ELSIF(p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN

7198: p_x_osp_order_line_rec.attribute14 := null;
7199: END IF;
7200: IF (p_x_osp_order_line_rec.attribute15 IS NULL) THEN
7201: p_x_osp_order_line_rec.attribute15 := l_osp_order_line_rec.attribute15;
7202: ELSIF(p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
7203: p_x_osp_order_line_rec.attribute15 := null;
7204: END IF;
7205: END IF;
7206: CLOSE osp_order_lines_csr;

Line 7208: IF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN

7204: END IF;
7205: END IF;
7206: CLOSE osp_order_lines_csr;
7207: ELSIF (p_x_osp_order_line_rec.operation_flag = G_OP_CREATE) THEN
7208: IF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN
7209: p_x_osp_order_line_rec.osp_order_id := null;
7210: END IF;
7211: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
7212: p_x_osp_order_line_rec.osp_line_number := null;

Line 7211: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN

7207: ELSIF (p_x_osp_order_line_rec.operation_flag = G_OP_CREATE) THEN
7208: IF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN
7209: p_x_osp_order_line_rec.osp_order_id := null;
7210: END IF;
7211: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
7212: p_x_osp_order_line_rec.osp_line_number := null;
7213: END IF;
7214: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
7215: p_x_osp_order_line_rec.status_code := null;

Line 7214: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN

7210: END IF;
7211: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
7212: p_x_osp_order_line_rec.osp_line_number := null;
7213: END IF;
7214: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
7215: p_x_osp_order_line_rec.status_code := null;
7216: END IF;
7217: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
7218: p_x_osp_order_line_rec.need_by_date := null;

Line 7217: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN

7213: END IF;
7214: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
7215: p_x_osp_order_line_rec.status_code := null;
7216: END IF;
7217: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
7218: p_x_osp_order_line_rec.need_by_date := null;
7219: END IF;
7220: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
7221: p_x_osp_order_line_rec.ship_by_date := null;

Line 7220: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN

7216: END IF;
7217: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
7218: p_x_osp_order_line_rec.need_by_date := null;
7219: END IF;
7220: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
7221: p_x_osp_order_line_rec.ship_by_date := null;
7222: END IF;
7223: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
7224: p_x_osp_order_line_rec.service_item_id := null;

Line 7223: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN

7219: END IF;
7220: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
7221: p_x_osp_order_line_rec.ship_by_date := null;
7222: END IF;
7223: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
7224: p_x_osp_order_line_rec.service_item_id := null;
7225: END IF;
7226: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
7227: p_x_osp_order_line_rec.service_item_number := null;

Line 7226: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN

7222: END IF;
7223: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
7224: p_x_osp_order_line_rec.service_item_id := null;
7225: END IF;
7226: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
7227: p_x_osp_order_line_rec.service_item_number := null;
7228: END IF;
7229: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
7230: p_x_osp_order_line_rec.service_item_description := null;

Line 7229: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN

7225: END IF;
7226: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
7227: p_x_osp_order_line_rec.service_item_number := null;
7228: END IF;
7229: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
7230: p_x_osp_order_line_rec.service_item_description := null;
7231: END IF;
7232: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
7233: p_x_osp_order_line_rec.service_item_uom_code := null;

Line 7232: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN

7228: END IF;
7229: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
7230: p_x_osp_order_line_rec.service_item_description := null;
7231: END IF;
7232: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
7233: p_x_osp_order_line_rec.service_item_uom_code := null;
7234: END IF;
7235: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
7236: p_x_osp_order_line_rec.quantity := null;

Line 7235: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN

7231: END IF;
7232: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
7233: p_x_osp_order_line_rec.service_item_uom_code := null;
7234: END IF;
7235: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
7236: p_x_osp_order_line_rec.quantity := null;
7237: END IF;
7238: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
7239: p_x_osp_order_line_rec.po_line_type_id := null;

Line 7238: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN

7234: END IF;
7235: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
7236: p_x_osp_order_line_rec.quantity := null;
7237: END IF;
7238: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
7239: p_x_osp_order_line_rec.po_line_type_id := null;
7240: END IF;
7241: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
7242: p_x_osp_order_line_rec.po_line_id := null;

Line 7241: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN

7237: END IF;
7238: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
7239: p_x_osp_order_line_rec.po_line_type_id := null;
7240: END IF;
7241: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
7242: p_x_osp_order_line_rec.po_line_id := null;
7243: END IF;
7244: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
7245: p_x_osp_order_line_rec.oe_ship_line_id := null;

Line 7244: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN

7240: END IF;
7241: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
7242: p_x_osp_order_line_rec.po_line_id := null;
7243: END IF;
7244: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
7245: p_x_osp_order_line_rec.oe_ship_line_id := null;
7246: END IF;
7247: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
7248: p_x_osp_order_line_rec.oe_return_line_id := null;

Line 7247: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN

7243: END IF;
7244: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
7245: p_x_osp_order_line_rec.oe_ship_line_id := null;
7246: END IF;
7247: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
7248: p_x_osp_order_line_rec.oe_return_line_id := null;
7249: END IF;
7250: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
7251: p_x_osp_order_line_rec.workorder_id := null;

Line 7250: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN

7246: END IF;
7247: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
7248: p_x_osp_order_line_rec.oe_return_line_id := null;
7249: END IF;
7250: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
7251: p_x_osp_order_line_rec.workorder_id := null;
7252: END IF;
7253: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
7254: p_x_osp_order_line_rec.job_number := null;

Line 7253: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN

7249: END IF;
7250: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
7251: p_x_osp_order_line_rec.workorder_id := null;
7252: END IF;
7253: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
7254: p_x_osp_order_line_rec.job_number := null;
7255: END IF;
7256: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
7257: p_x_osp_order_line_rec.exchange_instance_id := null;

Line 7256: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN

7252: END IF;
7253: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
7254: p_x_osp_order_line_rec.job_number := null;
7255: END IF;
7256: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
7257: p_x_osp_order_line_rec.exchange_instance_id := null;
7258: END IF;
7259: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
7260: p_x_osp_order_line_rec.exchange_instance_number := null;

Line 7259: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN

7255: END IF;
7256: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
7257: p_x_osp_order_line_rec.exchange_instance_id := null;
7258: END IF;
7259: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
7260: p_x_osp_order_line_rec.exchange_instance_number := null;
7261: END IF;
7262: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
7263: p_x_osp_order_line_rec.inventory_item_id := null;

Line 7262: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN

7258: END IF;
7259: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
7260: p_x_osp_order_line_rec.exchange_instance_number := null;
7261: END IF;
7262: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
7263: p_x_osp_order_line_rec.inventory_item_id := null;
7264: END IF;
7265: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
7266: p_x_osp_order_line_rec.inventory_org_id := null;

Line 7265: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN

7261: END IF;
7262: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
7263: p_x_osp_order_line_rec.inventory_item_id := null;
7264: END IF;
7265: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
7266: p_x_osp_order_line_rec.inventory_org_id := null;
7267: END IF;
7268: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
7269: p_x_osp_order_line_rec.item_number := null;

Line 7268: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN

7264: END IF;
7265: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
7266: p_x_osp_order_line_rec.inventory_org_id := null;
7267: END IF;
7268: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
7269: p_x_osp_order_line_rec.item_number := null;
7270: END IF;
7271: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
7272: p_x_osp_order_line_rec.inventory_item_uom := null;

Line 7271: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN

7267: END IF;
7268: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
7269: p_x_osp_order_line_rec.item_number := null;
7270: END IF;
7271: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
7272: p_x_osp_order_line_rec.inventory_item_uom := null;
7273: END IF;
7274: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
7275: p_x_osp_order_line_rec.inventory_item_quantity := null;

Line 7274: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN

7270: END IF;
7271: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
7272: p_x_osp_order_line_rec.inventory_item_uom := null;
7273: END IF;
7274: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
7275: p_x_osp_order_line_rec.inventory_item_quantity := null;
7276: END IF;
7277: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
7278: p_x_osp_order_line_rec.sub_inventory := null;

Line 7277: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN

7273: END IF;
7274: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
7275: p_x_osp_order_line_rec.inventory_item_quantity := null;
7276: END IF;
7277: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
7278: p_x_osp_order_line_rec.sub_inventory := null;
7279: END IF;
7280: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
7281: p_x_osp_order_line_rec.lot_number := null;

Line 7280: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN

7276: END IF;
7277: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
7278: p_x_osp_order_line_rec.sub_inventory := null;
7279: END IF;
7280: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
7281: p_x_osp_order_line_rec.lot_number := null;
7282: END IF;
7283: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
7284: p_x_osp_order_line_rec.serial_number := null;

Line 7283: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN

7279: END IF;
7280: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
7281: p_x_osp_order_line_rec.lot_number := null;
7282: END IF;
7283: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
7284: p_x_osp_order_line_rec.serial_number := null;
7285: END IF;
7286: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
7287: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN

Line 7287: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN

7283: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
7284: p_x_osp_order_line_rec.serial_number := null;
7285: END IF;
7286: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
7287: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN
7288: p_x_osp_order_line_rec.po_req_line_id := null;
7289: END IF;
7290: -- jaramana End
7291: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN

Line 7291: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN

7287: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN
7288: p_x_osp_order_line_rec.po_req_line_id := null;
7289: END IF;
7290: -- jaramana End
7291: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
7292: p_x_osp_order_line_rec.attribute_category := null;
7293: END IF;
7294: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
7295: p_x_osp_order_line_rec.attribute1 := null;

Line 7294: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN

7290: -- jaramana End
7291: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
7292: p_x_osp_order_line_rec.attribute_category := null;
7293: END IF;
7294: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
7295: p_x_osp_order_line_rec.attribute1 := null;
7296: END IF;
7297: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
7298: p_x_osp_order_line_rec.attribute2 := null;

Line 7297: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN

7293: END IF;
7294: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
7295: p_x_osp_order_line_rec.attribute1 := null;
7296: END IF;
7297: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
7298: p_x_osp_order_line_rec.attribute2 := null;
7299: END IF;
7300: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
7301: p_x_osp_order_line_rec.attribute3 := null;

Line 7300: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN

7296: END IF;
7297: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
7298: p_x_osp_order_line_rec.attribute2 := null;
7299: END IF;
7300: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
7301: p_x_osp_order_line_rec.attribute3 := null;
7302: END IF;
7303: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
7304: p_x_osp_order_line_rec.attribute4 := null;

Line 7303: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN

7299: END IF;
7300: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
7301: p_x_osp_order_line_rec.attribute3 := null;
7302: END IF;
7303: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
7304: p_x_osp_order_line_rec.attribute4 := null;
7305: END IF;
7306: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
7307: p_x_osp_order_line_rec.attribute5 := null;

Line 7306: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN

7302: END IF;
7303: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
7304: p_x_osp_order_line_rec.attribute4 := null;
7305: END IF;
7306: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
7307: p_x_osp_order_line_rec.attribute5 := null;
7308: END IF;
7309: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
7310: p_x_osp_order_line_rec.attribute6 := null;

Line 7309: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN

7305: END IF;
7306: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
7307: p_x_osp_order_line_rec.attribute5 := null;
7308: END IF;
7309: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
7310: p_x_osp_order_line_rec.attribute6 := null;
7311: END IF;
7312: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
7313: p_x_osp_order_line_rec.attribute7 := null;

Line 7312: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN

7308: END IF;
7309: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
7310: p_x_osp_order_line_rec.attribute6 := null;
7311: END IF;
7312: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
7313: p_x_osp_order_line_rec.attribute7 := null;
7314: END IF;
7315: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
7316: p_x_osp_order_line_rec.attribute8 := null;

Line 7315: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN

7311: END IF;
7312: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
7313: p_x_osp_order_line_rec.attribute7 := null;
7314: END IF;
7315: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
7316: p_x_osp_order_line_rec.attribute8 := null;
7317: END IF;
7318: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
7319: p_x_osp_order_line_rec.attribute9 := null;

Line 7318: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN

7314: END IF;
7315: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
7316: p_x_osp_order_line_rec.attribute8 := null;
7317: END IF;
7318: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
7319: p_x_osp_order_line_rec.attribute9 := null;
7320: END IF;
7321: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
7322: p_x_osp_order_line_rec.attribute10 := null;

Line 7321: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN

7317: END IF;
7318: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
7319: p_x_osp_order_line_rec.attribute9 := null;
7320: END IF;
7321: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
7322: p_x_osp_order_line_rec.attribute10 := null;
7323: END IF;
7324: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
7325: p_x_osp_order_line_rec.attribute11 := null;

Line 7324: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN

7320: END IF;
7321: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
7322: p_x_osp_order_line_rec.attribute10 := null;
7323: END IF;
7324: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
7325: p_x_osp_order_line_rec.attribute11 := null;
7326: END IF;
7327: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
7328: p_x_osp_order_line_rec.attribute12 := null;

Line 7327: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN

7323: END IF;
7324: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
7325: p_x_osp_order_line_rec.attribute11 := null;
7326: END IF;
7327: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
7328: p_x_osp_order_line_rec.attribute12 := null;
7329: END IF;
7330: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
7331: p_x_osp_order_line_rec.attribute13 := null;

Line 7330: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN

7326: END IF;
7327: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
7328: p_x_osp_order_line_rec.attribute12 := null;
7329: END IF;
7330: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
7331: p_x_osp_order_line_rec.attribute13 := null;
7332: END IF;
7333: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
7334: p_x_osp_order_line_rec.attribute14 := null;

Line 7333: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN

7329: END IF;
7330: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
7331: p_x_osp_order_line_rec.attribute13 := null;
7332: END IF;
7333: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
7334: p_x_osp_order_line_rec.attribute14 := null;
7335: END IF;
7336: IF (p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
7337: p_x_osp_order_line_rec.attribute15 := null;

Line 7336: IF (p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN

7332: END IF;
7333: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
7334: p_x_osp_order_line_rec.attribute14 := null;
7335: END IF;
7336: IF (p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
7337: p_x_osp_order_line_rec.attribute15 := null;
7338: END IF;
7339: END IF;
7340: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 7412: ELSIF (p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN

7408: IF(g_module_type = 'JSP') THEN
7409: -- service item number
7410: IF(p_x_osp_order_line_rec.service_item_number IS NULL) THEN
7411: p_x_osp_order_line_rec.service_item_id := NULL;
7412: ELSIF (p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
7413: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
7414: p_x_osp_order_line_rec.service_item_id := FND_API.G_MISS_NUM;
7415: ELSE
7416: p_x_osp_order_line_rec.service_item_id := NULL;

Line 7414: p_x_osp_order_line_rec.service_item_id := FND_API.G_MISS_NUM;

7410: IF(p_x_osp_order_line_rec.service_item_number IS NULL) THEN
7411: p_x_osp_order_line_rec.service_item_id := NULL;
7412: ELSIF (p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
7413: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
7414: p_x_osp_order_line_rec.service_item_id := FND_API.G_MISS_NUM;
7415: ELSE
7416: p_x_osp_order_line_rec.service_item_id := NULL;
7417: END IF;
7418: END IF;

Line 7422: ELSIF (p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN

7418: END IF;
7419: -- job number and workorder_id
7420: IF(p_x_osp_order_line_rec.job_number IS NULL) THEN
7421: p_x_osp_order_line_rec.workorder_id := NULL;
7422: ELSIF (p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
7423: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
7424: p_x_osp_order_line_rec.workorder_id := FND_API.G_MISS_NUM;
7425: ELSE
7426: p_x_osp_order_line_rec.workorder_id := NULL;

Line 7424: p_x_osp_order_line_rec.workorder_id := FND_API.G_MISS_NUM;

7420: IF(p_x_osp_order_line_rec.job_number IS NULL) THEN
7421: p_x_osp_order_line_rec.workorder_id := NULL;
7422: ELSIF (p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
7423: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
7424: p_x_osp_order_line_rec.workorder_id := FND_API.G_MISS_NUM;
7425: ELSE
7426: p_x_osp_order_line_rec.workorder_id := NULL;
7427: END IF;
7428: END IF;

Line 7432: ELSIF (p_x_osp_order_line_rec.po_line_type = FND_API.G_MISS_CHAR) THEN

7428: END IF;
7429: -- po_line_type_id
7430: IF(p_x_osp_order_line_rec.po_line_type IS NULL) THEN
7431: p_x_osp_order_line_rec.po_line_type_id := NULL;
7432: ELSIF (p_x_osp_order_line_rec.po_line_type = FND_API.G_MISS_CHAR) THEN
7433: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
7434: p_x_osp_order_line_rec.po_line_type_id := FND_API.G_MISS_NUM;
7435: ELSE
7436: p_x_osp_order_line_rec.po_line_type_id := NULL;

Line 7434: p_x_osp_order_line_rec.po_line_type_id := FND_API.G_MISS_NUM;

7430: IF(p_x_osp_order_line_rec.po_line_type IS NULL) THEN
7431: p_x_osp_order_line_rec.po_line_type_id := NULL;
7432: ELSIF (p_x_osp_order_line_rec.po_line_type = FND_API.G_MISS_CHAR) THEN
7433: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
7434: p_x_osp_order_line_rec.po_line_type_id := FND_API.G_MISS_NUM;
7435: ELSE
7436: p_x_osp_order_line_rec.po_line_type_id := NULL;
7437: END IF;
7438: END IF;

Line 7441: IF (p_x_osp_order_line_rec.job_number IS NOT NULL AND p_x_osp_order_line_rec.job_number <> FND_API.G_MISS_CHAR) THEN

7437: END IF;
7438: END IF;
7439: END IF;
7440: -- conversion of value to id for job number (to workorder_id)
7441: IF (p_x_osp_order_line_rec.job_number IS NOT NULL AND p_x_osp_order_line_rec.job_number <> FND_API.G_MISS_CHAR) THEN
7442: OPEN workorder_id_csr(p_x_osp_order_line_rec.job_number);
7443: FETCH workorder_id_csr INTO l_workorder_id;
7444: IF(workorder_id_csr%NOTFOUND) THEN
7445: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_JOB_NUM_INV');

Line 7454: IF (p_x_osp_order_line_rec.service_item_number IS NOT NULL AND p_x_osp_order_line_rec.service_item_number <> FND_API.G_MISS_CHAR) THEN

7450: END IF;
7451: CLOSE workorder_id_csr;
7452: END IF;
7453: -- conversion of value to id for service item number
7454: IF (p_x_osp_order_line_rec.service_item_number IS NOT NULL AND p_x_osp_order_line_rec.service_item_number <> FND_API.G_MISS_CHAR) THEN
7455: OPEN service_item_id_csr(p_x_osp_order_line_rec.service_item_number, p_x_osp_order_line_rec.inventory_org_id);
7456: FETCH service_item_id_csr INTO l_service_item_id;
7457: IF(service_item_id_csr%NOTFOUND) THEN
7458: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_SVC_ITEM_INV');

Line 7467: IF (p_x_osp_order_line_rec.po_line_type IS NOT NULL AND p_x_osp_order_line_rec.po_line_type <> FND_API.G_MISS_CHAR) THEN

7463: END IF;
7464: CLOSE service_item_id_csr;
7465: END IF;
7466: -- conversion of value to id for po_line_type (to po_line_type_id)
7467: IF (p_x_osp_order_line_rec.po_line_type IS NOT NULL AND p_x_osp_order_line_rec.po_line_type <> FND_API.G_MISS_CHAR) THEN
7468: OPEN po_line_type_id_csr(p_x_osp_order_line_rec.po_line_type);
7469: FETCH po_line_type_id_csr INTO l_po_line_type_id;
7470: IF(po_line_type_id_csr%NOTFOUND) THEN
7471: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_PO_LN_TYPE_INV');

Line 7480: IF (p_x_osp_order_line_rec.exchange_instance_number IS NOT NULL AND p_x_osp_order_line_rec.exchange_instance_number <> FND_API.G_MISS_CHAR) THEN

7476: END IF;
7477: CLOSE po_line_type_id_csr;
7478: END IF;
7479: -- conversion of value to id for exchange_instance_number (to exchange_instance_id)
7480: IF (p_x_osp_order_line_rec.exchange_instance_number IS NOT NULL AND p_x_osp_order_line_rec.exchange_instance_number <> FND_API.G_MISS_CHAR) THEN
7481: OPEN exchange_instance_id_csr(p_x_osp_order_line_rec.exchange_instance_number);
7482: FETCH exchange_instance_id_csr INTO l_exchange_instance_id;
7483: IF(exchange_instance_id_csr%NOTFOUND) THEN
7484: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_X_INST_NUM_INV');

Line 7522: ELSIF (p_x_osp_order_line_rec.po_line_id IS NOT NULL AND p_x_osp_order_line_rec.po_line_id <> FND_API.G_MISS_NUM) THEN

7518: CLOSE osp_order_line_on_csr;
7519: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
7520: -- We are not planning to derive the OSP_ORDER_LINE_ID from PO_LINE_ID
7521: /*
7522: ELSIF (p_x_osp_order_line_rec.po_line_id IS NOT NULL AND p_x_osp_order_line_rec.po_line_id <> FND_API.G_MISS_NUM) THEN
7523: OPEN osp_order_line_po_csr(p_x_osp_order_line_rec.po_line_id );
7524: FETCH osp_order_line_po_csr INTO l_osp_order_line_id;
7525: IF(osp_order_line_po_csr%NOTFOUND) THEN
7526: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_LINE_INV');

Line 7542: RAISE FND_API.G_EXC_ERROR;

7538: END IF;
7539: END IF;
7540: END IF;
7541: IF FND_MSG_PUB.count_msg > 0 THEN
7542: RAISE FND_API.G_EXC_ERROR;
7543: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7544: END IF;
7545: --dbms_output.put_line('Exiting : convert_order_lines_val_to_id');
7546: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 7543: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7539: END IF;
7540: END IF;
7541: IF FND_MSG_PUB.count_msg > 0 THEN
7542: RAISE FND_API.G_EXC_ERROR;
7543: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7544: END IF;
7545: --dbms_output.put_line('Exiting : convert_order_lines_val_to_id');
7546: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7547: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 7574: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN

7570: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7571: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
7572: END IF;
7573:
7574: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
7575: OPEN val_service_item_id_csr;
7576: FETCH val_service_item_id_csr INTO g_dummy_char;
7577: IF(val_service_item_id_csr%NOTFOUND) THEN
7578: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_SVC_ITEM');

Line 7689: RAISE FND_API.G_EXC_ERROR;

7685: IF verify_vendor%NOTFOUND THEN
7686: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
7687: FND_MESSAGE.set_token('ITEM_ID', p_osp_order_line_rec.inventory_item_id);
7688: FND_MSG_PUB.add;
7689: RAISE FND_API.G_EXC_ERROR;
7690: --FND_MSG_PUB.count_and_get(
7691: --p_encoded => FND_API.G_FALSE,
7692: --p_count => l_msg_count,
7693: --p_data => l_msg_data);

Line 7691: --p_encoded => FND_API.G_FALSE,

7687: FND_MESSAGE.set_token('ITEM_ID', p_osp_order_line_rec.inventory_item_id);
7688: FND_MSG_PUB.add;
7689: RAISE FND_API.G_EXC_ERROR;
7690: --FND_MSG_PUB.count_and_get(
7691: --p_encoded => FND_API.G_FALSE,
7692: --p_count => l_msg_count,
7693: --p_data => l_msg_data);
7694: END IF;
7695: CLOSE verify_vendor;

Line 7734: p_init_msg_list => FND_API.G_FALSE,

7730: --nullify_exchange_instance(p_osp_order_rec.osp_order_id, p_x_osp_order_lines_tbl);
7731: END IF;
7732: AHL_OSP_SHIPMENT_PUB.convert_subtxn_type(
7733: p_api_version => 1.0,
7734: p_init_msg_list => FND_API.G_FALSE,
7735: p_commit => FND_API.G_FALSE,
7736: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7737: p_default => FND_API.G_TRUE,
7738: p_module_type => NULL,

Line 7735: p_commit => FND_API.G_FALSE,

7731: END IF;
7732: AHL_OSP_SHIPMENT_PUB.convert_subtxn_type(
7733: p_api_version => 1.0,
7734: p_init_msg_list => FND_API.G_FALSE,
7735: p_commit => FND_API.G_FALSE,
7736: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7737: p_default => FND_API.G_TRUE,
7738: p_module_type => NULL,
7739: p_osp_order_id => p_osp_order_rec.osp_order_id ,

Line 7736: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

7732: AHL_OSP_SHIPMENT_PUB.convert_subtxn_type(
7733: p_api_version => 1.0,
7734: p_init_msg_list => FND_API.G_FALSE,
7735: p_commit => FND_API.G_FALSE,
7736: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7737: p_default => FND_API.G_TRUE,
7738: p_module_type => NULL,
7739: p_osp_order_id => p_osp_order_rec.osp_order_id ,
7740: p_old_order_type_code => l_old_type_code,

Line 7737: p_default => FND_API.G_TRUE,

7733: p_api_version => 1.0,
7734: p_init_msg_list => FND_API.G_FALSE,
7735: p_commit => FND_API.G_FALSE,
7736: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7737: p_default => FND_API.G_TRUE,
7738: p_module_type => NULL,
7739: p_osp_order_id => p_osp_order_rec.osp_order_id ,
7740: p_old_order_type_code => l_old_type_code,
7741: p_new_order_type_code => p_osp_order_rec.order_type_code,

Line 7821: l_contract_id NUMBER := FND_API.G_MISS_NUM;

7817: L_API_NAME CONSTANT VARCHAR2(30) := 'Get_Warranty_Rec_for_Create';
7818: L_DEBUG_KEY CONSTANT VARCHAR2(100) := G_LOG_PREFIX || '.' || L_API_NAME;
7819: -- Local variables defined for the procedure
7820: l_trackable VARCHAR2(1);
7821: l_contract_id NUMBER := FND_API.G_MISS_NUM;
7822: l_warranty_entl_id NUMBER;
7823: l_call_process_entl VARCHAR2(1) := 'Y';
7824: l_ovn NUMBER;
7825: l_entitlement_rec AHL_WARRANTY_ENTL_PVT.Warranty_Entl_Rec_Type;

Line 7886: l_entitlement_rec.warranty_contract_id := FND_API.G_MISS_NUM;

7882: FETCH c_match_contract into l_contract_id; -- Store the warranty contract id for the instance match
7883: EXIT WHEN c_match_contract%NOTFOUND OR c_match_contract%ROWCOUNT > 1;
7884: END LOOP;
7885: IF(c_match_contract%ROWCOUNT > 1) THEN
7886: l_entitlement_rec.warranty_contract_id := FND_API.G_MISS_NUM;
7887: l_entitlement_rec.entitlement_status_code := 'REVIEW';
7888: ELSIF(c_match_contract%ROWCOUNT = 1) THEN
7889: l_entitlement_rec.warranty_contract_id := l_contract_id;
7890: l_entitlement_rec.entitlement_status_code := 'APPROVED';

Line 8040: l_contract_id := FND_API.G_MISS_NUM;

8036: FND_MSG_PUB.add;
8037: END IF;
8038: l_entl_status := 'APPROVAL_PENDING';
8039: ELSE -- If contact number is not associated/removed
8040: l_contract_id := FND_API.G_MISS_NUM;
8041: IF(l_old_contract_id IS NULL AND l_old_entl_status IN ('REVIEW','NOT_APPLICABLE')) THEN
8042: l_entl_status := l_old_entl_status;
8043: ELSE
8044: l_entl_status := 'APPROVAL_PENDING';

Line 8063: l_entitlement_rec.visit_task_id := FND_API.G_MISS_NUM;

8059: l_entitlement_rec.operation_flag := AHL_WARRANTY_ENTL_PVT.G_OP_UPDATE;
8060: ELSIF(p_x_osp_order_line_rec.warranty_entitlement_id is null AND l_entl_status = 'APPROVAL_PENDING') THEN
8061: -- CREATE Entitlement record
8062: l_entitlement_rec.operation_flag := AHL_WARRANTY_ENTL_PVT.G_OP_CREATE;
8063: l_entitlement_rec.visit_task_id := FND_API.G_MISS_NUM;
8064: ELSE
8065: l_call_process_entl := 'N';
8066: END IF;
8067:

Line 8159: l_entitlement_rec.osp_order_line_id := FND_API.G_MISS_NUM;

8155: CLOSE c_get_entl_details;
8156:
8157: IF(l_warranty_entl_id IS NOT NULL) THEN --warranty entitlement exists
8158: IF(l_visit_task_id IS NOT NULL) THEN --entitlement based on visit
8159: l_entitlement_rec.osp_order_line_id := FND_API.G_MISS_NUM;
8160: l_entitlement_rec.warranty_entitlement_id := l_warranty_entl_id;
8161: l_entitlement_rec.object_version_number := l_ovn;
8162: l_entitlement_rec.operation_flag := AHL_WARRANTY_ENTL_PVT.G_OP_UPDATE;
8163: ELSE --entitlement based on OSP

Line 8190: l_entitlement_rec.osp_order_line_id := FND_API.G_MISS_NUM;

8186: CLOSE c_get_entl_details;
8187:
8188: IF(l_warranty_entl_id IS NOT NULL) THEN --warranty entitlement exists
8189: IF(l_visit_task_id IS NOT NULL) THEN --entitlement based on visit
8190: l_entitlement_rec.osp_order_line_id := FND_API.G_MISS_NUM;
8191: l_entitlement_rec.warranty_entitlement_id := l_warranty_entl_id;
8192: l_entitlement_rec.object_version_number := l_ovn;
8193: l_entitlement_rec.operation_flag := AHL_WARRANTY_ENTL_PVT.G_OP_UPDATE;
8194: ELSE --entitlement based on OSP