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 178: found VARCHAR2(1) := FND_API.G_FALSE;

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

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

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

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

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

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

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

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

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

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

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

Line 387: RAISE FND_API.G_EXC_ERROR;

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

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

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

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

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

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

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

Line 401: RAISE FND_API.G_EXC_ERROR;

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

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

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

Line 441: p_init_msg_list => FND_API.G_FALSE,

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

Line 450: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 456: raise FND_API.G_EXC_ERROR;

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

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

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

Line 474: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 481: raise FND_API.G_EXC_ERROR;

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

Line 518: RAISE FND_API.G_EXC_ERROR;

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

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

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

Line 542: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 543: RAISE FND_API.G_EXC_ERROR;

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

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

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

Line 556: p_qte_rec.org_contact_id = FND_API.G_MISS_NUM THEN

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

Line 568: l_org_contact <> FND_API.G_MISS_NUM THEN

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

Line 582: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 588: raise FND_API.G_EXC_ERROR;

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

Line 592: l_header_rec.sold_to_contact_id = FND_API.G_MISS_NUM THEN

588: raise FND_API.G_EXC_ERROR;
589: END IF;
590:
591: IF l_header_rec.sold_to_contact_id is NULL OR
592: l_header_rec.sold_to_contact_id = FND_API.G_MISS_NUM THEN
593: IF aso_debug_pub.g_debug_flag = 'Y' THEN
594: aso_debug_pub.add('calling create contact role for org contact:l_org_contact_party_id: '||l_org_contact_party_id,1, 'N');
595: 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');
596: END IF;

Line 609: IF L_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 616: raise FND_API.G_EXC_ERROR;

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

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

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

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

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

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

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

Line 659: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 665: raise FND_API.G_EXC_ERROR;

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

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

685: x_msg_data => l_msg_data,
686: x_cust_account_role_id => l_header_rec.invoice_to_contact_id);
687:
688: IF l_header_rec.invoice_to_contact_id IS NULL THEN
689: l_header_rec.invoice_to_contact_id := FND_API.G_MISS_NUM;
690: END IF;
691:
692: IF aso_debug_pub.g_debug_flag = 'Y' THEN
693: 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 696: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

692: IF aso_debug_pub.g_debug_flag = 'Y' THEN
693: 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');
694: END IF;
695:
696: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
697: raise FND_API.G_EXC_ERROR;
698: END IF;
699:
700: -- end_cust

Line 697: raise FND_API.G_EXC_ERROR;

693: 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');
694: END IF;
695:
696: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
697: raise FND_API.G_EXC_ERROR;
698: END IF;
699:
700: -- end_cust
701: IF aso_debug_pub.g_debug_flag = 'Y' THEN

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

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

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

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

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

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

Line 738: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 744: raise FND_API.G_EXC_ERROR;

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

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

766: x_msg_data => l_msg_data,
767: x_cust_account_role_id => l_header_rec.End_Customer_contact_id);
768:
769: IF l_header_rec.End_Customer_contact_id IS NULL THEN
770: l_header_rec.End_Customer_contact_id := FND_API.G_MISS_NUM;
771: END IF;
772:
773: IF aso_debug_pub.g_debug_flag = 'Y' THEN
774: 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 778: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

774: 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');
775: 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');
776: END IF;
777:
778: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
779: raise FND_API.G_EXC_ERROR;
780: END IF;
781:
782: -- end_cust

Line 779: raise FND_API.G_EXC_ERROR;

775: 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');
776: END IF;
777:
778: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
779: raise FND_API.G_EXC_ERROR;
780: END IF;
781:
782: -- end_cust
783:

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

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

Line 807: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 808: RAISE FND_API.G_EXC_ERROR;

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

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

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

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

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

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

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

Line 849: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

Line 855: raise FND_API.G_EXC_ERROR;

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

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

875: x_msg_data => l_msg_data,
876: x_cust_account_role_id => l_header_rec.ship_to_contact_id);
877:
878: IF l_header_rec.ship_to_contact_id IS NULL THEN
879: l_header_rec.ship_to_contact_id := FND_API.G_MISS_NUM;
880: END IF;
881:
882: IF aso_debug_pub.g_debug_flag = 'Y' THEN
883: 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 886: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

882: IF aso_debug_pub.g_debug_flag = 'Y' THEN
883: 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');
884: END IF;
885:
886: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
887: raise FND_API.G_EXC_ERROR;
888: END IF;
889:
890: END IF; -- shipment tbl count

Line 887: raise FND_API.G_EXC_ERROR;

883: 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');
884: END IF;
885:
886: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
887: raise FND_API.G_EXC_ERROR;
888: END IF;
889:
890: END IF; -- shipment tbl count
891: IF aso_debug_pub.g_debug_flag = 'Y' THEN

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 1060: p_qte_rec.quote_source_code = FND_API.G_MISS_CHAR THEN

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

Line 1076: l_quote_source := FND_API.G_MISS_CHAR;

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

Line 1090: l_quote_source <> FND_API.G_MISS_CHAR THEN

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

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

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

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

1156: END IF; -- payment_type_code is not null
1157:
1158: -- bug 5613870
1159: IF p_header_payment_tbl(i).payment_type_code = 'CREDIT_CARD' THEN
1160: l_header_payment_tbl(pay_count).receipt_method_id := fnd_api.g_miss_num;
1161: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1162: aso_debug_pub.add('Passing receipt method id as g miss num' ,1,'N');
1163: END IF;
1164: END IF;

Line 1183: :=FND_API.G_MISS_CHAR;

1179: --bug 1921958
1180: IF (p_header_shipment_tbl(i).shipping_instructions IS NULL) AND
1181: (l_om_defaulting_prof = 'Y') THEN
1182: l_header_rec.shipping_instructions
1183: :=FND_API.G_MISS_CHAR;
1184: ELSE
1185: l_header_rec.shipping_instructions
1186: :=rtrim(p_header_shipment_tbl(i).shipping_instructions);
1187: END IF;

Line 1192: :=FND_API.G_MISS_CHAR;

1188:
1189: IF (p_header_shipment_tbl(i).packing_instructions IS NULL) AND
1190: (l_om_defaulting_prof = 'Y') THEN
1191: l_header_rec.packing_instructions
1192: :=FND_API.G_MISS_CHAR;
1193: ELSE
1194: l_header_rec.packing_instructions
1195: :=rtrim(p_header_shipment_tbl(i).packing_instructions);
1196: END IF;

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

1201: END IF;
1202:
1203: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
1204: IF p_header_shipment_tbl(i).FOB_CODE is null then
1205: l_header_rec.fob_point_code := FND_API.G_MISS_CHAR;
1206: ELSE -- 3465720
1207: l_header_rec.fob_point_code := p_header_shipment_tbl(i).fob_code;
1208: end if;
1209: IF p_header_shipment_tbl(i).FREIGHT_TERMS_CODE is null then

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

1206: ELSE -- 3465720
1207: l_header_rec.fob_point_code := p_header_shipment_tbl(i).fob_code;
1208: end if;
1209: IF p_header_shipment_tbl(i).FREIGHT_TERMS_CODE is null then
1210: l_header_rec.FREIGHT_TERMS_CODE := FND_API.G_MISS_CHAR;
1211: ELSE -- 3465720
1212: l_header_rec.FREIGHT_TERMS_CODE := p_header_shipment_tbl(i).freight_terms_code;
1213: end if;
1214: IF p_header_shipment_tbl(i).SHIPMENT_PRIORITY_CODE is null then

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

