DBA Data[Home] [Help]

APPS.ASO_MAP_QUOTE_ORDER_INT dependencies on FND_API

Line 63: P_Calculate_Price_Flag IN VARCHAR2 := FND_API.G_FALSE

59: P_Line_sales_credit_TBL IN ASO_QUOTE_PUB.Sales_credit_tbl_type
60: := ASO_QUOTE_PUB.G_MISS_sales_credit_TBL,
61: P_Lot_Serial_Tbl IN ASO_QUOTE_PUB.Lot_Serial_Tbl_Type
62: := ASO_QUOTE_PUB.G_MISS_Lot_Serial_Tbl,
63: P_Calculate_Price_Flag IN VARCHAR2 := FND_API.G_FALSE
64: , x_header_rec OUT NOCOPY /* file.sql.39 change */ OE_Order_PUB.Header_Rec_Type
65: , x_header_val_rec OUT NOCOPY /* file.sql.39 change */ OE_Order_PUB.Header_Val_Rec_Type
66: , x_Header_Adj_tbl OUT NOCOPY /* file.sql.39 change */ OE_Order_PUB.Header_Adj_Tbl_Type
67: , x_Header_Adj_val_tbl OUT NOCOPY /* file.sql.39 change */ OE_Order_PUB.Header_Adj_Val_Tbl_Type

Line 180: found VARCHAR2(1) := FND_API.G_FALSE;

176: l_version_number NUMBER;
177:
178: -- other variable and count declarations
179:
180: found VARCHAR2(1) := FND_API.G_FALSE;
181: found_service VARCHAR2(1) := FND_API.G_FALSE;
182: found_tax VARCHAR2(1) := FND_API.G_FALSE;
183: i NUMBER := 1;
184: j NUMBER := 1;

Line 181: found_service VARCHAR2(1) := FND_API.G_FALSE;

177:
178: -- other variable and count declarations
179:
180: found VARCHAR2(1) := FND_API.G_FALSE;
181: found_service VARCHAR2(1) := FND_API.G_FALSE;
182: found_tax VARCHAR2(1) := FND_API.G_FALSE;
183: i NUMBER := 1;
184: j NUMBER := 1;
185: k NUMBER := 1;

Line 182: found_tax VARCHAR2(1) := FND_API.G_FALSE;

178: -- other variable and count declarations
179:
180: found VARCHAR2(1) := FND_API.G_FALSE;
181: found_service VARCHAR2(1) := FND_API.G_FALSE;
182: found_tax VARCHAR2(1) := FND_API.G_FALSE;
183: i NUMBER := 1;
184: j NUMBER := 1;
185: k NUMBER := 1;
186: l NUMBER := 1;

Line 327: l_header_rec.ordered_date = FND_API.G_MISS_DATE) AND

323:
324: l_header_rec.order_category_code := p_qte_rec.quote_category_code;
325: l_header_rec.ordered_date := p_qte_rec.ordered_date;
326: IF (l_header_rec.ordered_date is NULL OR
327: l_header_rec.ordered_date = FND_API.G_MISS_DATE) AND
328: p_operation = 'CREATE' THEN
329: l_header_rec.ordered_date := sysdate;
330: END IF;
331: l_header_rec.marketing_source_code_id := p_qte_rec.marketing_source_code_id;

Line 368: l_header_rec.conversion_type_code <> FND_API.G_MISS_CHAR THEN

364: END IF;
365:
366: -- vtariker: 3057860: overriding profile value if value is passed in hdr
367: IF l_header_rec.conversion_type_code IS NOT NULL OR
368: l_header_rec.conversion_type_code <> FND_API.G_MISS_CHAR THEN
369: l_conversion_type := l_header_rec.conversion_type_code;
370: END IF;
371: -- vtariker: 3057860
372:

Line 374: AND p_qte_rec.currency_code <> FND_API.G_MISS_CHAR THEN

370: END IF;
371: -- vtariker: 3057860
372:
373: IF p_qte_rec.currency_code is not NULL
374: AND p_qte_rec.currency_code <> FND_API.G_MISS_CHAR THEN
375:
376: IF (l_set_of_books_id IS NOT NULL) THEN
377:
378: OPEN C_Functional_Currency(l_set_of_books_id);

Line 389: RAISE FND_API.G_EXC_ERROR;

385: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
386: fnd_message.set_name('ASO', 'ASO_QTE_MISSING_CONV_TYPE');
387: FND_MSG_PUB.Add;
388: END IF;
389: RAISE FND_API.G_EXC_ERROR;
390: END IF;
391:
392: IF l_conversion_type <> 'USER' THEN
393: l_header_rec.conversion_rate := FND_API.G_MISS_NUM;

Line 393: l_header_rec.conversion_rate := FND_API.G_MISS_NUM;

389: RAISE FND_API.G_EXC_ERROR;
390: END IF;
391:
392: IF l_conversion_type <> 'USER' THEN
393: l_header_rec.conversion_rate := FND_API.G_MISS_NUM;
394: l_header_rec.conversion_rate_date := FND_API.G_MISS_DATE;
395: ELSE
396: IF (p_qte_rec.exchange_rate is NULL OR
397: p_qte_rec.exchange_rate = FND_API.G_MISS_NUM) THEN

Line 394: l_header_rec.conversion_rate_date := FND_API.G_MISS_DATE;

390: END IF;
391:
392: IF l_conversion_type <> 'USER' THEN
393: l_header_rec.conversion_rate := FND_API.G_MISS_NUM;
394: l_header_rec.conversion_rate_date := FND_API.G_MISS_DATE;
395: ELSE
396: IF (p_qte_rec.exchange_rate is NULL OR
397: p_qte_rec.exchange_rate = FND_API.G_MISS_NUM) THEN
398: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN

Line 397: p_qte_rec.exchange_rate = FND_API.G_MISS_NUM) THEN

393: l_header_rec.conversion_rate := FND_API.G_MISS_NUM;
394: l_header_rec.conversion_rate_date := FND_API.G_MISS_DATE;
395: ELSE
396: IF (p_qte_rec.exchange_rate is NULL OR
397: p_qte_rec.exchange_rate = FND_API.G_MISS_NUM) THEN
398: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
399: fnd_message.set_name('ASO', 'ASO_QTE_MISSING_CONV_RATE');
400: fnd_message.set_token('CURRENCY_CODE', p_qte_rec.currency_code, FALSE);
401: FND_MSG_PUB.Add;

Line 403: RAISE FND_API.G_EXC_ERROR;

399: fnd_message.set_name('ASO', 'ASO_QTE_MISSING_CONV_RATE');
400: fnd_message.set_token('CURRENCY_CODE', p_qte_rec.currency_code, FALSE);
401: FND_MSG_PUB.Add;
402: END IF;
403: RAISE FND_API.G_EXC_ERROR;
404: END IF;
405: l_header_rec.conversion_rate := p_qte_rec.exchange_rate;
406: l_header_rec.conversion_rate_date := l_sysdate;
407: END IF;

Line 436: AND p_qte_rec.cust_account_id <> FND_API.G_MISS_NUM THEN

432: aso_debug_pub.add('before customer account ', 1, 'Y' );
433: END IF;
434:
435: IF p_qte_rec.cust_account_id is not NULL
436: AND p_qte_rec.cust_account_id <> FND_API.G_MISS_NUM THEN
437: l_header_rec.sold_to_org_id := p_qte_rec.cust_account_id;
438: l_cust_account_id := p_qte_rec.cust_account_id;
439: IF aso_debug_pub.g_debug_flag = 'Y' THEN
440: aso_debug_pub.add('validating cust account ' || l_cust_account_id || 'for party' || p_qte_rec.party_id, 1, 'N');

Line 443: p_init_msg_list => FND_API.G_FALSE,

439: IF aso_debug_pub.g_debug_flag = 'Y' THEN
440: aso_debug_pub.add('validating cust account ' || l_cust_account_id || 'for party' || p_qte_rec.party_id, 1, 'N');
441: END IF;
442: ASO_PARTY_INT.Validate_CustAccount (
443: p_init_msg_list => FND_API.G_FALSE,
444: p_party_id => p_qte_rec.party_id,
445: p_cust_account_id=> l_cust_account_id,
446: x_return_status => l_return_status,
447: x_msg_count => l_msg_count,

Line 452: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

448: x_msg_data => l_msg_data);
449: IF aso_debug_pub.g_debug_flag = 'Y' THEN
450: aso_debug_pub.add(' done validating customer.return status = ' || l_return_status ,1, 'Y');
451: END IF;
452: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN
453: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
454: FND_MESSAGE.Set_Name('ASO', 'ASO_API_INVALID_ID');
455: FND_MESSAGE.Set_Token('COLUMN', 'CUST_ACCOUNT_ID', FALSE);
456: FND_MSG_PUB.ADD;

Line 458: raise FND_API.G_EXC_ERROR;

454: FND_MESSAGE.Set_Name('ASO', 'ASO_API_INVALID_ID');
455: FND_MESSAGE.Set_Token('COLUMN', 'CUST_ACCOUNT_ID', FALSE);
456: FND_MSG_PUB.ADD;
457: END IF;
458: raise FND_API.G_EXC_ERROR;
459: END IF;
460: ELSE
461: IF p_operation = 'CREATE' THEN
462: IF p_qte_rec.party_id is not NULL

Line 463: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN

459: END IF;
460: ELSE
461: IF p_operation = 'CREATE' THEN
462: IF p_qte_rec.party_id is not NULL
463: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
464: IF aso_debug_pub.g_debug_flag = 'Y' THEN
465: aso_debug_pub.add('deriving cust account id:p_qte_rec.party_id: '||p_qte_rec.party_id, 1, 'N');
466: END IF;
467: ASO_CHECK_TCA_PVT.Customer_Account(

Line 476: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

472: x_return_status => l_return_status,
473: x_msg_count => l_msg_count,
474: x_msg_data => l_msg_data);
475:
476: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN
477: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
478: THEN
479: FND_MESSAGE.Set_Name('ASO', 'ASO_CUST_ACCOUNT');
480: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);

Line 483: raise FND_API.G_EXC_ERROR;

479: FND_MESSAGE.Set_Name('ASO', 'ASO_CUST_ACCOUNT');
480: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
481: FND_MSG_PUB.ADD;
482: END IF;
483: raise FND_API.G_EXC_ERROR;
484: END IF;
485: IF aso_debug_pub.g_debug_flag = 'Y' THEN
486: aso_debug_pub.add('Cust_Accnt_Id in'||l_cust_account_id, 1, 'N');
487: END IF;

Line 520: RAISE FND_API.G_EXC_ERROR;

516: FND_MESSAGE.Set_Name('ASO', 'ASO_API_MISSING_COLUMN');
517: FND_MESSAGE.Set_Token('COLUMN', 'CUST_ACCOUNT_ID', FALSE);
518: FND_MSG_PUB.Add;
519: END IF;
520: RAISE FND_API.G_EXC_ERROR;
521: END IF;
522: END IF;
523: END IF;
524:

Line 525: IF p_qte_rec.invoice_to_cust_account_id <> FND_API.G_MISS_NUM AND

521: END IF;
522: END IF;
523: END IF;
524:
525: IF p_qte_rec.invoice_to_cust_account_id <> FND_API.G_MISS_NUM AND
526: p_qte_rec.invoice_to_cust_account_id IS NOT NULL AND
527: p_qte_rec.invoice_to_cust_account_id <> l_cust_account_id THEN
528: IF aso_debug_pub.g_debug_flag = 'Y' THEN
529: aso_debug_pub.add('before cust_acct_reltn:p_sold_to_cust_account: '||l_cust_account_id, 1, 'N');

Line 544: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

540: );
541: IF aso_debug_pub.g_debug_flag = 'Y' THEN
542: aso_debug_pub.add('after cust_acct_reltn:l_return_status: '||l_return_status, 1, 'N');
543: END IF;
544: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
545: RAISE FND_API.G_EXC_ERROR;
546: END IF;
547:
548: END IF;

Line 545: RAISE FND_API.G_EXC_ERROR;

541: IF aso_debug_pub.g_debug_flag = 'Y' THEN
542: aso_debug_pub.add('after cust_acct_reltn:l_return_status: '||l_return_status, 1, 'N');
543: END IF;
544: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
545: RAISE FND_API.G_EXC_ERROR;
546: END IF;
547:
548: END IF;
549:

Line 555: p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN

