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 328: RAISE FND_API.G_EXC_ERROR;

324: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
325: FND_MSG_PUB.ADD;
326: END IF;
327: IF FND_MSG_PUB.count_msg > 0 THEN
328: RAISE FND_API.G_EXC_ERROR;
329: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
330: END IF;
331: IF(g_module_type = 'JSP')THEN
332: -- conversion of value to id for Vendor name

Line 329: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

325: FND_MSG_PUB.ADD;
326: END IF;
327: IF FND_MSG_PUB.count_msg > 0 THEN
328: RAISE FND_API.G_EXC_ERROR;
329: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
330: END IF;
331: IF(g_module_type = 'JSP')THEN
332: -- conversion of value to id for Vendor name
333: IF(p_x_osp_order_rec.vendor_name IS NULL) THEN

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

331: IF(g_module_type = 'JSP')THEN
332: -- conversion of value to id for Vendor name
333: IF(p_x_osp_order_rec.vendor_name IS NULL) THEN
334: p_x_osp_order_rec.vendor_id := NULL;
335: ELSIF (p_x_osp_order_rec.vendor_name = FND_API.G_MISS_CHAR) THEN
336: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
337: p_x_osp_order_rec.vendor_id := FND_API.G_MISS_NUM;
338: ELSE
339: p_x_osp_order_rec.vendor_id := NULL;

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

333: IF(p_x_osp_order_rec.vendor_name IS NULL) THEN
334: p_x_osp_order_rec.vendor_id := NULL;
335: ELSIF (p_x_osp_order_rec.vendor_name = FND_API.G_MISS_CHAR) THEN
336: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
337: p_x_osp_order_rec.vendor_id := FND_API.G_MISS_NUM;
338: ELSE
339: p_x_osp_order_rec.vendor_id := NULL;
340: END IF;
341: END IF;

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

340: END IF;
341: END IF;
342: IF(p_x_osp_order_rec.vendor_site_code IS NULL) THEN
343: p_x_osp_order_rec.vendor_site_id := NULL;
344: ELSIF (p_x_osp_order_rec.vendor_site_code = FND_API.G_MISS_CHAR) THEN
345: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
346: p_x_osp_order_rec.vendor_site_id := FND_API.G_MISS_NUM;
347: ELSE
348: p_x_osp_order_rec.vendor_site_id := NULL;

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

342: IF(p_x_osp_order_rec.vendor_site_code IS NULL) THEN
343: p_x_osp_order_rec.vendor_site_id := NULL;
344: ELSIF (p_x_osp_order_rec.vendor_site_code = FND_API.G_MISS_CHAR) THEN
345: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
346: p_x_osp_order_rec.vendor_site_id := FND_API.G_MISS_NUM;
347: ELSE
348: p_x_osp_order_rec.vendor_site_id := NULL;
349: END IF;
350: END IF;

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

349: END IF;
350: END IF;
351: IF(p_x_osp_order_rec.buyer_name IS NULL) THEN
352: p_x_osp_order_rec.po_agent_id := NULL;
353: ELSIF (p_x_osp_order_rec.buyer_name = FND_API.G_MISS_CHAR) THEN
354: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
355: p_x_osp_order_rec.po_agent_id := FND_API.G_MISS_NUM;
356: ELSE
357: p_x_osp_order_rec.po_agent_id := NULL;

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

351: IF(p_x_osp_order_rec.buyer_name IS NULL) THEN
352: p_x_osp_order_rec.po_agent_id := NULL;
353: ELSIF (p_x_osp_order_rec.buyer_name = FND_API.G_MISS_CHAR) THEN
354: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
355: p_x_osp_order_rec.po_agent_id := FND_API.G_MISS_NUM;
356: ELSE
357: p_x_osp_order_rec.po_agent_id := NULL;
358: END IF;
359: END IF;

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

358: END IF;
359: END IF;
360: IF(p_x_osp_order_rec.customer_name IS NULL) THEN
361: p_x_osp_order_rec.customer_id := NULL;
362: ELSIF (p_x_osp_order_rec.customer_name = FND_API.G_MISS_CHAR) THEN
363: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
364: p_x_osp_order_rec.customer_id := FND_API.G_MISS_NUM;
365: ELSE
366: p_x_osp_order_rec.customer_id := NULL;

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

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

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

367: END IF;
368: END IF;
369: IF(p_x_osp_order_rec.contract_number IS NULL) THEN
370: p_x_osp_order_rec.contract_id := NULL;
371: ELSIF (p_x_osp_order_rec.contract_number = FND_API.G_MISS_CHAR) THEN
372: IF(p_x_osp_order_rec.operation_flag <> G_OP_CREATE) THEN
373: p_x_osp_order_rec.contract_id := FND_API.G_MISS_NUM;
374: ELSE
375: p_x_osp_order_rec.contract_id := NULL;

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

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

Line 381: 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

377: END IF;
378: --dbms_output.put_line('Done nulling out order header ids');
379: END IF;
380: -- conversion of value to id for Vendor name
381: 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
382: l_count := 0;
383: --dbms_output.put_line('converting vendor_name to id');
384: OPEN vendor_id_csr(p_x_osp_order_rec.vendor_name);
385: LOOP

Line 412: 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

408: END IF;
409: --dbms_output.put_line('done converting vendor_name to id');
410: END IF;
411: -- conversion of value to id for vendor site code
412: 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
413: l_count := 0;
414: OPEN vendor_site_id_csr(p_x_osp_order_rec.vendor_site_code);
415: LOOP
416: FETCH vendor_site_id_csr INTO l_vendor_site_id;

Line 440: 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

436: p_x_osp_order_rec.vendor_site_id := l_vendor_site_id;
437: END IF;
438: END IF;
439: -- conversion of value to id for buyer name
440: 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
441: l_count := 0;
442: OPEN po_agent_id_csr(p_x_osp_order_rec.buyer_name);
443: LOOP
444: FETCH po_agent_id_csr INTO l_po_agent_id;

Line 468: 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

464: p_x_osp_order_rec.po_agent_id := l_po_agent_id;
465: END IF;
466: END IF;
467: -- conversion of value to id for customer name
468: 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
469: --dbms_output.put_line('converting customer_name to id');
470: l_count := 0;
471: OPEN customer_id_csr(p_x_osp_order_rec.customer_name);
472: LOOP

Line 497: 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

493: p_x_osp_order_rec.customer_id := l_customer_id;
494: END IF;
495: END IF;
496: -- conversion of value to id for contract number
497: 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
498: --dbms_output.put_line('converting contract_number to id');
499: OPEN contract_id_csr(p_x_osp_order_rec.contract_number);
500: FETCH contract_id_csr INTO l_contract_id;
501: IF(contract_id_csr%NOTFOUND) THEN

Line 511: RAISE FND_API.G_EXC_ERROR;

507: END IF;
508: CLOSE contract_id_csr;
509: END IF;
510: IF FND_MSG_PUB.count_msg > 0 THEN
511: RAISE FND_API.G_EXC_ERROR;
512: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
513: END IF;
514: -- finding unique key osp_order_id when operation flag is not 'C'
515: IF (p_x_osp_order_rec.osp_order_id IS NULL) THEN

Line 512: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

508: CLOSE contract_id_csr;
509: END IF;
510: IF FND_MSG_PUB.count_msg > 0 THEN
511: RAISE FND_API.G_EXC_ERROR;
512: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
513: END IF;
514: -- finding unique key osp_order_id when operation flag is not 'C'
515: IF (p_x_osp_order_rec.osp_order_id IS NULL) THEN
516: --dbms_output.put_line('finding osp_order_id');

Line 532: 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

528: END IF;
529: CLOSE osp_order_on_csr;
530: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
531: /*
532: 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
533: OPEN osp_order_po_csr(p_x_osp_order_rec.po_header_id);
534: FETCH osp_order_po_csr INTO l_osp_order_id,l_object_version_number;
535: IF(osp_order_po_csr%NOTFOUND) THEN
536: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_HEADER_INV');

Line 544: 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

540: p_x_osp_order_rec.osp_order_id := l_osp_order_id;
541: p_x_osp_order_rec.object_version_number := l_object_version_number;
542: END IF;
543: CLOSE osp_order_po_csr;
544: 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
545: OPEN osp_order_oe_csr(p_x_osp_order_rec.oe_header_id);
546: FETCH osp_order_oe_csr INTO l_osp_order_id,l_object_version_number;
547: IF(osp_order_oe_csr%NOTFOUND) THEN
548: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_OE_HEADER_INV');

Line 565: RAISE FND_API.G_EXC_ERROR;

561: END IF;
562: END IF;
563: END IF;
564: IF FND_MSG_PUB.count_msg > 0 THEN
565: RAISE FND_API.G_EXC_ERROR;
566: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
567: END IF;
568: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
569: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 566: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

562: END IF;
563: END IF;
564: IF FND_MSG_PUB.count_msg > 0 THEN
565: RAISE FND_API.G_EXC_ERROR;
566: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
567: END IF;
568: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
569: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
570: END IF;

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

591: BEGIN
592: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
593: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
594: END IF;
595: IF(p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN
596: OPEN val_vendor_id_csr(p_vendor_id);
597: FETCH val_vendor_id_csr INTO l_exist;
598: IF(val_vendor_id_csr%NOTFOUND) THEN
599: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_INV');

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

636: BEGIN
637: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
638: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
639: END IF;
640: IF (p_vendor_id IS NULL OR p_vendor_id = FND_API.G_MISS_NUM) THEN
641: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
642: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_ID_NLL');
643: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_vendor_site_id);
644: FND_MSG_PUB.ADD;

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

637: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
638: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
639: END IF;
640: IF (p_vendor_id IS NULL OR p_vendor_id = FND_API.G_MISS_NUM) THEN
641: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
642: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_ID_NLL');
643: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_vendor_site_id);
644: FND_MSG_PUB.ADD;
645: END IF;

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

643: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_vendor_site_id);
644: FND_MSG_PUB.ADD;
645: END IF;
646: ELSE
647: IF(p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM)THEN
648: OPEN val_vendor_site_id_csr(p_vendor_id, p_vendor_site_id);
649: FETCH val_vendor_site_id_csr INTO l_exist;
650: IF(val_vendor_site_id_csr%NOTFOUND) THEN
651: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_INV');

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

680: BEGIN
681: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
682: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
683: END IF;
684: IF(p_customer_id IS NOT NULL AND p_customer_id <> FND_API.G_MISS_NUM) THEN
685: OPEN val_customer_id_csr(p_customer_id);
686: FETCH val_customer_id_csr INTO l_exist;
687: IF(val_customer_id_csr%NOTFOUND) THEN
688: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUST_ID_INV');

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

708: BEGIN
709: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
710: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
711: END IF;
712: IF(p_po_agent_id IS NOT NULL AND p_po_agent_id <> FND_API.G_MISS_NUM) THEN
713: OPEN val_po_agent_id_csr(p_po_agent_id);
714: FETCH val_po_agent_id_csr INTO l_exist;
715: IF(val_po_agent_id_csr%NOTFOUND) THEN
716: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_INV');

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

757: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CTRCT');
758: FND_MSG_PUB.ADD;
759: RETURN;
760: END IF;
761: IF(p_party_vendor_id IS NULL OR p_party_vendor_id = FND_API.G_MISS_NUM) THEN
762: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN
763: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_PTY_ID_NLL');
764: FND_MESSAGE.Set_Token('CONTRACT_ID', p_contract_id);
765: FND_MSG_PUB.ADD;

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

758: FND_MSG_PUB.ADD;
759: RETURN;
760: END IF;
761: IF(p_party_vendor_id IS NULL OR p_party_vendor_id = FND_API.G_MISS_NUM) THEN
762: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN
763: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VEND_PTY_ID_NLL');
764: FND_MESSAGE.Set_Token('CONTRACT_ID', p_contract_id);
765: FND_MSG_PUB.ADD;
766: END IF;

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

764: FND_MESSAGE.Set_Token('CONTRACT_ID', p_contract_id);
765: FND_MSG_PUB.ADD;
766: END IF;
767: ELSE
768: IF(p_contract_id IS NOT NULL AND p_contract_id <> FND_API.G_MISS_NUM) THEN
769: OPEN val_contract_id_csr(p_contract_id, p_party_vendor_id, l_buy_or_sell, p_authoring_org_id, l_object_code);
770: FETCH val_contract_id_csr INTO l_exist;
771: IF(val_contract_id_csr%NOTFOUND) THEN
772: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CTRCT');

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

796: BEGIN
797: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
798: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
799: END IF;
800: IF(p_osp_order_id IS NULL OR p_osp_order_id = FND_API.G_MISS_NUM) THEN
801: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_HEADER_INV');
802: FND_MSG_PUB.ADD;
803: RETURN;
804: END IF;

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

801: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_HEADER_INV');
802: FND_MSG_PUB.ADD;
803: RETURN;
804: END IF;
805: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM) THEN
806: OPEN val_po_header_id_csr(p_po_header_id, p_osp_order_id);
807: FETCH val_po_header_id_csr INTO l_exist;
808: IF(val_po_header_id_csr%NOTFOUND) THEN
809: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_HEADER_INV');

Line 874: RAISE FND_API.G_EXC_ERROR;

870: FND_MESSAGE.Set_Name('AHL', 'AHL_OSP_ORG_NOT_SET');
871: FND_MSG_PUB.ADD;
872: END IF;
873: IF FND_MSG_PUB.count_msg > 0 THEN
874: RAISE FND_API.G_EXC_ERROR;
875: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
876: END IF;
877: -- Note added by jaramana on January 8, 2008 for the Requisition ER 6034236
878: -- 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 875: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

871: FND_MSG_PUB.ADD;
872: END IF;
873: IF FND_MSG_PUB.count_msg > 0 THEN
874: RAISE FND_API.G_EXC_ERROR;
875: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
876: END IF;
877: -- Note added by jaramana on January 8, 2008 for the Requisition ER 6034236
878: -- 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
879: -- means, there need to be no change in the osp_order_header, hence no validation is necessary.

Line 991: 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

987: p_x_osp_order_rec.single_instance_flag := l_osp_order_rec.single_instance_flag;
988: END IF;
989: */
990: -- contract terms should be null.
991: 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
992: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CO');
993: FND_MSG_PUB.ADD;
994: END IF;
995: -- shipping info is not allowed to update in this API

Line 997: 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

993: FND_MSG_PUB.ADD;
994: END IF;
995: -- shipping info is not allowed to update in this API
996: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL ) THEN
997: 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
998: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_OE'); FND_MSG_PUB.ADD;
999: ELSIF(p_x_osp_order_rec.oe_header_id <> l_osp_order_rec.oe_header_id) THEN
1000: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_OE');
1001: FND_MSG_PUB.ADD;

Line 1015: 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

1011:
1012: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1013: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.create', 'operation is create');
1014: END IF;
1015: 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
1016: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_NNLL');
1017: FND_MSG_PUB.ADD;
1018: END IF;
1019: 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 1019: 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

1015: 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
1016: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_NNLL');
1017: FND_MSG_PUB.ADD;
1018: END IF;
1019: 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
1020: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OBJV_NNLL');
1021: FND_MSG_PUB.ADD;
1022: END IF;
1023: -- populate order number

Line 1024: 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

1020: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OBJV_NNLL');
1021: FND_MSG_PUB.ADD;
1022: END IF;
1023: -- populate order number
1024: 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
1025: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_NUM_INV');
1026: FND_MESSAGE.Set_Token('ORDER_NUMBER', p_x_osp_order_rec.osp_order_number);
1027: FND_MSG_PUB.ADD;
1028: END IF;

Line 1030: 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

1026: FND_MESSAGE.Set_Token('ORDER_NUMBER', p_x_osp_order_rec.osp_order_number);
1027: FND_MSG_PUB.ADD;
1028: END IF;
1029: -- populate order_date
1030: 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
1031: IF(TRUNC(p_x_osp_order_rec.order_date) <> TRUNC(SYSDATE)) THEN
1032: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_ORD_DAT');
1033: FND_MESSAGE.Set_Token('ORDER_DATE', p_x_osp_order_rec.order_date);
1034: FND_MSG_PUB.ADD;

Line 1040: 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

1036: ELSE
1037: p_x_osp_order_rec.order_date := TRUNC(SYSDATE);
1038: END IF;
1039: -- populate operating_unit_id
1040: 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
1041: IF(p_x_osp_order_rec.operating_unit_id <> l_operating_unit_id) THEN
1042: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_OP_UNIT');
1043: FND_MSG_PUB.ADD;
1044: END IF;

Line 1049: 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

1045: ELSE
1046: p_x_osp_order_rec.operating_unit_id := l_operating_unit_id;
1047: END IF;
1048: -- po_header_id, oe_header_id, po_batch_id, po_request_id, po_interface_header_id, contract_terms should be null for CREATE.
1049: 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
1050: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1051: FND_MSG_PUB.ADD;
1052: END IF;
1053: 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 1053: 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

1049: 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
1050: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1051: FND_MSG_PUB.ADD;
1052: END IF;
1053: 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
1054: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OE_NNLL');
1055: FND_MSG_PUB.ADD;
1056: END IF;
1057: 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 1057: 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

1053: 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
1054: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_OE_NNLL');
1055: FND_MSG_PUB.ADD;
1056: END IF;
1057: 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
1058: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1059: FND_MSG_PUB.ADD;
1060: END IF;
1061: 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 1061: 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

1057: 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
1058: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1059: FND_MSG_PUB.ADD;
1060: END IF;
1061: 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
1062: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1063: FND_MSG_PUB.ADD;
1064: END IF;
1065: 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 1065: 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

1061: 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
1062: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1063: FND_MSG_PUB.ADD;
1064: END IF;
1065: 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
1066: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1067: FND_MSG_PUB.ADD;
1068: END IF;
1069: -- status_code should be null or 'ENTERED'. IF null, default to 'ENTERED'

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

1066: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1067: FND_MSG_PUB.ADD;
1068: END IF;
1069: -- status_code should be null or 'ENTERED'. IF null, default to 'ENTERED'
1070: IF(p_x_osp_order_rec.status_code IS NOT NULL AND p_x_osp_order_rec.status_code <> FND_API.G_MISS_CHAR
1071: AND p_x_osp_order_rec.status_code <> G_OSP_ENTERED_STATUS) THEN
1072: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_STATUS');
1073: FND_MSG_PUB.ADD;
1074: ELSE

Line 1083: RAISE FND_API.G_EXC_ERROR;

1079: --dbms_output.put_line('Create mode defaulting done');
1080: */
1081: END IF;
1082: IF FND_MSG_PUB.count_msg > 0 THEN
1083: RAISE FND_API.G_EXC_ERROR;
1084: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1085: END IF;
1086: ----------------------------
1087: -- forcing null column rules

Line 1084: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1080: */
1081: END IF;
1082: IF FND_MSG_PUB.count_msg > 0 THEN
1083: RAISE FND_API.G_EXC_ERROR;
1084: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1085: END IF;
1086: ----------------------------
1087: -- forcing null column rules
1088: ----------------------------

Line 1095: 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

1091: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1092: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.type', 'Update Order type is Service or Exchange');
1093: END IF;
1094: -- contract_id and customer_id must be null for SERVICE or EXCHANGE
1095: 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
1096: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CTRCT');
1097: FND_MESSAGE.Set_Token('CONTRACT_ID', p_x_osp_order_rec.contract_id);
1098: FND_MSG_PUB.ADD;
1099: END IF;

Line 1100: 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

1096: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CTRCT');
1097: FND_MESSAGE.Set_Token('CONTRACT_ID', p_x_osp_order_rec.contract_id);
1098: FND_MSG_PUB.ADD;
1099: END IF;
1100: 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
1101: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUST_ID_INV');
1102: FND_MESSAGE.Set_Token('CUSTOMER_ID', p_x_osp_order_rec.customer_id);
1103: FND_MSG_PUB.ADD;
1104: END IF;

Line 1105: 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