1211: ELSE -- 3465720
1212: l_header_rec.FREIGHT_TERMS_CODE := p_header_shipment_tbl(i).freight_terms_code;
1213: end if;
1214: IF p_header_shipment_tbl(i).SHIPMENT_PRIORITY_CODE is null then
1215: l_header_rec.SHIPMENT_PRIORITY_CODE := FND_API.G_MISS_CHAR;
1216: ELSE -- 3465720
1217: l_header_rec.SHIPMENT_PRIORITY_CODE := p_header_shipment_tbl(i).shipment_priority_code;
1218: end if;
1219: IF p_header_shipment_tbl(i).ship_method_code is null then

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

1216: ELSE -- 3465720
1217: l_header_rec.SHIPMENT_PRIORITY_CODE := p_header_shipment_tbl(i).shipment_priority_code;
1218: end if;
1219: IF p_header_shipment_tbl(i).ship_method_code is null then
1220: l_header_rec.shipping_method_code := FND_API.G_MISS_CHAR;
1221: ELSE -- 3582285
1222: l_header_rec.shipping_method_code := p_header_shipment_tbl(i).ship_method_code;
1223: end if;
1224:

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

1246: aso_debug_pub.add('request date= ' ||l_header_rec.request_date,1,'N');
1247: 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');
1248: END IF;
1249: IF p_header_shipment_tbl(i).Ship_From_Org_Id IS NOT NULL AND
1250: p_header_shipment_tbl(i).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN
1251:
1252: l_header_rec.Ship_From_Org_Id
1253: :=p_header_shipment_tbl(i).Ship_From_Org_Id;
1254: END IF;

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

1253: :=p_header_shipment_tbl(i).Ship_From_Org_Id;
1254: END IF;
1255:
1256: -- bug 4916969
1257: 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
1258: l_header_rec.demand_class_code := p_header_shipment_tbl(i).demand_class_code;
1259:
1260: end if;
1261:

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

1278: aso_debug_pub.add('MapQ: l_reservation_lvl_prof: '||l_reservation_lvl_prof,1,'N');
1279: END IF;
1280:
1281: IF (l_header_rec.order_type_id is not null AND
1282: l_header_rec.order_type_id <> FND_API.G_MISS_NUM) AND
1283: l_reservation_lvl_prof = 'AUTO_ORDER' THEN
1284: OPEN scheduling_level_cur(l_header_rec.order_type_id);
1285: FETCH scheduling_level_cur INTO l_order_scheduling_level;
1286: CLOSE scheduling_level_cur;

Line 1360: found := FND_API.G_FALSE;

1356: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1357: aso_debug_pub.add('mapping quote lines',1,'N');
1358: END IF;
1359: FOR j in 1..P_line_Shipment_Tbl.count LOOP
1360: found := FND_API.G_FALSE;
1361: FOR k in 1..p_qte_line_tbl.count LOOP
1362:
1363: -- kchervel the quantity check should be done before the loop.
1364:

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

1373: aso_debug_pub.add('map_quote_to_order- p_qte_line_tbl(k).minisite_id: '||p_qte_line_tbl(k).minisite_id,1, 'N');
1374: aso_debug_pub.add('map_quote_to_order- p_qte_rec.minisite_id: '||p_qte_rec.minisite_id,1, 'N');
1375: END IF;
1376: IF p_qte_line_tbl(k).Commitment_Id IS NOT NULL AND
1377: p_qte_line_tbl(k).Commitment_Id <> FND_API.G_MISS_NUM THEN
1378: l_line_tbl(i).Commitment_Id := p_qte_line_tbl(k).Commitment_Id;
1379: END IF;
1380:
1381: IF p_qte_line_tbl(k).Agreement_Id IS NOT NULL AND

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

1378: l_line_tbl(i).Commitment_Id := p_qte_line_tbl(k).Commitment_Id;
1379: END IF;
1380:
1381: IF p_qte_line_tbl(k).Agreement_Id IS NOT NULL AND
1382: p_qte_line_tbl(k).Agreement_Id <> FND_API.G_MISS_NUM THEN
1383: l_line_tbl(i).Agreement_Id := p_qte_line_tbl(k).Agreement_Id;
1384: END IF;
1385: -- EDU
1386:

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

1384: END IF;
1385: -- EDU
1386:
1387: IF p_qte_line_tbl(k).Item_Revision IS NOT NULL AND
1388: p_qte_line_tbl(k).Item_Revision <> FND_API.G_MISS_CHAR THEN
1389: l_line_tbl(i).Item_Revision := p_qte_line_tbl(k).Item_Revision;
1390: END IF;
1391:
1392: l_line_tbl(i).minisite_id := p_qte_line_tbl(k).minisite_id;

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

1425:
1426: -- Recurring charge Change
1427: --l_line_tbl(i).charge_periodicity_code := p_qte_line_tbl(k).charge_periodicity_code;
1428:
1429: IF p_qte_line_tbl(k).invoice_to_cust_account_id <> FND_API.G_MISS_NUM AND
1430: p_qte_line_tbl(k).invoice_to_cust_account_id IS NOT NULL AND
1431: p_qte_line_tbl(k).invoice_to_cust_account_id <> l_cust_account_id THEN
1432: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1433: aso_debug_pub.add('mapq line: before cust_acct_reltn:p_sold_to_cust_account: '||l_cust_account_id,1,'N');