551: aso_debug_pub.add('before org contact', 1, 'N');
552: aso_debug_pub.add('p_qte_rec.org_contact_id: ' || p_qte_rec.org_contact_id,1, 'N');
553: END IF;
554: IF p_qte_rec.party_id is not null and
555: p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
556:
557: IF p_qte_rec.org_contact_id is NULL OR
558: p_qte_rec.org_contact_id = FND_API.G_MISS_NUM THEN
559: get_org_contact( p_party_id => p_qte_rec.party_id,

Line 558: p_qte_rec.org_contact_id = FND_API.G_MISS_NUM THEN

554: IF p_qte_rec.party_id is not null and
555: p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
556:
557: IF p_qte_rec.org_contact_id is NULL OR
558: p_qte_rec.org_contact_id = FND_API.G_MISS_NUM THEN
559: get_org_contact( p_party_id => p_qte_rec.party_id,
560: x_org_contact => l_org_contact
561: );
562: ELSE

Line 570: l_org_contact <> FND_API.G_MISS_NUM THEN

566: IF aso_debug_pub.g_debug_flag = 'Y' THEN
567: aso_debug_pub.add('l_org_contact: ' || l_org_contact,1, 'N');
568: END IF;
569: IF l_org_contact is not NULL AND
570: l_org_contact <> FND_API.G_MISS_NUM THEN
571: IF aso_debug_pub.g_debug_flag = 'Y' THEN
572: aso_debug_pub.add('deriving org_contact_role:l_header_rec.sold_to_org_id: ' || l_header_rec.sold_to_org_id,1, 'N');
573: END IF;
574: get_org_contact_role(

Line 584: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

580: );
581: IF aso_debug_pub.g_debug_flag = 'Y' THEN
582: aso_debug_pub.add('after get org contact. sold_to_contact_id = ' || l_header_rec.sold_to_contact_id ,1, 'N');
583: END IF;
584: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
585: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
586: THEN
587: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_ORG_CON_ACT_CRS');
588: FND_MSG_PUB.ADD;

Line 590: raise FND_API.G_EXC_ERROR;

586: THEN
587: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_ORG_CON_ACT_CRS');
588: FND_MSG_PUB.ADD;
589: END IF;
590: raise FND_API.G_EXC_ERROR;
591: END IF;
592:
593: IF l_header_rec.sold_to_contact_id is NULL OR
594: l_header_rec.sold_to_contact_id = FND_API.G_MISS_NUM THEN

Line 594: l_header_rec.sold_to_contact_id = FND_API.G_MISS_NUM THEN

590: raise FND_API.G_EXC_ERROR;
591: END IF;
592:
593: IF l_header_rec.sold_to_contact_id is NULL OR
594: l_header_rec.sold_to_contact_id = FND_API.G_MISS_NUM THEN
595: IF aso_debug_pub.g_debug_flag = 'Y' THEN
596: aso_debug_pub.add('calling create contact role for org contact:l_org_contact_party_id: '||l_org_contact_party_id,1, 'N');
597: aso_debug_pub.add('calling create contact role for org contact:l_header_rec.sold_to_org_id: '||l_header_rec.sold_to_org_id,1, 'N');
598: END IF;

Line 611: IF L_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

607: );
608: IF aso_debug_pub.g_debug_flag = 'Y' THEN
609: aso_debug_pub.add('after create contact role. sold_to_contact_id = ' || l_header_rec.sold_to_contact_id ,1, 'Y');
610: END IF;
611: IF L_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN
612: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
613: THEN
614: FND_MESSAGE.Set_Name('ASO', 'ASO_ORG_CONTACT');
615: FND_MESSAGE.Set_Token('ID', to_char(p_qte_rec.org_contact_id), FALSE);

Line 618: raise FND_API.G_EXC_ERROR;

614: FND_MESSAGE.Set_Name('ASO', 'ASO_ORG_CONTACT');
615: FND_MESSAGE.Set_Token('ID', to_char(p_qte_rec.org_contact_id), FALSE);
616: FND_MSG_PUB.ADD;
617: END IF;
618: raise FND_API.G_EXC_ERROR;
619: END IF;
620: END IF;
621: END IF;
622: END IF;

Line 628: p_qte_rec.invoice_to_cust_account_id <> FND_API.G_MISS_NUM THEN

624: IF aso_debug_pub.g_debug_flag = 'Y' THEN
625: aso_debug_pub.add('invoice_to_cust_account = ' || p_qte_rec.invoice_to_cust_account_id,1,'N');
626: END IF;
627: IF p_qte_rec.invoice_to_cust_account_id is not NULL AND
628: p_qte_rec.invoice_to_cust_account_id <> FND_API.G_MISS_NUM THEN
629: l_invoice_cust_account_id := p_qte_rec.invoice_to_cust_account_id;
630: ELSE
631: l_invoice_cust_account_id := l_header_rec.sold_to_org_id;
632: END IF;

Line 639: AND p_qte_rec.invoice_to_party_site_id <> FND_API.G_MISS_NUM THEN

635: aso_debug_pub.add('l_invoice_cust_acccount_id = ' || l_invoice_cust_account_id,1,'N' );
636: aso_debug_pub.add('before invoice to party site id '|| p_qte_rec.invoice_to_party_site_id, 1, 'Y');
637: END IF;
638: IF p_qte_rec.invoice_to_party_site_id is not NULL
639: AND p_qte_rec.invoice_to_party_site_id <> FND_API.G_MISS_NUM THEN
640:
641: ASO_CHECK_TCA_PVT.Customer_Account_Site
642: (
643: p_api_version => 1.0

Line 655: l_header_rec.invoice_to_org_id := FND_API.G_MISS_NUM;

651: ,x_site_use_id => l_header_rec.invoice_to_org_id
652: );
653:
654: IF l_header_rec.invoice_to_org_id IS NULL THEN
655: l_header_rec.invoice_to_org_id := FND_API.G_MISS_NUM;
656: END IF;
657: IF aso_debug_pub.g_debug_flag = 'Y' THEN
658: aso_debug_pub.add('site_use_id after deriving invoice = ' || l_header_rec.invoice_to_org_id,1,'Y');
659: aso_debug_pub.add('inv_acct_site after deriving invoice = ' || l_hd_inv_cust_acct_site,1,'Y');

Line 661: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

657: IF aso_debug_pub.g_debug_flag = 'Y' THEN
658: aso_debug_pub.add('site_use_id after deriving invoice = ' || l_header_rec.invoice_to_org_id,1,'Y');
659: aso_debug_pub.add('inv_acct_site after deriving invoice = ' || l_hd_inv_cust_acct_site,1,'Y');
660: END IF;
661: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
662: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
663: THEN
664: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
665: FND_MSG_PUB.ADD;

Line 667: raise FND_API.G_EXC_ERROR;

663: THEN
664: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
665: FND_MSG_PUB.ADD;
666: END IF;
667: raise FND_API.G_EXC_ERROR;
668: END IF;
669:
670: END IF;
671:

Line 691: l_header_rec.invoice_to_contact_id := FND_API.G_MISS_NUM;

687: x_msg_data => l_msg_data,
688: x_cust_account_role_id => l_header_rec.invoice_to_contact_id);
689:
690: IF l_header_rec.invoice_to_contact_id IS NULL THEN
691: l_header_rec.invoice_to_contact_id := FND_API.G_MISS_NUM;
692: END IF;
693:
694: IF aso_debug_pub.g_debug_flag = 'Y' THEN
695: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.invoice_to_contact_id: '||l_header_rec.invoice_to_contact_id,1,'N');

Line 698: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

694: IF aso_debug_pub.g_debug_flag = 'Y' THEN
695: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.invoice_to_contact_id: '||l_header_rec.invoice_to_contact_id,1,'N');
696: END IF;
697:
698: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
699: raise FND_API.G_EXC_ERROR;
700: END IF;
701:
702: -- end_cust

Line 699: raise FND_API.G_EXC_ERROR;

695: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.invoice_to_contact_id: '||l_header_rec.invoice_to_contact_id,1,'N');
696: END IF;
697:
698: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
699: raise FND_API.G_EXC_ERROR;
700: END IF;
701:
702: -- end_cust
703: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 707: p_qte_rec.End_Customer_cust_account_id <> FND_API.G_MISS_NUM THEN

703: IF aso_debug_pub.g_debug_flag = 'Y' THEN
704: aso_debug_pub.add('End_Customer_cust_account = ' || p_qte_rec.End_Customer_cust_account_id,1,'N');
705: END IF;
706: IF p_qte_rec.End_Customer_cust_account_id is not NULL AND
707: p_qte_rec.End_Customer_cust_account_id <> FND_API.G_MISS_NUM THEN
708: l_End_cust_account_id := p_qte_rec.End_Customer_cust_account_id;
709: ELSE
710: l_End_cust_account_id := l_header_rec.sold_to_org_id;
711: END IF;

Line 718: AND p_qte_rec.End_Customer_party_site_id <> FND_API.G_MISS_NUM THEN

714: aso_debug_pub.add('l_End_cust_acccount_id = ' || l_End_cust_account_id,1,'N' );
715: aso_debug_pub.add('before End_Customer party site id '|| p_qte_rec.End_Customer_party_site_id, 1, 'Y');
716: END IF;
717: IF p_qte_rec.End_Customer_party_site_id is not NULL
718: AND p_qte_rec.End_Customer_party_site_id <> FND_API.G_MISS_NUM THEN
719:
720: ASO_CHECK_TCA_PVT.Customer_Account_Site
721: (
722: p_api_version => 1.0

Line 734: l_header_rec.End_Customer_Site_Use_Id := FND_API.G_MISS_NUM;

730: ,x_site_use_id => l_header_rec.End_Customer_Site_Use_Id
731: );
732:
733: IF l_header_rec.End_Customer_Site_Use_Id IS NULL THEN
734: l_header_rec.End_Customer_Site_Use_Id := FND_API.G_MISS_NUM;
735: END IF;
736: IF aso_debug_pub.g_debug_flag = 'Y' THEN
737: aso_debug_pub.add('site_use_id after deriving End_Customer = ' || l_header_rec.End_Customer_Site_Use_Id,1,'Y');
738: aso_debug_pub.add('inv_acct_site after deriving End_Customer = ' || l_hd_end_cust_acct_site,1,'Y');

Line 740: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

736: IF aso_debug_pub.g_debug_flag = 'Y' THEN
737: aso_debug_pub.add('site_use_id after deriving End_Customer = ' || l_header_rec.End_Customer_Site_Use_Id,1,'Y');
738: aso_debug_pub.add('inv_acct_site after deriving End_Customer = ' || l_hd_end_cust_acct_site,1,'Y');
739: END IF;
740: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
741: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
742: THEN
743: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_END_SITE_AC_CRS');
744: FND_MSG_PUB.ADD;

Line 746: raise FND_API.G_EXC_ERROR;

742: THEN
743: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_END_SITE_AC_CRS');
744: FND_MSG_PUB.ADD;
745: END IF;
746: raise FND_API.G_EXC_ERROR;
747: END IF;
748:
749: l_header_rec.End_Customer_id := l_End_cust_account_id;
750:

Line 772: l_header_rec.End_Customer_contact_id := FND_API.G_MISS_NUM;

768: x_msg_data => l_msg_data,
769: x_cust_account_role_id => l_header_rec.End_Customer_contact_id);
770:
771: IF l_header_rec.End_Customer_contact_id IS NULL THEN
772: l_header_rec.End_Customer_contact_id := FND_API.G_MISS_NUM;
773: END IF;
774:
775: IF aso_debug_pub.g_debug_flag = 'Y' THEN
776: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.End_Customer_contact_id: '||l_header_rec.End_Customer_contact_id,1,'N');

Line 780: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

776: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.End_Customer_contact_id: '||l_header_rec.End_Customer_contact_id,1,'N');
777: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.End_Customer_id: '||l_header_rec.End_Customer_id,1,'N');
778: END IF;
779:
780: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
781: raise FND_API.G_EXC_ERROR;
782: END IF;
783:
784: -- end_cust

Line 781: raise FND_API.G_EXC_ERROR;

777: aso_debug_pub.add('mapq hd: after Cust_Acct_Contact_Addr:l_header_rec.End_Customer_id: '||l_header_rec.End_Customer_id,1,'N');
778: END IF;
779:
780: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
781: raise FND_API.G_EXC_ERROR;
782: END IF;
783:
784: -- end_cust
785:

Line 793: IF p_header_shipment_tbl(1).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND

789:
790: IF p_header_shipment_tbl.count > 0 THEN
791: -- OM takes in only one shipment at the header level
792:
793: IF p_header_shipment_tbl(1).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND
794: p_header_shipment_tbl(1).ship_to_cust_account_id IS NOT NULL AND
795: p_header_shipment_tbl(1).ship_to_cust_account_id <> l_cust_account_id THEN
796: IF aso_debug_pub.g_debug_flag = 'Y' THEN
797: aso_debug_pub.add('before cust_acct_relationship ', 1, 'N' );

Line 809: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

805: x_msg_count => l_msg_count,
806: x_msg_data => l_msg_data
807: );
808:
809: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
810: RAISE FND_API.G_EXC_ERROR;
811: END IF;
812:
813: END IF;

Line 810: RAISE FND_API.G_EXC_ERROR;

806: x_msg_data => l_msg_data
807: );
808:
809: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
810: RAISE FND_API.G_EXC_ERROR;
811: END IF;
812:
813: END IF;
814:

Line 816: p_header_shipment_tbl(1).ship_to_cust_account_id <> FND_API.G_MISS_NUM THEN

812:
813: END IF;
814:
815: IF p_header_shipment_tbl(1).ship_to_cust_account_id is not NULL AND
816: p_header_shipment_tbl(1).ship_to_cust_account_id <> FND_API.G_MISS_NUM THEN
817: l_ship_cust_account_id := p_header_shipment_tbl(1).ship_to_cust_account_id;
818: ELSE
819: l_ship_cust_account_id := l_header_rec.sold_to_org_id;
820: END IF;