1101: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUST_ID_INV');
1102: FND_MESSAGE.Set_Token('CUSTOMER_ID', p_x_osp_order_rec.customer_id);
1103: FND_MSG_PUB.ADD;
1104: END IF;
1105: 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
1106: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CO');
1107: FND_MSG_PUB.ADD;
1108: END IF;
1109: ELSIF (p_x_osp_order_rec.order_type_code IN( G_OSP_ORDER_TYPE_LOAN,G_OSP_ORDER_TYPE_BORROW) ) THEN

Line 1114: 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

1110: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1111: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.type', 'Update Order type is Loan or Borrow');
1112: END IF;
1113: -- po_agent_id,vendor_id(FOR LOAN only) and vendor_site_id must be null.
1114: 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
1115: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_INV');
1116: FND_MESSAGE.Set_Token('BUYER_ID', p_x_osp_order_rec.po_agent_id);
1117: FND_MSG_PUB.ADD;
1118: END IF;

Line 1119: 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

1115: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_INV');
1116: FND_MESSAGE.Set_Token('BUYER_ID', p_x_osp_order_rec.po_agent_id);
1117: FND_MSG_PUB.ADD;
1118: END IF;
1119: 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
1120: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_INV');
1121: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_x_osp_order_rec.vendor_site_id);
1122: FND_MSG_PUB.ADD;
1123: END IF;

Line 1125: 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

1121: FND_MESSAGE.Set_Token('VENDOR_SITE_ID', p_x_osp_order_rec.vendor_site_id);
1122: FND_MSG_PUB.ADD;
1123: END IF;
1124: IF(p_x_osp_order_rec.order_type_code = G_OSP_ORDER_TYPE_LOAN) THEN
1125: 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
1126: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_INV');
1127: FND_MESSAGE.Set_Token('VENDOR_ID', p_x_osp_order_rec.vendor_id);
1128: FND_MSG_PUB.ADD;
1129: END IF;

Line 1132: 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

1128: FND_MSG_PUB.ADD;
1129: END IF;
1130: END IF;
1131: -- po_header_id, po_batch_id, po_request_id, po_interface_header_id, contract_terms should be null
1132: 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
1133: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1134: FND_MSG_PUB.ADD;
1135: END IF;
1136: 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 1136: 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

1132: 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
1133: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1134: FND_MSG_PUB.ADD;
1135: END IF;
1136: 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
1137: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1138: FND_MSG_PUB.ADD;
1139: END IF;
1140: 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 1140: 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

1136: 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
1137: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1138: FND_MSG_PUB.ADD;
1139: END IF;
1140: 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
1141: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1142: FND_MSG_PUB.ADD;
1143: END IF;
1144: 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 1144: 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

1140: 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
1141: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1142: FND_MSG_PUB.ADD;
1143: END IF;
1144: 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
1145: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1146: FND_MSG_PUB.ADD;
1147: END IF;
1148:

Line 1150: 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

1146: FND_MSG_PUB.ADD;
1147: END IF;
1148:
1149: -- Added by jaramana on January 8, 2008 for the Requisition ER 6034236
1150: 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
1151: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_REQ_NNLL');
1152: FND_MSG_PUB.ADD;
1153: END IF;
1154: -- jaramana End

Line 1156: 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

1152: FND_MSG_PUB.ADD;
1153: END IF;
1154: -- jaramana End
1155:
1156: 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
1157: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_CO');
1158: FND_MSG_PUB.ADD;
1159: END IF;
1160:

Line 1164: RAISE FND_API.G_EXC_ERROR;

1160:
1161: END IF;
1162: --dbms_output.put_line('ensured null columns');
1163: IF FND_MSG_PUB.count_msg > 0 THEN
1164: RAISE FND_API.G_EXC_ERROR;
1165: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1166: END IF;
1167: 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
1168: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236

Line 1165: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1161: END IF;
1162: --dbms_output.put_line('ensured null columns');
1163: IF FND_MSG_PUB.count_msg > 0 THEN
1164: RAISE FND_API.G_EXC_ERROR;
1165: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1166: END IF;
1167: 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
1168: -- Commented out by jaramana on January 8, 2008 for the Requisition ER 6034236
1169: -- This API is not being called during the create mode any more.

Line 1179: 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

1175: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.type.oper', 'Update Order type is Service or Exchange Operation is Create');
1176: END IF;
1177: --dbms_output.put_line('validate single_instance_flag');
1178: --set single_instance_flag
1179: 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
1180: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1181: ELSIF (p_x_osp_order_rec.single_instance_flag NOT IN(G_NO_FLAG,G_YES_FLAG))THEN
1182: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');
1183: FND_MESSAGE.Set_Token('INST_FLG', p_x_osp_order_rec.single_instance_flag);

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

1185: END IF;
1186: --dbms_output.put_line('validate vendor');
1187:
1188: -- validate vendor_id.
1189: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1190: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1191: FND_MSG_PUB.ADD;
1192: ELSE
1193: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1197: 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

1193: validate_vendor(p_x_osp_order_rec.vendor_id);
1194: END IF;
1195: --dbms_output.put_line('validate vendor site');
1196: -- validate vendor_site_id.
1197: 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
1198: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_NLL');
1199: FND_MSG_PUB.ADD;
1200: ELSE
1201: validate_vendor_site(p_x_osp_order_rec.vendor_id, p_x_osp_order_rec.vendor_site_id);

Line 1209: 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

1205: p_x_osp_order_rec.vendor_site_id,
1206: p_x_osp_order_rec.vendor_contact_id);
1207: -- validate po_agent_id.
1208: --dbms_output.put_line('validate buyer');
1209: 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
1210: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_NLL');
1211: FND_MSG_PUB.ADD;
1212: ELSE
1213: validate_buyer(p_x_osp_order_rec.po_agent_id);

Line 1229: 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

1225: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'
1226: || 'g_old_status_code' || g_old_status_code);
1227: END IF;
1228: -- po_header_id should be null.
1229: 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
1230: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1231: FND_MSG_PUB.ADD;
1232: END IF;
1233: -- Modified by jaramana on January 9, 2008 for the Requisition ER 6034236

Line 1235: 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

1231: FND_MSG_PUB.ADD;
1232: END IF;
1233: -- Modified by jaramana on January 9, 2008 for the Requisition ER 6034236
1234: -- req_header_id should be null.
1235: 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
1236: FND_MESSAGE.Set_Name(G_APP_NAME, 'AHL_OSP_ORD_REQ_NNLL');
1237: FND_MSG_PUB.ADD;
1238: END IF;
1239: -- jaramana End

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

1275: END IF;
1276:
1277: --
1278: --set single_instance_flag
1279: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN
1280: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1281: 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
1282: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');
1283: FND_MESSAGE.Set_Token('INST_FLG', p_x_osp_order_rec.single_instance_flag);

Line 1288: 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

1284: FND_MSG_PUB.ADD;
1285: END IF;
1286: /*
1287: -- validate vendor_id
1288: 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
1289: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1290: FND_MSG_PUB.ADD;
1291: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1292: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1295: 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

1291: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1292: validate_vendor(p_x_osp_order_rec.vendor_id);
1293: END IF;
1294: -- validate vendor_site_id.
1295: 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
1296: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_NLL');
1297: FND_MSG_PUB.ADD;
1298: ELSE
1299: 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 1323: --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

1319: p_x_osp_order_rec.vendor_site_id,
1320: p_x_osp_order_rec.vendor_contact_id);
1321: -- validate po_agent_id.
1322: --dbms_output.put_line('validate buyer in update');
1323: --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
1324: --G_MISS/Null conversion has already been made in default_unchanged_order_header
1325: IF(p_x_osp_order_rec.po_agent_id IS NULL) THEN
1326: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_NLL');
1327: FND_MSG_PUB.ADD;

Line 1358: 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

1354: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'
1355: || 'g_old_status_code: ' || g_old_status_code || 'new status: ' || p_x_osp_order_rec.status_code );
1356: END IF;
1357: -- po_header_id should be null.
1358: 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
1359: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1360: FND_MSG_PUB.ADD;
1361: END IF;
1362:

Line 1365: 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

1361: END IF;
1362:
1363: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
1364: -- req_header_id should be null.
1365: 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
1366: FND_MESSAGE.Set_Name(G_APP_NAME, 'AHL_OSP_ORD_REQ_NNLL');
1367: FND_MSG_PUB.ADD;
1368: END IF;
1369: -- jaramana End

Line 1409: 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

1405: --validation error.
1406: /*
1407: ELSIF (p_x_osp_order_rec.status_code = G_OSP_SUB_FAILED_STATUS) THEN
1408: -- po_header_id should be null.
1409: 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
1410: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1411: FND_MSG_PUB.ADD;
1412: END IF;
1413: --set single_instance_flag

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

1410: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1411: FND_MSG_PUB.ADD;
1412: END IF;
1413: --set single_instance_flag
1414: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR)THEN
1415: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1416: 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
1417: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');
1418: FND_MESSAGE.Set_Token('INST_FLG', p_x_osp_order_rec.single_instance_flag);

Line 1424: 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

1420: END IF;
1421: */
1422: /*
1423: -- validate vendor_id.
1424: 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
1425: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1426: FND_MSG_PUB.ADD;
1427: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1428: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1431: 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

1427: ELSIF (p_x_osp_order_rec.vendor_id IS NOT NULL) THEN
1428: validate_vendor(p_x_osp_order_rec.vendor_id);
1429: END IF;
1430: -- validate vendor_site_id.
1431: 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
1432: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENSITE_ID_NLL');
1433: FND_MSG_PUB.ADD;
1434: ELSE
1435: 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 1446: 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

1442: p_x_osp_order_rec.vendor_site_id,
1443: p_x_osp_order_rec.vendor_contact_id);
1444: -- validate po_agent_id.
1445: --dbms_output.put_line('validate buyer in update');
1446: 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
1447: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_BUYER_ID_NLL');
1448: FND_MSG_PUB.ADD;
1449: ELSIF (p_x_osp_order_rec.po_agent_id IS NOT NULL) THEN
1450: validate_buyer(p_x_osp_order_rec.po_agent_id);

Line 1460: 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

1456: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'
1457: || 'g_old_status_code: ' || g_old_status_code || 'new status: ' || p_x_osp_order_rec.status_code );
1458: END IF;
1459: -- po_header_id should be not be null.
1460: 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
1461: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_PO_NLL');
1462: FND_MSG_PUB.ADD;
1463: ELSE
1464: validate_po_header(p_x_osp_order_rec.osp_order_id,p_x_osp_order_rec.po_header_id);

Line 1515: 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

1511: END IF;
1512:
1513: -- jaramana modified on January 9, 2008 for the Requisition ER 6034236
1514: -- req_header_id should be null.
1515: 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
1516: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_REQ_NNLL');
1517: FND_MSG_PUB.ADD;
1518: END IF;
1519: -- jaramana End

Line 1582: 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

1578: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.srvExch.update.', 'Update Order type is Service or Exchange Operation is Update'||
1579: 'g_old_status_code: ' || g_old_status_code || 'new status: ' || p_x_osp_order_rec.status_code );
1580: END IF;
1581: -- po_header_id should be null.
1582: 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
1583: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1584: FND_MSG_PUB.ADD;
1585: END IF;
1586:

Line 1588: 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

1584: FND_MSG_PUB.ADD;
1585: END IF;
1586:
1587: -- req_header_id should be null.
1588: 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
1589: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_REQ_NNLL');
1590: FND_MSG_PUB.ADD;
1591: END IF;
1592:

Line 1637: 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

1633: FND_MSG_PUB.ADD;
1634: END IF;
1635:
1636: --po_header_id should be null
1637: 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
1638: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_PO_NNLL');
1639: FND_MSG_PUB.ADD;
1640: END IF;
1641:

Line 1685: 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

1681: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1682: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT, L_DEBUG_KEY || '.loan', 'Update order type is Loan');
1683: END IF;
1684: -- single_instance_flag can not be other than null, GMISS or G_NO_FLAG.
1685: 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
1686: OR p_x_osp_order_rec.single_instance_flag = G_NO_FLAG )THEN
1687: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1688: ELSE
1689: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');

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

1691: FND_MSG_PUB.ADD;
1692: END IF;
1693: IF(p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
1694: -- validate customer_id.
1695: IF(p_x_osp_order_rec.customer_id IS NULL OR p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
1696: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUSTOMER_ID_NLL');
1697: FND_MSG_PUB.ADD;
1698: ELSE
1699: validate_customer(p_x_osp_order_rec.customer_id);

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

1703: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1704: */
1705: -- Changes begin
1706: /*
1707: IF (p_x_osp_order_rec.contract_id IS NULL OR p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1708: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1709: FND_MSG_PUB.ADD;
1710: ELSE
1711: 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 1713: 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

1709: FND_MSG_PUB.ADD;
1710: ELSE
1711: 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);
1712: */
1713: 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
1714: 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);
1715: END IF;
1716: --Changes by mpothuku End
1717: ELSIF(p_x_osp_order_rec.operation_flag = G_OP_UPDATE) THEN

Line 1728: 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

1724: FND_MSG_PUB.ADD;
1725: END IF;
1726: -- jaramana End
1727: -- validate customer_id.
1728: 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
1729: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CUSTOMER_ID_NLL');
1730: FND_MSG_PUB.ADD;
1731: ELSIF(p_x_osp_order_rec.customer_id IS NOT NULL) THEN
1732: validate_customer(p_x_osp_order_rec.customer_id);

Line 1740: 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

1736: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1737: */
1738: -- Changes begin
1739: /*
1740: 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
1741: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1742: FND_MSG_PUB.ADD;
1743: ELSIF ( p_x_osp_order_rec.contract_id IS NOT NULL) THEN
1744: 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 1746: 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

1742: FND_MSG_PUB.ADD;
1743: ELSIF ( p_x_osp_order_rec.contract_id IS NOT NULL) THEN
1744: 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);
1745: */
1746: 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
1747: 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);
1748: END IF;
1749: --Changes by mpothuku End
1750: -- set status

Line 1778: 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

1774: END IF;
1775: -- validate BORROW order header
1776: ELSIF (p_x_osp_order_rec.order_type_code = G_OSP_ORDER_TYPE_BORROW) THEN
1777: -- single_instance_flag can not be other than null, GMISS or G_NO_FLAG.
1778: 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
1779: OR p_x_osp_order_rec.single_instance_flag = G_NO_FLAG )THEN
1780: p_x_osp_order_rec.single_instance_flag := G_NO_FLAG;
1781: ELSE
1782: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_INST_FLG');

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

1789: validate_customer(p_x_osp_order_rec.customer_id);
1790: END IF;
1791: /*
1792: -- validate vendor_id.
1793: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1794: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1795: FND_MSG_PUB.ADD;
1796: ELSE
1797: validate_vendor(p_x_osp_order_rec.vendor_id);

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

1805: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1806: */
1807: -- Changes begin
1808: /*
1809: IF (p_x_osp_order_rec.contract_id IS NULL OR p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
1810: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1811: FND_MSG_PUB.ADD;
1812: ELSE
1813: 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 1816: 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

1812: ELSE
1813: 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);
1814: END IF;
1815: */
1816: 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
1817: 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);
1818: END IF;
1819: --Changes by mpothuku End
1820: ELSIF(p_x_osp_order_rec.operation_flag = G_OP_UPDATE) THEN

Line 1829: 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

1825: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INV_STATUS');
1826: FND_MSG_PUB.ADD;
1827: END IF;
1828: -- validate customer_id.
1829: 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
1830: validate_customer(p_x_osp_order_rec.customer_id);
1831: END IF;
1832: /* Change made by mpothuku to make the contract_id optional on 12/16/04
1833: This is a work around and has to be revoked after PM comes up with the Service Contract Integration

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: This is a work around and has to be revoked after PM comes up with the Service Contract Integration
1834: */
1835: -- Changes begin
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: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1839: FND_MSG_PUB.ADD;
1840: 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
1841: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');

Line 1840: 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

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: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_CONTRACT_ID_NLL');
1839: FND_MSG_PUB.ADD;
1840: 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
1841: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1842: FND_MSG_PUB.ADD;
1843: ELSIF(p_x_osp_order_rec.vendor_id IS NOT NULL OR p_x_osp_order_rec.contract_id IS NOT NULL) THEN
1844: -- validate vendor_id.

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