Line 1449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1445:
1446: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1447: aso_debug_pub.add('mapq line: after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
1448: END IF;
1449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1450: RAISE FND_API.G_EXC_ERROR;
1451: END IF;
1452:
1453: END IF;

Line 1450: RAISE FND_API.G_EXC_ERROR;

1446: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1447: aso_debug_pub.add('mapq line: after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
1448: END IF;
1449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1450: RAISE FND_API.G_EXC_ERROR;
1451: END IF;
1452:
1453: END IF;
1454:

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

1452:
1453: END IF;
1454:
1455: IF p_qte_line_tbl(k).invoice_to_cust_account_id is not NULL AND
1456: p_qte_line_tbl(k).invoice_to_cust_account_id <> FND_API.G_MISS_NUM THEN
1457: l_invoice_cust_account_id := p_qte_line_tbl(k).invoice_to_cust_account_id;
1458: ELSE
1459: l_invoice_cust_account_id := l_header_rec.sold_to_org_id;
1460: END IF;

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

1463: aso_debug_pub.add('mapq line: before cust_acct_site:l_invoice_cust_account_id: '||l_invoice_cust_account_id,1,'N');
1464: 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');
1465: END IF;
1466: IF p_qte_line_tbl(k).invoice_to_party_site_id is not NULL
1467: AND p_qte_line_tbl(k).invoice_to_party_site_id <> FND_API.G_MISS_NUM THEN
1468:
1469: ASO_CHECK_TCA_PVT.Customer_Account_Site
1470: (
1471: p_api_version => 1.0

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

1479: ,x_site_use_id => l_line_tbl(i).invoice_to_org_id
1480: );
1481:
1482: IF l_line_tbl(i).invoice_to_org_id IS NULL THEN
1483: l_line_tbl(i).invoice_to_org_id := FND_API.G_MISS_NUM;
1484: END IF;
1485:
1486: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1487: 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 1490: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1486: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1487: 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');
1488: aso_debug_pub.add('mapq line: after cust_acct_site:l_ln_inv_cust_acct_site: '||l_ln_inv_cust_acct_site,1,'N');
1489: END IF;
1490: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1491: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
1492: THEN
1493: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
1494: FND_MSG_PUB.ADD;

Line 1496: raise FND_API.G_EXC_ERROR;

1492: THEN
1493: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
1494: FND_MSG_PUB.ADD;
1495: END IF;
1496: raise FND_API.G_EXC_ERROR;
1497: END IF;
1498:
1499: END IF;
1500:

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

1514: x_msg_data => l_msg_data,
1515: x_cust_account_role_id => l_line_tbl(i).invoice_to_contact_id);
1516:
1517: IF l_line_tbl(i).invoice_to_contact_id IS NULL THEN
1518: l_line_tbl(i).invoice_to_contact_id := FND_API.G_MISS_NUM;
1519: END IF;
1520:
1521: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1522: 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 1525: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1521: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1522: 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');
1523: END IF;
1524:
1525: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1526: raise FND_API.G_EXC_ERROR;
1527: END IF;
1528:
1529: -- end_cust

Line 1526: raise FND_API.G_EXC_ERROR;

1522: 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');
1523: END IF;
1524:
1525: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1526: raise FND_API.G_EXC_ERROR;
1527: END IF;
1528:
1529: -- end_cust
1530: IF p_qte_line_tbl(k).End_Customer_cust_account_id is not NULL AND

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

1527: END IF;
1528:
1529: -- end_cust
1530: IF p_qte_line_tbl(k).End_Customer_cust_account_id is not NULL AND
1531: p_qte_line_tbl(k).End_Customer_cust_account_id <> FND_API.G_MISS_NUM THEN
1532: l_End_cust_account_id := p_qte_line_tbl(k).End_Customer_cust_account_id;
1533: ELSE
1534: l_End_cust_account_id := l_header_rec.sold_to_org_id;
1535: END IF;

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

1538: aso_debug_pub.add('mapq line: before cust_acct_site:l_End_cust_account_id: '||l_End_cust_account_id,1,'N');
1539: 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');
1540: END IF;
1541: IF p_qte_line_tbl(k).End_Customer_party_site_id is not NULL
1542: AND p_qte_line_tbl(k).End_Customer_party_site_id <> FND_API.G_MISS_NUM THEN
1543:
1544: ASO_CHECK_TCA_PVT.Customer_Account_Site
1545: (
1546: p_api_version => 1.0

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

1554: ,x_site_use_id => l_line_tbl(i).End_Customer_site_use_id
1555: );
1556:
1557: IF l_line_tbl(i).End_Customer_site_use_id IS NULL THEN
1558: l_line_tbl(i).End_Customer_site_use_id := FND_API.G_MISS_NUM;
1559: END IF;
1560:
1561: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1562: 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 1565: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1561: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1562: 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');
1563: aso_debug_pub.add('mapq line: after cust_acct_site:l_ln_end_cust_acct_site: '||l_ln_end_cust_acct_site,1,'N');
1564: END IF;
1565: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1566: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
1567: THEN
1568: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_END_SITE_AC_CRS');
1569: FND_MSG_PUB.ADD;

Line 1571: raise FND_API.G_EXC_ERROR;

1567: THEN
1568: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_END_SITE_AC_CRS');
1569: FND_MSG_PUB.ADD;
1570: END IF;
1571: raise FND_API.G_EXC_ERROR;
1572: END IF;
1573:
1574: l_line_tbl(i).End_Customer_Id := l_End_cust_account_id;
1575:

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

1591: x_msg_data => l_msg_data,
1592: x_cust_account_role_id => l_line_tbl(i).End_Customer_contact_id);
1593:
1594: IF l_line_tbl(i).End_Customer_contact_id IS NULL THEN
1595: l_line_tbl(i).End_Customer_contact_id := FND_API.G_MISS_NUM;
1596: END IF;
1597:
1598: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1599: 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 1603: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1599: 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');
1600: 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');
1601: END IF;
1602:
1603: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1604: raise FND_API.G_EXC_ERROR;
1605: END IF;
1606: -- end_cust
1607:

Line 1604: raise FND_API.G_EXC_ERROR;

1600: 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');
1601: END IF;
1602:
1603: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1604: raise FND_API.G_EXC_ERROR;
1605: END IF;
1606: -- end_cust
1607:
1608: -- item type code in OC is different from OM and this will be defaulted by OM

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

1615: -- this piece of code should be in submit_quote. this is done because OM
1616: -- does its defaulting only if it is g_miss and not if it is null
1617:
1618: IF l_line_tbl(i).line_type_id is NULL THEN
1619: l_line_tbl(i).line_type_id := FND_API.G_MISS_NUM;
1620: END IF;
1621:
1622: l_line_tbl(i).line_category_code := p_qte_line_tbl(k).line_category_code;
1623: l_line_tbl(i).org_id := l_header_rec.org_id;

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

1622: l_line_tbl(i).line_category_code := p_qte_line_tbl(k).line_category_code;
1623: l_line_tbl(i).org_id := l_header_rec.org_id;
1624:
1625: IF p_qte_line_tbl(k).priced_price_list_id IS NOT NULL AND
1626: p_qte_line_tbl(k).priced_price_list_id <> FND_API.G_MISS_NUM THEN
1627: l_line_tbl(i).price_list_id := p_qte_line_tbl(k).priced_price_list_id;
1628: ELSE
1629: l_line_tbl(i).price_list_id := p_qte_line_tbl(k).price_list_id;
1630: END IF;

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

1629: l_line_tbl(i).price_list_id := p_qte_line_tbl(k).price_list_id;
1630: END IF;
1631:
1632: IF l_line_tbl(i).price_list_id IS NULL THEN
1633: l_line_tbl(i).price_list_id := FND_API.G_MISS_NUM;
1634: END IF;
1635:
1636: l_line_tbl(i).unit_list_price
1637: := p_qte_line_tbl(k).line_list_price;

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