Line 827: AND p_header_shipment_tbl(1).ship_to_party_site_id <> FND_API.G_MISS_NUM

823: aso_debug_pub.add('ship cust acccount = ' || l_ship_cust_account_id ,1, 'N');
824: aso_debug_pub.add('ship to party site = ' || p_header_shipment_tbl(1).ship_to_party_site_id, 1, 'N');
825: END IF;
826: IF p_header_shipment_tbl(1).ship_to_party_site_id is not NULL
827: AND p_header_shipment_tbl(1).ship_to_party_site_id <> FND_API.G_MISS_NUM
828: THEN
829:
830: ASO_CHECK_TCA_PVT.Customer_Account_Site
831: (

Line 844: l_header_rec.ship_to_org_id := FND_API.G_MISS_NUM;

840: ,x_site_use_id => l_header_rec.ship_to_org_id
841: );
842:
843: IF l_header_rec.ship_to_org_id IS NULL THEN
844: l_header_rec.ship_to_org_id := FND_API.G_MISS_NUM;
845: END IF;
846:
847: IF aso_debug_pub.g_debug_flag = 'Y' THEN
848: aso_debug_pub.add('ship to org after deriving = ' || l_header_rec.ship_to_org_id, 1, 'N');

Line 851: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

847: IF aso_debug_pub.g_debug_flag = 'Y' THEN
848: aso_debug_pub.add('ship to org after deriving = ' || l_header_rec.ship_to_org_id, 1, 'N');
849: aso_debug_pub.add('ship acct site after deriving = ' || l_hd_shp_cust_acct_site, 1, 'N');
850: END IF;
851: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
852: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
853: THEN
854: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_SHP_SITE_AC_CRS');
855: FND_MSG_PUB.ADD;

Line 857: raise FND_API.G_EXC_ERROR;

853: THEN
854: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_SHP_SITE_AC_CRS');
855: FND_MSG_PUB.ADD;
856: END IF;
857: raise FND_API.G_EXC_ERROR;
858: END IF;
859:
860: END IF;
861:

Line 881: l_header_rec.ship_to_contact_id := FND_API.G_MISS_NUM;

877: x_msg_data => l_msg_data,
878: x_cust_account_role_id => l_header_rec.ship_to_contact_id);
879:
880: IF l_header_rec.ship_to_contact_id IS NULL THEN
881: l_header_rec.ship_to_contact_id := FND_API.G_MISS_NUM;
882: END IF;
883:
884: IF aso_debug_pub.g_debug_flag = 'Y' THEN
885: aso_debug_pub.add('mapq hdr: after Cust_Acct_Contact_Addr:l_header_rec.ship_to_contact_id: '||l_header_rec.ship_to_contact_id,1,'N');

Line 888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

884: IF aso_debug_pub.g_debug_flag = 'Y' THEN
885: aso_debug_pub.add('mapq hdr: after Cust_Acct_Contact_Addr:l_header_rec.ship_to_contact_id: '||l_header_rec.ship_to_contact_id,1,'N');
886: END IF;
887:
888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
889: raise FND_API.G_EXC_ERROR;
890: END IF;
891:
892: END IF; -- shipment tbl count

Line 889: raise FND_API.G_EXC_ERROR;

885: aso_debug_pub.add('mapq hdr: after Cust_Acct_Contact_Addr:l_header_rec.ship_to_contact_id: '||l_header_rec.ship_to_contact_id,1,'N');
886: END IF;
887:
888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
889: raise FND_API.G_EXC_ERROR;
890: END IF;
891:
892: END IF; -- shipment tbl count
893: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 927: p_qte_rec.employee_person_id <> FND_API.G_MISS_NUM) AND

923: aso_debug_pub.add('p_qte_rec.resource_id = ' || p_qte_rec.resource_id,1,'N');
924: END IF;
925:
926: IF (p_qte_rec.employee_person_id IS NOT NULL AND
927: p_qte_rec.employee_person_id <> FND_API.G_MISS_NUM) AND
928: (p_qte_rec.resource_id IS NULL OR
929: p_qte_rec.resource_id = FND_API.G_MISS_NUM) THEN
930:
931: l_header_rec.salesrep_id := ASO_ORDER_INT.Salesrep_id(p_qte_rec.employee_person_id);

Line 929: p_qte_rec.resource_id = FND_API.G_MISS_NUM) THEN

925:
926: IF (p_qte_rec.employee_person_id IS NOT NULL AND
927: p_qte_rec.employee_person_id <> FND_API.G_MISS_NUM) AND
928: (p_qte_rec.resource_id IS NULL OR
929: p_qte_rec.resource_id = FND_API.G_MISS_NUM) THEN
930:
931: l_header_rec.salesrep_id := ASO_ORDER_INT.Salesrep_id(p_qte_rec.employee_person_id);
932: ELSE
933: IF (p_qte_rec.resource_id IS NOT NULL AND

Line 934: p_qte_rec.resource_id <> FND_API.G_MISS_NUM) THEN

930:
931: l_header_rec.salesrep_id := ASO_ORDER_INT.Salesrep_id(p_qte_rec.employee_person_id);
932: ELSE
933: IF (p_qte_rec.resource_id IS NOT NULL AND
934: p_qte_rec.resource_id <> FND_API.G_MISS_NUM) THEN
935:
936: OPEN salesrep(p_qte_rec.resource_id);
937: FETCH salesrep into l_header_rec.salesrep_id;
938: CLOSE salesrep;

Line 952: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND

948: aso_debug_pub.add('p_operation = '|| p_operation,1,'N');
949: END IF;
950:
951: IF (l_header_rec.salesrep_id IS NULL OR
952: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND
953: p_operation = 'UPDATE' THEN
954:
955: l_header_rec.salesrep_id := FND_API.G_MISS_NUM;
956:

Line 955: l_header_rec.salesrep_id := FND_API.G_MISS_NUM;

951: IF (l_header_rec.salesrep_id IS NULL OR
952: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND
953: p_operation = 'UPDATE' THEN
954:
955: l_header_rec.salesrep_id := FND_API.G_MISS_NUM;
956:
957: ELSE
958:
959: IF (l_header_rec.salesrep_id IS NULL OR

Line 960: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND

956:
957: ELSE
958:
959: IF (l_header_rec.salesrep_id IS NULL OR
960: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND
961: l_om_defaulting_prof = 'N' THEN
962:
963: IF l_validate_salesrep_prof = 'N' THEN
964:

Line 988: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND

984:
985: -- if the salesrep is still null then an error is raised.
986:
987: IF (l_header_rec.salesrep_id IS NULL OR
988: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) AND
989: l_om_defaulting_prof = 'N' AND
990: l_validate_salesrep_prof = 'N' THEN
991: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
992:

Line 1004: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) THEN

1000: END IF;
1001: ELSE
1002: IF l_om_defaulting_prof = 'Y' AND
1003: (l_header_rec.salesrep_id IS NULL OR
1004: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) THEN
1005: l_header_rec.salesrep_id := FND_API.G_MISS_NUM;
1006: END IF;
1007: END IF;
1008:

Line 1005: l_header_rec.salesrep_id := FND_API.G_MISS_NUM;

1001: ELSE
1002: IF l_om_defaulting_prof = 'Y' AND
1003: (l_header_rec.salesrep_id IS NULL OR
1004: l_header_rec.salesrep_id = FND_API.G_MISS_NUM) THEN
1005: l_header_rec.salesrep_id := FND_API.G_MISS_NUM;
1006: END IF;
1007: END IF;
1008:
1009: END IF; -- p_operation = UPDATE;

Line 1020: p_qte_rec.original_system_reference <> FND_API.G_MISS_CHAR) THEN

1016: l_header_rec.source_document_id := p_qte_rec.quote_header_id;
1017:
1018: IF p_operation = 'CREATE' THEN
1019: IF (p_qte_rec.original_system_reference IS NOT NULL OR
1020: p_qte_rec.original_system_reference <> FND_API.G_MISS_CHAR) THEN
1021: l_header_rec.orig_sys_document_ref := p_qte_rec.original_system_reference;
1022: ELSE
1023: IF (p_qte_rec.quote_header_id IS NULL OR
1024: p_qte_rec.quote_header_id = FND_API.G_MISS_NUM) THEN

Line 1024: p_qte_rec.quote_header_id = FND_API.G_MISS_NUM) THEN

1020: p_qte_rec.original_system_reference <> FND_API.G_MISS_CHAR) THEN
1021: l_header_rec.orig_sys_document_ref := p_qte_rec.original_system_reference;
1022: ELSE
1023: IF (p_qte_rec.quote_header_id IS NULL OR
1024: p_qte_rec.quote_header_id = FND_API.G_MISS_NUM) THEN
1025: l_quote_number := NULL;
1026: l_version_number := NULL;
1027: ELSE
1028:

Line 1062: p_qte_rec.quote_source_code = FND_API.G_MISS_CHAR THEN

1058: END IF; -- CREATE
1059: -- default value if null
1060:
1061: IF p_qte_rec.quote_source_code is NULL OR
1062: p_qte_rec.quote_source_code = FND_API.G_MISS_CHAR THEN
1063:
1064: IF p_operation = 'CREATE' THEN
1065:
1066: IF (l_om_defaulting_prof = 'N') THEN

Line 1078: l_quote_source := FND_API.G_MISS_CHAR;

1074: END IF;
1075: -- p_qte_rec.quote_source_code := 'CRM Apps';
1076:
1077: ELSIF p_operation = 'UPDATE' THEN
1078: l_quote_source := FND_API.G_MISS_CHAR;
1079: END IF;
1080:
1081: ELSE
1082: l_quote_source := p_qte_rec.quote_source_code;

Line 1092: l_quote_source <> FND_API.G_MISS_CHAR THEN

1088: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1089: aso_debug_pub.add('in here for quote source',1,'N');
1090: END IF;
1091: IF l_quote_source is not NULL AND
1092: l_quote_source <> FND_API.G_MISS_CHAR THEN
1093:
1094: OPEN C_order_source(l_quote_source);
1095: FETCH C_order_source INTO l_header_rec.source_document_type_id;
1096: IF (C_order_source%NOTFOUND) THEN

Line 1108: l_header_rec.payment_term_id := FND_API.G_MISS_NUM;

1104: For i in 1..p_header_payment_tbl.count LOOP
1105:
1106: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
1107: IF p_header_payment_tbl(i).payment_term_id IS NULL THEN
1108: l_header_rec.payment_term_id := FND_API.G_MISS_NUM;
1109: ELSE -- 3465720
1110: l_header_rec.payment_term_id := p_header_payment_tbl(i).payment_term_id;
1111: END IF;
1112: ELSE

Line 1158: l_header_payment_tbl(pay_count).trxn_extension_id = FND_API.G_MISS_NUM ) Then

1154: END IF;
1155:
1156: /* Start : code change done for Bug 9401669 */
1157: If (l_header_payment_tbl(pay_count).trxn_extension_id Is Null Or
1158: l_header_payment_tbl(pay_count).trxn_extension_id = FND_API.G_MISS_NUM ) Then
1159:
1160: l_header_payment_tbl(pay_count).CC_INSTRUMENT_ASSIGNMENT_ID := p_header_payment_tbl(i).INSTR_ASSIGNMENT_ID;
1161: l_header_payment_tbl(pay_count).CC_INSTRUMENT_ID := p_header_payment_tbl(i).INSTRUMENT_ID;
1162:

Line 1178: l_header_payment_tbl(pay_count).receipt_method_id := fnd_api.g_miss_num;

1174: END IF; -- payment_type_code is not null
1175:
1176: -- bug 5613870
1177: -- IF p_header_payment_tbl(i).payment_type_code = 'CREDIT_CARD' THEN -- Code Change done for Bug 14180257
1178: l_header_payment_tbl(pay_count).receipt_method_id := fnd_api.g_miss_num;
1179: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1180: aso_debug_pub.add('Passing receipt method id as g miss num' ,1,'N');
1181: END IF;
1182: -- END IF;

Line 1201: :=FND_API.G_MISS_CHAR;

1197: --bug 1921958
1198: IF (p_header_shipment_tbl(i).shipping_instructions IS NULL) AND
1199: (l_om_defaulting_prof = 'Y') THEN
1200: l_header_rec.shipping_instructions
1201: :=FND_API.G_MISS_CHAR;
1202: ELSE
1203: l_header_rec.shipping_instructions
1204: :=rtrim(p_header_shipment_tbl(i).shipping_instructions);
1205: END IF;

Line 1210: :=FND_API.G_MISS_CHAR;

1206:
1207: IF (p_header_shipment_tbl(i).packing_instructions IS NULL) AND
1208: (l_om_defaulting_prof = 'Y') THEN
1209: l_header_rec.packing_instructions
1210: :=FND_API.G_MISS_CHAR;
1211: ELSE
1212: l_header_rec.packing_instructions
1213: :=rtrim(p_header_shipment_tbl(i).packing_instructions);
1214: END IF;

Line 1223: l_header_rec.fob_point_code := FND_API.G_MISS_CHAR;