1849: END IF;
1850: */
1851: /*
1852: -- validate vendor_id.
1853: IF(p_x_osp_order_rec.vendor_id IS NULL OR p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
1854: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_NLL');
1855: FND_MSG_PUB.ADD;
1856: ELSE
1857: validate_vendor(p_x_osp_order_rec.vendor_id);

Line 1866: 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

1862: p_x_osp_order_rec.vendor_contact_id);
1863:
1864: p_x_osp_order_rec.contract_id := NVL(p_x_osp_order_rec.contract_id, l_osp_order_rec.contract_id);
1865: --validate contract_id only if it is not null.
1866: 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
1867: 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);
1868: END IF;
1869: --Changes by mpothuku End
1870: -- set status

Line 1924: RAISE FND_API.G_EXC_ERROR;

1920: END IF;
1921: -- jaramana End
1922: END IF;
1923: IF FND_MSG_PUB.count_msg > 0 THEN
1924: RAISE FND_API.G_EXC_ERROR;
1925: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1926: END IF;
1927: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1928: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 1925: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1921: -- jaramana End
1922: END IF;
1923: IF FND_MSG_PUB.count_msg > 0 THEN
1924: RAISE FND_API.G_EXC_ERROR;
1925: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1926: END IF;
1927: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
1928: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
1929: END IF;

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

1981: ELSE
1982: --dbms_output.put_line('l_osp_order_rec.osp_order_number ' || l_osp_order_rec.osp_order_number);
1983: IF (p_x_osp_order_rec.osp_order_number IS NULL) THEN
1984: p_x_osp_order_rec.osp_order_number := l_osp_order_rec.osp_order_number;
1985: ELSIF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN
1986: p_x_osp_order_rec.osp_order_number := null;
1987: END IF;
1988: IF (p_x_osp_order_rec.order_type_code IS NULL) THEN
1989: p_x_osp_order_rec.order_type_code := l_osp_order_rec.order_type_code;

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

1986: p_x_osp_order_rec.osp_order_number := null;
1987: END IF;
1988: IF (p_x_osp_order_rec.order_type_code IS NULL) THEN
1989: p_x_osp_order_rec.order_type_code := l_osp_order_rec.order_type_code;
1990: ELSIF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
1991: p_x_osp_order_rec.order_type_code := null;
1992: END IF;
1993: IF (p_x_osp_order_rec.single_instance_flag IS NULL) THEN
1994: p_x_osp_order_rec.single_instance_flag := l_osp_order_rec.single_instance_flag;

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

1991: p_x_osp_order_rec.order_type_code := null;
1992: END IF;
1993: IF (p_x_osp_order_rec.single_instance_flag IS NULL) THEN
1994: p_x_osp_order_rec.single_instance_flag := l_osp_order_rec.single_instance_flag;
1995: ELSIF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
1996: p_x_osp_order_rec.single_instance_flag := null;
1997: END IF;
1998: IF (p_x_osp_order_rec.po_header_id IS NULL) THEN
1999: p_x_osp_order_rec.po_header_id := l_osp_order_rec.po_header_id;

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

1996: p_x_osp_order_rec.single_instance_flag := null;
1997: END IF;
1998: IF (p_x_osp_order_rec.po_header_id IS NULL) THEN
1999: p_x_osp_order_rec.po_header_id := l_osp_order_rec.po_header_id;
2000: ELSIF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2001: p_x_osp_order_rec.po_header_id := null;
2002: END IF;
2003: IF (p_x_osp_order_rec.oe_header_id IS NULL) THEN
2004: p_x_osp_order_rec.oe_header_id := l_osp_order_rec.oe_header_id;

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

2001: p_x_osp_order_rec.po_header_id := null;
2002: END IF;
2003: IF (p_x_osp_order_rec.oe_header_id IS NULL) THEN
2004: p_x_osp_order_rec.oe_header_id := l_osp_order_rec.oe_header_id;
2005: ELSIF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2006: p_x_osp_order_rec.oe_header_id := null;
2007: END IF;
2008: IF (p_x_osp_order_rec.vendor_id IS NULL) THEN
2009: p_x_osp_order_rec.vendor_id := l_osp_order_rec.vendor_id;

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

2006: p_x_osp_order_rec.oe_header_id := null;
2007: END IF;
2008: IF (p_x_osp_order_rec.vendor_id IS NULL) THEN
2009: p_x_osp_order_rec.vendor_id := l_osp_order_rec.vendor_id;
2010: ELSIF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2011: p_x_osp_order_rec.vendor_id := null;
2012: END IF;
2013: IF (p_x_osp_order_rec.vendor_site_id IS NULL) THEN
2014: p_x_osp_order_rec.vendor_site_id := l_osp_order_rec.vendor_site_id;

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

2011: p_x_osp_order_rec.vendor_id := null;
2012: END IF;
2013: IF (p_x_osp_order_rec.vendor_site_id IS NULL) THEN
2014: p_x_osp_order_rec.vendor_site_id := l_osp_order_rec.vendor_site_id;
2015: ELSIF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2016: p_x_osp_order_rec.vendor_site_id := null;
2017: END IF;
2018: IF (p_x_osp_order_rec.customer_id IS NULL) THEN
2019: p_x_osp_order_rec.customer_id := l_osp_order_rec.customer_id;

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

2016: p_x_osp_order_rec.vendor_site_id := null;
2017: END IF;
2018: IF (p_x_osp_order_rec.customer_id IS NULL) THEN
2019: p_x_osp_order_rec.customer_id := l_osp_order_rec.customer_id;
2020: ELSIF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2021: p_x_osp_order_rec.customer_id := null;
2022: END IF;
2023: IF (p_x_osp_order_rec.order_date IS NULL) THEN
2024: p_x_osp_order_rec.order_date := l_osp_order_rec.order_date;

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

2021: p_x_osp_order_rec.customer_id := null;
2022: END IF;
2023: IF (p_x_osp_order_rec.order_date IS NULL) THEN
2024: p_x_osp_order_rec.order_date := l_osp_order_rec.order_date;
2025: ELSIF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2026: p_x_osp_order_rec.order_date := null;
2027: END IF;
2028: IF (p_x_osp_order_rec.contract_id IS NULL) THEN
2029: p_x_osp_order_rec.contract_id := l_osp_order_rec.contract_id;

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

2026: p_x_osp_order_rec.order_date := null;
2027: END IF;
2028: IF (p_x_osp_order_rec.contract_id IS NULL) THEN
2029: p_x_osp_order_rec.contract_id := l_osp_order_rec.contract_id;
2030: ELSIF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2031: p_x_osp_order_rec.contract_id := null;
2032: END IF;
2033: IF (p_x_osp_order_rec.contract_terms IS NULL) THEN
2034: p_x_osp_order_rec.contract_terms := l_osp_order_rec.contract_terms;

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

2031: p_x_osp_order_rec.contract_id := null;
2032: END IF;
2033: IF (p_x_osp_order_rec.contract_terms IS NULL) THEN
2034: p_x_osp_order_rec.contract_terms := l_osp_order_rec.contract_terms;
2035: ELSIF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2036: p_x_osp_order_rec.contract_terms := null;
2037: END IF;
2038: IF (p_x_osp_order_rec.operating_unit_id IS NULL) THEN
2039: p_x_osp_order_rec.operating_unit_id := l_osp_order_rec.operating_unit_id;

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

2036: p_x_osp_order_rec.contract_terms := null;
2037: END IF;
2038: IF (p_x_osp_order_rec.operating_unit_id IS NULL) THEN
2039: p_x_osp_order_rec.operating_unit_id := l_osp_order_rec.operating_unit_id;
2040: ELSIF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2041: p_x_osp_order_rec.operating_unit_id := null;
2042: END IF;
2043: IF (p_x_osp_order_rec.po_synch_flag IS NULL) THEN
2044: p_x_osp_order_rec.po_synch_flag := l_osp_order_rec.po_synch_flag;

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

2041: p_x_osp_order_rec.operating_unit_id := null;
2042: END IF;
2043: IF (p_x_osp_order_rec.po_synch_flag IS NULL) THEN
2044: p_x_osp_order_rec.po_synch_flag := l_osp_order_rec.po_synch_flag;
2045: ELSIF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2046: p_x_osp_order_rec.po_synch_flag := null;
2047: END IF;
2048: IF (p_x_osp_order_rec.status_code IS NULL) THEN
2049: p_x_osp_order_rec.status_code := l_osp_order_rec.status_code;

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

2046: p_x_osp_order_rec.po_synch_flag := null;
2047: END IF;
2048: IF (p_x_osp_order_rec.status_code IS NULL) THEN
2049: p_x_osp_order_rec.status_code := l_osp_order_rec.status_code;
2050: ELSIF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2051: p_x_osp_order_rec.status_code := null;
2052: END IF;
2053: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2054: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin',

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

2057: 'interface_id='||p_x_osp_order_rec.po_interface_header_id);
2058: END IF;
2059: IF (p_x_osp_order_rec.po_batch_id IS NULL) THEN
2060: p_x_osp_order_rec.po_batch_id := l_osp_order_rec.po_batch_id;
2061: ELSIF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2062: p_x_osp_order_rec.po_batch_id := null;
2063: END IF;
2064: IF (p_x_osp_order_rec.po_request_id IS NULL) THEN
2065: p_x_osp_order_rec.po_request_id := l_osp_order_rec.po_request_id;

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

2062: p_x_osp_order_rec.po_batch_id := null;
2063: END IF;
2064: IF (p_x_osp_order_rec.po_request_id IS NULL) THEN
2065: p_x_osp_order_rec.po_request_id := l_osp_order_rec.po_request_id;
2066: ELSIF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2067: p_x_osp_order_rec.po_request_id := null;
2068: END IF;
2069: IF (p_x_osp_order_rec.po_agent_id IS NULL) THEN
2070: p_x_osp_order_rec.po_agent_id := l_osp_order_rec.po_agent_id;

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

2067: p_x_osp_order_rec.po_request_id := null;
2068: END IF;
2069: IF (p_x_osp_order_rec.po_agent_id IS NULL) THEN
2070: p_x_osp_order_rec.po_agent_id := l_osp_order_rec.po_agent_id;
2071: ELSIF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2072: p_x_osp_order_rec.po_agent_id := null;
2073: END IF;
2074: IF (p_x_osp_order_rec.po_interface_header_id IS NULL) THEN
2075: p_x_osp_order_rec.po_interface_header_id := l_osp_order_rec.po_interface_header_id;

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

2072: p_x_osp_order_rec.po_agent_id := null;
2073: END IF;
2074: IF (p_x_osp_order_rec.po_interface_header_id IS NULL) THEN
2075: p_x_osp_order_rec.po_interface_header_id := l_osp_order_rec.po_interface_header_id;
2076: ELSIF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2077: p_x_osp_order_rec.po_interface_header_id := null;
2078: END IF;
2079: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2080: IF (p_x_osp_order_rec.po_req_header_id IS NULL) THEN

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

2078: END IF;
2079: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2080: IF (p_x_osp_order_rec.po_req_header_id IS NULL) THEN
2081: p_x_osp_order_rec.po_req_header_id := l_osp_order_rec.po_req_header_id;
2082: ELSIF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN
2083: p_x_osp_order_rec.po_req_header_id := null;
2084: END IF;
2085: -- jaramana End
2086: IF (p_x_osp_order_rec.description IS NULL) THEN

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

2084: END IF;
2085: -- jaramana End
2086: IF (p_x_osp_order_rec.description IS NULL) THEN
2087: p_x_osp_order_rec.description := l_osp_order_rec.description;
2088: ELSIF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN
2089: p_x_osp_order_rec.description := null;
2090: END IF;
2091: IF (p_x_osp_order_rec.attribute_category IS NULL) THEN
2092: p_x_osp_order_rec.attribute_category := l_osp_order_rec.attribute_category;

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

2089: p_x_osp_order_rec.description := null;
2090: END IF;
2091: IF (p_x_osp_order_rec.attribute_category IS NULL) THEN
2092: p_x_osp_order_rec.attribute_category := l_osp_order_rec.attribute_category;
2093: ELSIF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2094: p_x_osp_order_rec.attribute_category := null;
2095: END IF;
2096: IF (p_x_osp_order_rec.attribute1 IS NULL) THEN
2097: p_x_osp_order_rec.attribute1 := l_osp_order_rec.attribute1;

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

2094: p_x_osp_order_rec.attribute_category := null;
2095: END IF;
2096: IF (p_x_osp_order_rec.attribute1 IS NULL) THEN
2097: p_x_osp_order_rec.attribute1 := l_osp_order_rec.attribute1;
2098: ELSIF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2099: p_x_osp_order_rec.attribute1 := null;
2100: END IF;
2101: IF (p_x_osp_order_rec.attribute2 IS NULL) THEN
2102: p_x_osp_order_rec.attribute2 := l_osp_order_rec.attribute2;

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

2099: p_x_osp_order_rec.attribute1 := null;
2100: END IF;
2101: IF (p_x_osp_order_rec.attribute2 IS NULL) THEN
2102: p_x_osp_order_rec.attribute2 := l_osp_order_rec.attribute2;
2103: ELSIF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2104: p_x_osp_order_rec.attribute2 := null;
2105: END IF;
2106: IF (p_x_osp_order_rec.attribute3 IS NULL) THEN
2107: p_x_osp_order_rec.attribute3 := l_osp_order_rec.attribute3;

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

2104: p_x_osp_order_rec.attribute2 := null;
2105: END IF;
2106: IF (p_x_osp_order_rec.attribute3 IS NULL) THEN
2107: p_x_osp_order_rec.attribute3 := l_osp_order_rec.attribute3;
2108: ELSIF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2109: p_x_osp_order_rec.attribute3 := null;
2110: END IF;
2111: IF (p_x_osp_order_rec.attribute4 IS NULL) THEN
2112: p_x_osp_order_rec.attribute4 := l_osp_order_rec.attribute4;

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

2109: p_x_osp_order_rec.attribute3 := null;
2110: END IF;
2111: IF (p_x_osp_order_rec.attribute4 IS NULL) THEN
2112: p_x_osp_order_rec.attribute4 := l_osp_order_rec.attribute4;
2113: ELSIF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2114: p_x_osp_order_rec.attribute4 := null;
2115: END IF;
2116: IF (p_x_osp_order_rec.attribute5 IS NULL) THEN
2117: p_x_osp_order_rec.attribute5 := l_osp_order_rec.attribute5;

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

2114: p_x_osp_order_rec.attribute4 := null;
2115: END IF;
2116: IF (p_x_osp_order_rec.attribute5 IS NULL) THEN
2117: p_x_osp_order_rec.attribute5 := l_osp_order_rec.attribute5;
2118: ELSIF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2119: p_x_osp_order_rec.attribute5 := null;
2120: END IF;
2121: IF (p_x_osp_order_rec.attribute6 IS NULL) THEN
2122: p_x_osp_order_rec.attribute6 := l_osp_order_rec.attribute6;

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

2119: p_x_osp_order_rec.attribute5 := null;
2120: END IF;
2121: IF (p_x_osp_order_rec.attribute6 IS NULL) THEN
2122: p_x_osp_order_rec.attribute6 := l_osp_order_rec.attribute6;
2123: ELSIF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2124: p_x_osp_order_rec.attribute6 := null;
2125: END IF;
2126: IF (p_x_osp_order_rec.attribute7 IS NULL) THEN
2127: p_x_osp_order_rec.attribute7 := l_osp_order_rec.attribute7;

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

2124: p_x_osp_order_rec.attribute6 := null;
2125: END IF;
2126: IF (p_x_osp_order_rec.attribute7 IS NULL) THEN
2127: p_x_osp_order_rec.attribute7 := l_osp_order_rec.attribute7;
2128: ELSIF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2129: p_x_osp_order_rec.attribute7 := null;
2130: END IF;
2131: IF (p_x_osp_order_rec.attribute8 IS NULL) THEN
2132: p_x_osp_order_rec.attribute8 := l_osp_order_rec.attribute8;

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

2129: p_x_osp_order_rec.attribute7 := null;
2130: END IF;
2131: IF (p_x_osp_order_rec.attribute8 IS NULL) THEN
2132: p_x_osp_order_rec.attribute8 := l_osp_order_rec.attribute8;
2133: ELSIF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2134: p_x_osp_order_rec.attribute8 := null;
2135: END IF;
2136: IF (p_x_osp_order_rec.attribute9 IS NULL) THEN
2137: p_x_osp_order_rec.attribute9 := l_osp_order_rec.attribute9;

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

2134: p_x_osp_order_rec.attribute8 := null;
2135: END IF;
2136: IF (p_x_osp_order_rec.attribute9 IS NULL) THEN
2137: p_x_osp_order_rec.attribute9 := l_osp_order_rec.attribute9;
2138: ELSIF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2139: p_x_osp_order_rec.attribute9 := null;
2140: END IF;
2141: IF (p_x_osp_order_rec.attribute10 IS NULL) THEN
2142: p_x_osp_order_rec.attribute10 := l_osp_order_rec.attribute10;

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

2139: p_x_osp_order_rec.attribute9 := null;
2140: END IF;
2141: IF (p_x_osp_order_rec.attribute10 IS NULL) THEN
2142: p_x_osp_order_rec.attribute10 := l_osp_order_rec.attribute10;
2143: ELSIF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2144: p_x_osp_order_rec.attribute10 := null;
2145: END IF;
2146: IF (p_x_osp_order_rec.attribute11 IS NULL) THEN
2147: p_x_osp_order_rec.attribute11 := l_osp_order_rec.attribute11;

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

2144: p_x_osp_order_rec.attribute10 := null;
2145: END IF;
2146: IF (p_x_osp_order_rec.attribute11 IS NULL) THEN
2147: p_x_osp_order_rec.attribute11 := l_osp_order_rec.attribute11;
2148: ELSIF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2149: p_x_osp_order_rec.attribute11 := null;
2150: END IF;
2151: IF (p_x_osp_order_rec.attribute12 IS NULL) THEN
2152: p_x_osp_order_rec.attribute12 := l_osp_order_rec.attribute12;

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

2149: p_x_osp_order_rec.attribute11 := null;
2150: END IF;
2151: IF (p_x_osp_order_rec.attribute12 IS NULL) THEN
2152: p_x_osp_order_rec.attribute12 := l_osp_order_rec.attribute12;
2153: ELSIF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2154: p_x_osp_order_rec.attribute12 := null;
2155: END IF;
2156: IF (p_x_osp_order_rec.attribute13 IS NULL) THEN
2157: p_x_osp_order_rec.attribute13 := l_osp_order_rec.attribute13;

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

2154: p_x_osp_order_rec.attribute12 := null;
2155: END IF;
2156: IF (p_x_osp_order_rec.attribute13 IS NULL) THEN
2157: p_x_osp_order_rec.attribute13 := l_osp_order_rec.attribute13;
2158: ELSIF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2159: p_x_osp_order_rec.attribute13 := null;
2160: END IF;
2161: IF (p_x_osp_order_rec.attribute14 IS NULL) THEN
2162: p_x_osp_order_rec.attribute14 := l_osp_order_rec.attribute14;

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

2159: p_x_osp_order_rec.attribute13 := null;
2160: END IF;
2161: IF (p_x_osp_order_rec.attribute14 IS NULL) THEN
2162: p_x_osp_order_rec.attribute14 := l_osp_order_rec.attribute14;
2163: ELSIF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2164: p_x_osp_order_rec.attribute14 := null;
2165: END IF;
2166: IF (p_x_osp_order_rec.attribute15 IS NULL) THEN
2167: p_x_osp_order_rec.attribute15 := l_osp_order_rec.attribute15;

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

2164: p_x_osp_order_rec.attribute14 := null;
2165: END IF;
2166: IF (p_x_osp_order_rec.attribute15 IS NULL) THEN
2167: p_x_osp_order_rec.attribute15 := l_osp_order_rec.attribute15;
2168: ELSIF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2169: p_x_osp_order_rec.attribute15 := null;
2170: END IF;
2171: IF (p_x_osp_order_rec.vendor_contact_id IS NULL) THEN
2172: p_x_osp_order_rec.vendor_contact_id := l_osp_order_rec.vendor_contact_id;

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

2169: p_x_osp_order_rec.attribute15 := null;
2170: END IF;
2171: IF (p_x_osp_order_rec.vendor_contact_id IS NULL) THEN
2172: p_x_osp_order_rec.vendor_contact_id := l_osp_order_rec.vendor_contact_id;
2173: ELSIF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN
2174: p_x_osp_order_rec.vendor_contact_id := null;
2175: END IF;
2176: END IF;
2177: CLOSE osp_order_csr;

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

2175: END IF;
2176: END IF;
2177: CLOSE osp_order_csr;
2178: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
2179: IF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN
2180: p_x_osp_order_rec.osp_order_number := null;
2181: END IF;
2182: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2183: p_x_osp_order_rec.order_type_code := null;

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

2178: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
2179: IF(p_x_osp_order_rec.osp_order_number = FND_API.G_MISS_NUM) THEN
2180: p_x_osp_order_rec.osp_order_number := null;
2181: END IF;
2182: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2183: p_x_osp_order_rec.order_type_code := null;
2184: END IF;
2185: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2186: p_x_osp_order_rec.single_instance_flag := null;

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

2181: END IF;
2182: IF(p_x_osp_order_rec.order_type_code = FND_API.G_MISS_CHAR) THEN
2183: p_x_osp_order_rec.order_type_code := null;
2184: END IF;
2185: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2186: p_x_osp_order_rec.single_instance_flag := null;
2187: END IF;
2188: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2189: p_x_osp_order_rec.po_header_id := null;

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

2184: END IF;
2185: IF(p_x_osp_order_rec.single_instance_flag = FND_API.G_MISS_CHAR) THEN
2186: p_x_osp_order_rec.single_instance_flag := null;
2187: END IF;
2188: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2189: p_x_osp_order_rec.po_header_id := null;
2190: END IF;
2191: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2192: p_x_osp_order_rec.oe_header_id := null;

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

2187: END IF;
2188: IF(p_x_osp_order_rec.po_header_id = FND_API.G_MISS_NUM) THEN
2189: p_x_osp_order_rec.po_header_id := null;
2190: END IF;
2191: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2192: p_x_osp_order_rec.oe_header_id := null;
2193: END IF;
2194: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2195: p_x_osp_order_rec.vendor_id := null;

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

2190: END IF;
2191: IF(p_x_osp_order_rec.oe_header_id = FND_API.G_MISS_NUM) THEN
2192: p_x_osp_order_rec.oe_header_id := null;
2193: END IF;
2194: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2195: p_x_osp_order_rec.vendor_id := null;
2196: END IF;
2197: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2198: p_x_osp_order_rec.vendor_site_id := null;

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

2193: END IF;
2194: IF(p_x_osp_order_rec.vendor_id = FND_API.G_MISS_NUM) THEN
2195: p_x_osp_order_rec.vendor_id := null;
2196: END IF;
2197: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2198: p_x_osp_order_rec.vendor_site_id := null;
2199: END IF;
2200: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2201: p_x_osp_order_rec.customer_id := null;

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

2196: END IF;
2197: IF(p_x_osp_order_rec.vendor_site_id = FND_API.G_MISS_NUM) THEN
2198: p_x_osp_order_rec.vendor_site_id := null;
2199: END IF;
2200: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2201: p_x_osp_order_rec.customer_id := null;
2202: END IF;
2203: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2204: p_x_osp_order_rec.order_date := null;

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

2199: END IF;
2200: IF(p_x_osp_order_rec.customer_id = FND_API.G_MISS_NUM) THEN
2201: p_x_osp_order_rec.customer_id := null;
2202: END IF;
2203: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2204: p_x_osp_order_rec.order_date := null;
2205: END IF;
2206: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2207: p_x_osp_order_rec.contract_id := null;

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

2202: END IF;
2203: IF(p_x_osp_order_rec.order_date = FND_API.G_MISS_DATE) THEN
2204: p_x_osp_order_rec.order_date := null;
2205: END IF;
2206: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2207: p_x_osp_order_rec.contract_id := null;
2208: END IF;
2209: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2210: p_x_osp_order_rec.contract_terms := null;

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

2205: END IF;
2206: IF(p_x_osp_order_rec.contract_id = FND_API.G_MISS_NUM) THEN
2207: p_x_osp_order_rec.contract_id := null;
2208: END IF;
2209: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2210: p_x_osp_order_rec.contract_terms := null;
2211: END IF;
2212: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2213: p_x_osp_order_rec.operating_unit_id := null;

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

2208: END IF;
2209: IF(p_x_osp_order_rec.contract_terms = FND_API.G_MISS_CHAR) THEN
2210: p_x_osp_order_rec.contract_terms := null;
2211: END IF;
2212: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2213: p_x_osp_order_rec.operating_unit_id := null;
2214: END IF;
2215: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2216: p_x_osp_order_rec.po_synch_flag := null;

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

2211: END IF;
2212: IF(p_x_osp_order_rec.operating_unit_id = FND_API.G_MISS_NUM) THEN
2213: p_x_osp_order_rec.operating_unit_id := null;
2214: END IF;
2215: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2216: p_x_osp_order_rec.po_synch_flag := null;
2217: END IF;
2218: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2219: p_x_osp_order_rec.status_code := null;

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

2214: END IF;
2215: IF(p_x_osp_order_rec.po_synch_flag = FND_API.G_MISS_CHAR) THEN
2216: p_x_osp_order_rec.po_synch_flag := null;
2217: END IF;
2218: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2219: p_x_osp_order_rec.status_code := null;
2220: END IF;
2221: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2222: p_x_osp_order_rec.po_batch_id := null;

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

2217: END IF;
2218: IF(p_x_osp_order_rec.status_code = FND_API.G_MISS_CHAR) THEN
2219: p_x_osp_order_rec.status_code := null;
2220: END IF;
2221: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2222: p_x_osp_order_rec.po_batch_id := null;
2223: END IF;
2224: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2225: p_x_osp_order_rec.po_request_id := null;

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

2220: END IF;
2221: IF(p_x_osp_order_rec.po_batch_id = FND_API.G_MISS_NUM) THEN
2222: p_x_osp_order_rec.po_batch_id := null;
2223: END IF;
2224: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2225: p_x_osp_order_rec.po_request_id := null;
2226: END IF;
2227: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2228: p_x_osp_order_rec.po_agent_id := null;

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

2223: END IF;
2224: IF(p_x_osp_order_rec.po_request_id = FND_API.G_MISS_NUM) THEN
2225: p_x_osp_order_rec.po_request_id := null;
2226: END IF;
2227: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2228: p_x_osp_order_rec.po_agent_id := null;
2229: END IF;
2230: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2231: p_x_osp_order_rec.po_interface_header_id := null;

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

2226: END IF;
2227: IF(p_x_osp_order_rec.po_agent_id = FND_API.G_MISS_NUM) THEN
2228: p_x_osp_order_rec.po_agent_id := null;
2229: END IF;
2230: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2231: p_x_osp_order_rec.po_interface_header_id := null;
2232: END IF;
2233: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2234: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN

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

2230: IF(p_x_osp_order_rec.po_interface_header_id = FND_API.G_MISS_NUM) THEN
2231: p_x_osp_order_rec.po_interface_header_id := null;
2232: END IF;
2233: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
2234: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN
2235: p_x_osp_order_rec.po_req_header_id := null;
2236: END IF;
2237: -- jaramana End
2238: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN

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

2234: IF(p_x_osp_order_rec.po_req_header_id = FND_API.G_MISS_NUM) THEN
2235: p_x_osp_order_rec.po_req_header_id := null;
2236: END IF;
2237: -- jaramana End
2238: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN
2239: p_x_osp_order_rec.description := null;
2240: END IF;
2241: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2242: p_x_osp_order_rec.attribute_category := null;

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

2237: -- jaramana End
2238: IF(p_x_osp_order_rec.description = FND_API.G_MISS_CHAR) THEN
2239: p_x_osp_order_rec.description := null;
2240: END IF;
2241: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2242: p_x_osp_order_rec.attribute_category := null;
2243: END IF;
2244: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2245: p_x_osp_order_rec.attribute1 := null;

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

2240: END IF;
2241: IF(p_x_osp_order_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
2242: p_x_osp_order_rec.attribute_category := null;
2243: END IF;
2244: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2245: p_x_osp_order_rec.attribute1 := null;
2246: END IF;
2247: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2248: p_x_osp_order_rec.attribute2 := null;

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

2243: END IF;
2244: IF(p_x_osp_order_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
2245: p_x_osp_order_rec.attribute1 := null;
2246: END IF;
2247: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2248: p_x_osp_order_rec.attribute2 := null;
2249: END IF;
2250: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2251: p_x_osp_order_rec.attribute3 := null;

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

2246: END IF;
2247: IF(p_x_osp_order_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
2248: p_x_osp_order_rec.attribute2 := null;
2249: END IF;
2250: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2251: p_x_osp_order_rec.attribute3 := null;
2252: END IF;
2253: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2254: p_x_osp_order_rec.attribute4 := null;

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

2249: END IF;
2250: IF(p_x_osp_order_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
2251: p_x_osp_order_rec.attribute3 := null;
2252: END IF;
2253: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2254: p_x_osp_order_rec.attribute4 := null;
2255: END IF;
2256: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2257: p_x_osp_order_rec.attribute5 := null;

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

2252: END IF;
2253: IF(p_x_osp_order_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
2254: p_x_osp_order_rec.attribute4 := null;
2255: END IF;
2256: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2257: p_x_osp_order_rec.attribute5 := null;
2258: END IF;
2259: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2260: p_x_osp_order_rec.attribute6 := null;

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

2255: END IF;
2256: IF(p_x_osp_order_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
2257: p_x_osp_order_rec.attribute5 := null;
2258: END IF;
2259: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2260: p_x_osp_order_rec.attribute6 := null;
2261: END IF;
2262: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2263: p_x_osp_order_rec.attribute7 := null;

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

2258: END IF;
2259: IF(p_x_osp_order_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
2260: p_x_osp_order_rec.attribute6 := null;
2261: END IF;
2262: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2263: p_x_osp_order_rec.attribute7 := null;
2264: END IF;
2265: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2266: p_x_osp_order_rec.attribute8 := null;

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

2261: END IF;
2262: IF(p_x_osp_order_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
2263: p_x_osp_order_rec.attribute7 := null;
2264: END IF;
2265: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2266: p_x_osp_order_rec.attribute8 := null;
2267: END IF;
2268: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2269: p_x_osp_order_rec.attribute9 := null;

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

2264: END IF;
2265: IF(p_x_osp_order_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
2266: p_x_osp_order_rec.attribute8 := null;
2267: END IF;
2268: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2269: p_x_osp_order_rec.attribute9 := null;
2270: END IF;
2271: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2272: p_x_osp_order_rec.attribute10 := null;

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

2267: END IF;
2268: IF(p_x_osp_order_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
2269: p_x_osp_order_rec.attribute9 := null;
2270: END IF;
2271: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2272: p_x_osp_order_rec.attribute10 := null;
2273: END IF;
2274: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2275: p_x_osp_order_rec.attribute11 := null;

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

2270: END IF;
2271: IF(p_x_osp_order_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
2272: p_x_osp_order_rec.attribute10 := null;
2273: END IF;
2274: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2275: p_x_osp_order_rec.attribute11 := null;
2276: END IF;
2277: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2278: p_x_osp_order_rec.attribute12 := null;

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

2273: END IF;
2274: IF(p_x_osp_order_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
2275: p_x_osp_order_rec.attribute11 := null;
2276: END IF;
2277: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2278: p_x_osp_order_rec.attribute12 := null;
2279: END IF;
2280: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2281: p_x_osp_order_rec.attribute13 := null;

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

2276: END IF;
2277: IF(p_x_osp_order_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
2278: p_x_osp_order_rec.attribute12 := null;
2279: END IF;
2280: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2281: p_x_osp_order_rec.attribute13 := null;
2282: END IF;
2283: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2284: p_x_osp_order_rec.attribute14 := null;

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

2279: END IF;
2280: IF(p_x_osp_order_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
2281: p_x_osp_order_rec.attribute13 := null;
2282: END IF;
2283: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2284: p_x_osp_order_rec.attribute14 := null;
2285: END IF;
2286: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2287: p_x_osp_order_rec.attribute15 := null;

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

2282: END IF;
2283: IF(p_x_osp_order_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
2284: p_x_osp_order_rec.attribute14 := null;
2285: END IF;
2286: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2287: p_x_osp_order_rec.attribute15 := null;
2288: END IF;
2289: IF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN
2290: p_x_osp_order_rec.vendor_contact_id := null;

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

2285: END IF;
2286: IF(p_x_osp_order_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
2287: p_x_osp_order_rec.attribute15 := null;
2288: END IF;
2289: IF(p_x_osp_order_rec.vendor_contact_id = FND_API.G_MISS_NUM) THEN
2290: p_x_osp_order_rec.vendor_contact_id := null;
2291: END IF;
2292: END IF;
2293: IF FND_MSG_PUB.count_msg > 0 THEN

Line 2294: RAISE FND_API.G_EXC_ERROR;

2290: p_x_osp_order_rec.vendor_contact_id := null;
2291: END IF;
2292: END IF;
2293: IF FND_MSG_PUB.count_msg > 0 THEN
2294: RAISE FND_API.G_EXC_ERROR;
2295: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2296: END IF;
2297: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2298: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 2295: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2291: END IF;
2292: END IF;
2293: IF FND_MSG_PUB.count_msg > 0 THEN
2294: RAISE FND_API.G_EXC_ERROR;
2295: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2296: END IF;
2297: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2298: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
2299: END IF;

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

2393: BEGIN
2394: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2395: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2396: END IF;
2397: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2398: OPEN val_service_item_id_inv_csr(p_service_item_id, p_workorder_id);
2399: FETCH val_service_item_id_inv_csr INTO l_exist;
2400: IF(val_service_item_id_inv_csr%NOTFOUND) THEN
2401: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_SVC_ITEM');

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

2471: BEGIN
2472: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2473: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2474: END IF;
2475: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2476: OPEN val_service_item_desc_csr(p_service_item_id , p_service_item_description);
2477: FETCH val_service_item_desc_csr INTO l_exist;
2478: IF(val_service_item_desc_csr%NOTFOUND) THEN
2479: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_SVC_ITEM_DESC');

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

2537: BEGIN
2538: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2539: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2540: END IF;
2541: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2542:
2543: OPEN val_service_item_id_inv_csr(p_service_item_id, p_workorder_id);
2544: FETCH val_service_item_id_inv_csr INTO l_exist;
2545: IF(val_service_item_id_inv_csr%NOTFOUND) THEN

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

2622: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2623: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure'
2624: || '- Service Item Id: ' || p_service_item_id || 'uom_code' || p_service_item_uom_code );
2625: END IF;
2626: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2627: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
2628: OPEN val_service_item_uom_csr(p_service_item_id,p_service_item_uom_code,p_org_id);
2629: FETCH val_service_item_uom_csr INTO l_exist;
2630: IF(val_service_item_uom_csr%NOTFOUND) THEN

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

2623: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure'
2624: || '- Service Item Id: ' || p_service_item_id || 'uom_code' || p_service_item_uom_code );
2625: END IF;
2626: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
2627: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
2628: OPEN val_service_item_uom_csr(p_service_item_id,p_service_item_uom_code,p_org_id);
2629: FETCH val_service_item_uom_csr INTO l_exist;
2630: IF(val_service_item_uom_csr%NOTFOUND) THEN
2631: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_UOM');

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

2635: END IF;
2636: CLOSE val_service_item_uom_csr;
2637: END IF;
2638: ELSE
2639: IF(p_service_item_uom_code IS NOT NULL AND p_service_item_uom_code <> FND_API.G_MISS_CHAR) THEN
2640: OPEN val_uom_code_csr(p_service_item_uom_code);
2641: FETCH val_uom_code_csr INTO l_exist;
2642: IF(val_uom_code_csr%NOTFOUND) THEN
2643: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_UOM');

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

2667: BEGIN
2668: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2669: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2670: END IF;
2671: IF(p_po_line_type_id IS NOT NULL AND p_po_line_type_id <> FND_API.G_MISS_NUM) THEN
2672: OPEN val_po_line_type_id_csr(p_po_line_type_id);
2673: FETCH val_po_line_type_id_csr INTO l_exist;
2674: IF(val_po_line_type_id_csr%NOTFOUND) THEN
2675: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_LNTYP_ID');

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

2705: BEGIN
2706: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2707: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2708: END IF;
2709: IF(p_po_line_id IS NOT NULL AND p_po_line_id <> FND_API.G_MISS_NUM) THEN
2710: OPEN val_po_line_id_csr(p_po_line_id, p_osp_order_id);
2711: FETCH val_po_line_id_csr INTO l_exist;
2712: IF(val_po_line_id_csr%NOTFOUND) THEN
2713: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_LINE_INV');

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

2738: BEGIN
2739: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2740: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
2741: END IF;
2742: IF(p_exchange_instance_id IS NOT NULL AND p_exchange_instance_id <> FND_API.G_MISS_NUM) THEN
2743: OPEN val_instance_id_csr(p_exchange_instance_id);
2744: FETCH val_instance_id_csr INTO l_exist;
2745: IF (val_instance_id_csr %NOTFOUND) THEN
2746: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INSTANCE_ID_INV');

Line 2907: RAISE FND_API.G_EXC_ERROR;

2903: END IF;
2904: END LOOP;
2905: CLOSE val_order_lines_csr;
2906: IF FND_MSG_PUB.count_msg > 0 THEN
2907: RAISE FND_API.G_EXC_ERROR;
2908: -- Changed by jaramana on January 9, 2008 for the Requisition ER 6034236
2909: ELSIF(p_x_osp_order_rec.status_code = G_OSP_SUBMITTED_STATUS) THEN
2910: -- jaramana End
2911: -- submit for PO creation

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

2922: );
2923: OPEN get_old_status;
2924: FETCH get_old_status INTO l_temp_status_code, l_new_ovn;
2925: CLOSE get_old_status;
2926: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS OR
2927: l_new_ovn <> l_old_ovn+1) THEN
2928: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SUB_PO_FLD');
2929: FND_MSG_PUB.ADD;
2930: ELSE

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

2954: );
2955: OPEN get_old_status;
2956: FETCH get_old_status INTO l_temp_status_code, l_new_ovn;
2957: CLOSE get_old_status;
2958: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS OR
2959: l_new_ovn <> l_old_ovn+1) THEN
2960: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SUB_REQ_FLD');
2961: FND_MSG_PUB.ADD;
2962: ELSE

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

2999: END IF;
3000:
3001: -- ask SO whether can close
3002: IF(p_x_osp_order_rec.oe_header_id IS NOT NULL) THEN
3003: IF NOT(FND_API.TO_BOOLEAN(AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id))) THEN
3004: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CL_SO_OPEN');
3005: FND_MSG_PUB.ADD;
3006: END IF;
3007: END IF;

Line 3064: RAISE FND_API.G_EXC_ERROR;

3060: FND_MSG_PUB.ADD;
3061: END IF;
3062: CLOSE val_order_has_ship_lines;
3063: IF FND_MSG_PUB.count_msg > 0 THEN
3064: RAISE FND_API.G_EXC_ERROR;
3065: ELSE
3066: l_shipment_IDs_Tbl(1) := p_x_osp_order_rec.oe_header_id;
3067: AHL_OSP_SHIPMENT_PUB.Book_Order(
3068: p_api_version => 1.0,

Line 3069: p_init_msg_list => FND_API.G_FALSE,

3065: ELSE
3066: l_shipment_IDs_Tbl(1) := p_x_osp_order_rec.oe_header_id;
3067: AHL_OSP_SHIPMENT_PUB.Book_Order(
3068: p_api_version => 1.0,
3069: p_init_msg_list => FND_API.G_FALSE,
3070: p_commit => FND_API.G_FALSE,
3071: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
3072: p_oe_header_tbl => l_shipment_IDs_Tbl,
3073: x_return_status => l_return_status,

Line 3070: p_commit => FND_API.G_FALSE,

3066: l_shipment_IDs_Tbl(1) := p_x_osp_order_rec.oe_header_id;
3067: AHL_OSP_SHIPMENT_PUB.Book_Order(
3068: p_api_version => 1.0,
3069: p_init_msg_list => FND_API.G_FALSE,
3070: p_commit => FND_API.G_FALSE,
3071: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
3072: p_oe_header_tbl => l_shipment_IDs_Tbl,
3073: x_return_status => l_return_status,
3074: x_msg_count => l_msg_count,

Line 3071: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

3067: AHL_OSP_SHIPMENT_PUB.Book_Order(
3068: p_api_version => 1.0,
3069: p_init_msg_list => FND_API.G_FALSE,
3070: p_commit => FND_API.G_FALSE,
3071: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
3072: p_oe_header_tbl => l_shipment_IDs_Tbl,
3073: x_return_status => l_return_status,
3074: x_msg_count => l_msg_count,
3075: x_msg_data => l_msg_data

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

3073: x_return_status => l_return_status,
3074: x_msg_count => l_msg_count,
3075: x_msg_data => l_msg_data
3076: );
3077: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN
3078: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SUB_SO_FLD');
3079: FND_MSG_PUB.ADD;
3080: END IF;
3081: END IF;

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

3087: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CL_OE_NLL');
3088: FND_MSG_PUB.ADD;
3089: ELSE
3090: --dbms_output.put_line('Sales order closed ' || AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id));
3091: IF NOT(FND_API.TO_BOOLEAN(AHL_OSP_SHIPMENT_PUB.Is_Order_Header_Closed( p_x_osp_order_rec.oe_header_id))) THEN
3092: --dbms_output.put_line('Sales order is not closed');
3093: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_CL_SO_OPEN');
3094: FND_MSG_PUB.ADD;
3095: END IF;

Line 3108: RAISE FND_API.G_EXC_ERROR;

3104: END IF;
3105: END IF;
3106: END IF;
3107: IF FND_MSG_PUB.count_msg > 0 THEN
3108: RAISE FND_API.G_EXC_ERROR;
3109: END IF;
3110: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3111: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
3112: END IF;

Line 3119: p_cancel_flag IN VARCHAR2 := FND_API.G_FALSE

3115: --------------------------------------------------------------------------------------------------------------
3116: PROCEDURE delete_cancel_so(
3117: p_oe_header_id IN NUMBER,
3118: p_del_cancel_so_lines_tbl IN del_cancel_so_lines_tbl_type,
3119: p_cancel_flag IN VARCHAR2 := FND_API.G_FALSE
3120: ) IS
3121: l_Ship_ID_Tbl AHL_OSP_SHIPMENT_PUB.Ship_ID_Tbl_Type;
3122: l_return_status VARCHAR2(1);
3123: l_msg_count NUMBER;

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

3157: x_return_status => l_return_status ,
3158: x_msg_count => l_msg_count ,
3159: x_msg_data => l_msg_data
3160: );
3161: IF(l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN
3162: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SO_CAN_FLD');
3163: FND_MSG_PUB.ADD;
3164: END IF;
3165: ELSIF ( p_del_cancel_so_lines_tbl IS NOT NULL) THEN

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

3252: x_return_status => l_return_status ,
3253: x_msg_count => l_msg_count ,
3254: x_msg_data => l_msg_data
3255: );
3256: IF(l_return_status <> FND_API.G_RET_STS_SUCCESS)THEN
3257: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_INV_SO_LN_CAN_FLD');
3258: FND_MSG_PUB.ADD;
3259: END IF;
3260: END IF;

Line 3263: RAISE FND_API.G_EXC_ERROR;

3259: END IF;
3260: END IF;
3261: END IF;
3262: IF FND_MSG_PUB.count_msg > 0 THEN
3263: RAISE FND_API.G_EXC_ERROR;
3264: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3265: END IF;
3266: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3267: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

Line 3264: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3260: END IF;
3261: END IF;
3262: IF FND_MSG_PUB.count_msg > 0 THEN
3263: RAISE FND_API.G_EXC_ERROR;
3264: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3265: END IF;
3266: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3267: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');
3268: END IF;

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

3349: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3350: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3351: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_id: ' || p_vendor_id);
3352: END IF;
3353: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3354: AND p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN
3355: OPEN vendor_id_csr(p_po_header_id, p_vendor_id);
3356: FETCH vendor_id_csr INTO l_exist;
3357: IF(vendor_id_csr %FOUND) THEN

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

3350: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3351: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_id: ' || p_vendor_id);
3352: END IF;
3353: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3354: AND p_vendor_id IS NOT NULL AND p_vendor_id <> FND_API.G_MISS_NUM) THEN
3355: OPEN vendor_id_csr(p_po_header_id, p_vendor_id);
3356: FETCH vendor_id_csr INTO l_exist;
3357: IF(vendor_id_csr %FOUND) THEN
3358: CLOSE vendor_id_csr;

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

3377: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3378: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3379: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_site_id: ' || p_vendor_site_id);
3380: END IF;
3381: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3382: AND p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
3383: OPEN vendor_site_id_csr(p_po_header_id, p_vendor_site_id);
3384: FETCH vendor_site_id_csr INTO l_exist;
3385: IF(vendor_site_id_csr %FOUND) THEN

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

3378: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Function - '
3379: || 'p_po_header_id: ' || p_po_header_id || ' p_vendor_site_id: ' || p_vendor_site_id);
3380: END IF;
3381: IF(p_po_header_id IS NOT NULL AND p_po_header_id <> FND_API.G_MISS_NUM
3382: AND p_vendor_site_id IS NOT NULL AND p_vendor_site_id <> FND_API.G_MISS_NUM) THEN
3383: OPEN vendor_site_id_csr(p_po_header_id, p_vendor_site_id);
3384: FETCH vendor_site_id_csr INTO l_exist;
3385: IF(vendor_site_id_csr %FOUND) THEN
3386: CLOSE vendor_site_id_csr;

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

3396: --It handles OSP order header Creation, Update, and Deletion, order lines Creation, Update
3397: --and Deletion.
3398: PROCEDURE process_osp_order(
3399: p_api_version IN NUMBER := 1.0,
3400: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
3401: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3402: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
3403: p_module_type IN VARCHAR2 := NULL,
3404: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type,

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

3397: --and Deletion.
3398: PROCEDURE process_osp_order(
3399: p_api_version IN NUMBER := 1.0,
3400: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
3401: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3402: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
3403: p_module_type IN VARCHAR2 := NULL,
3404: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type,
3405: p_x_osp_order_lines_tbl IN OUT NOCOPY osp_order_lines_tbl_type,

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

3398: PROCEDURE process_osp_order(
3399: p_api_version IN NUMBER := 1.0,
3400: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
3401: p_commit IN VARCHAR2 := FND_API.G_FALSE,
3402: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
3403: p_module_type IN VARCHAR2 := NULL,
3404: p_x_osp_order_rec IN OUT NOCOPY osp_order_rec_type,
3405: p_x_osp_order_lines_tbl IN OUT NOCOPY osp_order_lines_tbl_type,
3406: x_return_status OUT NOCOPY VARCHAR2,

Line 3436: x_return_status := FND_API.G_RET_STS_SUCCESS;

3432: FROM ahl_osp_order_lines
3433: WHERE osp_order_id = c_osp_order_id;
3434: BEGIN
3435: --Initialize API return status to success
3436: x_return_status := FND_API.G_RET_STS_SUCCESS;
3437:
3438: --Standard Start of API savepoint
3439: SAVEPOINT process_osp_order;
3440:

Line 3442: IF NOT FND_API.compatible_api_call(

3438: --Standard Start of API savepoint
3439: SAVEPOINT process_osp_order;
3440:
3441: --Standard call to check for call compatibility.
3442: IF NOT FND_API.compatible_api_call(
3443: l_api_version,
3444: p_api_version,
3445: l_api_name,
3446: G_PKG_NAME)

Line 3448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3444: p_api_version,
3445: l_api_name,
3446: G_PKG_NAME)
3447: THEN
3448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3449: END IF;
3450:
3451: --Initialize message list if p_init_msg_list is set to TRUE.
3452: IF FND_API.to_boolean(p_init_msg_list) THEN

Line 3452: IF FND_API.to_boolean(p_init_msg_list) THEN

3448: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3449: END IF;
3450:
3451: --Initialize message list if p_init_msg_list is set to TRUE.
3452: IF FND_API.to_boolean(p_init_msg_list) THEN
3453: FND_MSG_PUB.initialize;
3454: END IF;
3455:
3456: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 3468: RAISE FND_API.G_EXC_ERROR;

3464: IF (p_x_osp_order_rec.operation_flag IS NOT NULL AND
3465: p_x_osp_order_rec.operation_flag NOT IN (G_OP_CREATE, G_OP_UPDATE, G_OP_DELETE)) THEN
3466: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVOP');
3467: FND_MSG_PUB.add;
3468: RAISE FND_API.G_EXC_ERROR;
3469: END IF;
3470: --Validate the operation_flag of the line records and it couldn't be NULL
3471: --In case only header record is to be processed, then NULL is supposed to be passed
3472: --to the lines table

Line 3478: RAISE FND_API.G_EXC_ERROR;

3474: FOR i IN p_x_osp_order_lines_tbl.FIRST..p_x_osp_order_lines_tbl.LAST LOOP
3475: IF (p_x_osp_order_lines_tbl(i).operation_flag NOT IN (G_OP_CREATE, G_OP_UPDATE, G_OP_DELETE)) THEN
3476: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVOP');
3477: FND_MSG_PUB.add;
3478: RAISE FND_API.G_EXC_ERROR;
3479: END IF;
3480: END LOOP;
3481: END IF;
3482:

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

3491: p_osp_order_lines_tbl => p_x_osp_order_lines_tbl,
3492: x_msg_count => l_msg_count,
3493: x_msg_data => l_msg_data,
3494: x_return_status => l_return_status);
3495: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;

Line 3496: RAISE FND_API.G_EXC_ERROR;

3492: x_msg_count => l_msg_count,
3493: x_msg_data => l_msg_data,
3494: x_return_status => l_return_status);
3495: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;
3500: END IF;

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

3493: x_msg_data => l_msg_data,
3494: x_return_status => l_return_status);
3495: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;
3500: END IF;
3501:

Line 3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3494: x_return_status => l_return_status);
3495: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3496: RAISE FND_API.G_EXC_ERROR;
3497: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3499: END IF;
3500: END IF;
3501:
3502: IF (p_x_osp_order_rec.operation_flag IS NULL) THEN

Line 3527: RAISE FND_API.G_EXC_ERROR;

3523: WHEN NO_DATA_FOUND THEN
3524: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');
3525: FND_MESSAGE.Set_Token('OSP_LINE_ID',p_x_osp_order_lines_tbl(i).osp_order_line_id);
3526: FND_MSG_PUB.ADD;
3527: RAISE FND_API.G_EXC_ERROR;
3528: END;
3529: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
3530: IF (l_status_code IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS)) THEN
3531: -- jaramana End

Line 3549: RAISE FND_API.G_EXC_ERROR;

3545: p_del_cancel_so_lines_tbl => l_del_cancel_so_lines_tbl);
3546: ELSE
3547: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
3548: FND_MSG_PUB.ADD;
3549: RAISE FND_API.G_EXC_ERROR;
3550: END IF;
3551: ELSIF (p_x_osp_order_lines_tbl(i).operation_flag = G_OP_CREATE) THEN
3552: --Create(Add) new line record
3553: create_osp_order_line(p_x_osp_order_lines_tbl(i));

Line 3590: RAISE FND_API.G_EXC_ERROR;

3586: EXCEPTION
3587: WHEN NO_DATA_FOUND THEN
3588: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');
3589: FND_MSG_PUB.add;
3590: RAISE FND_API.G_EXC_ERROR;
3591: END;
3592:
3593: IF l_valid_vendors_tbl.count > 0 THEN
3594: IF (l_header_vendor_id IS NULL OR l_header_site_id IS NULL) THEN

Line 3608: RAISE FND_API.G_EXC_ERROR;

3604: END IF;
3605: IF NOT l_validate_pass_flag THEN
3606: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3607: FND_MSG_PUB.add;
3608: RAISE FND_API.G_EXC_ERROR;
3609: END IF;
3610: ELSE
3611: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3612: FND_MSG_PUB.add;

Line 3613: RAISE FND_API.G_EXC_ERROR;

3609: END IF;
3610: ELSE
3611: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3612: FND_MSG_PUB.add;
3613: RAISE FND_API.G_EXC_ERROR;
3614: END IF;
3615: END IF;
3616: END IF;
3617: --Call create_shipment. Create_shipment will check whether it will create

Line 3637: RAISE FND_API.G_EXC_ERROR;

3633: EXCEPTION
3634: WHEN NO_DATA_FOUND THEN
3635: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');
3636: FND_MSG_PUB.add;
3637: RAISE FND_API.G_EXC_ERROR;
3638: END;
3639: --check the osp order could be deleted, if Yes then
3640: --Delete OSP order Header/Line records
3641: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 3664: RAISE FND_API.G_EXC_ERROR;

3660: WHEN NO_DATA_FOUND THEN
3661: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');
3662: FND_MESSAGE.Set_Token('OSP_LINE_ID',l_get_order_lines.osp_order_line_id);
3663: FND_MSG_PUB.ADD;
3664: RAISE FND_API.G_EXC_ERROR;
3665: END;
3666: IF (l_oe_ship_line_id IS NOT NULL OR l_oe_return_line_id IS NOT NULL) THEN
3667: l_del_cancel_so_lines_tbl(i).osp_order_id := p_x_osp_order_rec.osp_order_id;
3668: l_del_cancel_so_lines_tbl(i).oe_ship_line_id := l_oe_ship_line_id;

Line 3699: RAISE FND_API.G_EXC_ERROR;

3695: END IF;
3696: ELSE
3697: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
3698: FND_MSG_PUB.ADD;
3699: RAISE FND_API.G_EXC_ERROR;
3700: END IF;
3701: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_UPDATE) THEN
3702: IF (FND_LOG.LEVEL_EVENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3703: FND_LOG.STRING(FND_LOG.LEVEL_EVENT,

Line 3732: RAISE FND_API.G_EXC_ERROR;

3728: WHEN NO_DATA_FOUND THEN
3729: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_ID_LN_INV');
3730: FND_MESSAGE.Set_Token('OSP_LINE_ID',p_x_osp_order_lines_tbl(i).osp_order_line_id);
3731: FND_MSG_PUB.ADD;
3732: RAISE FND_API.G_EXC_ERROR;
3733: END;
3734: -- Added by jaramana on January 9, 2008 for the Requisition ER 6034236
3735: IF (l_status_code IN (G_OSP_ENTERED_STATUS, G_OSP_SUB_FAILED_STATUS, G_OSP_REQ_SUB_FAILED_STATUS)) THEN
3736: -- jaramana End

Line 3754: RAISE FND_API.G_EXC_ERROR;

3750: p_del_cancel_so_lines_tbl => l_del_cancel_so_lines_tbl);
3751: ELSE
3752: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVOP');
3753: FND_MSG_PUB.ADD;
3754: RAISE FND_API.G_EXC_ERROR;
3755: END IF;
3756: --AHL_OSP_ORDER_LINES_PKG.delete_row(p_x_osp_order_lines_tbl(i).osp_order_line_id);
3757: ELSIF (p_x_osp_order_lines_tbl(i).operation_flag = G_OP_UPDATE) THEN
3758: --update osp order line

Line 3789: RAISE FND_API.G_EXC_ERROR;

3785: EXCEPTION
3786: WHEN NO_DATA_FOUND THEN
3787: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORD_INVALID');
3788: FND_MSG_PUB.add;
3789: RAISE FND_API.G_EXC_ERROR;
3790: END;
3791: IF l_any_vendor_flag <> 'Y' THEN
3792: IF l_valid_vendors_tbl.count > 0 THEN
3793: IF (l_header_vendor_id IS NULL OR l_header_site_id IS NULL) THEN

Line 3807: RAISE FND_API.G_EXC_ERROR;

3803: END IF;
3804: IF NOT l_validate_pass_flag THEN
3805: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3806: FND_MSG_PUB.add;
3807: RAISE FND_API.G_EXC_ERROR;
3808: END IF;
3809: ELSE
3810: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3811: FND_MSG_PUB.add;

Line 3812: RAISE FND_API.G_EXC_ERROR;

3808: END IF;
3809: ELSE
3810: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
3811: FND_MSG_PUB.add;
3812: RAISE FND_API.G_EXC_ERROR;
3813: END IF;
3814: END IF;
3815: ELSIF (p_x_osp_order_rec.operation_flag = G_OP_CREATE) THEN
3816: --Validate new line records first because in header record only one attribute needs validation

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

3862: p_osp_order_lines_tbl => p_x_osp_order_lines_tbl,
3863: x_msg_count => l_msg_count,
3864: x_msg_data => l_msg_data,
3865: x_return_status => l_return_status);
3866: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3867: RAISE FND_API.G_EXC_ERROR;
3868: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3869: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3870: END IF;

Line 3867: RAISE FND_API.G_EXC_ERROR;

3863: x_msg_count => l_msg_count,
3864: x_msg_data => l_msg_data,
3865: x_return_status => l_return_status);
3866: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3867: RAISE FND_API.G_EXC_ERROR;
3868: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3869: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3870: END IF;
3871: END IF;

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

3864: x_msg_data => l_msg_data,
3865: x_return_status => l_return_status);
3866: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3867: RAISE FND_API.G_EXC_ERROR;
3868: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3869: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3870: END IF;
3871: END IF;
3872:

Line 3869: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

3865: x_return_status => l_return_status);
3866: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
3867: RAISE FND_API.G_EXC_ERROR;
3868: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
3869: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3870: END IF;
3871: END IF;
3872:
3873: -- Get all the error messages from the previous steps (if any) and raise the appropriate Exception

Line 3877: RAISE FND_API.G_EXC_ERROR;

3873: -- Get all the error messages from the previous steps (if any) and raise the appropriate Exception
3874: l_msg_count := FND_MSG_PUB.count_msg;
3875: IF l_msg_count > 0 THEN
3876: x_msg_count := l_msg_count;
3877: RAISE FND_API.G_EXC_ERROR;
3878: END IF;
3879:
3880: -- Perform the Commit (if requested)
3881: IF FND_API.to_boolean(p_commit) THEN

Line 3881: IF FND_API.to_boolean(p_commit) THEN

3877: RAISE FND_API.G_EXC_ERROR;
3878: END IF;
3879:
3880: -- Perform the Commit (if requested)
3881: IF FND_API.to_boolean(p_commit) THEN
3882: COMMIT;
3883: END IF;
3884:
3885: -- Count and Get messages (optional)

Line 3887: p_encoded => FND_API.G_FALSE,

3883: END IF;
3884:
3885: -- Count and Get messages (optional)
3886: FND_MSG_PUB.count_and_get(
3887: p_encoded => FND_API.G_FALSE,
3888: p_count => x_msg_count,
3889: p_data => x_msg_data);
3890:
3891: EXCEPTION

Line 3892: WHEN FND_API.G_EXC_ERROR THEN

3888: p_count => x_msg_count,
3889: p_data => x_msg_data);
3890:
3891: EXCEPTION
3892: WHEN FND_API.G_EXC_ERROR THEN
3893: ROLLBACK TO process_osp_order;
3894: x_return_status := FND_API.G_RET_STS_ERROR;
3895: FND_MSG_PUB.count_and_get(
3896: p_encoded => FND_API.G_FALSE,

Line 3894: x_return_status := FND_API.G_RET_STS_ERROR;

3890:
3891: EXCEPTION
3892: WHEN FND_API.G_EXC_ERROR THEN
3893: ROLLBACK TO process_osp_order;
3894: x_return_status := FND_API.G_RET_STS_ERROR;
3895: FND_MSG_PUB.count_and_get(
3896: p_encoded => FND_API.G_FALSE,
3897: p_count => x_msg_count,
3898: p_data => x_msg_data);

Line 3896: p_encoded => FND_API.G_FALSE,

3892: WHEN FND_API.G_EXC_ERROR THEN
3893: ROLLBACK TO process_osp_order;
3894: x_return_status := FND_API.G_RET_STS_ERROR;
3895: FND_MSG_PUB.count_and_get(
3896: p_encoded => FND_API.G_FALSE,
3897: p_count => x_msg_count,
3898: p_data => x_msg_data);
3899:
3900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 3900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

3896: p_encoded => FND_API.G_FALSE,
3897: p_count => x_msg_count,
3898: p_data => x_msg_data);
3899:
3900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3901: ROLLBACK TO process_osp_order;
3902: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3903: FND_MSG_PUB.count_and_get(
3904: p_encoded => FND_API.G_FALSE,

Line 3902: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3898: p_data => x_msg_data);
3899:
3900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3901: ROLLBACK TO process_osp_order;
3902: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3903: FND_MSG_PUB.count_and_get(
3904: p_encoded => FND_API.G_FALSE,
3905: p_count => x_msg_count,
3906: p_data => x_msg_data);

Line 3904: p_encoded => FND_API.G_FALSE,

3900: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3901: ROLLBACK TO process_osp_order;
3902: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3903: FND_MSG_PUB.count_and_get(
3904: p_encoded => FND_API.G_FALSE,
3905: p_count => x_msg_count,
3906: p_data => x_msg_data);
3907:
3908: WHEN OTHERS THEN

Line 3910: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

3906: p_data => x_msg_data);
3907:
3908: WHEN OTHERS THEN
3909: ROLLBACK TO process_osp_order;
3910: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3911: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
3912: THEN
3913: FND_MSG_PUB.add_exc_msg(
3914: p_pkg_name => G_PKG_NAME,

Line 3919: p_encoded => FND_API.G_FALSE,

3915: p_procedure_name => l_api_name,
3916: p_error_text => SUBSTRB(SQLERRM,1,240));
3917: END IF;
3918: FND_MSG_PUB.count_and_get(
3919: p_encoded => FND_API.G_FALSE,
3920: p_count => x_msg_count,
3921: p_data => x_msg_data);
3922: END process_osp_order;
3923:

Line 3980: RAISE FND_API.G_EXC_ERROR;

3976: l_operating_unit_id :=mo_global.get_current_org_id();
3977: IF (l_operating_unit_id IS NULL) THEN
3978: FND_MESSAGE.Set_Name('AHL', 'AHL_OSP_ORG_NOT_SET');
3979: FND_MSG_PUB.ADD;
3980: RAISE FND_API.G_EXC_ERROR;
3981: END IF;
3982: --Validate the only user passed parameter order_type_code
3983: IF (p_x_osp_order_rec.order_type_code IS NULL OR
3984: p_x_osp_order_rec.order_type_code NOT IN (G_OSP_ORDER_TYPE_SERVICE,

Line 3989: RAISE FND_API.G_EXC_ERROR;

3985: G_OSP_ORDER_TYPE_EXCHANGE,
3986: G_OSP_ORDER_TYPE_BORROW)) THEN
3987: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ORDER_TYPE_INVALID');
3988: FND_MSG_PUB.add;
3989: RAISE FND_API.G_EXC_ERROR;
3990: END IF;
3991:
3992: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
3993: --This API nulls out the G_MISS info, if passed by the user in the create mode.

Line 4017: RAISE FND_API.G_EXC_ERROR;

4013: p_x_osp_order_rec.vendor_site_id,
4014: p_x_osp_order_rec.vendor_contact_id);
4015: IF FND_MSG_PUB.count_msg > 0 THEN
4016: -- Vendor/Vendor Site/Vendor Contact is Invalid
4017: RAISE FND_API.G_EXC_ERROR;
4018: END IF;
4019: -- If valid, use the input values
4020: l_vendor_id := p_x_osp_order_rec.vendor_id;
4021: l_vendor_site_id := p_x_osp_order_rec.vendor_site_id;

Line 4029: RAISE FND_API.G_EXC_ERROR;

4025: validate_vendor_site(p_x_osp_order_rec.vendor_id,
4026: p_x_osp_order_rec.vendor_site_id);
4027: IF FND_MSG_PUB.count_msg > 0 THEN
4028: -- Vendor/Vendor Site/Vendor Contact is Invalid
4029: RAISE FND_API.G_EXC_ERROR;
4030: END IF;
4031: -- If valid, use the input values
4032: l_vendor_id := p_x_osp_order_rec.vendor_id;
4033: l_vendor_site_id := p_x_osp_order_rec.vendor_site_id;

Line 4040: RAISE FND_API.G_EXC_ERROR;

4036: -- Validate the Vendor
4037: validate_vendor(p_x_osp_order_rec.vendor_id);
4038: IF FND_MSG_PUB.count_msg > 0 THEN
4039: -- Vendor/Vendor Site/Vendor Contact is Invalid
4040: RAISE FND_API.G_EXC_ERROR;
4041: END IF;
4042: -- If valid, use the input values
4043: l_vendor_id := p_x_osp_order_rec.vendor_id;
4044: END IF;

Line 4091: RAISE FND_API.G_EXC_ERROR;

4087: WHEN NO_DATA_FOUND THEN
4088: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_WO');
4089: FND_MESSAGE.Set_Token('WORKORDER_ID', p_x_osp_order_lines_tbl(i).workorder_id);
4090: FND_MSG_PUB.ADD;
4091: RAISE FND_API.G_EXC_ERROR;
4092: END;
4093: END LOOP;
4094: END IF;
4095: derive_default_vendor(l_item_service_rels_tbl,

Line 4120: RAISE FND_API.G_EXC_ERROR;

4116: -- The vendor or vendor + vendor site passed in is not a valid: Throw Error
4117: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_VENDOR_ID_INV');
4118: FND_MESSAGE.Set_Token('VENDOR_ID', p_x_osp_order_rec.vendor_id);
4119: FND_MSG_PUB.ADD;
4120: RAISE FND_API.G_EXC_ERROR;
4121: END IF;
4122: IF (p_x_osp_order_rec.vendor_site_id IS NOT NULL) THEN
4123: IF (p_x_osp_order_rec.vendor_contact_id IS NOT NULL) THEN
4124: -- Check if p_x_osp_order_rec.vendor_contact_id is valid

Line 4130: RAISE FND_API.G_EXC_ERROR;

4126: p_x_osp_order_rec.vendor_site_id,
4127: p_x_osp_order_rec.vendor_contact_id);
4128: IF FND_MSG_PUB.count_msg > 0 THEN
4129: -- Vendor/Vendor Site/Vendor Contact is Invalid
4130: RAISE FND_API.G_EXC_ERROR;
4131: END IF;
4132: -- Vendor Contact is valid: Use it
4133: l_vendor_contact_id := p_x_osp_order_rec.vendor_contact_id;
4134: ELSE

Line 4150: RAISE FND_API.G_EXC_ERROR;

4146: -- Validate the buyer
4147: validate_buyer(p_x_osp_order_rec.po_agent_id);
4148: IF FND_MSG_PUB.count_msg > 0 THEN
4149: -- Buyer is Invalid
4150: RAISE FND_API.G_EXC_ERROR;
4151: END IF;
4152: -- Buyer is valid: Use it
4153: l_buyer_id := p_x_osp_order_rec.po_agent_id;
4154: ELSE

Line 4464: RAISE FND_API.G_EXC_ERROR;

4460: --yazhou 22-Aug-2006 starts
4461: -- Bug fix#5479266
4462:
4463: IF FND_MSG_PUB.count_msg > 0 THEN
4464: RAISE FND_API.G_EXC_ERROR;
4465: END IF;
4466:
4467: --yazhou 22-Aug-2006 ends
4468:

Line 4841: RAISE FND_API.G_EXC_ERROR;

4837: EXCEPTION
4838: WHEN NO_DATA_FOUND THEN
4839: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_ORD_INVALID');
4840: FND_MSG_PUB.ADD;
4841: RAISE FND_API.G_EXC_ERROR;
4842: END;
4843: l_oe_header_rec.header_id := l_oe_header_id;
4844: l_oe_header_rec.osp_order_id := l_osp_order_id;
4845: IF l_oe_header_id IS NULL THEN

Line 4952: p_init_msg_list => FND_API.G_FALSE,

4948: 'oe_line_operation='||l_oe_lines_tbl(1).operation);
4949: END IF;
4950: AHL_OSP_SHIPMENT_PUB.process_order(
4951: p_api_version => 1.0,
4952: p_init_msg_list => FND_API.G_FALSE,
4953: p_commit => FND_API.G_FALSE,
4954: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
4955: --Changed by mpothuku on 14-Dec-05 to differentiate the call from here and from
4956: --Shipment Line Details UI. Note that Shipment Line Details will be using OAF as the p_module_type

Line 4953: p_commit => FND_API.G_FALSE,

4949: END IF;
4950: AHL_OSP_SHIPMENT_PUB.process_order(
4951: p_api_version => 1.0,
4952: p_init_msg_list => FND_API.G_FALSE,
4953: p_commit => FND_API.G_FALSE,
4954: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
4955: --Changed by mpothuku on 14-Dec-05 to differentiate the call from here and from
4956: --Shipment Line Details UI. Note that Shipment Line Details will be using OAF as the p_module_type
4957: p_module_type => NULL,--G_OAF_MODULE,

Line 4954: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

4950: AHL_OSP_SHIPMENT_PUB.process_order(
4951: p_api_version => 1.0,
4952: p_init_msg_list => FND_API.G_FALSE,
4953: p_commit => FND_API.G_FALSE,
4954: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
4955: --Changed by mpothuku on 14-Dec-05 to differentiate the call from here and from
4956: --Shipment Line Details UI. Note that Shipment Line Details will be using OAF as the p_module_type
4957: p_module_type => NULL,--G_OAF_MODULE,
4958: p_x_header_rec => l_oe_header_rec,

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

4960: x_return_status => l_return_status,
4961: x_msg_count => l_msg_count,
4962: x_msg_data => l_msg_data);
4963: END IF;
4964: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4965: RAISE FND_API.G_EXC_ERROR;
4966: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4968: END IF;

Line 4965: RAISE FND_API.G_EXC_ERROR;

4961: x_msg_count => l_msg_count,
4962: x_msg_data => l_msg_data);
4963: END IF;
4964: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4965: RAISE FND_API.G_EXC_ERROR;
4966: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4968: END IF;
4969: END IF;

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

4962: x_msg_data => l_msg_data);
4963: END IF;
4964: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4965: RAISE FND_API.G_EXC_ERROR;
4966: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4968: END IF;
4969: END IF;
4970:

Line 4967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

4963: END IF;
4964: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
4965: RAISE FND_API.G_EXC_ERROR;
4966: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
4967: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4968: END IF;
4969: END IF;
4970:
4971: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 5430: 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

5426: --it is not necessary to add the original one here.
5427: --validate sercice_item_uom (just borrowed the old one)
5428: 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);
5429: --validate sercice_item_quantity(quantity)
5430: 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
5431: IF(p_x_osp_order_line_rec.quantity <=0) THEN
5432: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_VAL');
5433: FND_MESSAGE.Set_Token('QUANTITY', p_x_osp_order_line_rec.quantity);
5434: FND_MSG_PUB.ADD;

Line 5437: 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

5433: FND_MESSAGE.Set_Token('QUANTITY', p_x_osp_order_line_rec.quantity);
5434: FND_MSG_PUB.ADD;
5435: END IF;
5436: --quantity cannot be null when UOM is not null
5437: 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
5438: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_NLL');
5439: FND_MSG_PUB.ADD;
5440: END IF;
5441:

Line 5950: 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

5946: FROM ahl_osp_orders_b
5947: WHERE osp_order_id = p_x_osp_order_line_rec.osp_order_id;
5948: */
5949: -- jaramana End
5950: 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
5951: IF(p_x_osp_order_line_rec.quantity <= 0) THEN
5952: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_VAL');
5953: FND_MESSAGE.Set_Token('QUANTITY', p_x_osp_order_line_rec.quantity);
5954: FND_MSG_PUB.ADD;