1706: IF p_qte_line_dtl_tbl(l).service_ref_type_code = 'QUOTE' THEN
1707: l_line_tbl(i).service_reference_type_code := 'ORDER';
1708:
1709: -- line_id should be G_MISS_NUM. bug 1399679
1710: l_line_tbl(i).service_reference_line_id := FND_API.G_MISS_NUM;
1711: l_line_tbl(i).service_line_index
1712: := ASO_ORDER_INT.Service_Index (
1713: p_qte_line_dtl_tbl(l).quote_line_id ,
1714: p_qte_line_dtl_tbl(l).qte_line_index ,

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

1717: END IF;
1718:
1719: IF p_qte_line_dtl_tbl(l).service_ref_type_code = 'ORDER' THEN
1720: IF p_qte_line_dtl_tbl(l).service_ref_line_id IS NULL OR
1721: p_qte_line_dtl_tbl(l).service_ref_line_id = FND_API.G_MISS_NUM THEN
1722: l_line_tbl(i).service_line_index := p_qte_line_dtl_tbl(l).service_ref_qte_line_index;
1723: END IF;
1724: END IF;
1725:

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

1731: l_line_tbl(i).reference_type
1732: := p_qte_line_dtl_tbl(l).return_ref_type;
1733:
1734: IF (p_qte_line_dtl_tbl(l).return_attribute1 is null or
1735: p_qte_line_dtl_tbl(l).return_attribute1 = FND_API.G_MISS_CHAR) AND
1736: (p_qte_line_dtl_tbl(l).return_ref_header_id is not null AND
1737: p_qte_line_dtl_tbl(l).return_ref_header_id <> FND_API.G_MISS_NUM) Then
1738:
1739: l_line_tbl(i).return_attribute1

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

1733:
1734: IF (p_qte_line_dtl_tbl(l).return_attribute1 is null or
1735: p_qte_line_dtl_tbl(l).return_attribute1 = FND_API.G_MISS_CHAR) AND
1736: (p_qte_line_dtl_tbl(l).return_ref_header_id is not null AND
1737: p_qte_line_dtl_tbl(l).return_ref_header_id <> FND_API.G_MISS_NUM) Then
1738:
1739: l_line_tbl(i).return_attribute1
1740: := p_qte_line_dtl_tbl(l).return_ref_header_id;
1741: ELSE

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

1756: l_line_tbl(i).return_attribute15
1757: := p_qte_line_dtl_tbl(l).return_attribute15;
1758:
1759: IF (p_qte_line_dtl_tbl(l).return_attribute2 is null or
1760: p_qte_line_dtl_tbl(l).return_attribute2 = FND_API.G_MISS_CHAR) AND
1761: (p_qte_line_dtl_tbl(l).return_ref_line_id is not null AND
1762: p_qte_line_dtl_tbl(l).return_ref_line_id <> FND_API.G_MISS_NUM) Then
1763:
1764: l_line_tbl(i).return_attribute2

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

1758:
1759: IF (p_qte_line_dtl_tbl(l).return_attribute2 is null or
1760: p_qte_line_dtl_tbl(l).return_attribute2 = FND_API.G_MISS_CHAR) AND
1761: (p_qte_line_dtl_tbl(l).return_ref_line_id is not null AND
1762: p_qte_line_dtl_tbl(l).return_ref_line_id <> FND_API.G_MISS_NUM) Then
1763:
1764: l_line_tbl(i).return_attribute2
1765: := p_qte_line_dtl_tbl(l).return_ref_line_id;
1766: ELSE

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

1799: IF p_qte_line_tbl(k).line_category_code = 'RETURN' THEN
1800:
1801: -- Default return reason code from profile
1802: IF (p_qte_line_dtl_tbl(l).return_reason_code IS NULL OR
1803: p_qte_line_dtl_tbl(l).return_reason_code = FND_API.G_MISS_CHAR) THEN
1804: IF(l_ret_reason_code_prof IS NULL) THEN
1805: l_return_status := FND_API.G_RET_STS_ERROR;
1806: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1807: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');

Line 1805: l_return_status := FND_API.G_RET_STS_ERROR;

1801: -- Default return reason code from profile
1802: IF (p_qte_line_dtl_tbl(l).return_reason_code IS NULL OR
1803: p_qte_line_dtl_tbl(l).return_reason_code = FND_API.G_MISS_CHAR) THEN
1804: IF(l_ret_reason_code_prof IS NULL) THEN
1805: l_return_status := FND_API.G_RET_STS_ERROR;
1806: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1807: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1808: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1809: FND_MSG_PUB.ADD;

Line 1810: RAISE FND_API.G_EXC_ERROR;

1806: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1807: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1808: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1809: FND_MSG_PUB.ADD;
1810: RAISE FND_API.G_EXC_ERROR;
1811: END IF;
1812: ELSE
1813: l_line_tbl(i).return_reason_code := l_ret_reason_code_prof;
1814: END IF;

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

1923:
1924: IF p_qte_line_tbl(k).line_category_code = 'RETURN' THEN
1925: -- Default return reason code from profile
1926: IF (l_line_tbl(i).return_reason_code IS NULL OR
1927: l_line_tbl(i).return_reason_code = FND_API.G_MISS_CHAR) THEN
1928: IF(l_ret_reason_code_prof IS NULL) THEN
1929: l_return_status := FND_API.G_RET_STS_ERROR;
1930: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1931: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');

Line 1929: l_return_status := FND_API.G_RET_STS_ERROR;

1925: -- Default return reason code from profile
1926: IF (l_line_tbl(i).return_reason_code IS NULL OR
1927: l_line_tbl(i).return_reason_code = FND_API.G_MISS_CHAR) THEN
1928: IF(l_ret_reason_code_prof IS NULL) THEN
1929: l_return_status := FND_API.G_RET_STS_ERROR;
1930: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1931: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1932: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1933: FND_MSG_PUB.ADD;

Line 1934: RAISE FND_API.G_EXC_ERROR;

1930: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1931: FND_MESSAGE.Set_Name('ASO', 'API_INVALID_ID');
1932: FND_MESSAGE.Set_Token('COLUMN', 'RETURN_REASON_CODE', FALSE);
1933: FND_MSG_PUB.ADD;
1934: RAISE FND_API.G_EXC_ERROR;
1935: END IF;
1936: ELSE
1937: l_line_tbl(i).return_reason_code := l_ret_reason_code_prof;
1938: END IF;

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

1942: END IF;
1943:
1944: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
1945: IF p_line_shipment_tbl(j).fob_code IS NULL THEN
1946: l_line_tbl(i).fob_point_code := FND_API.G_MISS_CHAR;
1947: ELSE -- 3465720
1948: l_line_tbl(i).fob_point_code := p_line_shipment_tbl(j).fob_code;
1949: END IF;
1950: IF p_line_shipment_tbl(j).freight_terms_code IS NULL THEN

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

1947: ELSE -- 3465720
1948: l_line_tbl(i).fob_point_code := p_line_shipment_tbl(j).fob_code;
1949: END IF;
1950: IF p_line_shipment_tbl(j).freight_terms_code IS NULL THEN
1951: l_line_tbl(i).freight_terms_code := FND_API.G_MISS_CHAR;
1952: ELSE -- 3465720
1953: l_line_tbl(i).freight_terms_code := p_line_shipment_tbl(j).freight_terms_code;
1954: END IF;
1955: IF p_line_shipment_tbl(j).shipment_priority_code IS NULL THEN

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

1952: ELSE -- 3465720
1953: l_line_tbl(i).freight_terms_code := p_line_shipment_tbl(j).freight_terms_code;
1954: END IF;
1955: IF p_line_shipment_tbl(j).shipment_priority_code IS NULL THEN
1956: l_line_tbl(i).shipment_priority_code := FND_API.G_MISS_CHAR;
1957: ELSE -- 3465720
1958: l_line_tbl(i).shipment_priority_code := p_line_shipment_tbl(j).shipment_priority_code;
1959: END IF;
1960: IF p_line_shipment_tbl(j).ship_method_code IS NULL THEN

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

1957: ELSE -- 3465720
1958: l_line_tbl(i).shipment_priority_code := p_line_shipment_tbl(j).shipment_priority_code;
1959: END IF;
1960: IF p_line_shipment_tbl(j).ship_method_code IS NULL THEN
1961: l_line_tbl(i).shipping_method_code := FND_API.G_MISS_CHAR;
1962: ELSE -- 3582285
1963: l_line_tbl(i).shipping_method_code := p_line_shipment_tbl(j).ship_method_code;
1964: END IF;
1965: ELSE

Line 1981: := FND_API.G_MISS_CHAR;

1977: --bug 1921958
1978: IF (p_line_shipment_tbl(j).shipping_instructions IS NULL) AND
1979: (l_om_defaulting_prof = 'Y') THEN
1980: l_line_tbl(i).shipping_instructions
1981: := FND_API.G_MISS_CHAR;
1982: ELSE
1983: l_line_tbl(i).shipping_instructions
1984: := rtrim(p_line_shipment_tbl(j).shipping_instructions);
1985: END IF;

Line 1990: := FND_API.G_MISS_CHAR;

1986:
1987: IF (p_line_shipment_tbl(j).packing_instructions IS NULL) AND
1988: (l_om_defaulting_prof = 'Y') THEN
1989: l_line_tbl(i).packing_instructions
1990: := FND_API.G_MISS_CHAR;
1991: ELSE
1992: l_line_tbl(i).packing_instructions
1993: := rtrim(p_line_shipment_tbl(j).packing_instructions);
1994: END IF;

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

2010: l_line_tbl(i).ordered_quantity := p_line_shipment_tbl(j).quantity;
2011: l_line_tbl(i).order_quantity_uom := p_qte_line_tbl(k).uom_code;
2012:
2013: -- bug 4916969
2014: 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
2015: l_line_tbl(i).demand_class_code := p_line_shipment_tbl(j).demand_class_code;
2016: end if;
2017:
2018: IF aso_debug_pub.g_debug_flag = 'Y' THEN

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

2019: aso_debug_pub.add('p_line_shipment_tbl(j).Ship_From_Org_Id: '||p_line_shipment_tbl(j).Ship_From_Org_Id,1,'N');
2020: END IF;
2021:
2022: IF p_line_shipment_tbl(j).Ship_From_Org_Id IS NOT NULL AND
2023: p_line_shipment_tbl(j).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN
2024: l_line_tbl(i).ship_from_org_id := p_line_shipment_tbl(j).Ship_From_Org_Id;
2025: END IF;
2026:
2027: IF p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND

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

2023: p_line_shipment_tbl(j).Ship_From_Org_Id <> FND_API.G_MISS_NUM THEN
2024: l_line_tbl(i).ship_from_org_id := p_line_shipment_tbl(j).Ship_From_Org_Id;
2025: END IF;
2026:
2027: IF p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM AND
2028: p_line_shipment_tbl(j).ship_to_cust_account_id IS NOT NULL AND
2029: p_line_shipment_tbl(j).ship_to_cust_account_id <> l_cust_account_id THEN
2030: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2031: aso_debug_pub.add('before cust_acct_reltn:p_sold_to_cust_account: '||l_cust_account_id,1,'N');

Line 2047: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2043: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2044: aso_debug_pub.add('after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
2045: END IF;
2046:
2047: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2048: RAISE FND_API.G_EXC_ERROR;
2049: END IF;
2050:
2051: END IF;

Line 2048: RAISE FND_API.G_EXC_ERROR;

2044: aso_debug_pub.add('after cust_acct_reltn:l_return_status: '||l_return_status,1,'N');
2045: END IF;
2046:
2047: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2048: RAISE FND_API.G_EXC_ERROR;
2049: END IF;
2050:
2051: END IF;
2052:

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

2050:
2051: END IF;
2052:
2053: IF p_line_shipment_tbl(j).ship_to_cust_account_id is not NULL AND
2054: p_line_shipment_tbl(j).ship_to_cust_account_id <> FND_API.G_MISS_NUM THEN
2055: l_ship_cust_account_id := p_line_shipment_tbl(j).ship_to_cust_account_id;
2056: ELSE
2057: l_ship_cust_account_id := l_header_rec.sold_to_org_id;
2058: END IF;

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

2061: aso_debug_pub.add('mapq line: before cust_acct_site:l_ship_cust_account_id: '||l_ship_cust_account_id,1,'N');
2062: 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');
2063: END IF;
2064: IF p_line_shipment_tbl(j).ship_to_party_site_id is not NULL AND
2065: p_line_shipment_tbl(j).ship_to_party_site_id <> FND_API.G_MISS_NUM THEN
2066:
2067: ASO_CHECK_TCA_PVT.Customer_Account_Site
2068: (
2069: p_api_version => 1.0

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

2077: ,x_site_use_id => l_line_tbl(i).ship_to_org_id
2078: );
2079:
2080: IF l_line_tbl(i).ship_to_org_id IS NULL THEN
2081: l_line_tbl(i).ship_to_org_id := FND_API.G_MISS_NUM;
2082: END IF;
2083:
2084: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2085: 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 2088: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2084: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2085: 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');
2086: aso_debug_pub.add('mapq line: after cust_acct_site:l_ln_shp_cust_acct_site: '||l_ln_shp_cust_acct_site,1,'N');
2087: END IF;
2088: if l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2089: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
2090: THEN
2091: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
2092: FND_MSG_PUB.ADD;

Line 2094: raise FND_API.G_EXC_ERROR;

2090: THEN
2091: FND_MESSAGE.Set_Name('ASO', 'ASO_VALIDATE_INV_SITE_AC_CRS');
2092: FND_MSG_PUB.ADD;
2093: END IF;
2094: raise FND_API.G_EXC_ERROR;
2095: END IF;
2096:
2097: END IF;
2098:

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

2114: x_msg_data => l_msg_data,
2115: x_cust_account_role_id => l_line_tbl(i).ship_to_contact_id);
2116:
2117: IF l_line_tbl(i).ship_to_contact_id IS NULL THEN
2118: l_line_tbl(i).ship_to_contact_id := FND_API.G_MISS_NUM;
2119: END IF;
2120:
2121: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2122: 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 2125: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2121: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2122: 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');
2123: END IF;
2124:
2125: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2126: raise FND_API.G_EXC_ERROR;
2127: END IF;
2128:
2129: l_line_tbl(i).source_document_id := p_line_shipment_tbl(j).quote_header_id;

Line 2126: raise FND_API.G_EXC_ERROR;

2122: 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');
2123: END IF;
2124:
2125: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2126: raise FND_API.G_EXC_ERROR;
2127: END IF;
2128:
2129: l_line_tbl(i).source_document_id := p_line_shipment_tbl(j).quote_header_id;
2130: l_line_tbl(i).source_document_line_id

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

2137: aso_debug_pub.add('l_line_tbl(i).orig_sys_document_ref: '||l_line_tbl(i).orig_sys_document_ref,1,'N');
2138: END IF;
2139:
2140: IF p_qte_line_tbl(k).ui_line_number IS NOT NULL AND
2141: p_qte_line_tbl(k).ui_line_number <> FND_API.G_MISS_CHAR THEN
2142: l_line_tbl(i).orig_sys_line_ref := p_qte_line_tbl(k).ui_line_number;
2143:
2144: ELSIF p_qte_line_tbl(k).line_number IS NOT NULL
2145: AND p_qte_line_tbl(k).line_number <> FND_API.G_MISS_NUM THEN

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

2141: p_qte_line_tbl(k).ui_line_number <> FND_API.G_MISS_CHAR THEN
2142: l_line_tbl(i).orig_sys_line_ref := p_qte_line_tbl(k).ui_line_number;
2143:
2144: ELSIF p_qte_line_tbl(k).line_number IS NOT NULL
2145: AND p_qte_line_tbl(k).line_number <> FND_API.G_MISS_NUM THEN
2146:
2147: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2148: aso_debug_pub.add('p_qte_line_tbl(k).line_number: '||p_qte_line_tbl(k).line_number,1,'N');
2149: END IF;

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

2191:
2192: --Pass the tax records in the OM price adjustment table
2193: l_line_adj_tbl_count := l_Line_Adj_tbl.count;
2194:
2195: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;
2196: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;
2197: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;
2198: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_index := i;
2199: --l_Line_adj_rec.tax_code := l_tax_rate_code; --This is for 11i

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

2192: --Pass the tax records in the OM price adjustment table
2193: l_line_adj_tbl_count := l_Line_Adj_tbl.count;
2194:
2195: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;
2196: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;
2197: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;
2198: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_index := i;
2199: --l_Line_adj_rec.tax_code := l_tax_rate_code; --This is for 11i
2200: 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 2197: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;

2193: l_line_adj_tbl_count := l_Line_Adj_tbl.count;
2194:
2195: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).price_adjustment_id := FND_API.G_MISS_NUM;
2196: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).header_id := FND_API.G_MISS_NUM;
2197: --l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_id := FND_API.G_MISS_NUM;
2198: l_Line_Adj_tbl(l_line_adj_tbl_count + 1).line_index := i;
2199: --l_Line_adj_rec.tax_code := l_tax_rate_code; --This is for 11i
2200: 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
2201:

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