1219: END IF;
1220:
1221: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
1222: IF p_header_shipment_tbl(i).FOB_CODE is null then
1223: l_header_rec.fob_point_code := FND_API.G_MISS_CHAR;
1224: ELSE -- 3465720
1225: l_header_rec.fob_point_code := p_header_shipment_tbl(i).fob_code;
1226: end if;
1227: IF p_header_shipment_tbl(i).FREIGHT_TERMS_CODE is null then

Line 1228: l_header_rec.FREIGHT_TERMS_CODE := FND_API.G_MISS_CHAR;

1224: ELSE -- 3465720
1225: l_header_rec.fob_point_code := p_header_shipment_tbl(i).fob_code;
1226: end if;
1227: IF p_header_shipment_tbl(i).FREIGHT_TERMS_CODE is null then
1228: l_header_rec.FREIGHT_TERMS_CODE := FND_API.G_MISS_CHAR;
1229: ELSE -- 3465720
1230: l_header_rec.FREIGHT_TERMS_CODE := p_header_shipment_tbl(i).freight_terms_code;
1231: end if;
1232: IF p_header_shipment_tbl(i).SHIPMENT_PRIORITY_CODE is null then

Line 1233: l_header_rec.SHIPMENT_PRIORITY_CODE := FND_API.G_MISS_CHAR;

1229: ELSE -- 3465720
1230: l_header_rec.FREIGHT_TERMS_CODE := p_header_shipment_tbl(i).freight_terms_code;
1231: end if;
1232: IF p_header_shipment_tbl(i).SHIPMENT_PRIORITY_CODE is null then
1233: l_header_rec.SHIPMENT_PRIORITY_CODE := FND_API.G_MISS_CHAR;
1234: ELSE -- 3465720
1235: l_header_rec.SHIPMENT_PRIORITY_CODE := p_header_shipment_tbl(i).shipment_priority_code;
1236: end if;
1237: IF p_header_shipment_tbl(i).ship_method_code is null then

Line 1238: l_header_rec.shipping_method_code := FND_API.G_MISS_CHAR;

1234: ELSE -- 3465720
1235: l_header_rec.SHIPMENT_PRIORITY_CODE := p_header_shipment_tbl(i).shipment_priority_code;
1236: end if;
1237: IF p_header_shipment_tbl(i).ship_method_code is null then
1238: l_header_rec.shipping_method_code := FND_API.G_MISS_CHAR;
1239: ELSE -- 3582285
1240: l_header_rec.shipping_method_code := p_header_shipment_tbl(i).ship_method_code;
1241: end if;
1242:

Line 1268: p_header_shipment_tbl(i).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN

1264: aso_debug_pub.add('request date= ' ||l_header_rec.request_date,1,'N');
1265: aso_debug_pub.add('Map_Qte_To_Ord: p_header_shipment_tbl(i).Ship_From_Org_Id: '||p_header_shipment_tbl(i).Ship_From_Org_Id,1,'Y');
1266: END IF;
1267: IF p_header_shipment_tbl(i).Ship_From_Org_Id IS NOT NULL AND
1268: p_header_shipment_tbl(i).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN
1269:
1270: l_header_rec.Ship_From_Org_Id
1271: :=p_header_shipment_tbl(i).Ship_From_Org_Id;
1272: END IF;

Line 1275: IF (p_header_shipment_tbl(i).demand_class_code is not null and p_header_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char) then

1271: :=p_header_shipment_tbl(i).Ship_From_Org_Id;
1272: END IF;
1273:
1274: -- bug 4916969
1275: IF (p_header_shipment_tbl(i).demand_class_code is not null and p_header_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char) then
1276: l_header_rec.demand_class_code := p_header_shipment_tbl(i).demand_class_code;
1277:
1278: end if;
1279:

Line 1300: l_header_rec.order_type_id <> FND_API.G_MISS_NUM) AND

1296: aso_debug_pub.add('MapQ: l_reservation_lvl_prof: '||l_reservation_lvl_prof,1,'N');
1297: END IF;
1298:
1299: IF (l_header_rec.order_type_id is not null AND
1300: l_header_rec.order_type_id <> FND_API.G_MISS_NUM) AND
1301: l_reservation_lvl_prof = 'AUTO_ORDER' THEN
1302: OPEN scheduling_level_cur(l_header_rec.order_type_id);
1303: FETCH scheduling_level_cur INTO l_order_scheduling_level;
1304: CLOSE scheduling_level_cur;

Line 1378: found := FND_API.G_FALSE;

1374: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1375: aso_debug_pub.add('mapping quote lines',1,'N');
1376: END IF;
1377: FOR j in 1..P_line_Shipment_Tbl.count LOOP
1378: found := FND_API.G_FALSE;
1379: FOR k in 1..p_qte_line_tbl.count LOOP
1380:
1381: -- kchervel the quantity check should be done before the loop.
1382:

Line 1395: p_qte_line_tbl(k).Commitment_Id <> FND_API.G_MISS_NUM THEN

1391: aso_debug_pub.add('map_quote_to_order- p_qte_line_tbl(k).minisite_id: '||p_qte_line_tbl(k).minisite_id,1, 'N');
1392: aso_debug_pub.add('map_quote_to_order- p_qte_rec.minisite_id: '||p_qte_rec.minisite_id,1, 'N');
1393: END IF;
1394: IF p_qte_line_tbl(k).Commitment_Id IS NOT NULL AND
1395: p_qte_line_tbl(k).Commitment_Id <> FND_API.G_MISS_NUM THEN
1396: l_line_tbl(i).Commitment_Id := p_qte_line_tbl(k).Commitment_Id;
1397: END IF;
1398:
1399: IF p_qte_line_tbl(k).Agreement_Id IS NOT NULL AND

Line 1400: p_qte_line_tbl(k).Agreement_Id <> FND_API.G_MISS_NUM THEN

1396: l_line_tbl(i).Commitment_Id := p_qte_line_tbl(k).Commitment_Id;
1397: END IF;
1398:
1399: IF p_qte_line_tbl(k).Agreement_Id IS NOT NULL AND
1400: p_qte_line_tbl(k).Agreement_Id <> FND_API.G_MISS_NUM THEN
1401: l_line_tbl(i).Agreement_Id := p_qte_line_tbl(k).Agreement_Id;
1402: END IF;
1403: -- EDU
1404:

Line 1406: p_qte_line_tbl(k).Item_Revision <> FND_API.G_MISS_CHAR THEN

1402: END IF;
1403: -- EDU
1404:
1405: IF p_qte_line_tbl(k).Item_Revision IS NOT NULL AND
1406: p_qte_line_tbl(k).Item_Revision <> FND_API.G_MISS_CHAR THEN
1407: l_line_tbl(i).Item_Revision := p_qte_line_tbl(k).Item_Revision;
1408: END IF;
1409:
1410: l_line_tbl(i).minisite_id := p_qte_line_tbl(k).minisite_id;

Line 1450: p_qte_line_tbl(k).SUBSCRIPTION_ENABLE_FLAG <> FND_API.G_MISS_CHAR THEN

1446: --l_line_tbl(i).charge_periodicity_code := p_qte_line_tbl(k).charge_periodicity_code;
1447:
1448: --Bug 16283049
1449: IF p_qte_line_tbl(k).SUBSCRIPTION_ENABLE_FLAG IS NOT NULL AND
1450: p_qte_line_tbl(k).SUBSCRIPTION_ENABLE_FLAG <> FND_API.G_MISS_CHAR THEN
1451:
1452: l_line_tbl(i).SUBSCRIPTION_ENABLE_FLAG := p_qte_line_tbl(k).SUBSCRIPTION_ENABLE_FLAG;
1453: END IF;
1454:

Line 1457: p_qte_line_tbl(k).project_id <> FND_API.G_MISS_NUM THEN

1453: END IF;
1454:
1455: --ER Bug 12839824
1456: IF p_qte_line_tbl(k).project_id IS NOT NULL AND
1457: p_qte_line_tbl(k).project_id <> FND_API.G_MISS_NUM THEN
1458:
1459: l_line_tbl(i).project_id := p_qte_line_tbl(k).project_id;
1460: END IF;
1461:

Line 1463: p_qte_line_tbl(k).task_id <> FND_API.G_MISS_NUM THEN

1459: l_line_tbl(i).project_id := p_qte_line_tbl(k).project_id;
1460: END IF;
1461:
1462: IF p_qte_line_tbl(k).task_id IS NOT NULL AND
1463: p_qte_line_tbl(k).task_id <> FND_API.G_MISS_NUM THEN
1464:
1465: l_line_tbl(i).task_id := p_qte_line_tbl(k).task_id;
1466: END IF;
1467:

Line 1473: IF p_qte_line_tbl(k).invoice_to_cust_account_id <> FND_API.G_MISS_NUM AND

1469: aso_debug_pub.add('mapq line: l_line_tbl(i).project_id :'||p_qte_line_tbl(k).project_id,1,'N');
1470: aso_debug_pub.add('mapq line: l_line_tbl(i).task_id :'||p_qte_line_tbl(k).task_id,1,'N');
1471: END IF;
1472:
1473: IF p_qte_line_tbl(k).invoice_to_cust_account_id <> FND_API.G_MISS_NUM AND
1474: p_qte_line_tbl(k).invoice_to_cust_account_id IS NOT NULL AND
1475: p_qte_line_tbl(k).invoice_to_cust_account_id <> l_cust_account_id THEN
1476: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1477: aso_debug_pub.add('mapq line: before cust_acct_reltn:p_sold_to_cust_account: '||l_cust_account_id,1,'N');

Line 1493: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1489:
1490: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1491: aso_debug_pub.add('mapq line: after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
1492: END IF;
1493: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1494: RAISE FND_API.G_EXC_ERROR;
1495: END IF;
1496:
1497: END IF;

Line 1494: RAISE FND_API.G_EXC_ERROR;

1490: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1491: aso_debug_pub.add('mapq line: after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
1492: END IF;
1493: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1494: RAISE FND_API.G_EXC_ERROR;
1495: END IF;
1496:
1497: END IF;
1498:

Line 1500: p_qte_line_tbl(k).invoice_to_cust_account_id <> FND_API.G_MISS_NUM THEN

1496:
1497: END IF;
1498:
1499: IF p_qte_line_tbl(k).invoice_to_cust_account_id is not NULL AND
1500: p_qte_line_tbl(k).invoice_to_cust_account_id <> FND_API.G_MISS_NUM THEN
1501: l_invoice_cust_account_id := p_qte_line_tbl(k).invoice_to_cust_account_id;
1502: ELSE
1503: l_invoice_cust_account_id := l_header_rec.sold_to_org_id;
1504: END IF;

Line 1511: AND p_qte_line_tbl(k).invoice_to_party_site_id <> FND_API.G_MISS_NUM THEN

1507: aso_debug_pub.add('mapq line: before cust_acct_site:l_invoice_cust_account_id: '||l_invoice_cust_account_id,1,'N');
1508: aso_debug_pub.add('mapq line: before cust_acct_site:p_qte_line_tbl(k).invoice_to_party_site_id: '||p_qte_line_tbl(k).invoice_to_party_site_id,1,'N');
1509: END IF;
1510: IF p_qte_line_tbl(k).invoice_to_party_site_id is not NULL
1511: AND p_qte_line_tbl(k).invoice_to_party_site_id <> FND_API.G_MISS_NUM THEN
1512:
1513: ASO_CHECK_TCA_PVT.Customer_Account_Site
1514: (
1515: p_api_version => 1.0

Line 1527: l_line_tbl(i).invoice_to_org_id := FND_API.G_MISS_NUM;

1523: ,x_site_use_id => l_line_tbl(i).invoice_to_org_id
1524: );
1525:
1526: IF l_line_tbl(i).invoice_to_org_id IS NULL THEN
1527: l_line_tbl(i).invoice_to_org_id := FND_API.G_MISS_NUM;
1528: END IF;
1529:
1530: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1531: aso_debug_pub.add('mapq line: after cust_acct_site:l_line_tbl(i).invoice_to_org_id: '||l_line_tbl(i).invoice_to_org_id,1,'N');

Line 1534: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1530: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1531: aso_debug_pub.add('mapq line: after cust_acct_site:l_line_tbl(i).invoice_to_org_id: '||l_line_tbl(i).invoice_to_org_id,1,'N');
1532: aso_debug_pub.add('mapq line: after cust_acct_site:l_ln_inv_cust_acct_site: '||l_ln_inv_cust_acct_site,1,'N');
1533: END IF;
1534: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1535: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
1536: THEN
1537: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
1538: FND_MSG_PUB.ADD;

Line 1540: raise FND_API.G_EXC_ERROR;

1536: THEN
1537: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
1538: FND_MSG_PUB.ADD;
1539: END IF;
1540: raise FND_API.G_EXC_ERROR;
1541: END IF;
1542:
1543: END IF;
1544:

Line 1562: l_line_tbl(i).invoice_to_contact_id := FND_API.G_MISS_NUM;

1558: x_msg_data => l_msg_data,
1559: x_cust_account_role_id => l_line_tbl(i).invoice_to_contact_id);
1560:
1561: IF l_line_tbl(i).invoice_to_contact_id IS NULL THEN
1562: l_line_tbl(i).invoice_to_contact_id := FND_API.G_MISS_NUM;
1563: END IF;
1564:
1565: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1566: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).invoice_to_contact_id: '||l_line_tbl(i).invoice_to_contact_id,1,'N');