Line 5969: 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

5965: END IF;
5966: */
5967: -- jaramana End
5968: --quantity cannot be null when UOM is not null
5969: 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
5970: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_QUANT_NLL');
5971: FND_MSG_PUB.ADD;
5972: END IF;
5973:

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

6124: END LOOP;
6125: --Pick up the common vendor_cert_id (exists in all the sets) with
6126: --the highest(least) summary rank
6127: l_vendor_cert_id := NULL;
6128: l_temp_rank_sum := FND_API.G_MISS_NUM; --Just want to use a big positive number
6129: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
6130: FND_LOG.STRING(FND_LOG.LEVEL_STATEMENT,
6131: G_LOG_PREFIX || 'derive_default_vendor',
6132: 'Procedure begins and count2='||l_vendor_rank_count_tbl.count||

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

6535: FND_MSG_PUB.ADD;
6536: ELSE
6537: IF (p_x_osp_order_line_rec.osp_order_id IS NULL) THEN
6538: p_x_osp_order_line_rec.osp_order_id := l_osp_order_line_rec.osp_order_id;
6539: ELSIF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN
6540: p_x_osp_order_line_rec.osp_order_id := null;
6541: END IF;
6542: IF (p_x_osp_order_line_rec.osp_line_number IS NULL) THEN
6543: p_x_osp_order_line_rec.osp_line_number := l_osp_order_line_rec.osp_line_number;

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

6540: p_x_osp_order_line_rec.osp_order_id := null;
6541: END IF;
6542: IF (p_x_osp_order_line_rec.osp_line_number IS NULL) THEN
6543: p_x_osp_order_line_rec.osp_line_number := l_osp_order_line_rec.osp_line_number;
6544: ELSIF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
6545: p_x_osp_order_line_rec.osp_line_number := null;
6546: END IF;
6547: IF (p_x_osp_order_line_rec.status_code IS NULL) THEN
6548: p_x_osp_order_line_rec.status_code := l_osp_order_line_rec.status_code;

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

6545: p_x_osp_order_line_rec.osp_line_number := null;
6546: END IF;
6547: IF (p_x_osp_order_line_rec.status_code IS NULL) THEN
6548: p_x_osp_order_line_rec.status_code := l_osp_order_line_rec.status_code;
6549: ELSIF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
6550: p_x_osp_order_line_rec.status_code := null;
6551: END IF;
6552: IF (p_x_osp_order_line_rec.need_by_date IS NULL) THEN
6553: p_x_osp_order_line_rec.need_by_date := l_osp_order_line_rec.need_by_date;

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

6550: p_x_osp_order_line_rec.status_code := null;
6551: END IF;
6552: IF (p_x_osp_order_line_rec.need_by_date IS NULL) THEN
6553: p_x_osp_order_line_rec.need_by_date := l_osp_order_line_rec.need_by_date;
6554: ELSIF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
6555: p_x_osp_order_line_rec.need_by_date := null;
6556: END IF;
6557: IF (p_x_osp_order_line_rec.ship_by_date IS NULL) THEN
6558: p_x_osp_order_line_rec.ship_by_date := l_osp_order_line_rec.ship_by_date;

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

6555: p_x_osp_order_line_rec.need_by_date := null;
6556: END IF;
6557: IF (p_x_osp_order_line_rec.ship_by_date IS NULL) THEN
6558: p_x_osp_order_line_rec.ship_by_date := l_osp_order_line_rec.ship_by_date;
6559: ELSIF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
6560: p_x_osp_order_line_rec.ship_by_date := null;
6561: END IF;
6562: IF (p_x_osp_order_line_rec.service_item_id IS NULL) THEN
6563: p_x_osp_order_line_rec.service_item_id := l_osp_order_line_rec.service_item_id;

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

6560: p_x_osp_order_line_rec.ship_by_date := null;
6561: END IF;
6562: IF (p_x_osp_order_line_rec.service_item_id IS NULL) THEN
6563: p_x_osp_order_line_rec.service_item_id := l_osp_order_line_rec.service_item_id;
6564: ELSIF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
6565: p_x_osp_order_line_rec.service_item_id := null;
6566: END IF;
6567: IF (p_x_osp_order_line_rec.service_item_number IS NULL) THEN
6568: p_x_osp_order_line_rec.service_item_number := l_osp_order_line_rec.service_item_number;

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

6565: p_x_osp_order_line_rec.service_item_id := null;
6566: END IF;
6567: IF (p_x_osp_order_line_rec.service_item_number IS NULL) THEN
6568: p_x_osp_order_line_rec.service_item_number := l_osp_order_line_rec.service_item_number;
6569: ELSIF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
6570: p_x_osp_order_line_rec.service_item_number := null;
6571: END IF;
6572: IF (p_x_osp_order_line_rec.service_item_description IS NULL) THEN
6573: p_x_osp_order_line_rec.service_item_description := l_osp_order_line_rec.service_item_description;

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

6570: p_x_osp_order_line_rec.service_item_number := null;
6571: END IF;
6572: IF (p_x_osp_order_line_rec.service_item_description IS NULL) THEN
6573: p_x_osp_order_line_rec.service_item_description := l_osp_order_line_rec.service_item_description;
6574: ELSIF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
6575: p_x_osp_order_line_rec.service_item_description := null;
6576: END IF;
6577: IF (p_x_osp_order_line_rec.service_item_uom_code IS NULL) THEN
6578: p_x_osp_order_line_rec.service_item_uom_code := l_osp_order_line_rec.service_item_uom_code;

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

6575: p_x_osp_order_line_rec.service_item_description := null;
6576: END IF;
6577: IF (p_x_osp_order_line_rec.service_item_uom_code IS NULL) THEN
6578: p_x_osp_order_line_rec.service_item_uom_code := l_osp_order_line_rec.service_item_uom_code;
6579: ELSIF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
6580: p_x_osp_order_line_rec.service_item_uom_code := null;
6581: END IF;
6582: IF (p_x_osp_order_line_rec.quantity IS NULL) THEN
6583: p_x_osp_order_line_rec.quantity := l_osp_order_line_rec.quantity;

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

6580: p_x_osp_order_line_rec.service_item_uom_code := null;
6581: END IF;
6582: IF (p_x_osp_order_line_rec.quantity IS NULL) THEN
6583: p_x_osp_order_line_rec.quantity := l_osp_order_line_rec.quantity;
6584: ELSIF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
6585: p_x_osp_order_line_rec.quantity := null;
6586: END IF;
6587: IF (p_x_osp_order_line_rec.po_line_type_id IS NULL) THEN
6588: p_x_osp_order_line_rec.po_line_type_id := l_osp_order_line_rec.po_line_type_id;

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

6585: p_x_osp_order_line_rec.quantity := null;
6586: END IF;
6587: IF (p_x_osp_order_line_rec.po_line_type_id IS NULL) THEN
6588: p_x_osp_order_line_rec.po_line_type_id := l_osp_order_line_rec.po_line_type_id;
6589: ELSIF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
6590: p_x_osp_order_line_rec.po_line_type_id := null;
6591: END IF;
6592: IF (p_x_osp_order_line_rec.po_line_id IS NULL) THEN
6593: p_x_osp_order_line_rec.po_line_id := l_osp_order_line_rec.po_line_id;

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

6590: p_x_osp_order_line_rec.po_line_type_id := null;
6591: END IF;
6592: IF (p_x_osp_order_line_rec.po_line_id IS NULL) THEN
6593: p_x_osp_order_line_rec.po_line_id := l_osp_order_line_rec.po_line_id;
6594: ELSIF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
6595: p_x_osp_order_line_rec.po_line_id := null;
6596: END IF;
6597: IF (p_x_osp_order_line_rec.oe_ship_line_id IS NULL) THEN
6598: p_x_osp_order_line_rec.oe_ship_line_id := l_osp_order_line_rec.oe_ship_line_id;

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

6595: p_x_osp_order_line_rec.po_line_id := null;
6596: END IF;
6597: IF (p_x_osp_order_line_rec.oe_ship_line_id IS NULL) THEN
6598: p_x_osp_order_line_rec.oe_ship_line_id := l_osp_order_line_rec.oe_ship_line_id;
6599: ELSIF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
6600: p_x_osp_order_line_rec.oe_ship_line_id := null;
6601: END IF;
6602: IF (p_x_osp_order_line_rec.oe_return_line_id IS NULL) THEN
6603: p_x_osp_order_line_rec.oe_return_line_id := l_osp_order_line_rec.oe_return_line_id;

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

6600: p_x_osp_order_line_rec.oe_ship_line_id := null;
6601: END IF;
6602: IF (p_x_osp_order_line_rec.oe_return_line_id IS NULL) THEN
6603: p_x_osp_order_line_rec.oe_return_line_id := l_osp_order_line_rec.oe_return_line_id;
6604: ELSIF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
6605: p_x_osp_order_line_rec.oe_return_line_id := null;
6606: END IF;
6607: IF (p_x_osp_order_line_rec.workorder_id IS NULL) THEN
6608: p_x_osp_order_line_rec.workorder_id := l_osp_order_line_rec.workorder_id;

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

6605: p_x_osp_order_line_rec.oe_return_line_id := null;
6606: END IF;
6607: IF (p_x_osp_order_line_rec.workorder_id IS NULL) THEN
6608: p_x_osp_order_line_rec.workorder_id := l_osp_order_line_rec.workorder_id;
6609: ELSIF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
6610: p_x_osp_order_line_rec.workorder_id := null;
6611: END IF;
6612: IF (p_x_osp_order_line_rec.job_number IS NULL) THEN
6613: p_x_osp_order_line_rec.job_number := l_osp_order_line_rec.job_number;

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

6610: p_x_osp_order_line_rec.workorder_id := null;
6611: END IF;
6612: IF (p_x_osp_order_line_rec.job_number IS NULL) THEN
6613: p_x_osp_order_line_rec.job_number := l_osp_order_line_rec.job_number;
6614: ELSIF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
6615: p_x_osp_order_line_rec.job_number := null;
6616: END IF;
6617: IF (p_x_osp_order_line_rec.exchange_instance_id IS NULL) THEN
6618: p_x_osp_order_line_rec.exchange_instance_id := l_osp_order_line_rec.exchange_instance_id;

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

6615: p_x_osp_order_line_rec.job_number := null;
6616: END IF;
6617: IF (p_x_osp_order_line_rec.exchange_instance_id IS NULL) THEN
6618: p_x_osp_order_line_rec.exchange_instance_id := l_osp_order_line_rec.exchange_instance_id;
6619: ELSIF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
6620: p_x_osp_order_line_rec.exchange_instance_id := null;
6621: END IF;
6622: IF (p_x_osp_order_line_rec.exchange_instance_number IS NULL) THEN
6623: p_x_osp_order_line_rec.exchange_instance_number := l_osp_order_line_rec.exchange_instance_number;

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

6620: p_x_osp_order_line_rec.exchange_instance_id := null;
6621: END IF;
6622: IF (p_x_osp_order_line_rec.exchange_instance_number IS NULL) THEN
6623: p_x_osp_order_line_rec.exchange_instance_number := l_osp_order_line_rec.exchange_instance_number;
6624: ELSIF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
6625: p_x_osp_order_line_rec.exchange_instance_number := null;
6626: END IF;
6627: IF (p_x_osp_order_line_rec.inventory_item_id IS NULL) THEN
6628: p_x_osp_order_line_rec.inventory_item_id := l_osp_order_line_rec.inventory_item_id;

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

6625: p_x_osp_order_line_rec.exchange_instance_number := null;
6626: END IF;
6627: IF (p_x_osp_order_line_rec.inventory_item_id IS NULL) THEN
6628: p_x_osp_order_line_rec.inventory_item_id := l_osp_order_line_rec.inventory_item_id;
6629: ELSIF(p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
6630: p_x_osp_order_line_rec.inventory_item_id := null;
6631: END IF;
6632: IF (p_x_osp_order_line_rec.inventory_org_id IS NULL) THEN
6633: p_x_osp_order_line_rec.inventory_org_id := l_osp_order_line_rec.inventory_org_id;

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

6630: p_x_osp_order_line_rec.inventory_item_id := null;
6631: END IF;
6632: IF (p_x_osp_order_line_rec.inventory_org_id IS NULL) THEN
6633: p_x_osp_order_line_rec.inventory_org_id := l_osp_order_line_rec.inventory_org_id;
6634: ELSIF(p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
6635: p_x_osp_order_line_rec.inventory_org_id := null;
6636: END IF;
6637: IF (p_x_osp_order_line_rec.item_number IS NULL) THEN
6638: p_x_osp_order_line_rec.item_number := l_osp_order_line_rec.item_number;

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

6635: p_x_osp_order_line_rec.inventory_org_id := null;
6636: END IF;
6637: IF (p_x_osp_order_line_rec.item_number IS NULL) THEN
6638: p_x_osp_order_line_rec.item_number := l_osp_order_line_rec.item_number;
6639: ELSIF(p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
6640: p_x_osp_order_line_rec.item_number := null;
6641: END IF;
6642: IF (p_x_osp_order_line_rec.inventory_item_uom IS NULL) THEN
6643: p_x_osp_order_line_rec.inventory_item_uom := l_osp_order_line_rec.inventory_item_uom;

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

6640: p_x_osp_order_line_rec.item_number := null;
6641: END IF;
6642: IF (p_x_osp_order_line_rec.inventory_item_uom IS NULL) THEN
6643: p_x_osp_order_line_rec.inventory_item_uom := l_osp_order_line_rec.inventory_item_uom;
6644: ELSIF(p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
6645: p_x_osp_order_line_rec.inventory_item_uom := null;
6646: END IF;
6647: IF (p_x_osp_order_line_rec.inventory_item_quantity IS NULL) THEN
6648: p_x_osp_order_line_rec.inventory_item_quantity := l_osp_order_line_rec.inventory_item_quantity;

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

6645: p_x_osp_order_line_rec.inventory_item_uom := null;
6646: END IF;
6647: IF (p_x_osp_order_line_rec.inventory_item_quantity IS NULL) THEN
6648: p_x_osp_order_line_rec.inventory_item_quantity := l_osp_order_line_rec.inventory_item_quantity;
6649: ELSIF(p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
6650: p_x_osp_order_line_rec.inventory_item_quantity := null;
6651: END IF;
6652: IF (p_x_osp_order_line_rec.sub_inventory IS NULL) THEN
6653: p_x_osp_order_line_rec.sub_inventory := l_osp_order_line_rec.sub_inventory;

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

6650: p_x_osp_order_line_rec.inventory_item_quantity := null;
6651: END IF;
6652: IF (p_x_osp_order_line_rec.sub_inventory IS NULL) THEN
6653: p_x_osp_order_line_rec.sub_inventory := l_osp_order_line_rec.sub_inventory;
6654: ELSIF(p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
6655: p_x_osp_order_line_rec.sub_inventory := null;
6656: END IF;
6657: IF (p_x_osp_order_line_rec.lot_number IS NULL) THEN
6658: p_x_osp_order_line_rec.lot_number := l_osp_order_line_rec.lot_number;

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

6655: p_x_osp_order_line_rec.sub_inventory := null;
6656: END IF;
6657: IF (p_x_osp_order_line_rec.lot_number IS NULL) THEN
6658: p_x_osp_order_line_rec.lot_number := l_osp_order_line_rec.lot_number;
6659: ELSIF(p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
6660: p_x_osp_order_line_rec.lot_number := null;
6661: END IF;
6662: IF (p_x_osp_order_line_rec.serial_number IS NULL) THEN
6663: p_x_osp_order_line_rec.serial_number := l_osp_order_line_rec.serial_number;

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

6660: p_x_osp_order_line_rec.lot_number := null;
6661: END IF;
6662: IF (p_x_osp_order_line_rec.serial_number IS NULL) THEN
6663: p_x_osp_order_line_rec.serial_number := l_osp_order_line_rec.serial_number;
6664: ELSIF(p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
6665: p_x_osp_order_line_rec.serial_number := null;
6666: END IF;
6667:
6668: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236

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

6667:
6668: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
6669: IF (p_x_osp_order_line_rec.po_req_line_id IS NULL) THEN
6670: p_x_osp_order_line_rec.po_req_line_id := l_osp_order_line_rec.po_req_line_id;
6671: ELSIF(p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN
6672: p_x_osp_order_line_rec.po_req_line_id := null;
6673: END IF;
6674: -- jaramana End
6675:

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

6674: -- jaramana End
6675:
6676: IF (p_x_osp_order_line_rec.attribute_category IS NULL) THEN
6677: p_x_osp_order_line_rec.attribute_category := l_osp_order_line_rec.attribute_category;
6678: ELSIF(p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
6679: p_x_osp_order_line_rec.attribute_category := null;
6680: END IF;
6681: IF (p_x_osp_order_line_rec.attribute1 IS NULL) THEN
6682: p_x_osp_order_line_rec.attribute1 := l_osp_order_line_rec.attribute1;

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

6679: p_x_osp_order_line_rec.attribute_category := null;
6680: END IF;
6681: IF (p_x_osp_order_line_rec.attribute1 IS NULL) THEN
6682: p_x_osp_order_line_rec.attribute1 := l_osp_order_line_rec.attribute1;
6683: ELSIF(p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
6684: p_x_osp_order_line_rec.attribute1 := null;
6685: END IF;
6686: IF (p_x_osp_order_line_rec.attribute2 IS NULL) THEN
6687: p_x_osp_order_line_rec.attribute2 := l_osp_order_line_rec.attribute2;

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

6684: p_x_osp_order_line_rec.attribute1 := null;
6685: END IF;
6686: IF (p_x_osp_order_line_rec.attribute2 IS NULL) THEN
6687: p_x_osp_order_line_rec.attribute2 := l_osp_order_line_rec.attribute2;
6688: ELSIF(p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
6689: p_x_osp_order_line_rec.attribute2 := null;
6690: END IF;
6691: IF (p_x_osp_order_line_rec.attribute3 IS NULL) THEN
6692: p_x_osp_order_line_rec.attribute3 := l_osp_order_line_rec.attribute3;

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

6689: p_x_osp_order_line_rec.attribute2 := null;
6690: END IF;
6691: IF (p_x_osp_order_line_rec.attribute3 IS NULL) THEN
6692: p_x_osp_order_line_rec.attribute3 := l_osp_order_line_rec.attribute3;
6693: ELSIF(p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
6694: p_x_osp_order_line_rec.attribute3 := null;
6695: END IF;
6696: IF (p_x_osp_order_line_rec.attribute4 IS NULL) THEN
6697: p_x_osp_order_line_rec.attribute4 := l_osp_order_line_rec.attribute4;

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

6694: p_x_osp_order_line_rec.attribute3 := null;
6695: END IF;
6696: IF (p_x_osp_order_line_rec.attribute4 IS NULL) THEN
6697: p_x_osp_order_line_rec.attribute4 := l_osp_order_line_rec.attribute4;
6698: ELSIF(p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
6699: p_x_osp_order_line_rec.attribute4 := null;
6700: END IF;
6701: IF (p_x_osp_order_line_rec.attribute5 IS NULL) THEN
6702: p_x_osp_order_line_rec.attribute5 := l_osp_order_line_rec.attribute5;

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

6699: p_x_osp_order_line_rec.attribute4 := null;
6700: END IF;
6701: IF (p_x_osp_order_line_rec.attribute5 IS NULL) THEN
6702: p_x_osp_order_line_rec.attribute5 := l_osp_order_line_rec.attribute5;
6703: ELSIF(p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
6704: p_x_osp_order_line_rec.attribute5 := null;
6705: END IF;
6706: IF (p_x_osp_order_line_rec.attribute6 IS NULL) THEN
6707: p_x_osp_order_line_rec.attribute6 := l_osp_order_line_rec.attribute6;

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

6704: p_x_osp_order_line_rec.attribute5 := null;
6705: END IF;
6706: IF (p_x_osp_order_line_rec.attribute6 IS NULL) THEN
6707: p_x_osp_order_line_rec.attribute6 := l_osp_order_line_rec.attribute6;
6708: ELSIF(p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
6709: p_x_osp_order_line_rec.attribute6 := null;
6710: END IF;
6711: IF (p_x_osp_order_line_rec.attribute7 IS NULL) THEN
6712: p_x_osp_order_line_rec.attribute7 := l_osp_order_line_rec.attribute7;

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

6709: p_x_osp_order_line_rec.attribute6 := null;
6710: END IF;
6711: IF (p_x_osp_order_line_rec.attribute7 IS NULL) THEN
6712: p_x_osp_order_line_rec.attribute7 := l_osp_order_line_rec.attribute7;
6713: ELSIF(p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
6714: p_x_osp_order_line_rec.attribute7 := null;
6715: END IF;
6716: IF (p_x_osp_order_line_rec.attribute8 IS NULL) THEN
6717: p_x_osp_order_line_rec.attribute8 := l_osp_order_line_rec.attribute8;

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

6714: p_x_osp_order_line_rec.attribute7 := null;
6715: END IF;
6716: IF (p_x_osp_order_line_rec.attribute8 IS NULL) THEN
6717: p_x_osp_order_line_rec.attribute8 := l_osp_order_line_rec.attribute8;
6718: ELSIF(p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
6719: p_x_osp_order_line_rec.attribute8 := null;
6720: END IF;
6721: IF (p_x_osp_order_line_rec.attribute9 IS NULL) THEN
6722: p_x_osp_order_line_rec.attribute9 := l_osp_order_line_rec.attribute9;

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

6719: p_x_osp_order_line_rec.attribute8 := null;
6720: END IF;
6721: IF (p_x_osp_order_line_rec.attribute9 IS NULL) THEN
6722: p_x_osp_order_line_rec.attribute9 := l_osp_order_line_rec.attribute9;
6723: ELSIF(p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
6724: p_x_osp_order_line_rec.attribute9 := null;
6725: END IF;
6726: IF (p_x_osp_order_line_rec.attribute10 IS NULL) THEN
6727: p_x_osp_order_line_rec.attribute10 := l_osp_order_line_rec.attribute10;

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

6724: p_x_osp_order_line_rec.attribute9 := null;
6725: END IF;
6726: IF (p_x_osp_order_line_rec.attribute10 IS NULL) THEN
6727: p_x_osp_order_line_rec.attribute10 := l_osp_order_line_rec.attribute10;
6728: ELSIF(p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
6729: p_x_osp_order_line_rec.attribute10 := null;
6730: END IF;
6731: IF (p_x_osp_order_line_rec.attribute11 IS NULL) THEN
6732: p_x_osp_order_line_rec.attribute11 := l_osp_order_line_rec.attribute11;

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

6729: p_x_osp_order_line_rec.attribute10 := null;
6730: END IF;
6731: IF (p_x_osp_order_line_rec.attribute11 IS NULL) THEN
6732: p_x_osp_order_line_rec.attribute11 := l_osp_order_line_rec.attribute11;
6733: ELSIF(p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
6734: p_x_osp_order_line_rec.attribute11 := null;
6735: END IF;
6736: IF (p_x_osp_order_line_rec.attribute12 IS NULL) THEN
6737: p_x_osp_order_line_rec.attribute12 := l_osp_order_line_rec.attribute12;

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

6734: p_x_osp_order_line_rec.attribute11 := null;
6735: END IF;
6736: IF (p_x_osp_order_line_rec.attribute12 IS NULL) THEN
6737: p_x_osp_order_line_rec.attribute12 := l_osp_order_line_rec.attribute12;
6738: ELSIF(p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
6739: p_x_osp_order_line_rec.attribute12 := null;
6740: END IF;
6741: IF (p_x_osp_order_line_rec.attribute13 IS NULL) THEN
6742: p_x_osp_order_line_rec.attribute13 := l_osp_order_line_rec.attribute13;

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

6739: p_x_osp_order_line_rec.attribute12 := null;
6740: END IF;
6741: IF (p_x_osp_order_line_rec.attribute13 IS NULL) THEN
6742: p_x_osp_order_line_rec.attribute13 := l_osp_order_line_rec.attribute13;
6743: ELSIF(p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
6744: p_x_osp_order_line_rec.attribute13 := null;
6745: END IF;
6746: IF (p_x_osp_order_line_rec.attribute14 IS NULL) THEN
6747: p_x_osp_order_line_rec.attribute14 := l_osp_order_line_rec.attribute14;

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

6744: p_x_osp_order_line_rec.attribute13 := null;
6745: END IF;
6746: IF (p_x_osp_order_line_rec.attribute14 IS NULL) THEN
6747: p_x_osp_order_line_rec.attribute14 := l_osp_order_line_rec.attribute14;
6748: ELSIF(p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
6749: p_x_osp_order_line_rec.attribute14 := null;
6750: END IF;
6751: IF (p_x_osp_order_line_rec.attribute15 IS NULL) THEN
6752: p_x_osp_order_line_rec.attribute15 := l_osp_order_line_rec.attribute15;

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

6749: p_x_osp_order_line_rec.attribute14 := null;
6750: END IF;
6751: IF (p_x_osp_order_line_rec.attribute15 IS NULL) THEN
6752: p_x_osp_order_line_rec.attribute15 := l_osp_order_line_rec.attribute15;
6753: ELSIF(p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
6754: p_x_osp_order_line_rec.attribute15 := null;
6755: END IF;
6756: END IF;
6757: CLOSE osp_order_lines_csr;

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

6755: END IF;
6756: END IF;
6757: CLOSE osp_order_lines_csr;
6758: ELSIF (p_x_osp_order_line_rec.operation_flag = G_OP_CREATE) THEN
6759: IF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN
6760: p_x_osp_order_line_rec.osp_order_id := null;
6761: END IF;
6762: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
6763: p_x_osp_order_line_rec.osp_line_number := null;

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

6758: ELSIF (p_x_osp_order_line_rec.operation_flag = G_OP_CREATE) THEN
6759: IF(p_x_osp_order_line_rec.osp_order_id = FND_API.G_MISS_NUM) THEN
6760: p_x_osp_order_line_rec.osp_order_id := null;
6761: END IF;
6762: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
6763: p_x_osp_order_line_rec.osp_line_number := null;
6764: END IF;
6765: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
6766: p_x_osp_order_line_rec.status_code := null;

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

6761: END IF;
6762: IF(p_x_osp_order_line_rec.osp_line_number = FND_API.G_MISS_NUM) THEN
6763: p_x_osp_order_line_rec.osp_line_number := null;
6764: END IF;
6765: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
6766: p_x_osp_order_line_rec.status_code := null;
6767: END IF;
6768: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
6769: p_x_osp_order_line_rec.need_by_date := null;

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

6764: END IF;
6765: IF(p_x_osp_order_line_rec.status_code = FND_API.G_MISS_CHAR) THEN
6766: p_x_osp_order_line_rec.status_code := null;
6767: END IF;
6768: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
6769: p_x_osp_order_line_rec.need_by_date := null;
6770: END IF;
6771: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
6772: p_x_osp_order_line_rec.ship_by_date := null;

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

6767: END IF;
6768: IF(p_x_osp_order_line_rec.need_by_date = FND_API.G_MISS_DATE) THEN
6769: p_x_osp_order_line_rec.need_by_date := null;
6770: END IF;
6771: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
6772: p_x_osp_order_line_rec.ship_by_date := null;
6773: END IF;
6774: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
6775: p_x_osp_order_line_rec.service_item_id := null;

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

6770: END IF;
6771: IF(p_x_osp_order_line_rec.ship_by_date = FND_API.G_MISS_DATE) THEN
6772: p_x_osp_order_line_rec.ship_by_date := null;
6773: END IF;
6774: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
6775: p_x_osp_order_line_rec.service_item_id := null;
6776: END IF;
6777: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
6778: p_x_osp_order_line_rec.service_item_number := null;

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

6773: END IF;
6774: IF(p_x_osp_order_line_rec.service_item_id = FND_API.G_MISS_NUM) THEN
6775: p_x_osp_order_line_rec.service_item_id := null;
6776: END IF;
6777: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
6778: p_x_osp_order_line_rec.service_item_number := null;
6779: END IF;
6780: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
6781: p_x_osp_order_line_rec.service_item_description := null;

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

6776: END IF;
6777: IF(p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
6778: p_x_osp_order_line_rec.service_item_number := null;
6779: END IF;
6780: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
6781: p_x_osp_order_line_rec.service_item_description := null;
6782: END IF;
6783: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
6784: p_x_osp_order_line_rec.service_item_uom_code := null;

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

6779: END IF;
6780: IF(p_x_osp_order_line_rec.service_item_description = FND_API.G_MISS_CHAR) THEN
6781: p_x_osp_order_line_rec.service_item_description := null;
6782: END IF;
6783: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
6784: p_x_osp_order_line_rec.service_item_uom_code := null;
6785: END IF;
6786: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
6787: p_x_osp_order_line_rec.quantity := null;

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

6782: END IF;
6783: IF(p_x_osp_order_line_rec.service_item_uom_code = FND_API.G_MISS_CHAR) THEN
6784: p_x_osp_order_line_rec.service_item_uom_code := null;
6785: END IF;
6786: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
6787: p_x_osp_order_line_rec.quantity := null;
6788: END IF;
6789: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
6790: p_x_osp_order_line_rec.po_line_type_id := null;

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

6785: END IF;
6786: IF(p_x_osp_order_line_rec.quantity = FND_API.G_MISS_NUM) THEN
6787: p_x_osp_order_line_rec.quantity := null;
6788: END IF;
6789: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
6790: p_x_osp_order_line_rec.po_line_type_id := null;
6791: END IF;
6792: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
6793: p_x_osp_order_line_rec.po_line_id := null;

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

6788: END IF;
6789: IF(p_x_osp_order_line_rec.po_line_type_id = FND_API.G_MISS_NUM) THEN
6790: p_x_osp_order_line_rec.po_line_type_id := null;
6791: END IF;
6792: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
6793: p_x_osp_order_line_rec.po_line_id := null;
6794: END IF;
6795: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
6796: p_x_osp_order_line_rec.oe_ship_line_id := null;

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

6791: END IF;
6792: IF(p_x_osp_order_line_rec.po_line_id = FND_API.G_MISS_NUM) THEN
6793: p_x_osp_order_line_rec.po_line_id := null;
6794: END IF;
6795: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
6796: p_x_osp_order_line_rec.oe_ship_line_id := null;
6797: END IF;
6798: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
6799: p_x_osp_order_line_rec.oe_return_line_id := null;

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

6794: END IF;
6795: IF(p_x_osp_order_line_rec.oe_ship_line_id = FND_API.G_MISS_NUM) THEN
6796: p_x_osp_order_line_rec.oe_ship_line_id := null;
6797: END IF;
6798: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
6799: p_x_osp_order_line_rec.oe_return_line_id := null;
6800: END IF;
6801: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
6802: p_x_osp_order_line_rec.workorder_id := null;

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

6797: END IF;
6798: IF(p_x_osp_order_line_rec.oe_return_line_id = FND_API.G_MISS_NUM) THEN
6799: p_x_osp_order_line_rec.oe_return_line_id := null;
6800: END IF;
6801: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
6802: p_x_osp_order_line_rec.workorder_id := null;
6803: END IF;
6804: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
6805: p_x_osp_order_line_rec.job_number := null;

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

6800: END IF;
6801: IF(p_x_osp_order_line_rec.workorder_id = FND_API.G_MISS_NUM) THEN
6802: p_x_osp_order_line_rec.workorder_id := null;
6803: END IF;
6804: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
6805: p_x_osp_order_line_rec.job_number := null;
6806: END IF;
6807: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
6808: p_x_osp_order_line_rec.exchange_instance_id := null;

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

6803: END IF;
6804: IF(p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
6805: p_x_osp_order_line_rec.job_number := null;
6806: END IF;
6807: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
6808: p_x_osp_order_line_rec.exchange_instance_id := null;
6809: END IF;
6810: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
6811: p_x_osp_order_line_rec.exchange_instance_number := null;

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

6806: END IF;
6807: IF(p_x_osp_order_line_rec.exchange_instance_id = FND_API.G_MISS_NUM) THEN
6808: p_x_osp_order_line_rec.exchange_instance_id := null;
6809: END IF;
6810: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
6811: p_x_osp_order_line_rec.exchange_instance_number := null;
6812: END IF;
6813: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
6814: p_x_osp_order_line_rec.inventory_item_id := null;

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

6809: END IF;
6810: IF(p_x_osp_order_line_rec.exchange_instance_number = FND_API.G_MISS_CHAR) THEN
6811: p_x_osp_order_line_rec.exchange_instance_number := null;
6812: END IF;
6813: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
6814: p_x_osp_order_line_rec.inventory_item_id := null;
6815: END IF;
6816: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
6817: p_x_osp_order_line_rec.inventory_org_id := null;

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

6812: END IF;
6813: IF (p_x_osp_order_line_rec.inventory_item_id = FND_API.G_MISS_NUM) THEN
6814: p_x_osp_order_line_rec.inventory_item_id := null;
6815: END IF;
6816: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
6817: p_x_osp_order_line_rec.inventory_org_id := null;
6818: END IF;
6819: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
6820: p_x_osp_order_line_rec.item_number := null;

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

6815: END IF;
6816: IF (p_x_osp_order_line_rec.inventory_org_id = FND_API.G_MISS_NUM) THEN
6817: p_x_osp_order_line_rec.inventory_org_id := null;
6818: END IF;
6819: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
6820: p_x_osp_order_line_rec.item_number := null;
6821: END IF;
6822: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
6823: p_x_osp_order_line_rec.inventory_item_uom := null;

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

6818: END IF;
6819: IF (p_x_osp_order_line_rec.item_number = FND_API.G_MISS_CHAR) THEN
6820: p_x_osp_order_line_rec.item_number := null;
6821: END IF;
6822: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
6823: p_x_osp_order_line_rec.inventory_item_uom := null;
6824: END IF;
6825: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
6826: p_x_osp_order_line_rec.inventory_item_quantity := null;

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

6821: END IF;
6822: IF (p_x_osp_order_line_rec.inventory_item_uom = FND_API.G_MISS_CHAR) THEN
6823: p_x_osp_order_line_rec.inventory_item_uom := null;
6824: END IF;
6825: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
6826: p_x_osp_order_line_rec.inventory_item_quantity := null;
6827: END IF;
6828: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
6829: p_x_osp_order_line_rec.sub_inventory := null;

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

6824: END IF;
6825: IF (p_x_osp_order_line_rec.inventory_item_quantity = FND_API.G_MISS_NUM) THEN
6826: p_x_osp_order_line_rec.inventory_item_quantity := null;
6827: END IF;
6828: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
6829: p_x_osp_order_line_rec.sub_inventory := null;
6830: END IF;
6831: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
6832: p_x_osp_order_line_rec.lot_number := null;

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

6827: END IF;
6828: IF (p_x_osp_order_line_rec.sub_inventory = FND_API.G_MISS_CHAR) THEN
6829: p_x_osp_order_line_rec.sub_inventory := null;
6830: END IF;
6831: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
6832: p_x_osp_order_line_rec.lot_number := null;
6833: END IF;
6834: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
6835: p_x_osp_order_line_rec.serial_number := null;

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

6830: END IF;
6831: IF (p_x_osp_order_line_rec.lot_number = FND_API.G_MISS_CHAR) THEN
6832: p_x_osp_order_line_rec.lot_number := null;
6833: END IF;
6834: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
6835: p_x_osp_order_line_rec.serial_number := null;
6836: END IF;
6837: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
6838: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN

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

6834: IF (p_x_osp_order_line_rec.serial_number = FND_API.G_MISS_CHAR) THEN
6835: p_x_osp_order_line_rec.serial_number := null;
6836: END IF;
6837: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
6838: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN
6839: p_x_osp_order_line_rec.po_req_line_id := null;
6840: END IF;
6841: -- jaramana End
6842: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN

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

6838: IF (p_x_osp_order_line_rec.po_req_line_id = FND_API.G_MISS_NUM) THEN
6839: p_x_osp_order_line_rec.po_req_line_id := null;
6840: END IF;
6841: -- jaramana End
6842: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
6843: p_x_osp_order_line_rec.attribute_category := null;
6844: END IF;
6845: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
6846: p_x_osp_order_line_rec.attribute1 := null;

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

6841: -- jaramana End
6842: IF (p_x_osp_order_line_rec.attribute_category = FND_API.G_MISS_CHAR) THEN
6843: p_x_osp_order_line_rec.attribute_category := null;
6844: END IF;
6845: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
6846: p_x_osp_order_line_rec.attribute1 := null;
6847: END IF;
6848: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
6849: p_x_osp_order_line_rec.attribute2 := null;

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

6844: END IF;
6845: IF (p_x_osp_order_line_rec.attribute1 = FND_API.G_MISS_CHAR) THEN
6846: p_x_osp_order_line_rec.attribute1 := null;
6847: END IF;
6848: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
6849: p_x_osp_order_line_rec.attribute2 := null;
6850: END IF;
6851: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
6852: p_x_osp_order_line_rec.attribute3 := null;

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

6847: END IF;
6848: IF (p_x_osp_order_line_rec.attribute2 = FND_API.G_MISS_CHAR) THEN
6849: p_x_osp_order_line_rec.attribute2 := null;
6850: END IF;
6851: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
6852: p_x_osp_order_line_rec.attribute3 := null;
6853: END IF;
6854: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
6855: p_x_osp_order_line_rec.attribute4 := null;

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

6850: END IF;
6851: IF (p_x_osp_order_line_rec.attribute3 = FND_API.G_MISS_CHAR) THEN
6852: p_x_osp_order_line_rec.attribute3 := null;
6853: END IF;
6854: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
6855: p_x_osp_order_line_rec.attribute4 := null;
6856: END IF;
6857: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
6858: p_x_osp_order_line_rec.attribute5 := null;

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

6853: END IF;
6854: IF (p_x_osp_order_line_rec.attribute4 = FND_API.G_MISS_CHAR) THEN
6855: p_x_osp_order_line_rec.attribute4 := null;
6856: END IF;
6857: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
6858: p_x_osp_order_line_rec.attribute5 := null;
6859: END IF;
6860: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
6861: p_x_osp_order_line_rec.attribute6 := null;

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

6856: END IF;
6857: IF (p_x_osp_order_line_rec.attribute5 = FND_API.G_MISS_CHAR) THEN
6858: p_x_osp_order_line_rec.attribute5 := null;
6859: END IF;
6860: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
6861: p_x_osp_order_line_rec.attribute6 := null;
6862: END IF;
6863: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
6864: p_x_osp_order_line_rec.attribute7 := null;

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

6859: END IF;
6860: IF (p_x_osp_order_line_rec.attribute6 = FND_API.G_MISS_CHAR) THEN
6861: p_x_osp_order_line_rec.attribute6 := null;
6862: END IF;
6863: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
6864: p_x_osp_order_line_rec.attribute7 := null;
6865: END IF;
6866: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
6867: p_x_osp_order_line_rec.attribute8 := null;

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

6862: END IF;
6863: IF (p_x_osp_order_line_rec.attribute7 = FND_API.G_MISS_CHAR) THEN
6864: p_x_osp_order_line_rec.attribute7 := null;
6865: END IF;
6866: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
6867: p_x_osp_order_line_rec.attribute8 := null;
6868: END IF;
6869: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
6870: p_x_osp_order_line_rec.attribute9 := null;

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

6865: END IF;
6866: IF (p_x_osp_order_line_rec.attribute8 = FND_API.G_MISS_CHAR) THEN
6867: p_x_osp_order_line_rec.attribute8 := null;
6868: END IF;
6869: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
6870: p_x_osp_order_line_rec.attribute9 := null;
6871: END IF;
6872: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
6873: p_x_osp_order_line_rec.attribute10 := null;

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

6868: END IF;
6869: IF (p_x_osp_order_line_rec.attribute9 = FND_API.G_MISS_CHAR) THEN
6870: p_x_osp_order_line_rec.attribute9 := null;
6871: END IF;
6872: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
6873: p_x_osp_order_line_rec.attribute10 := null;
6874: END IF;
6875: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
6876: p_x_osp_order_line_rec.attribute11 := null;

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

6871: END IF;
6872: IF (p_x_osp_order_line_rec.attribute10 = FND_API.G_MISS_CHAR) THEN
6873: p_x_osp_order_line_rec.attribute10 := null;
6874: END IF;
6875: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
6876: p_x_osp_order_line_rec.attribute11 := null;
6877: END IF;
6878: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
6879: p_x_osp_order_line_rec.attribute12 := null;

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

6874: END IF;
6875: IF (p_x_osp_order_line_rec.attribute11 = FND_API.G_MISS_CHAR) THEN
6876: p_x_osp_order_line_rec.attribute11 := null;
6877: END IF;
6878: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
6879: p_x_osp_order_line_rec.attribute12 := null;
6880: END IF;
6881: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
6882: p_x_osp_order_line_rec.attribute13 := null;

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

6877: END IF;
6878: IF (p_x_osp_order_line_rec.attribute12 = FND_API.G_MISS_CHAR) THEN
6879: p_x_osp_order_line_rec.attribute12 := null;
6880: END IF;
6881: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
6882: p_x_osp_order_line_rec.attribute13 := null;
6883: END IF;
6884: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
6885: p_x_osp_order_line_rec.attribute14 := null;

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

6880: END IF;
6881: IF (p_x_osp_order_line_rec.attribute13 = FND_API.G_MISS_CHAR) THEN
6882: p_x_osp_order_line_rec.attribute13 := null;
6883: END IF;
6884: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
6885: p_x_osp_order_line_rec.attribute14 := null;
6886: END IF;
6887: IF (p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
6888: p_x_osp_order_line_rec.attribute15 := null;

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

6883: END IF;
6884: IF (p_x_osp_order_line_rec.attribute14 = FND_API.G_MISS_CHAR) THEN
6885: p_x_osp_order_line_rec.attribute14 := null;
6886: END IF;
6887: IF (p_x_osp_order_line_rec.attribute15 = FND_API.G_MISS_CHAR) THEN
6888: p_x_osp_order_line_rec.attribute15 := null;
6889: END IF;
6890: END IF;
6891: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

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

6959: IF(g_module_type = 'JSP') THEN
6960: -- service item number
6961: IF(p_x_osp_order_line_rec.service_item_number IS NULL) THEN
6962: p_x_osp_order_line_rec.service_item_id := NULL;
6963: ELSIF (p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
6964: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
6965: p_x_osp_order_line_rec.service_item_id := FND_API.G_MISS_NUM;
6966: ELSE
6967: p_x_osp_order_line_rec.service_item_id := NULL;

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

6961: IF(p_x_osp_order_line_rec.service_item_number IS NULL) THEN
6962: p_x_osp_order_line_rec.service_item_id := NULL;
6963: ELSIF (p_x_osp_order_line_rec.service_item_number = FND_API.G_MISS_CHAR) THEN
6964: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
6965: p_x_osp_order_line_rec.service_item_id := FND_API.G_MISS_NUM;
6966: ELSE
6967: p_x_osp_order_line_rec.service_item_id := NULL;
6968: END IF;
6969: END IF;

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

6969: END IF;
6970: -- job number and workorder_id
6971: IF(p_x_osp_order_line_rec.job_number IS NULL) THEN
6972: p_x_osp_order_line_rec.workorder_id := NULL;
6973: ELSIF (p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
6974: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
6975: p_x_osp_order_line_rec.workorder_id := FND_API.G_MISS_NUM;
6976: ELSE
6977: p_x_osp_order_line_rec.workorder_id := NULL;

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

6971: IF(p_x_osp_order_line_rec.job_number IS NULL) THEN
6972: p_x_osp_order_line_rec.workorder_id := NULL;
6973: ELSIF (p_x_osp_order_line_rec.job_number = FND_API.G_MISS_CHAR) THEN
6974: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
6975: p_x_osp_order_line_rec.workorder_id := FND_API.G_MISS_NUM;
6976: ELSE
6977: p_x_osp_order_line_rec.workorder_id := NULL;
6978: END IF;
6979: END IF;

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

6979: END IF;
6980: -- po_line_type_id
6981: IF(p_x_osp_order_line_rec.po_line_type IS NULL) THEN
6982: p_x_osp_order_line_rec.po_line_type_id := NULL;
6983: ELSIF (p_x_osp_order_line_rec.po_line_type = FND_API.G_MISS_CHAR) THEN
6984: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
6985: p_x_osp_order_line_rec.po_line_type_id := FND_API.G_MISS_NUM;
6986: ELSE
6987: p_x_osp_order_line_rec.po_line_type_id := NULL;

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

6981: IF(p_x_osp_order_line_rec.po_line_type IS NULL) THEN
6982: p_x_osp_order_line_rec.po_line_type_id := NULL;
6983: ELSIF (p_x_osp_order_line_rec.po_line_type = FND_API.G_MISS_CHAR) THEN
6984: IF(p_x_osp_order_line_rec.operation_flag <> G_OP_CREATE) THEN
6985: p_x_osp_order_line_rec.po_line_type_id := FND_API.G_MISS_NUM;
6986: ELSE
6987: p_x_osp_order_line_rec.po_line_type_id := NULL;
6988: END IF;
6989: END IF;

Line 6992: 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

6988: END IF;
6989: END IF;
6990: END IF;
6991: -- conversion of value to id for job number (to workorder_id)
6992: 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
6993: OPEN workorder_id_csr(p_x_osp_order_line_rec.job_number);
6994: FETCH workorder_id_csr INTO l_workorder_id;
6995: IF(workorder_id_csr%NOTFOUND) THEN
6996: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_JOB_NUM_INV');

Line 7005: 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

7001: END IF;
7002: CLOSE workorder_id_csr;
7003: END IF;
7004: -- conversion of value to id for service item number
7005: 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
7006: OPEN service_item_id_csr(p_x_osp_order_line_rec.service_item_number, p_x_osp_order_line_rec.inventory_org_id);
7007: FETCH service_item_id_csr INTO l_service_item_id;
7008: IF(service_item_id_csr%NOTFOUND) THEN
7009: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_SVC_ITEM_INV');

Line 7018: 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

7014: END IF;
7015: CLOSE service_item_id_csr;
7016: END IF;
7017: -- conversion of value to id for po_line_type (to po_line_type_id)
7018: 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
7019: OPEN po_line_type_id_csr(p_x_osp_order_line_rec.po_line_type);
7020: FETCH po_line_type_id_csr INTO l_po_line_type_id;
7021: IF(po_line_type_id_csr%NOTFOUND) THEN
7022: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_PO_LN_TYPE_INV');

Line 7031: 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

7027: END IF;
7028: CLOSE po_line_type_id_csr;
7029: END IF;
7030: -- conversion of value to id for exchange_instance_number (to exchange_instance_id)
7031: 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
7032: OPEN exchange_instance_id_csr(p_x_osp_order_line_rec.exchange_instance_number);
7033: FETCH exchange_instance_id_csr INTO l_exchange_instance_id;
7034: IF(exchange_instance_id_csr%NOTFOUND) THEN
7035: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_X_INST_NUM_INV');

Line 7073: 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

7069: CLOSE osp_order_line_on_csr;
7070: -- Added by jaramana on January 10, 2008 for the Requisition ER 6034236
7071: -- We are not planning to derive the OSP_ORDER_LINE_ID from PO_LINE_ID
7072: /*
7073: 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
7074: OPEN osp_order_line_po_csr(p_x_osp_order_line_rec.po_line_id );
7075: FETCH osp_order_line_po_csr INTO l_osp_order_line_id;
7076: IF(osp_order_line_po_csr%NOTFOUND) THEN
7077: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_PO_LINE_INV');

Line 7093: RAISE FND_API.G_EXC_ERROR;

7089: END IF;
7090: END IF;
7091: END IF;
7092: IF FND_MSG_PUB.count_msg > 0 THEN
7093: RAISE FND_API.G_EXC_ERROR;
7094: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7095: END IF;
7096: --dbms_output.put_line('Exiting : convert_order_lines_val_to_id');
7097: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 7094: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

7090: END IF;
7091: END IF;
7092: IF FND_MSG_PUB.count_msg > 0 THEN
7093: RAISE FND_API.G_EXC_ERROR;
7094: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7095: END IF;
7096: --dbms_output.put_line('Exiting : convert_order_lines_val_to_id');
7097: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7098: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.end', 'End Procedure');

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

7121: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7122: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
7123: END IF;
7124:
7125: IF(p_service_item_id IS NOT NULL AND p_service_item_id <> FND_API.G_MISS_NUM) THEN
7126: OPEN val_service_item_id_csr;
7127: FETCH val_service_item_id_csr INTO g_dummy_char;
7128: IF(val_service_item_id_csr%NOTFOUND) THEN
7129: FND_MESSAGE.Set_Name(G_APP_NAME,'AHL_OSP_LN_INV_SVC_ITEM');

Line 7240: RAISE FND_API.G_EXC_ERROR;

7236: IF verify_vendor%NOTFOUND THEN
7237: FND_MESSAGE.set_name('AHL', 'AHL_OSP_ITEM_VENDOR_MISMATCH');
7238: FND_MESSAGE.set_token('ITEM_ID', p_osp_order_line_rec.inventory_item_id);
7239: FND_MSG_PUB.add;
7240: RAISE FND_API.G_EXC_ERROR;
7241: --FND_MSG_PUB.count_and_get(
7242: --p_encoded => FND_API.G_FALSE,
7243: --p_count => l_msg_count,
7244: --p_data => l_msg_data);

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

7238: FND_MESSAGE.set_token('ITEM_ID', p_osp_order_line_rec.inventory_item_id);
7239: FND_MSG_PUB.add;
7240: RAISE FND_API.G_EXC_ERROR;
7241: --FND_MSG_PUB.count_and_get(
7242: --p_encoded => FND_API.G_FALSE,
7243: --p_count => l_msg_count,
7244: --p_data => l_msg_data);
7245: END IF;
7246: CLOSE verify_vendor;

Line 7285: p_init_msg_list => FND_API.G_FALSE,

7281: --nullify_exchange_instance(p_osp_order_rec.osp_order_id, p_x_osp_order_lines_tbl);
7282: END IF;
7283: AHL_OSP_SHIPMENT_PUB.convert_subtxn_type(
7284: p_api_version => 1.0,
7285: p_init_msg_list => FND_API.G_FALSE,
7286: p_commit => FND_API.G_FALSE,
7287: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7288: p_default => FND_API.G_TRUE,
7289: p_module_type => NULL,

Line 7286: p_commit => FND_API.G_FALSE,

7282: END IF;
7283: AHL_OSP_SHIPMENT_PUB.convert_subtxn_type(
7284: p_api_version => 1.0,
7285: p_init_msg_list => FND_API.G_FALSE,
7286: p_commit => FND_API.G_FALSE,
7287: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7288: p_default => FND_API.G_TRUE,
7289: p_module_type => NULL,
7290: p_osp_order_id => p_osp_order_rec.osp_order_id ,

Line 7287: p_validation_level => FND_API.G_VALID_LEVEL_FULL,

7283: AHL_OSP_SHIPMENT_PUB.convert_subtxn_type(
7284: p_api_version => 1.0,
7285: p_init_msg_list => FND_API.G_FALSE,
7286: p_commit => FND_API.G_FALSE,
7287: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7288: p_default => FND_API.G_TRUE,
7289: p_module_type => NULL,
7290: p_osp_order_id => p_osp_order_rec.osp_order_id ,
7291: p_old_order_type_code => l_old_type_code,

Line 7288: p_default => FND_API.G_TRUE,

7284: p_api_version => 1.0,
7285: p_init_msg_list => FND_API.G_FALSE,
7286: p_commit => FND_API.G_FALSE,
7287: p_validation_level => FND_API.G_VALID_LEVEL_FULL,
7288: p_default => FND_API.G_TRUE,
7289: p_module_type => NULL,
7290: p_osp_order_id => p_osp_order_rec.osp_order_id ,
7291: p_old_order_type_code => l_old_type_code,
7292: p_new_order_type_code => p_osp_order_rec.order_type_code,