2266: end if;
2267: -- tax
2268:
2269: IF (l_line_tbl(i).top_model_line_index is NULL OR
2270: l_line_tbl(i).top_model_line_index = FND_API.G_MISS_NUM) AND
2271: l_reservation_lvl_prof = 'AUTO_ORDER' THEN
2272:
2273: -- initialize for each line
2274: l_line_scheduling_level := ' ';

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

2272:
2273: -- initialize for each line
2274: l_line_scheduling_level := ' ';
2275: IF l_line_tbl(i).line_type_id is not null AND
2276: l_line_tbl(i).line_type_id <> FND_API.G_MISS_NUM then
2277: OPEN scheduling_level_cur(l_line_tbl(i).line_type_id);
2278: FETCH scheduling_level_cur INTO l_line_scheduling_level;
2279: CLOSE scheduling_level_cur;
2280: END IF;

Line 2303: IF p_calculate_price_flag = FND_API.G_FALSE THEN

2299: := OE_ORDER_SCH_UTIL.OESCH_ACT_RESERVE;
2300: END IF;
2301: END IF; -- reservation
2302:
2303: IF p_calculate_price_flag = FND_API.G_FALSE THEN
2304: l_line_tbl(i).calculate_price_flag := 'N';
2305: l_line_tbl(i).pricing_quantity_uom := l_line_tbl(i).order_quantity_uom;
2306: l_line_tbl(i).pricing_quantity := l_line_tbl(i).ordered_quantity;
2307: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2407: found := FND_API.G_TRUE;