Line 1569: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1565: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1566: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).invoice_to_contact_id: '||l_line_tbl(i).invoice_to_contact_id,1,'N');
1567: END IF;
1568:
1569: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1570: raise FND_API.G_EXC_ERROR;
1571: END IF;
1572:
1573: -- end_cust

Line 1570: raise FND_API.G_EXC_ERROR;

1566: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).invoice_to_contact_id: '||l_line_tbl(i).invoice_to_contact_id,1,'N');
1567: END IF;
1568:
1569: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1570: raise FND_API.G_EXC_ERROR;
1571: END IF;
1572:
1573: -- end_cust
1574: IF p_qte_line_tbl(k).End_Customer_cust_account_id is not NULL AND

Line 1575: p_qte_line_tbl(k).End_Customer_cust_account_id <> FND_API.G_MISS_NUM THEN

1571: END IF;
1572:
1573: -- end_cust
1574: IF p_qte_line_tbl(k).End_Customer_cust_account_id is not NULL AND
1575: p_qte_line_tbl(k).End_Customer_cust_account_id <> FND_API.G_MISS_NUM THEN
1576: l_End_cust_account_id := p_qte_line_tbl(k).End_Customer_cust_account_id;
1577: ELSE
1578: l_End_cust_account_id := l_header_rec.sold_to_org_id;
1579: END IF;

Line 1586: AND p_qte_line_tbl(k).End_Customer_party_site_id <> FND_API.G_MISS_NUM THEN

1582: aso_debug_pub.add('mapq line: before cust_acct_site:l_End_cust_account_id: '||l_End_cust_account_id,1,'N');
1583: aso_debug_pub.add('mapq line: before cust_acct_site:p_qte_line_tbl(k).End_Customer_party_site_id: '||p_qte_line_tbl(k).End_Customer_party_site_id,1,'N');
1584: END IF;
1585: IF p_qte_line_tbl(k).End_Customer_party_site_id is not NULL
1586: AND p_qte_line_tbl(k).End_Customer_party_site_id <> FND_API.G_MISS_NUM THEN
1587:
1588: ASO_CHECK_TCA_PVT.Customer_Account_Site
1589: (
1590: p_api_version => 1.0

Line 1602: l_line_tbl(i).End_Customer_site_use_id := FND_API.G_MISS_NUM;

1598: ,x_site_use_id => l_line_tbl(i).End_Customer_site_use_id
1599: );
1600:
1601: IF l_line_tbl(i).End_Customer_site_use_id IS NULL THEN
1602: l_line_tbl(i).End_Customer_site_use_id := FND_API.G_MISS_NUM;
1603: END IF;
1604:
1605: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1606: aso_debug_pub.add('mapq line: after cust_acct_site:l_line_tbl(i).End_Customer_site_use_id: '||l_line_tbl(i).End_Customer_site_use_id,1,'N');

Line 1609: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1605: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1606: aso_debug_pub.add('mapq line: after cust_acct_site:l_line_tbl(i).End_Customer_site_use_id: '||l_line_tbl(i).End_Customer_site_use_id,1,'N');
1607: aso_debug_pub.add('mapq line: after cust_acct_site:l_ln_end_cust_acct_site: '||l_ln_end_cust_acct_site,1,'N');
1608: END IF;
1609: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1610: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
1611: THEN
1612: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_END_SITE_AC_CRS');
1613: FND_MSG_PUB.ADD;

Line 1615: raise FND_API.G_EXC_ERROR;

1611: THEN
1612: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_END_SITE_AC_CRS');
1613: FND_MSG_PUB.ADD;
1614: END IF;
1615: raise FND_API.G_EXC_ERROR;
1616: END IF;
1617:
1618: l_line_tbl(i).End_Customer_Id := l_End_cust_account_id;
1619:

Line 1639: l_line_tbl(i).End_Customer_contact_id := FND_API.G_MISS_NUM;

1635: x_msg_data => l_msg_data,
1636: x_cust_account_role_id => l_line_tbl(i).End_Customer_contact_id);
1637:
1638: IF l_line_tbl(i).End_Customer_contact_id IS NULL THEN
1639: l_line_tbl(i).End_Customer_contact_id := FND_API.G_MISS_NUM;
1640: END IF;
1641:
1642: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1643: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).End_Customer_contact_id: '||l_line_tbl(i).End_Customer_contact_id,1,'N');

Line 1647: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1643: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).End_Customer_contact_id: '||l_line_tbl(i).End_Customer_contact_id,1,'N');
1644: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).End_Customer_id: '||l_line_tbl(i).End_Customer_id,1,'N');
1645: END IF;
1646:
1647: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1648: raise FND_API.G_EXC_ERROR;
1649: END IF;
1650: -- end_cust
1651:

Line 1648: raise FND_API.G_EXC_ERROR;

1644: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).End_Customer_id: '||l_line_tbl(i).End_Customer_id,1,'N');
1645: END IF;
1646:
1647: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1648: raise FND_API.G_EXC_ERROR;
1649: END IF;
1650: -- end_cust
1651:
1652: -- item type code in OC is different from OM and this will be defaulted by OM

Line 1663: l_line_tbl(i).line_type_id := FND_API.G_MISS_NUM;

1659: -- this piece of code should be in submit_quote. this is done because OM
1660: -- does its defaulting only if it is g_miss and not if it is null
1661:
1662: IF l_line_tbl(i).line_type_id is NULL THEN
1663: l_line_tbl(i).line_type_id := FND_API.G_MISS_NUM;
1664: END IF;
1665:
1666: l_line_tbl(i).line_category_code := p_qte_line_tbl(k).line_category_code;
1667: l_line_tbl(i).org_id := l_header_rec.org_id;

Line 1670: p_qte_line_tbl(k).priced_price_list_id <> FND_API.G_MISS_NUM THEN

1666: l_line_tbl(i).line_category_code := p_qte_line_tbl(k).line_category_code;
1667: l_line_tbl(i).org_id := l_header_rec.org_id;
1668:
1669: IF p_qte_line_tbl(k).priced_price_list_id IS NOT NULL AND
1670: p_qte_line_tbl(k).priced_price_list_id <> FND_API.G_MISS_NUM THEN
1671: l_line_tbl(i).price_list_id := p_qte_line_tbl(k).priced_price_list_id;
1672: ELSE
1673: l_line_tbl(i).price_list_id := p_qte_line_tbl(k).price_list_id;
1674: END IF;

Line 1677: l_line_tbl(i).price_list_id := FND_API.G_MISS_NUM;

1673: l_line_tbl(i).price_list_id := p_qte_line_tbl(k).price_list_id;
1674: END IF;
1675:
1676: IF l_line_tbl(i).price_list_id IS NULL THEN
1677: l_line_tbl(i).price_list_id := FND_API.G_MISS_NUM;
1678: END IF;
1679:
1680: l_line_tbl(i).unit_list_price
1681: := p_qte_line_tbl(k).line_list_price;

Line 1762: l_line_tbl(i).service_reference_line_id := FND_API.G_MISS_NUM;

1758: IF p_qte_line_dtl_tbl(l).service_ref_type_code = 'QUOTE' THEN
1759: l_line_tbl(i).service_reference_type_code := 'ORDER';
1760:
1761: -- line_id should be G_MISS_NUM. bug 1399679
1762: l_line_tbl(i).service_reference_line_id := FND_API.G_MISS_NUM;
1763: l_line_tbl(i).service_line_index
1764: := ASO_ORDER_INT.Service_Index (
1765: p_qte_line_dtl_tbl(l).quote_line_id ,
1766: p_qte_line_dtl_tbl(l).qte_line_index ,

Line 1773: p_qte_line_dtl_tbl(l).service_ref_line_id = FND_API.G_MISS_NUM THEN

1769: END IF;
1770:
1771: IF p_qte_line_dtl_tbl(l).service_ref_type_code = 'ORDER' THEN
1772: IF p_qte_line_dtl_tbl(l).service_ref_line_id IS NULL OR
1773: p_qte_line_dtl_tbl(l).service_ref_line_id = FND_API.G_MISS_NUM THEN
1774: l_line_tbl(i).service_line_index := p_qte_line_dtl_tbl(l).service_ref_qte_line_index;
1775: END IF;
1776: END IF;
1777:

Line 1787: p_qte_line_dtl_tbl(l).return_attribute1 = FND_API.G_MISS_CHAR) AND

1783: l_line_tbl(i).reference_type
1784: := p_qte_line_dtl_tbl(l).return_ref_type;
1785:
1786: IF (p_qte_line_dtl_tbl(l).return_attribute1 is null or
1787: p_qte_line_dtl_tbl(l).return_attribute1 = FND_API.G_MISS_CHAR) AND
1788: (p_qte_line_dtl_tbl(l).return_ref_header_id is not null AND
1789: p_qte_line_dtl_tbl(l).return_ref_header_id <> FND_API.G_MISS_NUM) Then
1790:
1791: l_line_tbl(i).return_attribute1

Line 1789: p_qte_line_dtl_tbl(l).return_ref_header_id <> FND_API.G_MISS_NUM) Then

1785:
1786: IF (p_qte_line_dtl_tbl(l).return_attribute1 is null or
1787: p_qte_line_dtl_tbl(l).return_attribute1 = FND_API.G_MISS_CHAR) AND
1788: (p_qte_line_dtl_tbl(l).return_ref_header_id is not null AND
1789: p_qte_line_dtl_tbl(l).return_ref_header_id <> FND_API.G_MISS_NUM) Then
1790:
1791: l_line_tbl(i).return_attribute1
1792: := p_qte_line_dtl_tbl(l).return_ref_header_id;
1793: ELSE

Line 1812: p_qte_line_dtl_tbl(l).return_attribute2 = FND_API.G_MISS_CHAR) AND

1808: l_line_tbl(i).return_attribute15
1809: := p_qte_line_dtl_tbl(l).return_attribute15;
1810:
1811: IF (p_qte_line_dtl_tbl(l).return_attribute2 is null or
1812: p_qte_line_dtl_tbl(l).return_attribute2 = FND_API.G_MISS_CHAR) AND
1813: (p_qte_line_dtl_tbl(l).return_ref_line_id is not null AND
1814: p_qte_line_dtl_tbl(l).return_ref_line_id <> FND_API.G_MISS_NUM) Then
1815:
1816: l_line_tbl(i).return_attribute2

Line 1814: p_qte_line_dtl_tbl(l).return_ref_line_id <> FND_API.G_MISS_NUM) Then

1810:
1811: IF (p_qte_line_dtl_tbl(l).return_attribute2 is null or
1812: p_qte_line_dtl_tbl(l).return_attribute2 = FND_API.G_MISS_CHAR) AND
1813: (p_qte_line_dtl_tbl(l).return_ref_line_id is not null AND
1814: p_qte_line_dtl_tbl(l).return_ref_line_id <> FND_API.G_MISS_NUM) Then
1815:
1816: l_line_tbl(i).return_attribute2
1817: := p_qte_line_dtl_tbl(l).return_ref_line_id;
1818: ELSE

Line 1855: p_qte_line_dtl_tbl(l).return_reason_code = FND_API.G_MISS_CHAR) THEN

1851: IF p_qte_line_tbl(k).line_category_code = 'RETURN' THEN
1852:
1853: -- Default return reason code from profile
1854: IF (p_qte_line_dtl_tbl(l).return_reason_code IS NULL OR
1855: p_qte_line_dtl_tbl(l).return_reason_code = FND_API.G_MISS_CHAR) THEN
1856: IF(l_ret_reason_code_prof IS NULL) THEN
1857: l_return_status := FND_API.G_RET_STS_ERROR;
1858: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1859: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');

Line 1857: l_return_status := FND_API.G_RET_STS_ERROR;

1853: -- Default return reason code from profile
1854: IF (p_qte_line_dtl_tbl(l).return_reason_code IS NULL OR
1855: p_qte_line_dtl_tbl(l).return_reason_code = FND_API.G_MISS_CHAR) THEN
1856: IF(l_ret_reason_code_prof IS NULL) THEN
1857: l_return_status := FND_API.G_RET_STS_ERROR;
1858: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1859: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1860: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1861: FND_MSG_PUB.ADD;

Line 1862: RAISE FND_API.G_EXC_ERROR;

1858: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1859: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1860: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1861: FND_MSG_PUB.ADD;
1862: RAISE FND_API.G_EXC_ERROR;
1863: END IF;
1864: ELSE
1865: l_line_tbl(i).return_reason_code := l_ret_reason_code_prof;
1866: END IF;

Line 1979: l_line_tbl(i).return_reason_code = FND_API.G_MISS_CHAR) THEN

1975:
1976: IF p_qte_line_tbl(k).line_category_code = 'RETURN' THEN
1977: -- Default return reason code from profile
1978: IF (l_line_tbl(i).return_reason_code IS NULL OR
1979: l_line_tbl(i).return_reason_code = FND_API.G_MISS_CHAR) THEN
1980: IF(l_ret_reason_code_prof IS NULL) THEN
1981: l_return_status := FND_API.G_RET_STS_ERROR;
1982: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1983: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');