2403: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2404: aso_debug_pub.add('after lot serial:l_lot_serial_tbl.count: '||l_lot_serial_tbl.count,1,'Y');
2405: END IF;
2406:
2407: found := FND_API.G_TRUE;
2408: END IF;
2409: END LOOP; -- lines
2410:
2411: i:= i+1;

Line 2556: x_return_status := FND_API.G_RET_STS_SUCCESS;

2552: begin
2553:
2554: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
2555:
2556: x_return_status := FND_API.G_RET_STS_SUCCESS;
2557:
2558: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2559: aso_debug_pub.add('site use in get_acct_site_uses = ' || p_acct_site_type,1,'N');
2560: END IF;

Line 2565: x_return_status := FND_API.G_RET_STS_ERROR;

2561: OPEN party_cur;
2562: FETCH party_cur INTO l_party_type, l_party_id;
2563: IF (party_cur%NOTFOUND) THEN
2564: l_party_type := NULL;
2565: x_return_status := FND_API.G_RET_STS_ERROR;
2566: END IF;
2567: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2568: aso_debug_pub.add('party_type in get_acct_site_uses = ' || l_party_type,1,'N');
2569: END IF;

Line 2577: x_return_status := FND_API.G_RET_STS_ERROR;

2573: OPEN relationship_cur;
2574: FETCH relationship_cur INTO cur_party_id;
2575: IF (relationship_cur%NOTFOUND) THEN
2576: cur_party_id := NULL;
2577: x_return_status := FND_API.G_RET_STS_ERROR;
2578: END IF;
2579: CLOSE relationship_cur;
2580: ELSE
2581: cur_party_id := l_party_id;

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

2593: aso_debug_pub.add('account site use status = ' || cust_site_use_status, 1,'N');
2594: END IF;
2595: IF (site_use_cur%NOTFOUND) THEN
2596: l_site_use_id := NULL;
2597: -- x_return_status := FND_API.G_RET_STS_ERROR;
2598: ELSE
2599: IF cust_acct_site_status <> 'A' OR cust_site_use_status <> 'A' THEN
2600: l_site_use_id := NULL;
2601: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2601: x_return_status := FND_API.G_RET_STS_ERROR;

2597: -- x_return_status := FND_API.G_RET_STS_ERROR;
2598: ELSE
2599: IF cust_acct_site_status <> 'A' OR cust_site_use_status <> 'A' THEN
2600: l_site_use_id := NULL;
2601: x_return_status := FND_API.G_RET_STS_ERROR;
2602: IF p_acct_site_type = 'BILL_TO' THEN
2603: FND_MESSAGE.Set_Name('ASO','ASO_INV_CUST_SITE_INACTIVE');
2604: ELSE
2605: FND_MESSAGE.Set_Name('ASO','ASO_SHIP_CUST_SITE_INACTIVE');

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

2702: l_party_type VARCHAR2(30);
2703: l_cust_account_role_id number;
2704: l_party_id number;
2705: l_relationship_party_id number := NULL;
2706: l_multiple_flag VARCHAR2(1) := FND_API.G_FALSE;
2707: l_count_relationship number := 0;
2708: l_acct_site_type VARCHAR2(50);
2709: begin
2710:

Line 2711: x_return_status := FND_API.G_RET_STS_SUCCESS;

2707: l_count_relationship number := 0;
2708: l_acct_site_type VARCHAR2(50);
2709: begin
2710:
2711: x_return_status := FND_API.G_RET_STS_SUCCESS;
2712: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2713: aso_debug_pub.add('site use in get_cust_account_roles = ' || p_acct_site_type,1,'N');
2714: aso_debug_pub.add('p_party_id = ' || p_party_id,1,'N');
2715: END IF;

Line 2725: x_return_status := FND_API.G_RET_STS_ERROR;

2721: OPEN party_cur;
2722: FETCH party_cur INTO l_party_type;
2723: IF (party_cur%NOTFOUND) THEN
2724: l_party_type := NULL;
2725: x_return_status := FND_API.G_RET_STS_ERROR;
2726: END IF;
2727: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2728: aso_debug_pub.add('party_type in get_cust_account_roles = ' || l_party_type,1,'N');
2729: END IF;

Line 2737: x_return_status := FND_API.G_RET_STS_ERROR;

2733: OPEN cust_cur;
2734: FETCH cust_cur INTO l_party_id;
2735: IF cust_cur%NOTFOUND THEN
2736: l_party_id := NULL;
2737: x_return_status := FND_API.G_RET_STS_ERROR;
2738: END IF;
2739: CLOSE cust_cur;
2740:
2741: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2746: x_party_id := FND_API.G_MISS_NUM;

2742: aso_debug_pub.add('l_party_id = ' || l_party_id, 1,'N');
2743: END IF;
2744: IF l_party_id IS NOT NULL AND l_party_id = p_party_id THEN
2745: -- p_party_id is owner of account, hence not a contact
2746: x_party_id := FND_API.G_MISS_NUM;
2747: x_cust_account_role_id := FND_API.G_MISS_NUM;
2748: return;
2749: END IF;
2750:

Line 2747: x_cust_account_role_id := FND_API.G_MISS_NUM;

2743: END IF;
2744: IF l_party_id IS NOT NULL AND l_party_id = p_party_id THEN
2745: -- p_party_id is owner of account, hence not a contact
2746: x_party_id := FND_API.G_MISS_NUM;
2747: x_cust_account_role_id := FND_API.G_MISS_NUM;
2748: return;
2749: END IF;
2750:
2751: OPEN person_relationship_cur;

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

2750:
2751: OPEN person_relationship_cur;
2752: LOOP
2753: FETCH person_relationship_cur INTO l_relationship_party_id;
2754: EXIT WHEN person_relationship_cur%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;
2755: l_count_relationship := l_count_relationship + 1;
2756:
2757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2758: aso_debug_pub.add('relationship_party_id = ' || l_relationship_party_id,1,'N');

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

2765: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2766: aso_debug_pub.add('looping in cust_role',1,'N');
2767: END IF;
2768: FETCH cust_role INTO l_cust_account_role_id, cust_account_role_status;
2769: EXIT WHEN cust_role%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;
2770: IF (cust_role%ROWCOUNT) > 1 THEN
2771: x_return_status := FND_API.G_RET_STS_ERROR;
2772: END IF;
2773: END LOOP;

Line 2771: x_return_status := FND_API.G_RET_STS_ERROR;

2767: END IF;
2768: FETCH cust_role INTO l_cust_account_role_id, cust_account_role_status;
2769: EXIT WHEN cust_role%NOTFOUND OR x_return_status = FND_API.G_RET_STS_ERROR;
2770: IF (cust_role%ROWCOUNT) > 1 THEN
2771: x_return_status := FND_API.G_RET_STS_ERROR;
2772: END IF;
2773: END LOOP;
2774: CLOSE cust_role;
2775:

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

2778: aso_debug_pub.add('rowcount = ' || person_relationship_cur%ROWCOUNT,1,'N');
2779: aso_debug_pub.add('l_multiple_flag = ' || l_multiple_flag,1,'N');
2780: END IF;
2781:
2782: IF person_relationship_cur%ROWCOUNT > 1 AND l_multiple_flag = FND_API.G_TRUE
2783: THEN
2784: x_return_status := FND_API.G_RET_STS_ERROR;
2785: END IF;
2786: IF l_cust_account_role_id IS NOT NULL THEN

Line 2784: x_return_status := FND_API.G_RET_STS_ERROR;

2780: END IF;
2781:
2782: IF person_relationship_cur%ROWCOUNT > 1 AND l_multiple_flag = FND_API.G_TRUE
2783: THEN
2784: x_return_status := FND_API.G_RET_STS_ERROR;
2785: END IF;
2786: IF l_cust_account_role_id IS NOT NULL THEN
2787: l_multiple_flag := FND_API.G_TRUE;
2788: END IF;

Line 2787: l_multiple_flag := FND_API.G_TRUE;

2783: THEN
2784: x_return_status := FND_API.G_RET_STS_ERROR;
2785: END IF;
2786: IF l_cust_account_role_id IS NOT NULL THEN
2787: l_multiple_flag := FND_API.G_TRUE;
2788: END IF;
2789: END LOOP;
2790: IF l_count_relationship = 0 THEN
2791: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2791: x_return_status := FND_API.G_RET_STS_ERROR;

2787: l_multiple_flag := FND_API.G_TRUE;
2788: END IF;
2789: END LOOP;
2790: IF l_count_relationship = 0 THEN
2791: x_return_status := FND_API.G_RET_STS_ERROR;
2792: END IF;
2793: CLOSE person_relationship_cur;
2794: x_party_id := l_relationship_party_id;
2795: END IF; --end person

Line 2801: x_return_status := FND_API.G_RET_STS_ERROR;

2797: OPEN org_contact;
2798: FETCH org_contact INTO l_org_contact_id;
2799: IF (org_contact%NOTFOUND) THEN
2800: l_org_contact_id := NULL;
2801: x_return_status := FND_API.G_RET_STS_ERROR;
2802: END IF;
2803: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2804: aso_debug_pub.add('org_contact_id in get_cust_acct_roles = '|| l_org_contact_id,1,'N');
2805: END IF;

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

2810: CLOSE cust_role_exists;
2811:
2812: IF NVL(l_exists,'N') <> 'Y' THEN
2813: l_cust_account_role_id := NULL;
2814: -- x_return_status := FND_API.G_RET_STS_ERROR;
2815: ELSE
2816: OPEN cust_role(p_party_id);
2817: FETCH cust_role INTO l_cust_account_role_id, cust_account_role_status;
2818:

Line 2826: x_return_status := FND_API.G_RET_STS_ERROR;

2822: END IF;
2823:
2824: IF (cust_role%NOTFOUND) THEN
2825: l_cust_account_role_id := NULL;
2826: x_return_status := FND_API.G_RET_STS_ERROR;
2827: IF p_acct_site_type = 'BILL_TO' THEN
2828: FND_MESSAGE.Set_Name('ASO','ASO_INV_CUST_ROLE_INACTIVE');
2829: ELSIF p_acct_site_type = 'END_USER' THEN
2830: FND_MESSAGE.Set_Name('ASO','ASO_END_CUST_ROLE_INACTIVE');

Line 2906: x_return_status := FND_API.G_RET_STS_ERROR;

2902:
2903: LOOP
2904: FETCH C_get_cust_id_from_party_id INTO lx_cust_id;
2905: IF C_get_cust_id_from_party_id%ROWCOUNT > 1 THEN
2906: x_return_status := FND_API.G_RET_STS_ERROR;
2907: EXIT;
2908: END IF;
2909: EXIT WHEN C_get_cust_id_from_party_id%NOTFOUND;
2910: END LOOP;

Line 2914: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2910: END LOOP;
2911:
2912: CLOSE C_get_cust_id_from_party_id;
2913:
2914: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2915: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2916: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2917: FND_MSG_PUB.ADD;
2918: raise FND_API.G_EXC_ERROR;

Line 2918: raise FND_API.G_EXC_ERROR;

2914: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2915: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2916: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2917: FND_MSG_PUB.ADD;
2918: raise FND_API.G_EXC_ERROR;
2919: END IF;
2920:
2921: ELSIF l_party_type = 'PARTY_RELATIONSHIP' THEN
2922: OPEN account_user_cur;

Line 2926: x_return_status := FND_API.G_RET_STS_ERROR;

2922: OPEN account_user_cur;
2923: LOOP
2924: FETCH account_user_cur INTO lx_cust_id;
2925: IF account_user_cur%ROWCOUNT > 1 THEN
2926: x_return_status := FND_API.G_RET_STS_ERROR;
2927: EXIT;
2928: END IF;
2929: EXIT WHEN C_get_cust_id_from_party_id%NOTFOUND;
2930: END LOOP;

Line 2932: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

2928: END IF;
2929: EXIT WHEN C_get_cust_id_from_party_id%NOTFOUND;
2930: END LOOP;
2931: CLOSE account_user_cur;
2932: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2933: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2934: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2935: FND_MSG_PUB.ADD;
2936: raise FND_API.G_EXC_ERROR;

Line 2936: raise FND_API.G_EXC_ERROR;

2932: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2933: FND_MESSAGE.Set_Name('ASO', 'ASO_MULTIPLE_CUST_ACCOUNT');
2934: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2935: FND_MSG_PUB.ADD;
2936: raise FND_API.G_EXC_ERROR;
2937: END IF;
2938: END IF;
2939:
2940: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN

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

2936: raise FND_API.G_EXC_ERROR;
2937: END IF;
2938: END IF;
2939:
2940: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN
2941: IF p_qte_rec.party_id is not NULL
2942: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
2943: ASO_PARTY_INT.Create_Customer_Account(
2944: p_api_version => 1.0

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

2938: END IF;
2939:
2940: IF lx_cust_id IS NULL OR lx_cust_id = FND_API.G_MISS_NUM THEN
2941: IF p_qte_rec.party_id is not NULL
2942: AND p_qte_rec.party_id <> FND_API.G_MISS_NUM THEN
2943: ASO_PARTY_INT.Create_Customer_Account(
2944: p_api_version => 1.0
2945: ,P_Qte_REC => p_qte_rec
2946: ,x_return_status => l_return_status

Line 2952: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN

2948: ,x_msg_data => l_msg_data
2949: ,x_acct_id => cust_account_id
2950: );
2951:
2952: IF l_Return_Status <> FND_API.G_RET_STS_SUCCESS THEN
2953: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
2954: THEN
2955: FND_MESSAGE.Set_Name('ASO', 'ASO_CUST_ACCOUNT');
2956: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);

Line 2959: raise FND_API.G_EXC_ERROR;

2955: FND_MESSAGE.Set_Name('ASO', 'ASO_CUST_ACCOUNT');
2956: FND_MESSAGE.Set_Token('ID', to_char( p_qte_rec.party_id), FALSE);
2957: FND_MSG_PUB.ADD;
2958: END IF;
2959: raise FND_API.G_EXC_ERROR;
2960: END IF;
2961:
2962: p_Cust_Acct_Id := cust_account_id;
2963: END IF;

Line 3021: x_return_status := FND_API.G_RET_STS_SUCCESS;

3017:
3018: l_party_id NUMBER;
3019: BEGIN
3020:
3021: x_return_status := FND_API.G_RET_STS_SUCCESS;
3022:
3023:
3024: OPEN C_party;
3025: FETCH C_party INTO l_party_id;

Line 3027: x_return_status := FND_API.G_RET_STS_ERROR;

3023:
3024: OPEN C_party;
3025: FETCH C_party INTO l_party_id;
3026: IF (C_party%NOTFOUND) THEN
3027: x_return_status := FND_API.G_RET_STS_ERROR;
3028: END IF;
3029: CLOSE C_party;
3030:
3031: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 3049: x_return_status := FND_API.G_RET_STS_ERROR;