Line 1981: l_return_status := FND_API.G_RET_STS_ERROR;

1977: -- Default return reason code from profile
1978: IF (l_line_tbl(i).return_reason_code IS NULL OR
1979: l_line_tbl(i).return_reason_code = FND_API.G_MISS_CHAR) THEN
1980: IF(l_ret_reason_code_prof IS NULL) THEN
1981: l_return_status := FND_API.G_RET_STS_ERROR;
1982: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1983: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1984: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1985: FND_MSG_PUB.ADD;

Line 1986: RAISE FND_API.G_EXC_ERROR;

1982: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1983: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1984: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1985: FND_MSG_PUB.ADD;
1986: RAISE FND_API.G_EXC_ERROR;
1987: END IF;
1988: ELSE
1989: l_line_tbl(i).return_reason_code := l_ret_reason_code_prof;
1990: END IF;

Line 1998: l_line_tbl(i).fob_point_code := FND_API.G_MISS_CHAR;

1994: END IF;
1995:
1996: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
1997: IF p_line_shipment_tbl(j).fob_code IS NULL THEN
1998: l_line_tbl(i).fob_point_code := FND_API.G_MISS_CHAR;
1999: ELSE -- 3465720
2000: l_line_tbl(i).fob_point_code := p_line_shipment_tbl(j).fob_code;
2001: END IF;
2002: IF p_line_shipment_tbl(j).freight_terms_code IS NULL THEN

Line 2003: l_line_tbl(i).freight_terms_code := FND_API.G_MISS_CHAR;

1999: ELSE -- 3465720
2000: l_line_tbl(i).fob_point_code := p_line_shipment_tbl(j).fob_code;
2001: END IF;
2002: IF p_line_shipment_tbl(j).freight_terms_code IS NULL THEN
2003: l_line_tbl(i).freight_terms_code := FND_API.G_MISS_CHAR;
2004: ELSE -- 3465720
2005: l_line_tbl(i).freight_terms_code := p_line_shipment_tbl(j).freight_terms_code;
2006: END IF;
2007: IF p_line_shipment_tbl(j).shipment_priority_code IS NULL THEN

Line 2008: l_line_tbl(i).shipment_priority_code := FND_API.G_MISS_CHAR;

2004: ELSE -- 3465720
2005: l_line_tbl(i).freight_terms_code := p_line_shipment_tbl(j).freight_terms_code;
2006: END IF;
2007: IF p_line_shipment_tbl(j).shipment_priority_code IS NULL THEN
2008: l_line_tbl(i).shipment_priority_code := FND_API.G_MISS_CHAR;
2009: ELSE -- 3465720
2010: l_line_tbl(i).shipment_priority_code := p_line_shipment_tbl(j).shipment_priority_code;
2011: END IF;
2012: IF p_line_shipment_tbl(j).ship_method_code IS NULL THEN

Line 2013: l_line_tbl(i).shipping_method_code := FND_API.G_MISS_CHAR;

2009: ELSE -- 3465720
2010: l_line_tbl(i).shipment_priority_code := p_line_shipment_tbl(j).shipment_priority_code;
2011: END IF;
2012: IF p_line_shipment_tbl(j).ship_method_code IS NULL THEN
2013: l_line_tbl(i).shipping_method_code := FND_API.G_MISS_CHAR;
2014: ELSE -- 3582285
2015: l_line_tbl(i).shipping_method_code := p_line_shipment_tbl(j).ship_method_code;
2016: END IF;
2017: ELSE

Line 2033: := FND_API.G_MISS_CHAR;

2029: --bug 1921958
2030: IF (p_line_shipment_tbl(j).shipping_instructions IS NULL) AND
2031: (l_om_defaulting_prof = 'Y') THEN
2032: l_line_tbl(i).shipping_instructions
2033: := FND_API.G_MISS_CHAR;
2034: ELSE
2035: l_line_tbl(i).shipping_instructions
2036: := rtrim(p_line_shipment_tbl(j).shipping_instructions);
2037: END IF;

Line 2042: := FND_API.G_MISS_CHAR;

2038:
2039: IF (p_line_shipment_tbl(j).packing_instructions IS NULL) AND
2040: (l_om_defaulting_prof = 'Y') THEN
2041: l_line_tbl(i).packing_instructions
2042: := FND_API.G_MISS_CHAR;
2043: ELSE
2044: l_line_tbl(i).packing_instructions
2045: := rtrim(p_line_shipment_tbl(j).packing_instructions);
2046: END IF;

Line 2066: IF (p_line_shipment_tbl(j).demand_class_code is not null and p_line_shipment_tbl(j).demand_class_code <> fnd_api.g_miss_char) then

2062: l_line_tbl(i).ordered_quantity := p_line_shipment_tbl(j).quantity;
2063: l_line_tbl(i).order_quantity_uom := p_qte_line_tbl(k).uom_code;
2064:
2065: -- bug 4916969
2066: IF (p_line_shipment_tbl(j).demand_class_code is not null and p_line_shipment_tbl(j).demand_class_code <> fnd_api.g_miss_char) then
2067: l_line_tbl(i).demand_class_code := p_line_shipment_tbl(j).demand_class_code;
2068: end if;
2069:
2070: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2075: p_line_shipment_tbl(j).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN

2071: aso_debug_pub.add('p_line_shipment_tbl(j).Ship_From_Org_Id: '||p_line_shipment_tbl(j).Ship_From_Org_Id,1,'N');
2072: END IF;
2073:
2074: IF p_line_shipment_tbl(j).Ship_From_Org_Id IS NOT NULL AND
2075: p_line_shipment_tbl(j).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN
2076: l_line_tbl(i).ship_from_org_id := p_line_shipment_tbl(j).Ship_From_Org_Id;
2077: END IF;
2078:
2079: IF p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND

Line 2079: IF p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND

2075: p_line_shipment_tbl(j).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN
2076: l_line_tbl(i).ship_from_org_id := p_line_shipment_tbl(j).Ship_From_Org_Id;
2077: END IF;
2078:
2079: IF p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND
2080: p_line_shipment_tbl(j).ship_to_cust_account_id IS NOT NULL AND
2081: p_line_shipment_tbl(j).ship_to_cust_account_id <> l_cust_account_id THEN
2082: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2083: aso_debug_pub.add('before cust_acct_reltn:p_sold_to_cust_account: '||l_cust_account_id,1,'N');

Line 2099: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2095: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2096: aso_debug_pub.add('after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
2097: END IF;
2098:
2099: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2100: RAISE FND_API.G_EXC_ERROR;
2101: END IF;
2102:
2103: END IF;

Line 2100: RAISE FND_API.G_EXC_ERROR;

2096: aso_debug_pub.add('after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
2097: END IF;
2098:
2099: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2100: RAISE FND_API.G_EXC_ERROR;
2101: END IF;
2102:
2103: END IF;
2104:

Line 2106: p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM THEN

2102:
2103: END IF;
2104:
2105: IF p_line_shipment_tbl(j).ship_to_cust_account_id is not NULL AND
2106: p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM THEN
2107: l_ship_cust_account_id := p_line_shipment_tbl(j).ship_to_cust_account_id;
2108: ELSE
2109: l_ship_cust_account_id := l_header_rec.sold_to_org_id;
2110: END IF;

Line 2117: p_line_shipment_tbl(j).ship_to_party_site_id <> FND_API.G_MISS_NUM THEN

2113: aso_debug_pub.add('mapq line: before cust_acct_site:l_ship_cust_account_id: '||l_ship_cust_account_id,1,'N');
2114: aso_debug_pub.add('p_line_shipment_tbl(j).ship_to_party_site_id: '||p_line_shipment_tbl(j).ship_to_party_site_id,1,'N');
2115: END IF;
2116: IF p_line_shipment_tbl(j).ship_to_party_site_id is not NULL AND
2117: p_line_shipment_tbl(j).ship_to_party_site_id <> FND_API.G_MISS_NUM THEN
2118:
2119: ASO_CHECK_TCA_PVT.Customer_Account_Site
2120: (
2121: p_api_version => 1.0

Line 2133: l_line_tbl(i).ship_to_org_id := FND_API.G_MISS_NUM;

2129: ,x_site_use_id => l_line_tbl(i).ship_to_org_id
2130: );
2131:
2132: IF l_line_tbl(i).ship_to_org_id IS NULL THEN
2133: l_line_tbl(i).ship_to_org_id := FND_API.G_MISS_NUM;
2134: END IF;
2135:
2136: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2137: aso_debug_pub.add('mapq line: after cust_acct_site:l_line_tbl(i).ship_to_org_id: '||l_line_tbl(i).ship_to_org_id,1,'N');

Line 2140: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2136: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2137: aso_debug_pub.add('mapq line: after cust_acct_site:l_line_tbl(i).ship_to_org_id: '||l_line_tbl(i).ship_to_org_id,1,'N');
2138: aso_debug_pub.add('mapq line: after cust_acct_site:l_ln_shp_cust_acct_site: '||l_ln_shp_cust_acct_site,1,'N');
2139: END IF;
2140: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2141: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
2142: THEN
2143: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
2144: FND_MSG_PUB.ADD;

Line 2146: raise FND_API.G_EXC_ERROR;

2142: THEN
2143: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
2144: FND_MSG_PUB.ADD;
2145: END IF;
2146: raise FND_API.G_EXC_ERROR;
2147: END IF;
2148:
2149: END IF;
2150:

Line 2170: l_line_tbl(i).ship_to_contact_id := FND_API.G_MISS_NUM;

2166: x_msg_data => l_msg_data,
2167: x_cust_account_role_id => l_line_tbl(i).ship_to_contact_id);
2168:
2169: IF l_line_tbl(i).ship_to_contact_id IS NULL THEN
2170: l_line_tbl(i).ship_to_contact_id := FND_API.G_MISS_NUM;
2171: END IF;
2172:
2173: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2174: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).ship_to_contact_id: '||l_line_tbl(i).ship_to_contact_id,1,'N');

Line 2177: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2173: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2174: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).ship_to_contact_id: '||l_line_tbl(i).ship_to_contact_id,1,'N');
2175: END IF;
2176:
2177: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2178: raise FND_API.G_EXC_ERROR;
2179: END IF;
2180:
2181: l_line_tbl(i).source_document_id := p_line_shipment_tbl(j).quote_header_id;

Line 2178: raise FND_API.G_EXC_ERROR;

2174: aso_debug_pub.add('mapq line: after Cust_Acct_Contact_Addr:l_line_tbl(i).ship_to_contact_id: '||l_line_tbl(i).ship_to_contact_id,1,'N');
2175: END IF;
2176:
2177: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2178: raise FND_API.G_EXC_ERROR;
2179: END IF;
2180:
2181: l_line_tbl(i).source_document_id := p_line_shipment_tbl(j).quote_header_id;
2182: l_line_tbl(i).source_document_line_id

Line 2193: p_qte_line_tbl(k).ui_line_number <> FND_API.G_MISS_CHAR THEN

2189: aso_debug_pub.add('l_line_tbl(i).orig_sys_document_ref: '||l_line_tbl(i).orig_sys_document_ref,1,'N');
2190: END IF;
2191:
2192: IF p_qte_line_tbl(k).ui_line_number IS NOT NULL AND
2193: p_qte_line_tbl(k).ui_line_number <> FND_API.G_MISS_CHAR THEN
2194: l_line_tbl(i).orig_sys_line_ref := p_qte_line_tbl(k).ui_line_number;
2195:
2196: ELSIF p_qte_line_tbl(k).line_number IS NOT NULL
2197: AND p_qte_line_tbl(k).line_number <> FND_API.G_MISS_NUM THEN

Line 2197: AND p_qte_line_tbl(k).line_number <> FND_API.G_MISS_NUM THEN

2193: p_qte_line_tbl(k).ui_line_number <> FND_API.G_MISS_CHAR THEN
2194: l_line_tbl(i).orig_sys_line_ref := p_qte_line_tbl(k).ui_line_number;
2195:
2196: ELSIF p_qte_line_tbl(k).line_number IS NOT NULL
2197: AND p_qte_line_tbl(k).line_number <> FND_API.G_MISS_NUM THEN
2198:
2199: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2200: aso_debug_pub.add('p_qte_line_tbl(k).line_number: '||p_qte_line_tbl(k).line_number,1,'N');
2201: END IF;

Line 2247: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;

2243:
2244: --Pass the tax records in the OM price adjustment table
2245: l_line_adj_tbl_count := l_Line_Adj_tbl.count;
2246:
2247: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;
2248: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;
2249: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;
2250: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_index := i;
2251: --l_Line_adj_rec.tax_code := l_tax_rate_code; --This is for 11i

Line 2248: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;

2244: --Pass the tax records in the OM price adjustment table
2245: l_line_adj_tbl_count := l_Line_Adj_tbl.count;
2246:
2247: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;
2248: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;
2249: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;
2250: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_index := i;
2251: --l_Line_adj_rec.tax_code := l_tax_rate_code; --This is for 11i
2252: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).tax_rate_id := p_line_tax_detail_tbl(l).tax_rate_id; -- This is for R12

Line 2249: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;