3045: FETCH C_inactive_contact INTO x_cust_account_role_id, cust_account_role_status;
3046: IF C_inactive_contact%FOUND THEN
3047: -- this means there are ONLY inactive contacts
3048: x_cust_account_role_id := NULL;
3049: x_return_status := FND_API.G_RET_STS_ERROR;
3050: FND_MESSAGE.Set_Name('ASO','ASO_SOLD_CUST_ROLE_INACTIVE');
3051: FND_MSG_PUB.ADD;
3052: ELSE
3053: -- this means there are no contacts

Line 3327: := FND_API.G_MISS_NUM;

3323: l_header_price_att_tbl(p_att_count).order_price_attrib_id
3324: := p_header_price_attributes_tbl(i).price_attribute_id;
3325: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3326: l_header_price_att_tbl(p_att_count).order_price_attrib_id
3327: := FND_API.G_MISS_NUM;
3328: END IF;
3329:
3330: l_header_price_att_tbl(p_att_count).operation := p_operation;
3331:

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

3464: := p_qte_rec.quote_header_id;
3465: l_header_adj_tbl(adj_count).price_adjustment_id
3466: := p_header_price_adj_tbl(i).price_adjustment_id;
3467: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3468: l_header_adj_tbl(adj_count).price_adjustment_id := FND_API.G_MISS_NUM;
3469: END IF;
3470:
3471: l_header_adj_tbl(adj_count).operation := p_operation;
3472:

Line 3546: := FND_API.G_MISS_NUM;

3542: l_header_adj_att_tbl(attr_count).price_adj_attrib_id
3543: := p_header_price_adj_attr_tbl(j).price_adj_attrib_id;
3544: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3545: l_header_adj_att_tbl(attr_count).price_adj_attrib_id
3546: := FND_API.G_MISS_NUM;
3547: END IF;
3548:
3549: l_header_adj_att_tbl(attr_count).operation := p_operation;
3550:

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

3571: FOR j in 1..P_header_Price_Adj_rltship_Tbl.count LOOP
3572:
3573:
3574: IF P_operation = OE_GLOBALS.G_OPR_CREATE THEN
3575: l_Header_Adj_Assoc_tbl(i).price_adj_assoc_id := FND_API.G_MISS_NUM;
3576: l_Header_Adj_Assoc_tbl(i).Adj_index
3577: := P_Header_Price_Adj_rltship_Tbl(j).PRICE_ADJ_INDEX ;
3578: l_Header_Adj_Assoc_tbl(i).Rltd_Adj_Index
3579: := P_Header_Price_Adj_rltship_Tbl(j).RLTD_PRICE_ADJ_INDEX;

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

3671: := P_qte_rec.quote_header_id;
3672: l_Header_Scredit_tbl(sc_count).sales_credit_id
3673: := P_header_sales_credit_Tbl(j).sales_credit_id;
3674: ELSIF p_header_operation = OE_GLOBALS.G_OPR_CREATE THEN
3675: l_Header_Scredit_tbl(sc_count).sales_credit_id := FND_API.G_MISS_NUM;
3676: END IF;
3677:
3678: l_Header_Scredit_tbl(sc_count).operation := p_header_operation;
3679:

Line 3949: := FND_API.G_MISS_NUM;

3945: -- bug# 2020930 end
3946:
3947: IF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
3948: l_line_price_att_tbl(p_att_count).order_price_attrib_id
3949: := FND_API.G_MISS_NUM;
3950: ELSIF p_operation = OE_GLOBALS.G_OPR_UPDATE THEN
3951: l_line_price_att_tbl(p_att_count).header_id
3952: := p_line_price_attributes_tbl(l).quote_header_id;
3953: l_line_price_att_tbl(p_att_count).line_id

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

4018: l_line_adj_tbl(adj_count).attribute9 := p_line_price_adj_tbl(pad_count).attribute9;
4019: l_line_adj_tbl(adj_count).context := p_line_price_adj_tbl(pad_count).attribute_category;
4020: l_line_adj_tbl(adj_count).automatic_flag := p_line_price_adj_tbl(pad_count).automatic_flag;
4021:
4022: IF p_operation <> OE_GLOBALS.G_OPR_CREATE AND p_operation <> FND_API.G_MISS_CHAR THEN
4023:
4024: l_line_adj_tbl(adj_count).header_id := p_line_price_adj_tbl(pad_count).quote_header_id;
4025: l_line_adj_tbl(adj_count).line_id := p_line_price_adj_tbl(pad_count).quote_line_id;
4026:

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

4025: l_line_adj_tbl(adj_count).line_id := p_line_price_adj_tbl(pad_count).quote_line_id;
4026:
4027: ELSIF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
4028:
4029: l_line_adj_tbl(adj_count).price_adjustment_id := FND_API.G_MISS_NUM;
4030:
4031: END IF;
4032:
4033: l_line_adj_tbl(adj_count).operation := p_operation;

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

4093:
4094: IF p_line_price_adj_attr_tbl(l).price_adj_index = pad_count THEN
4095:
4096: IF p_operation = OE_GLOBALS.G_OPR_CREATE THEN
4097: l_line_adj_att_tbl(attr_count).price_adj_attrib_id := FND_API.G_MISS_NUM;
4098: ELSIF p_operation <> OE_GLOBALS.G_OPR_CREATE THEN
4099: l_line_adj_att_tbl(attr_count).price_adj_attrib_id := p_line_price_adj_attr_tbl(l).price_adj_attrib_id;
4100: l_line_adj_att_tbl(attr_count).price_adjustment_id := p_line_price_adj_attr_tbl(l).price_adjustment_id;
4101: END IF;

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

4182: := P_Line_Price_Adj_rltship_Tbl(l).price_adj_index;
4183: l_Line_Adj_Assoc_tbl(adj_rlt_count).Rltd_Adj_index
4184: := P_Line_Price_Adj_rltship_Tbl(l).rltd_price_adj_index;
4185: l_Line_Adj_Assoc_tbl(adj_rlt_count).Line_Index := p_line_index;
4186: l_line_Adj_Assoc_tbl(adj_rlt_count).price_adj_assoc_id := FND_API.G_MISS_NUM;
4187:
4188: ELSIF l_Line_Adj_Assoc_tbl(adj_rlt_count).operation = OE_GLOBALS.G_OPR_UPDATE THEN
4189:
4190: l_Line_Adj_Assoc_tbl(adj_rlt_count).line_id

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

4290: IF p_line_operation <> OE_GLOBALS.G_OPR_CREATE THEN
4291: l_Line_Scredit_tbl(sc_count).sales_credit_id
4292: := P_line_sales_credit_Tbl(l).sales_credit_id;
4293: ELSIF p_line_operation = OE_GLOBALS.G_OPR_CREATE THEN
4294: l_Line_Scredit_tbl(sc_count).sales_credit_id := FND_API.G_MISS_NUM;
4295: END IF;
4296:
4297: l_Line_Scredit_tbl(sc_count).operation := p_line_operation;
4298:

Line 4337: l_Line_tbl(p_line_index).payment_term_id := FND_API.G_MISS_NUM;

4333: l_Line_payment_tbl(pay_count).line_index := p_line_index;
4334:
4335: IF (NVL(l_om_defaulting_prof, 'N') = 'Y') THEN
4336: IF P_Line_Payment_Tbl(i).payment_term_id IS NULL THEN
4337: l_Line_tbl(p_line_index).payment_term_id := FND_API.G_MISS_NUM;
4338: ELSE
4339: l_Line_tbl(p_line_index).payment_term_id := P_Line_Payment_Tbl(i).payment_term_id;
4340: END IF;
4341: ELSE