2245: l_line_adj_tbl_count := l_Line_Adj_tbl.count;
2246:
2247: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;
2248: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;
2249: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;
2250: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_index := i;
2251: --l_Line_adj_rec.tax_code := l_tax_rate_code; --This is for 11i
2252: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).tax_rate_id := p_line_tax_detail_tbl(l).tax_rate_id; -- This is for R12
2253:

Line 2322: l_line_tbl(i).top_model_line_index = FND_API.G_MISS_NUM) AND

2318: end if;
2319: -- tax
2320:
2321: IF (l_line_tbl(i).top_model_line_index is NULL OR
2322: l_line_tbl(i).top_model_line_index = FND_API.G_MISS_NUM) AND
2323: l_reservation_lvl_prof = 'AUTO_ORDER' THEN
2324:
2325: -- initialize for each line
2326: l_line_scheduling_level := ' ';

Line 2328: l_line_tbl(i).line_type_id <> FND_API.G_MISS_NUM then

2324:
2325: -- initialize for each line
2326: l_line_scheduling_level := ' ';
2327: IF l_line_tbl(i).line_type_id is not null AND
2328: l_line_tbl(i).line_type_id <> FND_API.G_MISS_NUM then
2329: OPEN scheduling_level_cur(l_line_tbl(i).line_type_id);
2330: FETCH scheduling_level_cur INTO l_line_scheduling_level;
2331: CLOSE scheduling_level_cur;
2332: END IF;

Line 2355: IF p_calculate_price_flag = FND_API.G_FALSE THEN

2351: := OE_ORDER_SCH_UTIL.OESCH_ACT_RESERVE;
2352: END IF;
2353: END IF; -- reservation
2354:
2355: IF p_calculate_price_flag = FND_API.G_FALSE THEN
2356: l_line_tbl(i).calculate_price_flag := 'N';
2357: l_line_tbl(i).pricing_quantity_uom := l_line_tbl(i).order_quantity_uom;
2358: l_line_tbl(i).pricing_quantity := l_line_tbl(i).ordered_quantity;
2359: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2459: found := FND_API.G_TRUE;

2455: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2456: aso_debug_pub.add('after lot serial:l_lot_serial_tbl.count: '||l_lot_serial_tbl.count,1,'Y');
2457: END IF;
2458:
2459: found := FND_API.G_TRUE;
2460: END IF;
2461: END LOOP; -- lines
2462:
2463: i:= i+1;

Line 2612: x_return_status := FND_API.G_RET_STS_SUCCESS;

2608: begin
2609:
2610: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
2611:
2612: x_return_status := FND_API.G_RET_STS_SUCCESS;
2613:
2614: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2615: aso_debug_pub.add('site use in get_acct_site_uses = ' || p_acct_site_type,1,'N');
2616: END IF;

Line 2621: x_return_status := FND_API.G_RET_STS_ERROR;

2617: OPEN party_cur;
2618: FETCH party_cur INTO l_party_type, l_party_id;
2619: IF (party_cur%NOTFOUND) THEN
2620: l_party_type := NULL;
2621: x_return_status := FND_API.G_RET_STS_ERROR;
2622: END IF;
2623: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2624: aso_debug_pub.add('party_type in get_acct_site_uses = ' || l_party_type,1,'N');
2625: END IF;

Line 2633: x_return_status := FND_API.G_RET_STS_ERROR;

2629: OPEN relationship_cur;
2630: FETCH relationship_cur INTO cur_party_id;
2631: IF (relationship_cur%NOTFOUND) THEN
2632: cur_party_id := NULL;
2633: x_return_status := FND_API.G_RET_STS_ERROR;
2634: END IF;
2635: CLOSE relationship_cur;
2636: ELSE
2637: cur_party_id := l_party_id;

Line 2653: -- x_return_status := FND_API.G_RET_STS_ERROR;

2649: aso_debug_pub.add('account site use status = ' || cust_site_use_status, 1,'N');
2650: END IF;
2651: IF (site_use_cur%NOTFOUND) THEN
2652: l_site_use_id := NULL;
2653: -- x_return_status := FND_API.G_RET_STS_ERROR;
2654: ELSE
2655: IF cust_acct_site_status <> 'A' OR cust_site_use_status <> 'A' THEN
2656: l_site_use_id := NULL;
2657: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2657: x_return_status := FND_API.G_RET_STS_ERROR;

2653: -- x_return_status := FND_API.G_RET_STS_ERROR;
2654: ELSE
2655: IF cust_acct_site_status <> 'A' OR cust_site_use_status <> 'A' THEN
2656: l_site_use_id := NULL;
2657: x_return_status := FND_API.G_RET_STS_ERROR;
2658: IF p_acct_site_type = 'BILL_TO' THEN
2659: FND_MESSAGE.Set_Name('ASO','ASO_INV_CUST_SITE_INACTIVE');
2660: ELSE
2661: FND_MESSAGE.Set_Name('ASO','ASO_SHIP_CUST_SITE_INACTIVE');

Line 2762: l_multiple_flag VARCHAR2(1) := FND_API.G_FALSE;

2758: l_party_type VARCHAR2(30);
2759: l_cust_account_role_id number;
2760: l_party_id number;
2761: l_relationship_party_id number := NULL;
2762: l_multiple_flag VARCHAR2(1) := FND_API.G_FALSE;
2763: l_count_relationship number := 0;
2764: l_acct_site_type VARCHAR2(50);
2765: begin
2766:

Line 2767: x_return_status := FND_API.G_RET_STS_SUCCESS;

2763: l_count_relationship number := 0;
2764: l_acct_site_type VARCHAR2(50);
2765: begin
2766:
2767: x_return_status := FND_API.G_RET_STS_SUCCESS;
2768: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2769: aso_debug_pub.add('site use in get_cust_account_roles = ' || p_acct_site_type,1,'N');
2770: aso_debug_pub.add('p_party_id = ' || p_party_id,1,'N');
2771: END IF;

Line 2781: x_return_status := FND_API.G_RET_STS_ERROR;

2777: OPEN party_cur;
2778: FETCH party_cur INTO l_party_type;
2779: IF (party_cur%NOTFOUND) THEN
2780: l_party_type := NULL;
2781: x_return_status := FND_API.G_RET_STS_ERROR;
2782: END IF;
2783: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2784: aso_debug_pub.add('party_type in get_cust_account_roles = ' || l_party_type,1,'N');
2785: END IF;

Line 2793: x_return_status := FND_API.G_RET_STS_ERROR;

2789: OPEN cust_cur;
2790: FETCH cust_cur INTO l_party_id;
2791: IF cust_cur%NOTFOUND THEN
2792: l_party_id := NULL;
2793: x_return_status := FND_API.G_RET_STS_ERROR;
2794: END IF;
2795: CLOSE cust_cur;
2796:
2797: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2802: x_party_id := FND_API.G_MISS_NUM;

2798: aso_debug_pub.add('l_party_id = ' || l_party_id, 1,'N');
2799: END IF;
2800: IF l_party_id IS NOT NULL AND l_party_id = p_party_id THEN
2801: -- p_party_id is owner of account, hence not a contact
2802: x_party_id := FND_API.G_MISS_NUM;
2803: x_cust_account_role_id := FND_API.G_MISS_NUM;
2804: return;
2805: END IF;
2806:

Line 2803: x_cust_account_role_id := FND_API.G_MISS_NUM;

2799: END IF;
2800: IF l_party_id IS NOT NULL AND l_party_id = p_party_id THEN
2801: -- p_party_id is owner of account, hence not a contact
2802: x_party_id := FND_API.G_MISS_NUM;
2803: x_cust_account_role_id := FND_API.G_MISS_NUM;
2804: return;
2805: END IF;
2806:
2807: OPEN person_relationship_cur;

Line 2810: EXIT WHEN person_relationship_cur%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;

2806:
2807: OPEN person_relationship_cur;
2808: LOOP
2809: FETCH person_relationship_cur INTO l_relationship_party_id;
2810: EXIT WHEN person_relationship_cur%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;
2811: l_count_relationship := l_count_relationship + 1;
2812:
2813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2814: aso_debug_pub.add('relationship_party_id = ' || l_relationship_party_id,1,'N');

Line 2825: EXIT WHEN cust_role%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;

2821: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2822: aso_debug_pub.add('looping in cust_role',1,'N');
2823: END IF;
2824: FETCH cust_role INTO l_cust_account_role_id, cust_account_role_status;
2825: EXIT WHEN cust_role%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;
2826: IF (cust_role%ROWCOUNT) > 1 THEN
2827: x_return_status := FND_API.G_RET_STS_ERROR;
2828: END IF;
2829: END LOOP;

Line 2827: x_return_status := FND_API.G_RET_STS_ERROR;

2823: END IF;
2824: FETCH cust_role INTO l_cust_account_role_id, cust_account_role_status;
2825: EXIT WHEN cust_role%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;
2826: IF (cust_role%ROWCOUNT) > 1 THEN
2827: x_return_status := FND_API.G_RET_STS_ERROR;
2828: END IF;
2829: END LOOP;
2830: CLOSE cust_role;
2831:

Line 2838: IF person_relationship_cur%ROWCOUNT > 1 AND l_multiple_flag = FND_API.G_TRUE

2834: aso_debug_pub.add('rowcount = ' || person_relationship_cur%ROWCOUNT,1,'N');
2835: aso_debug_pub.add('l_multiple_flag = ' || l_multiple_flag,1,'N');
2836: END IF;
2837:
2838: IF person_relationship_cur%ROWCOUNT > 1 AND l_multiple_flag = FND_API.G_TRUE
2839: THEN
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841: END IF;
2842: IF l_cust_account_role_id IS NOT NULL THEN

Line 2840: x_return_status := FND_API.G_RET_STS_ERROR;

2836: END IF;
2837:
2838: IF person_relationship_cur%ROWCOUNT > 1 AND l_multiple_flag = FND_API.G_TRUE
2839: THEN
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841: END IF;
2842: IF l_cust_account_role_id IS NOT NULL THEN
2843: l_multiple_flag := FND_API.G_TRUE;
2844: END IF;

Line 2843: l_multiple_flag := FND_API.G_TRUE;

2839: THEN
2840: x_return_status := FND_API.G_RET_STS_ERROR;
2841: END IF;
2842: IF l_cust_account_role_id IS NOT NULL THEN
2843: l_multiple_flag := FND_API.G_TRUE;
2844: END IF;
2845: END LOOP;
2846: IF l_count_relationship = 0 THEN
2847: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2847: x_return_status := FND_API.G_RET_STS_ERROR;

2843: l_multiple_flag := FND_API.G_TRUE;
2844: END IF;
2845: END LOOP;
2846: IF l_count_relationship = 0 THEN
2847: x_return_status := FND_API.G_RET_STS_ERROR;
2848: END IF;
2849: CLOSE person_relationship_cur;
2850: x_party_id := l_relationship_party_id;
2851: END IF; --end person

Line 2857: x_return_status := FND_API.G_RET_STS_ERROR;

2853: OPEN org_contact;
2854: FETCH org_contact INTO l_org_contact_id;
2855: IF (org_contact%NOTFOUND) THEN
2856: l_org_contact_id := NULL;
2857: x_return_status := FND_API.G_RET_STS_ERROR;
2858: END IF;
2859: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2860: aso_debug_pub.add('org_contact_id in get_cust_acct_roles = '|| l_org_contact_id,1,'N');
2861: END IF;

Line 2870: -- x_return_status := FND_API.G_RET_STS_ERROR;

2866: CLOSE cust_role_exists;
2867:
2868: IF NVL(l_exists,'N') <> 'Y' THEN
2869: l_cust_account_role_id := NULL;
2870: -- x_return_status := FND_API.G_RET_STS_ERROR;
2871: ELSE
2872: OPEN cust_role(p_party_id);
2873: FETCH cust_role INTO l_cust_account_role_id, cust_account_role_status;
2874:

Line 2882: x_return_status := FND_API.G_RET_STS_ERROR;

2878: END IF;
2879:
2880: IF (cust_role%NOTFOUND) THEN
2881: l_cust_account_role_id := NULL;
2882: x_return_status := FND_API.G_RET_STS_ERROR;
2883: IF p_acct_site_type = 'BILL_TO' THEN
2884: FND_MESSAGE.Set_Name('ASO','ASO_INV_CUST_ROLE_INACTIVE');
2885: ELSIF p_acct_site_type = 'END_USER' THEN
2886: FND_MESSAGE.Set_Name('ASO','ASO_END_CUST_ROLE_INACTIVE');

Line 2962: x_return_status := FND_API.G_RET_STS_ERROR;

2958:
2959: LOOP
2960: FETCH C_get_cust_id_from_party_id INTO lx_cust_id;
2961: IF C_get_cust_id_from_party_id%ROWCOUNT > 1 THEN
2962: x_return_status := FND_API.G_RET_STS_ERROR;
2963: EXIT;
2964: END IF;
2965: EXIT WHEN C_get_cust_id_from_party_id%NOTFOUND;
2966: END LOOP;

Line 2970: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2966: END LOOP;
2967:
2968: CLOSE C_get_cust_id_from_party_id;
2969:
2970: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2971: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2972: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2973: FND_MSG_PUB.ADD;
2974: raise FND_API.G_EXC_ERROR;

Line 2974: raise FND_API.G_EXC_ERROR;

2970: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2971: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2972: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2973: FND_MSG_PUB.ADD;
2974: raise FND_API.G_EXC_ERROR;
2975: END IF;
2976:
2977: ELSIF l_party_type = 'PARTY_RELATIONSHIP' THEN
2978: OPEN account_user_cur;

Line 2982: x_return_status := FND_API.G_RET_STS_ERROR;

2978: OPEN account_user_cur;
2979: LOOP
2980: FETCH account_user_cur INTO lx_cust_id;
2981: IF account_user_cur%ROWCOUNT > 1 THEN
2982: x_return_status := FND_API.G_RET_STS_ERROR;
2983: EXIT;
2984: END IF;
2985: EXIT WHEN C_get_cust_id_from_party_id%NOTFOUND;
2986: END LOOP;

Line 2988: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2984: END IF;
2985: EXIT WHEN C_get_cust_id_from_party_id%NOTFOUND;
2986: END LOOP;
2987: CLOSE account_user_cur;
2988: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2989: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2990: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2991: FND_MSG_PUB.ADD;
2992: raise FND_API.G_EXC_ERROR;

Line 2992: raise FND_API.G_EXC_ERROR;

2988: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2989: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2990: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2991: FND_MSG_PUB.ADD;
2992: raise FND_API.G_EXC_ERROR;
2993: END IF;
2994: END IF;
2995:
2996: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN

Line 2996: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN

2992: raise FND_API.G_EXC_ERROR;
2993: END IF;
2994: END IF;
2995:
2996: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN
2997: IF p_qte_rec.party_id is not NULL
2998: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
2999: ASO_PARTY_INT.Create_Customer_Account(
3000: p_api_version => 1.0

Line 2998: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN

2994: END IF;
2995:
2996: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN
2997: IF p_qte_rec.party_id is not NULL
2998: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
2999: ASO_PARTY_INT.Create_Customer_Account(
3000: p_api_version => 1.0
3001: ,P_Qte_REC => p_qte_rec
3002: ,x_return_status => l_return_status

Line 3008: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

3004: ,x_msg_data => l_msg_data
3005: ,x_acct_id => cust_account_id
3006: );
3007:
3008: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN
3009: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
3010: THEN
3011: FND_MESSAGE.Set_Name('ASO', 'ASO_CUST_ACCOUNT');
3012: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);

Line 3015: raise FND_API.G_EXC_ERROR;

3011: FND_MESSAGE.Set_Name('ASO', 'ASO_CUST_ACCOUNT');
3012: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
3013: FND_MSG_PUB.ADD;
3014: END IF;
3015: raise FND_API.G_EXC_ERROR;
3016: END IF;
3017:
3018: p_Cust_Acct_Id := cust_account_id;
3019: END IF;

Line 3077: x_return_status := FND_API.G_RET_STS_SUCCESS;

3073:
3074: l_party_id NUMBER;
3075: BEGIN
3076:
3077: x_return_status := FND_API.G_RET_STS_SUCCESS;
3078:
3079:
3080: OPEN C_party;
3081: FETCH C_party INTO l_party_id;

Line 3083: x_return_status := FND_API.G_RET_STS_ERROR;

3079:
3080: OPEN C_party;
3081: FETCH C_party INTO l_party_id;
3082: IF (C_party%NOTFOUND) THEN
3083: x_return_status := FND_API.G_RET_STS_ERROR;
3084: END IF;
3085: CLOSE C_party;
3086:
3087: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 3105: x_return_status := FND_API.G_RET_STS_ERROR;

3101: FETCH C_inactive_contact INTO x_cust_account_role_id, cust_account_role_status;
3102: IF C_inactive_contact%FOUND THEN
3103: -- this means there are ONLY inactive contacts
3104: x_cust_account_role_id := NULL;
3105: x_return_status := FND_API.G_RET_STS_ERROR;
3106: FND_MESSAGE.Set_Name('ASO','ASO_SOLD_CUST_ROLE_INACTIVE');
3107: FND_MSG_PUB.ADD;
3108: ELSE
3109: -- this means there are no contacts

Line 3383: := FND_API.G_MISS_NUM;

3379: l_header_price_att_tbl(p_att_count).order_price_attrib_id
3380: := p_header_price_attributes_tbl(i).price_attribute_id;
3381: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3382: l_header_price_att_tbl(p_att_count).order_price_attrib_id
3383: := FND_API.G_MISS_NUM;
3384: END IF;
3385:
3386: l_header_price_att_tbl(p_att_count).operation := p_operation;
3387:

Line 3524: l_header_adj_tbl(adj_count).price_adjustment_id := FND_API.G_MISS_NUM;

3520: := p_qte_rec.quote_header_id;
3521: l_header_adj_tbl(adj_count).price_adjustment_id
3522: := p_header_price_adj_tbl(i).price_adjustment_id;
3523: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3524: l_header_adj_tbl(adj_count).price_adjustment_id := FND_API.G_MISS_NUM;
3525: END IF;
3526:
3527: l_header_adj_tbl(adj_count).operation := p_operation;
3528:

Line 3602: := FND_API.G_MISS_NUM;

3598: l_header_adj_att_tbl(attr_count).price_adj_attrib_id
3599: := p_header_price_adj_attr_tbl(j).price_adj_attrib_id;
3600: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3601: l_header_adj_att_tbl(attr_count).price_adj_attrib_id
3602: := FND_API.G_MISS_NUM;
3603: END IF;
3604:
3605: l_header_adj_att_tbl(attr_count).operation := p_operation;
3606:

Line 3631: l_Header_Adj_Assoc_tbl(i).price_adj_assoc_id := FND_API.G_MISS_NUM;

3627: FOR j in 1..P_header_Price_Adj_rltship_Tbl.count LOOP
3628:
3629:
3630: IF P_operation = OE_GLOBALS.G_OPR_CREATE THEN
3631: l_Header_Adj_Assoc_tbl(i).price_adj_assoc_id := FND_API.G_MISS_NUM;
3632: l_Header_Adj_Assoc_tbl(i).Adj_index
3633: := P_Header_Price_Adj_rltship_Tbl(j).PRICE_ADJ_INDEX ;
3634: l_Header_Adj_Assoc_tbl(i).Rltd_Adj_Index
3635: := P_Header_Price_Adj_rltship_Tbl(j).RLTD_PRICE_ADJ_INDEX;

Line 3742: l_Header_Scredit_tbl(sc_count).sales_credit_id := FND_API.G_MISS_NUM;

3738: := P_qte_rec.quote_header_id;
3739: l_Header_Scredit_tbl(sc_count).sales_credit_id
3740: := P_header_sales_credit_Tbl(j).sales_credit_id;
3741: ELSIF p_header_operation = OE_GLOBALS.G_OPR_CREATE THEN
3742: l_Header_Scredit_tbl(sc_count).sales_credit_id := FND_API.G_MISS_NUM;
3743: END IF;
3744:
3745: l_Header_Scredit_tbl(sc_count).operation := p_header_operation;
3746:

Line 4016: := FND_API.G_MISS_NUM;

4012: -- bug# 2020930 end
4013:
4014: IF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
4015: l_line_price_att_tbl(p_att_count).order_price_attrib_id
4016: := FND_API.G_MISS_NUM;
4017: ELSIF p_operation = OE_GLOBALS.G_OPR_UPDATE THEN
4018: l_line_price_att_tbl(p_att_count).header_id
4019: := p_line_price_attributes_tbl(l).quote_header_id;
4020: l_line_price_att_tbl(p_att_count).line_id

Line 4089: IF p_operation <> OE_GLOBALS.G_OPR_CREATE AND p_operation <> FND_API.G_MISS_CHAR THEN

4085: l_line_adj_tbl(adj_count).attribute9 := p_line_price_adj_tbl(pad_count).attribute9;
4086: l_line_adj_tbl(adj_count).context := p_line_price_adj_tbl(pad_count).attribute_category;
4087: l_line_adj_tbl(adj_count).automatic_flag := p_line_price_adj_tbl(pad_count).automatic_flag;
4088:
4089: IF p_operation <> OE_GLOBALS.G_OPR_CREATE AND p_operation <> FND_API.G_MISS_CHAR THEN
4090:
4091: l_line_adj_tbl(adj_count).header_id := p_line_price_adj_tbl(pad_count).quote_header_id;
4092: l_line_adj_tbl(adj_count).line_id := p_line_price_adj_tbl(pad_count).quote_line_id;
4093:

Line 4096: l_line_adj_tbl(adj_count).price_adjustment_id := FND_API.G_MISS_NUM;

4092: l_line_adj_tbl(adj_count).line_id := p_line_price_adj_tbl(pad_count).quote_line_id;
4093:
4094: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
4095:
4096: l_line_adj_tbl(adj_count).price_adjustment_id := FND_API.G_MISS_NUM;
4097:
4098: END IF;
4099:
4100: l_line_adj_tbl(adj_count).operation := p_operation;

Line 4164: l_line_adj_att_tbl(attr_count).price_adj_attrib_id := FND_API.G_MISS_NUM;

4160:
4161: IF p_line_price_adj_attr_tbl(l).price_adj_index = pad_count THEN
4162:
4163: IF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
4164: l_line_adj_att_tbl(attr_count).price_adj_attrib_id := FND_API.G_MISS_NUM;
4165: ELSIF p_operation <> OE_GLOBALS.G_OPR_CREATE THEN
4166: l_line_adj_att_tbl(attr_count).price_adj_attrib_id := p_line_price_adj_attr_tbl(l).price_adj_attrib_id;
4167: l_line_adj_att_tbl(attr_count).price_adjustment_id := p_line_price_adj_attr_tbl(l).price_adjustment_id;
4168: END IF;

Line 4253: l_line_Adj_Assoc_tbl(adj_rlt_count).price_adj_assoc_id := FND_API.G_MISS_NUM;

4249: := P_Line_Price_Adj_rltship_Tbl(l).price_adj_index;
4250: l_Line_Adj_Assoc_tbl(adj_rlt_count).Rltd_Adj_index
4251: := P_Line_Price_Adj_rltship_Tbl(l).rltd_price_adj_index;
4252: l_Line_Adj_Assoc_tbl(adj_rlt_count).Line_Index := p_line_index;
4253: l_line_Adj_Assoc_tbl(adj_rlt_count).price_adj_assoc_id := FND_API.G_MISS_NUM;
4254:
4255: ELSIF l_Line_Adj_Assoc_tbl(adj_rlt_count).operation = OE_GLOBALS.G_OPR_UPDATE THEN
4256:
4257: l_Line_Adj_Assoc_tbl(adj_rlt_count).line_id

Line 4372: l_Line_Scredit_tbl(sc_count).sales_credit_id := FND_API.G_MISS_NUM;

4368: IF p_line_operation <> OE_GLOBALS.G_OPR_CREATE THEN
4369: l_Line_Scredit_tbl(sc_count).sales_credit_id
4370: := P_line_sales_credit_Tbl(l).sales_credit_id;
4371: ELSIF p_line_operation = OE_GLOBALS.G_OPR_CREATE THEN
4372: l_Line_Scredit_tbl(sc_count).sales_credit_id := FND_API.G_MISS_NUM;
4373: END IF;
4374:
4375: l_Line_Scredit_tbl(sc_count).operation := p_line_operation;
4376:

Line 4416: x_Line_tbl(p_line_index).payment_term_id := FND_API.G_MISS_NUM;

4412: l_Line_payment_tbl(pay_count).line_index := p_line_index;
4413:
4414: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
4415: IF P_Line_Payment_Tbl(i).payment_term_id IS NULL THEN
4416: x_Line_tbl(p_line_index).payment_term_id := FND_API.G_MISS_NUM;
4417: ELSE
4418: x_Line_tbl(p_line_index).payment_term_id := P_Line_Payment_Tbl(i).payment_term_id;
4419: END IF;
4420: ELSE

Line 4459: l_Line_Payment_tbl(pay_count).trxn_extension_id = FND_API.G_MISS_NUM ) Then

4455: END IF;
4456:
4457: /* Start : code change done for Bug 9401669 */
4458: If (l_Line_Payment_tbl(pay_count).trxn_extension_id Is Null Or
4459: l_Line_Payment_tbl(pay_count).trxn_extension_id = FND_API.G_MISS_NUM ) Then
4460:
4461: l_Line_Payment_tbl(pay_count).CC_INSTRUMENT_ASSIGNMENT_ID := P_Line_Payment_Tbl(i).INSTR_ASSIGNMENT_ID;
4462: l_Line_Payment_tbl(pay_count).CC_INSTRUMENT_ID := P_Line_Payment_Tbl(i).INSTRUMENT_ID;
4463:

Line 4478: l_Line_Payment_tbl(pay_count).receipt_method_id := fnd_api.g_miss_num;

4474:
4475: END IF; -- payment_type_code is not null
4476:
4477: -- Code Change done for Bug 14180257
4478: l_Line_Payment_tbl(pay_count).receipt_method_id := fnd_api.g_miss_num;
4479: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4480: aso_debug_pub.add('Map_Quote_to_order : Passing line receipt method id as g miss num' ,1,'N');
4481: END IF;
4482: