275: END IF;
276:
277: CLOSE C_Validate_Quote;
278:
279: IF aso_debug_pub.g_debug_flag = 'Y' THEN
280: aso_debug_pub.ADD ( 'Copy_Quote - Begin- ASO_COPY_QUOTE_PVT.Copy_Quote ' , 1 , 'Y' );
281: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Header_Id: ' || P_Copy_Quote_Header_Rec.Quote_Header_Id , 1 , 'N' );
282: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Header_Only ' || P_Copy_Quote_Control_Rec.Copy_Header_Only , 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
276:
277: CLOSE C_Validate_Quote;
278:
279: IF aso_debug_pub.g_debug_flag = 'Y' THEN
280: aso_debug_pub.ADD ( 'Copy_Quote - Begin- ASO_COPY_QUOTE_PVT.Copy_Quote ' , 1 , 'Y' );
281: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Header_Id: ' || P_Copy_Quote_Header_Rec.Quote_Header_Id , 1 , 'N' );
282: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Header_Only ' || P_Copy_Quote_Control_Rec.Copy_Header_Only , 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
284:
277: CLOSE C_Validate_Quote;
278:
279: IF aso_debug_pub.g_debug_flag = 'Y' THEN
280: aso_debug_pub.ADD ( 'Copy_Quote - Begin- ASO_COPY_QUOTE_PVT.Copy_Quote ' , 1 , 'Y' );
281: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Header_Id: ' || P_Copy_Quote_Header_Rec.Quote_Header_Id , 1 , 'N' );
282: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Header_Only ' || P_Copy_Quote_Control_Rec.Copy_Header_Only , 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
284:
285: /* Code change for Quoting Usability Sun ER Start */
278:
279: IF aso_debug_pub.g_debug_flag = 'Y' THEN
280: aso_debug_pub.ADD ( 'Copy_Quote - Begin- ASO_COPY_QUOTE_PVT.Copy_Quote ' , 1 , 'Y' );
281: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Header_Id: ' || P_Copy_Quote_Header_Rec.Quote_Header_Id , 1 , 'N' );
282: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Header_Only ' || P_Copy_Quote_Control_Rec.Copy_Header_Only , 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
284:
285: /* Code change for Quoting Usability Sun ER Start */
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
279: IF aso_debug_pub.g_debug_flag = 'Y' THEN
280: aso_debug_pub.ADD ( 'Copy_Quote - Begin- ASO_COPY_QUOTE_PVT.Copy_Quote ' , 1 , 'Y' );
281: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Header_Id: ' || P_Copy_Quote_Header_Rec.Quote_Header_Id , 1 , 'N' );
282: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Header_Only ' || P_Copy_Quote_Control_Rec.Copy_Header_Only , 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
284:
285: /* Code change for Quoting Usability Sun ER Start */
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
282: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Header_Only ' || P_Copy_Quote_Control_Rec.Copy_Header_Only , 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
284:
285: /* Code change for Quoting Usability Sun ER Start */
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
283: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.New_Version ' || P_Copy_Quote_Control_Rec.New_Version , 1 , 'N' );
284:
285: /* Code change for Quoting Usability Sun ER Start */
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
284:
285: /* Code change for Quoting Usability Sun ER Start */
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
285: /* Code change for Quoting Usability Sun ER Start */
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
286: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Note: ' || P_Copy_Quote_Control_Rec.Copy_Note, 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
287: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Task: ' || P_Copy_Quote_Control_Rec.Copy_Task, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
288: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Attachment, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
289: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Shipping, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
290: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Billing, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
291: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Payment, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
292: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_End_Customer , 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
293: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Supplement , 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
294: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Flexfield , 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
295: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Credit, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
296: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Contract_Terms: ' || P_Copy_Quote_Control_Rec.Copy_Contract_Terms, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
297: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Sales_Team: ' || P_Copy_Quote_Control_Rec.Copy_Sales_Team, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
298: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Shipping: ' || P_Copy_Quote_Control_Rec.Copy_Line_Shipping, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
299: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Billing: ' || P_Copy_Quote_Control_Rec.Copy_Line_Billing, 1 , 'N' );
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
307: /* Code change for Quoting Usability Sun ER End */
300: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Payment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Payment, 1 , 'N' );
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
307: /* Code change for Quoting Usability Sun ER End */
308:
301: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_End_Customer: ' || P_Copy_Quote_Control_Rec.Copy_Line_End_Customer, 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
307: /* Code change for Quoting Usability Sun ER End */
308:
309: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Number ' || P_Copy_Quote_Header_Rec.Quote_Number , 1 , 'N' );
302: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement, 1 , 'N' );
303: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Attachment: ' || P_Copy_Quote_Control_Rec.Copy_Line_Attachment, 1 , 'N' );
304: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Flexfield: ' || P_Copy_Quote_Control_Rec.Copy_Line_Flexfield, 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
307: /* Code change for Quoting Usability Sun ER End */
308:
309: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Number ' || P_Copy_Quote_Header_Rec.Quote_Number , 1 , 'N' );
310: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Id ' || P_Copy_Quote_Header_Rec.Resource_Id , 1 , 'N' );
305: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit: ' || P_Copy_Quote_Control_Rec.Copy_Line_Sales_Credit, 1 , 'N' );
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
307: /* Code change for Quoting Usability Sun ER End */
308:
309: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Number ' || P_Copy_Quote_Header_Rec.Quote_Number , 1 , 'N' );
310: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Id ' || P_Copy_Quote_Header_Rec.Resource_Id , 1 , 'N' );
311: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Grp_Id ' || P_Copy_Quote_Header_Rec.Resource_Grp_Id , 1 , 'N' );
312: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Name ' || P_Copy_Quote_Header_Rec.Quote_Name , 1 , 'N' );
313:
306: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer: ' || P_Copy_Quote_Control_Rec.Copy_To_Same_Customer, 1 , 'N' );
307: /* Code change for Quoting Usability Sun ER End */
308:
309: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Number ' || P_Copy_Quote_Header_Rec.Quote_Number , 1 , 'N' );
310: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Id ' || P_Copy_Quote_Header_Rec.Resource_Id , 1 , 'N' );
311: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Grp_Id ' || P_Copy_Quote_Header_Rec.Resource_Grp_Id , 1 , 'N' );
312: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Name ' || P_Copy_Quote_Header_Rec.Quote_Name , 1 , 'N' );
313:
314: END IF;
307: /* Code change for Quoting Usability Sun ER End */
308:
309: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Number ' || P_Copy_Quote_Header_Rec.Quote_Number , 1 , 'N' );
310: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Id ' || P_Copy_Quote_Header_Rec.Resource_Id , 1 , 'N' );
311: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Grp_Id ' || P_Copy_Quote_Header_Rec.Resource_Grp_Id , 1 , 'N' );
312: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Name ' || P_Copy_Quote_Header_Rec.Quote_Name , 1 , 'N' );
313:
314: END IF;
315:
308:
309: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Number ' || P_Copy_Quote_Header_Rec.Quote_Number , 1 , 'N' );
310: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Id ' || P_Copy_Quote_Header_Rec.Resource_Id , 1 , 'N' );
311: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Grp_Id ' || P_Copy_Quote_Header_Rec.Resource_Grp_Id , 1 , 'N' );
312: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Name ' || P_Copy_Quote_Header_Rec.Quote_Name , 1 , 'N' );
313:
314: END IF;
315:
316: l_qte_header_rec := ASO_UTILITY_PVT.Query_Header_Row ( P_Copy_Quote_Header_Rec.Quote_Header_Id );
317:
318: /* Code change for Quoting Usability Sun ER Start */
319: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
320:
321: IF aso_debug_pub.g_debug_flag = 'Y' THEN
322: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is False ', 1 , 'N' );
323: END IF;
324:
325: -- for change customer , initializing quote header attributes with defaulted input header values
318: /* Code change for Quoting Usability Sun ER Start */
319: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
320:
321: IF aso_debug_pub.g_debug_flag = 'Y' THEN
322: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is False ', 1 , 'N' );
323: END IF;
324:
325: -- for change customer , initializing quote header attributes with defaulted input header values
326:
370: -- Check for Pricing Agreement
371: IF (l_qte_header_rec.contract_id IS NOT NULL AND
372: l_qte_header_rec.contract_id <> FND_API.G_MISS_NUM) THEN
373:
374: IF aso_debug_pub.g_debug_flag = 'Y' THEN
375: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.contract_id : '||l_qte_header_rec.contract_id, 1 , 'N' );
376: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID : '||l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID, 1 , 'N' );
377: END IF;
378:
371: IF (l_qte_header_rec.contract_id IS NOT NULL AND
372: l_qte_header_rec.contract_id <> FND_API.G_MISS_NUM) THEN
373:
374: IF aso_debug_pub.g_debug_flag = 'Y' THEN
375: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.contract_id : '||l_qte_header_rec.contract_id, 1 , 'N' );
376: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID : '||l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID, 1 , 'N' );
377: END IF;
378:
379: Open C_AGREEMENT(l_qte_header_rec.CONTRACT_ID,l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID);
372: l_qte_header_rec.contract_id <> FND_API.G_MISS_NUM) THEN
373:
374: IF aso_debug_pub.g_debug_flag = 'Y' THEN
375: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.contract_id : '||l_qte_header_rec.contract_id, 1 , 'N' );
376: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID : '||l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID, 1 , 'N' );
377: END IF;
378:
379: Open C_AGREEMENT(l_qte_header_rec.CONTRACT_ID,l_qte_header_rec.INVOICE_TO_CUST_ACCOUNT_ID);
380: Fetch C_AGREEMENT Into l_var;
386: End If;
387:
388: /* Start : Code change done for Bug 12674665 */
389:
390: IF aso_debug_pub.g_debug_flag = 'Y' THEN
391: aso_debug_pub.ADD ( 'Copy_Quote - Price List defaulting starting', 1 , 'N' );
392: aso_debug_pub.ADD ( 'Copy_Quote - Agreement Id : '||l_qte_header_rec.CONTRACT_ID, 1 , 'N' );
393: aso_debug_pub.ADD ( 'Copy_Quote - Customer Account Id : '||l_qte_header_rec.CUST_ACCOUNT_ID, 1 , 'N' );
394: aso_debug_pub.ADD ( 'Copy_Quote - Order Type Id : '||l_qte_header_rec.ORDER_TYPE_ID, 1 , 'N' );
387:
388: /* Start : Code change done for Bug 12674665 */
389:
390: IF aso_debug_pub.g_debug_flag = 'Y' THEN
391: aso_debug_pub.ADD ( 'Copy_Quote - Price List defaulting starting', 1 , 'N' );
392: aso_debug_pub.ADD ( 'Copy_Quote - Agreement Id : '||l_qte_header_rec.CONTRACT_ID, 1 , 'N' );
393: aso_debug_pub.ADD ( 'Copy_Quote - Customer Account Id : '||l_qte_header_rec.CUST_ACCOUNT_ID, 1 , 'N' );
394: aso_debug_pub.ADD ( 'Copy_Quote - Order Type Id : '||l_qte_header_rec.ORDER_TYPE_ID, 1 , 'N' );
395: END IF;
388: /* Start : Code change done for Bug 12674665 */
389:
390: IF aso_debug_pub.g_debug_flag = 'Y' THEN
391: aso_debug_pub.ADD ( 'Copy_Quote - Price List defaulting starting', 1 , 'N' );
392: aso_debug_pub.ADD ( 'Copy_Quote - Agreement Id : '||l_qte_header_rec.CONTRACT_ID, 1 , 'N' );
393: aso_debug_pub.ADD ( 'Copy_Quote - Customer Account Id : '||l_qte_header_rec.CUST_ACCOUNT_ID, 1 , 'N' );
394: aso_debug_pub.ADD ( 'Copy_Quote - Order Type Id : '||l_qte_header_rec.ORDER_TYPE_ID, 1 , 'N' );
395: END IF;
396:
389:
390: IF aso_debug_pub.g_debug_flag = 'Y' THEN
391: aso_debug_pub.ADD ( 'Copy_Quote - Price List defaulting starting', 1 , 'N' );
392: aso_debug_pub.ADD ( 'Copy_Quote - Agreement Id : '||l_qte_header_rec.CONTRACT_ID, 1 , 'N' );
393: aso_debug_pub.ADD ( 'Copy_Quote - Customer Account Id : '||l_qte_header_rec.CUST_ACCOUNT_ID, 1 , 'N' );
394: aso_debug_pub.ADD ( 'Copy_Quote - Order Type Id : '||l_qte_header_rec.ORDER_TYPE_ID, 1 , 'N' );
395: END IF;
396:
397: Open C_Agreement_PL(l_qte_header_rec.CONTRACT_ID);
390: IF aso_debug_pub.g_debug_flag = 'Y' THEN
391: aso_debug_pub.ADD ( 'Copy_Quote - Price List defaulting starting', 1 , 'N' );
392: aso_debug_pub.ADD ( 'Copy_Quote - Agreement Id : '||l_qte_header_rec.CONTRACT_ID, 1 , 'N' );
393: aso_debug_pub.ADD ( 'Copy_Quote - Customer Account Id : '||l_qte_header_rec.CUST_ACCOUNT_ID, 1 , 'N' );
394: aso_debug_pub.ADD ( 'Copy_Quote - Order Type Id : '||l_qte_header_rec.ORDER_TYPE_ID, 1 , 'N' );
395: END IF;
396:
397: Open C_Agreement_PL(l_qte_header_rec.CONTRACT_ID);
398: Fetch C_Agreement_PL Into l_qte_header_rec.PRICE_LIST_ID,l_qte_header_rec.CURRENCY_CODE;
398: Fetch C_Agreement_PL Into l_qte_header_rec.PRICE_LIST_ID,l_qte_header_rec.CURRENCY_CODE;
399:
400: If C_Agreement_PL%FOUND then
401:
402: IF aso_debug_pub.g_debug_flag = 'Y' THEN
403: aso_debug_pub.ADD ( 'Copy_Quote - Price List is defaulted based on Agreement', 1 , 'N' );
404: END IF;
405:
406: ElsIf C_Agreement_PL%NOTFOUND then
399:
400: If C_Agreement_PL%FOUND then
401:
402: IF aso_debug_pub.g_debug_flag = 'Y' THEN
403: aso_debug_pub.ADD ( 'Copy_Quote - Price List is defaulted based on Agreement', 1 , 'N' );
404: END IF;
405:
406: ElsIf C_Agreement_PL%NOTFOUND then
407:
409: Fetch C_Customer_PL Into l_qte_header_rec.PRICE_LIST_ID,l_qte_header_rec.CURRENCY_CODE;
410:
411: If C_Customer_PL%FOUND then
412:
413: IF aso_debug_pub.g_debug_flag = 'Y' THEN
414: aso_debug_pub.ADD ( 'Copy_Quote - Price List is defaulted based on Customer Account', 1 , 'N' );
415: END IF;
416:
417: ElsIf C_Customer_PL%NOTFOUND then
410:
411: If C_Customer_PL%FOUND then
412:
413: IF aso_debug_pub.g_debug_flag = 'Y' THEN
414: aso_debug_pub.ADD ( 'Copy_Quote - Price List is defaulted based on Customer Account', 1 , 'N' );
415: END IF;
416:
417: ElsIf C_Customer_PL%NOTFOUND then
418:
419: Open C_Order_Type_PL(l_qte_header_rec.ORDER_TYPE_ID);
420: Fetch C_Order_Type_PL Into l_qte_header_rec.PRICE_LIST_ID,l_qte_header_rec.CURRENCY_CODE;
421:
422: If C_Order_Type_PL%FOUND then
423: IF aso_debug_pub.g_debug_flag = 'Y' THEN
424: aso_debug_pub.ADD ( 'Copy_Quote - Price List is defaulted based on Order Type', 1 , 'N' );
425: END IF;
426: End If;
427: Close C_Order_Type_PL;
420: Fetch C_Order_Type_PL Into l_qte_header_rec.PRICE_LIST_ID,l_qte_header_rec.CURRENCY_CODE;
421:
422: If C_Order_Type_PL%FOUND then
423: IF aso_debug_pub.g_debug_flag = 'Y' THEN
424: aso_debug_pub.ADD ( 'Copy_Quote - Price List is defaulted based on Order Type', 1 , 'N' );
425: END IF;
426: End If;
427: Close C_Order_Type_PL;
428:
431:
432: End If;
433: Close C_Agreement_PL;
434:
435: IF aso_debug_pub.g_debug_flag = 'Y' THEN
436: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.PRICE_LIST_ID : '||l_qte_header_rec.PRICE_LIST_ID, 1 , 'N' );
437: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.CURRENCY_CODE : '||l_qte_header_rec.CURRENCY_CODE, 1 , 'N' );
438: END IF;
439:
432: End If;
433: Close C_Agreement_PL;
434:
435: IF aso_debug_pub.g_debug_flag = 'Y' THEN
436: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.PRICE_LIST_ID : '||l_qte_header_rec.PRICE_LIST_ID, 1 , 'N' );
437: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.CURRENCY_CODE : '||l_qte_header_rec.CURRENCY_CODE, 1 , 'N' );
438: END IF;
439:
440: /* End : Code change done for Bug 12674665 */
433: Close C_Agreement_PL;
434:
435: IF aso_debug_pub.g_debug_flag = 'Y' THEN
436: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.PRICE_LIST_ID : '||l_qte_header_rec.PRICE_LIST_ID, 1 , 'N' );
437: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.CURRENCY_CODE : '||l_qte_header_rec.CURRENCY_CODE, 1 , 'N' );
438: END IF;
439:
440: /* End : Code change done for Bug 12674665 */
441:
441:
442: If (l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL') Then
443: If (P_Qte_Header_Rec.RESOURCE_ID IS NOT NULL AND P_Qte_Header_Rec.RESOURCE_ID <> FND_API.G_MISS_NUM) Then
444:
445: IF aso_debug_pub.g_debug_flag = 'Y' THEN
446: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Header_Rec.RESOURCE_ID : '||P_Qte_Header_Rec.RESOURCE_ID, 1 , 'N' );
447: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Header_Rec.RESOURCE_GRP_ID : '||P_Qte_Header_Rec.RESOURCE_GRP_ID, 1 , 'N' );
448: END IF;
449:
442: If (l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL') Then
443: If (P_Qte_Header_Rec.RESOURCE_ID IS NOT NULL AND P_Qte_Header_Rec.RESOURCE_ID <> FND_API.G_MISS_NUM) Then
444:
445: IF aso_debug_pub.g_debug_flag = 'Y' THEN
446: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Header_Rec.RESOURCE_ID : '||P_Qte_Header_Rec.RESOURCE_ID, 1 , 'N' );
447: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Header_Rec.RESOURCE_GRP_ID : '||P_Qte_Header_Rec.RESOURCE_GRP_ID, 1 , 'N' );
448: END IF;
449:
450: l_qte_header_rec.RESOURCE_ID := P_Qte_Header_Rec.RESOURCE_ID;
443: If (P_Qte_Header_Rec.RESOURCE_ID IS NOT NULL AND P_Qte_Header_Rec.RESOURCE_ID <> FND_API.G_MISS_NUM) Then
444:
445: IF aso_debug_pub.g_debug_flag = 'Y' THEN
446: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Header_Rec.RESOURCE_ID : '||P_Qte_Header_Rec.RESOURCE_ID, 1 , 'N' );
447: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Header_Rec.RESOURCE_GRP_ID : '||P_Qte_Header_Rec.RESOURCE_GRP_ID, 1 , 'N' );
448: END IF;
449:
450: l_qte_header_rec.RESOURCE_ID := P_Qte_Header_Rec.RESOURCE_ID;
451: l_qte_header_rec.RESOURCE_GRP_ID := P_Qte_Header_Rec.RESOURCE_GRP_ID;
458: IF ( P_Copy_Quote_Header_Rec.Quote_Number IS NULL
459: OR P_Copy_Quote_Header_Rec.Quote_Number = FND_API.G_MISS_NUM
460: ) THEN
461: IF ( NVL ( FND_PROFILE.VALUE ('ASO_AUTO_NUMBERING' ), 'Y' ) = 'Y' ) THEN
462: IF aso_debug_pub.g_debug_flag = 'Y' THEN
463: aso_debug_pub.ADD ( 'Copy_Quote - AUTO_NUMBERING is Y ' , 1 , 'N' );
464: END IF;
465:
466: OPEN C_Qte_Number;
459: OR P_Copy_Quote_Header_Rec.Quote_Number = FND_API.G_MISS_NUM
460: ) THEN
461: IF ( NVL ( FND_PROFILE.VALUE ('ASO_AUTO_NUMBERING' ), 'Y' ) = 'Y' ) THEN
462: IF aso_debug_pub.g_debug_flag = 'Y' THEN
463: aso_debug_pub.ADD ( 'Copy_Quote - AUTO_NUMBERING is Y ' , 1 , 'N' );
464: END IF;
465:
466: OPEN C_Qte_Number;
467: FETCH C_Qte_Number INTO l_qte_header_rec.quote_number;
483: FETCH C_Qte_Number_Exists INTO l_qte_num;
484: CLOSE C_Qte_Number_Exists;
485:
486: IF l_qte_num = P_Copy_Quote_Header_Rec.Quote_Number THEN
487: IF aso_debug_pub.g_debug_flag = 'Y' THEN
488: aso_debug_pub.ADD ( 'Copy_Quote - AUTO_NUMBERING is N ' , 1 , 'N' );
489: END IF;
490: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
491: FND_MESSAGE.Set_Name ('ASO' , 'ASO_CANNOT_COPY_QTE' );
484: CLOSE C_Qte_Number_Exists;
485:
486: IF l_qte_num = P_Copy_Quote_Header_Rec.Quote_Number THEN
487: IF aso_debug_pub.g_debug_flag = 'Y' THEN
488: aso_debug_pub.ADD ( 'Copy_Quote - AUTO_NUMBERING is N ' , 1 , 'N' );
489: END IF;
490: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
491: FND_MESSAGE.Set_Name ('ASO' , 'ASO_CANNOT_COPY_QTE' );
492: FND_MSG_PUB.ADD;
544: END IF;
545: CLOSE C_Qte_Number_Exists;
546: RAISE FND_API.G_EXC_ERROR;
547: ELSE
548: IF aso_debug_pub.g_debug_flag = 'Y' THEN
549: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Number Exists' , 1 , 'N' );
550: END IF;
551: l_qte_header_rec.quote_number := P_Copy_Quote_Header_Rec.Quote_Number;
552: CLOSE C_Qte_Number_Exists;
545: CLOSE C_Qte_Number_Exists;
546: RAISE FND_API.G_EXC_ERROR;
547: ELSE
548: IF aso_debug_pub.g_debug_flag = 'Y' THEN
549: aso_debug_pub.ADD ( 'Copy_Quote - P_Qte_Number Exists' , 1 , 'N' );
550: END IF;
551: l_qte_header_rec.quote_number := P_Copy_Quote_Header_Rec.Quote_Number;
552: CLOSE C_Qte_Number_Exists;
553: END IF;
559: , l_qte_header_id
560: , l_qte_header_rec.quote_version;
561: CLOSE C_Curr_Qte_Info;
562:
563: IF aso_debug_pub.g_debug_flag = 'Y' THEN
564: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_status_id ' || l_qte_status_id , 1 , 'N' );
565: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_id ' || l_qte_header_id , 1 , 'N' );
566: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.quote_version ' || l_qte_header_rec.quote_version , 1 , 'N' );
567: END IF;
560: , l_qte_header_rec.quote_version;
561: CLOSE C_Curr_Qte_Info;
562:
563: IF aso_debug_pub.g_debug_flag = 'Y' THEN
564: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_status_id ' || l_qte_status_id , 1 , 'N' );
565: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_id ' || l_qte_header_id , 1 , 'N' );
566: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.quote_version ' || l_qte_header_rec.quote_version , 1 , 'N' );
567: END IF;
568:
561: CLOSE C_Curr_Qte_Info;
562:
563: IF aso_debug_pub.g_debug_flag = 'Y' THEN
564: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_status_id ' || l_qte_status_id , 1 , 'N' );
565: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_id ' || l_qte_header_id , 1 , 'N' );
566: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.quote_version ' || l_qte_header_rec.quote_version , 1 , 'N' );
567: END IF;
568:
569: OPEN C_Check_Qte_Status ( l_qte_status_id );
562:
563: IF aso_debug_pub.g_debug_flag = 'Y' THEN
564: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_status_id ' || l_qte_status_id , 1 , 'N' );
565: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_id ' || l_qte_header_id , 1 , 'N' );
566: aso_debug_pub.ADD ( 'Copy_Quote - l_qte_header_rec.quote_version ' || l_qte_header_rec.quote_version , 1 , 'N' );
567: END IF;
568:
569: OPEN C_Check_Qte_Status ( l_qte_status_id );
570: FETCH C_Check_Qte_Status INTO l_dummy;
569: OPEN C_Check_Qte_Status ( l_qte_status_id );
570: FETCH C_Check_Qte_Status INTO l_dummy;
571:
572: IF C_Check_Qte_Status%NOTFOUND THEN
573: IF aso_debug_pub.g_debug_flag = 'Y' THEN
574: aso_debug_pub.ADD ('Copy_Quote - invalid status ' , 1, 'N' );
575: END IF;
576: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
577: FND_MESSAGE.Set_Name ('ASO' , 'ASO_CANNOT_COPY_FOR_STATUS' );
570: FETCH C_Check_Qte_Status INTO l_dummy;
571:
572: IF C_Check_Qte_Status%NOTFOUND THEN
573: IF aso_debug_pub.g_debug_flag = 'Y' THEN
574: aso_debug_pub.ADD ('Copy_Quote - invalid status ' , 1, 'N' );
575: END IF;
576: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
577: FND_MESSAGE.Set_Name ('ASO' , 'ASO_CANNOT_COPY_FOR_STATUS' );
578: FND_MSG_PUB.ADD;
659: IF P_Copy_Quote_Header_Rec.tax_updated_date <> FND_API.G_MISS_DATE THEN
660: l_qte_header_rec.tax_updated_date := P_Copy_Quote_Header_Rec.tax_updated_date;
661: END IF;
662:
663: IF aso_debug_pub.g_debug_flag = 'Y' THEN
664: aso_debug_pub.ADD ('Copy_Quote - Begin- before copy_rows ' , 1, 'Y' );
665: END IF;
666: Copy_Header_Rows (
667: P_Api_Version_Number => 1.0
660: l_qte_header_rec.tax_updated_date := P_Copy_Quote_Header_Rec.tax_updated_date;
661: END IF;
662:
663: IF aso_debug_pub.g_debug_flag = 'Y' THEN
664: aso_debug_pub.ADD ('Copy_Quote - Begin- before copy_rows ' , 1, 'Y' );
665: END IF;
666: Copy_Header_Rows (
667: P_Api_Version_Number => 1.0
668: , P_Init_Msg_List => FND_API.G_FALSE
679: , X_Return_Status => l_return_status
680: , X_Msg_Count => x_msg_count
681: , X_Msg_Data => x_msg_data
682: );
683: IF aso_debug_pub.g_debug_flag = 'Y' THEN
684: aso_debug_pub.ADD ( 'Copy_Quote - After copy_rows ' || l_return_status , 1 , 'Y' );
685: END IF;
686:
687: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
680: , X_Msg_Count => x_msg_count
681: , X_Msg_Data => x_msg_data
682: );
683: IF aso_debug_pub.g_debug_flag = 'Y' THEN
684: aso_debug_pub.ADD ( 'Copy_Quote - After copy_rows ' || l_return_status , 1 , 'Y' );
685: END IF;
686:
687: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
688: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
698: END IF;
699:
700: IF P_Copy_Quote_Control_Rec.Copy_Header_Only <> FND_API.G_TRUE THEN
701:
702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
703: aso_debug_pub.ADD ('Copy_Quote - Begin- before copy_rows ' , 1, 'Y' );
704: END IF;
705:
706:
699:
700: IF P_Copy_Quote_Control_Rec.Copy_Header_Only <> FND_API.G_TRUE THEN
701:
702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
703: aso_debug_pub.ADD ('Copy_Quote - Begin- before copy_rows ' , 1, 'Y' );
704: END IF;
705:
706:
707: l_copy_line_qte_header_rec.batch_price_flag := FND_API.G_FALSE;
721: , X_Return_Status => l_return_status
722: , X_Msg_Count => x_msg_count
723: , X_Msg_Data => x_msg_data
724: );
725: IF aso_debug_pub.g_debug_flag = 'Y' THEN
726: aso_debug_pub.ADD ( 'Copy_Quote - After copy_rows ' || l_return_status , 1 , 'Y' );
727: END IF;
728: END IF;
729: -- ER 3177722
722: , X_Msg_Count => x_msg_count
723: , X_Msg_Data => x_msg_data
724: );
725: IF aso_debug_pub.g_debug_flag = 'Y' THEN
726: aso_debug_pub.ADD ( 'Copy_Quote - After copy_rows ' || l_return_status , 1 , 'Y' );
727: END IF;
728: END IF;
729: -- ER 3177722
730: /* if (l_return_status =FND_API.G_RET_STS_SUCCESS) then
730: /* if (l_return_status =FND_API.G_RET_STS_SUCCESS) then
731:
732:
733: if l_copy_config_profile='N' then
734: aso_debug_pub.add('Copy Quote -before ASO_QUOTE_PUB.validate_model_configuration return status: ', 1, 'N');
735:
736: ASO_QUOTE_PUB.validate_model_configuration
737: (
738: P_Api_Version_Number => 1.0,
749: );
750:
751: if l_Return_Status=FND_API.G_RET_STS_SUCCESS then
752: commit work;
753: aso_debug_pub.add('rassharm Copy Quote -after ASO_QUOTE_PUB.validate_model_configuration committing data return status: ', 1, 'N');
754:
755: end if;
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
753: aso_debug_pub.add('rassharm Copy Quote -after ASO_QUOTE_PUB.validate_model_configuration committing data return status: ', 1, 'N');
754:
755: end if;
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
759: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
760: END IF;
761:
754:
755: end if;
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
759: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
760: END IF;
761:
762:
755: end if;
756:
757: IF aso_debug_pub.g_debug_flag = 'Y' THEN
758: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
759: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
760: END IF;
761:
762:
763:
800: , p_RECIPROCAL_FLAG => NULL
801: ,p_OBJECT_VERSION_NUMBER => NULL
802:
803: );
804: IF aso_debug_pub.g_debug_flag = 'Y' THEN
805: aso_debug_pub.ADD ( 'Copy_Quote - After header_relationships,insert: END ' , 1 , 'Y' );
806: END IF;
807: --8975090
808:
801: ,p_OBJECT_VERSION_NUMBER => NULL
802:
803: );
804: IF aso_debug_pub.g_debug_flag = 'Y' THEN
805: aso_debug_pub.ADD ( 'Copy_Quote - After header_relationships,insert: END ' , 1 , 'Y' );
806: END IF;
807: --8975090
808:
809: -- IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE THEN code commented for Quoting Usability Sun ER
836: End If; -- Code change for Quoting Usability Sun ER
837:
838: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE THEN -- Code change for Quoting Usability Sun ER
839:
840: IF aso_debug_pub.g_debug_flag = 'Y' THEN
841: aso_debug_pub.ADD ( 'Copy_Quote - Before Copy_Opp_Quote: ' , 1 , 'N' );
842: END IF;
843: ASO_COPY_QUOTE_PVT.Copy_Opp_Quote(
844: p_api_version_number => 1.0,
837:
838: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE THEN -- Code change for Quoting Usability Sun ER
839:
840: IF aso_debug_pub.g_debug_flag = 'Y' THEN
841: aso_debug_pub.ADD ( 'Copy_Quote - Before Copy_Opp_Quote: ' , 1 , 'N' );
842: END IF;
843: ASO_COPY_QUOTE_PVT.Copy_Opp_Quote(
844: p_api_version_number => 1.0,
845: p_qte_header_id => P_Copy_Quote_Header_Rec.quote_header_id,
847: X_Return_Status => l_return_status,
848: X_Msg_Count => x_msg_count,
849: X_Msg_Data => x_msg_data
850: );
851: IF aso_debug_pub.g_debug_flag = 'Y' THEN
852: aso_debug_pub.ADD ( 'Copy_Quote - After Copy_Opp_Quote: l_return_status '||l_return_status , 1 , 'N' );
853: END IF;
854: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
855: x_return_status := l_return_status;
848: X_Msg_Count => x_msg_count,
849: X_Msg_Data => x_msg_data
850: );
851: IF aso_debug_pub.g_debug_flag = 'Y' THEN
852: aso_debug_pub.ADD ( 'Copy_Quote - After Copy_Opp_Quote: l_return_status '||l_return_status , 1 , 'N' );
853: END IF;
854: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
855: x_return_status := l_return_status;
856: RAISE FND_API.G_EXC_ERROR;
858:
859: END IF;
860:
861: -- vtariker Price/Tax Enh
862: IF aso_debug_pub.g_debug_flag = 'Y' THEN
863: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Pricing_Request_Type'||
864: P_Copy_Quote_Control_Rec.Pricing_Request_Type , 1 , 'N' );
865: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Header_Pricing_Event'||
866: P_Copy_Quote_Control_Rec.Header_Pricing_Event , 1 , 'N' );
859: END IF;
860:
861: -- vtariker Price/Tax Enh
862: IF aso_debug_pub.g_debug_flag = 'Y' THEN
863: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Pricing_Request_Type'||
864: P_Copy_Quote_Control_Rec.Pricing_Request_Type , 1 , 'N' );
865: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Header_Pricing_Event'||
866: P_Copy_Quote_Control_Rec.Header_Pricing_Event , 1 , 'N' );
867: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Price_Mode'||
861: -- vtariker Price/Tax Enh
862: IF aso_debug_pub.g_debug_flag = 'Y' THEN
863: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Pricing_Request_Type'||
864: P_Copy_Quote_Control_Rec.Pricing_Request_Type , 1 , 'N' );
865: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Header_Pricing_Event'||
866: P_Copy_Quote_Control_Rec.Header_Pricing_Event , 1 , 'N' );
867: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Price_Mode'||
868: P_Copy_Quote_Control_Rec.Price_Mode , 1 , 'N' );
869: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Tax_Flag'||
863: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Pricing_Request_Type'||
864: P_Copy_Quote_Control_Rec.Pricing_Request_Type , 1 , 'N' );
865: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Header_Pricing_Event'||
866: P_Copy_Quote_Control_Rec.Header_Pricing_Event , 1 , 'N' );
867: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Price_Mode'||
868: P_Copy_Quote_Control_Rec.Price_Mode , 1 , 'N' );
869: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Tax_Flag'||
870: P_Copy_Quote_Control_Rec.Calculate_Tax_Flag , 1 , 'N' );
871: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Freight_Charge_Flag'||
865: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Header_Pricing_Event'||
866: P_Copy_Quote_Control_Rec.Header_Pricing_Event , 1 , 'N' );
867: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Price_Mode'||
868: P_Copy_Quote_Control_Rec.Price_Mode , 1 , 'N' );
869: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Tax_Flag'||
870: P_Copy_Quote_Control_Rec.Calculate_Tax_Flag , 1 , 'N' );
871: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Freight_Charge_Flag'||
872: P_Copy_Quote_Control_Rec.Calculate_Freight_Charge_Flag , 1 , 'N' );
873: END IF;
867: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Price_Mode'||
868: P_Copy_Quote_Control_Rec.Price_Mode , 1 , 'N' );
869: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Tax_Flag'||
870: P_Copy_Quote_Control_Rec.Calculate_Tax_Flag , 1 , 'N' );
871: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Control_Rec.Calculate_Freight_Charge_Flag'||
872: P_Copy_Quote_Control_Rec.Calculate_Freight_Charge_Flag , 1 , 'N' );
873: END IF;
874:
875: IF (P_Copy_Quote_Control_Rec.Header_Pricing_Event <> FND_API.G_MISS_CHAR
902: CLOSE C_Get_Last_Upd_Date;
903:
904: l_upd_qte_header_rec.quote_header_id := x_qte_header_id;
905:
906: IF aso_debug_pub.g_debug_flag = 'Y' THEN
907: aso_debug_pub.ADD ( 'Copy_Quote - Before Update_Qte: x_qte_header_id '||x_qte_header_id , 1 , 'N' );
908: END IF;
909: aso_quote_pub.update_quote (
910: p_api_version_number => 1.0,
903:
904: l_upd_qte_header_rec.quote_header_id := x_qte_header_id;
905:
906: IF aso_debug_pub.g_debug_flag = 'Y' THEN
907: aso_debug_pub.ADD ( 'Copy_Quote - Before Update_Qte: x_qte_header_id '||x_qte_header_id , 1 , 'N' );
908: END IF;
909: aso_quote_pub.update_quote (
910: p_api_version_number => 1.0,
911: p_init_msg_list => fnd_api.g_false,
951: x_msg_count => x_msg_count,
952: x_msg_data => x_msg_data
953: );
954:
955: IF aso_debug_pub.g_debug_flag = 'Y' THEN
956: aso_debug_pub.ADD ( 'Copy_Quote - After Update_Quote (Reprice/tax): l_return_status '||
957: l_return_status , 1 ,'N' );
958: END IF;
959: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
952: x_msg_data => x_msg_data
953: );
954:
955: IF aso_debug_pub.g_debug_flag = 'Y' THEN
956: aso_debug_pub.ADD ( 'Copy_Quote - After Update_Quote (Reprice/tax): l_return_status '||
957: l_return_status , 1 ,'N' );
958: END IF;
959: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
960: x_return_status := l_return_status;
967:
968: IF NVL(FND_PROFILE.Value('OKC_ENABLE_SALES_CONTRACTS'),'N') = 'Y'
969: THEN
970:
971: IF aso_debug_pub.g_debug_flag = 'Y' THEN
972: aso_debug_pub.add(
973: 'Copy_Quote - Checking whether the old quote has terms associated with.',
974: 1,
975: 'Y');
968: IF NVL(FND_PROFILE.Value('OKC_ENABLE_SALES_CONTRACTS'),'N') = 'Y'
969: THEN
970:
971: IF aso_debug_pub.g_debug_flag = 'Y' THEN
972: aso_debug_pub.add(
973: 'Copy_Quote - Checking whether the old quote has terms associated with.',
974: 1,
975: 'Y');
976: END IF;
976: END IF;
977: -- bug 5314615
978: l_has_terms := OKC_TERMS_UTIL_GRP.has_terms('QUOTE', p_copy_quote_header_rec.quote_header_id);
979:
980: IF aso_debug_pub.g_debug_flag = 'Y' THEN
981: aso_debug_pub.add(
982: 'Copy_Quote - l_has_terms ' || l_has_terms,
983: 1,
984: 'Y');
977: -- bug 5314615
978: l_has_terms := OKC_TERMS_UTIL_GRP.has_terms('QUOTE', p_copy_quote_header_rec.quote_header_id);
979:
980: IF aso_debug_pub.g_debug_flag = 'Y' THEN
981: aso_debug_pub.add(
982: 'Copy_Quote - l_has_terms ' || l_has_terms,
983: 1,
984: 'Y');
985: END IF;
990:
991: l_target_doc_type := 'QUOTE';
992: l_target_doc_Id := x_qte_header_id;
993:
994: IF aso_debug_pub.g_debug_flag = 'Y' THEN
995: aso_debug_pub.add(
996: 'Copy_Quote - P_Source_Doc_ID ' || P_Copy_Quote_Header_Rec.Quote_Header_Id,
997: 1,
998: 'Y');
991: l_target_doc_type := 'QUOTE';
992: l_target_doc_Id := x_qte_header_id;
993:
994: IF aso_debug_pub.g_debug_flag = 'Y' THEN
995: aso_debug_pub.add(
996: 'Copy_Quote - P_Source_Doc_ID ' || P_Copy_Quote_Header_Rec.Quote_Header_Id,
997: 1,
998: 'Y');
999: aso_debug_pub.add(
995: aso_debug_pub.add(
996: 'Copy_Quote - P_Source_Doc_ID ' || P_Copy_Quote_Header_Rec.Quote_Header_Id,
997: 1,
998: 'Y');
999: aso_debug_pub.add(
1000: 'Copy_Quote - P_Target_Doc_ID ' || l_target_doc_Id,
1001: 1,
1002: 'Y');
1003: aso_debug_pub.add(
999: aso_debug_pub.add(
1000: 'Copy_Quote - P_Target_Doc_ID ' || l_target_doc_Id,
1001: 1,
1002: 'Y');
1003: aso_debug_pub.add(
1004: 'Copy_Quote - P_Target_Doc_Type ' || l_target_doc_type,
1005: 1,
1006: 'Y');
1007: END IF;
1006: 'Y');
1007: END IF;
1008:
1009: -- bug 4932493,always copying the contract documents
1010: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1011: aso_debug_pub.add(
1012: 'Copy_Quote - Copying terms, as well as contract documents',
1013: 1,
1014: 'Y');
1007: END IF;
1008:
1009: -- bug 4932493,always copying the contract documents
1010: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1011: aso_debug_pub.add(
1012: 'Copy_Quote - Copying terms, as well as contract documents',
1013: 1,
1014: 'Y');
1015: END IF;
1069: OPEN C_Get_RSA(x_qte_header_id);
1070: FETCH C_Get_RSA INTO l_rsa;
1071: CLOSE C_Get_RSA;
1072:
1073: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1074: aso_debug_pub.ADD ( 'Copy_Quote - l_rsa: '|| l_rsa , 1 , 'Y' );
1075: END IF;
1076:
1077: IF ( (P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE) and (nvl(l_rsa,'N') = 'Y') ) then
1070: FETCH C_Get_RSA INTO l_rsa;
1071: CLOSE C_Get_RSA;
1072:
1073: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1074: aso_debug_pub.ADD ( 'Copy_Quote - l_rsa: '|| l_rsa , 1 , 'Y' );
1075: END IF;
1076:
1077: IF ( (P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE) and (nvl(l_rsa,'N') = 'Y') ) then
1078:
1080: OPEN get_note_id(P_Copy_Quote_Header_Rec.quote_header_id);
1081: FETCH get_note_id into l_note_id;
1082: CLOSE get_note_id;
1083:
1084: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1085: aso_debug_pub.ADD ( 'Copy_Quote - l_note_id: '|| l_note_id , 1 , 'Y' );
1086: aso_debug_pub.ADD ( 'Copy_Quote - Before Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1087: END IF;
1088:
1081: FETCH get_note_id into l_note_id;
1082: CLOSE get_note_id;
1083:
1084: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1085: aso_debug_pub.ADD ( 'Copy_Quote - l_note_id: '|| l_note_id , 1 , 'Y' );
1086: aso_debug_pub.ADD ( 'Copy_Quote - Before Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1087: END IF;
1088:
1089: JTF_NOTES_PUB.Create_Note_Context(
1082: CLOSE get_note_id;
1083:
1084: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1085: aso_debug_pub.ADD ( 'Copy_Quote - l_note_id: '|| l_note_id , 1 , 'Y' );
1086: aso_debug_pub.ADD ( 'Copy_Quote - Before Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1087: END IF;
1088:
1089: JTF_NOTES_PUB.Create_Note_Context(
1090: p_validation_level => FND_API.G_VALID_LEVEL_NONE,
1099: p_note_context_type => 'ASO_QUOTE' ,
1100: x_note_context_id => lx_jtf_note_context_id
1101: );
1102:
1103: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1104: aso_debug_pub.ADD ( 'Copy_Quote - After Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1105: aso_debug_pub.ADD ( 'Copy_Quote - x_return_status : ' || x_return_status, 1 , 'Y' );
1106: aso_debug_pub.ADD ( 'Copy_Quote - lx_jtf_note_context_id: ' || lx_jtf_note_context_id, 1 , 'Y' );
1107: END IF;
1100: x_note_context_id => lx_jtf_note_context_id
1101: );
1102:
1103: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1104: aso_debug_pub.ADD ( 'Copy_Quote - After Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1105: aso_debug_pub.ADD ( 'Copy_Quote - x_return_status : ' || x_return_status, 1 , 'Y' );
1106: aso_debug_pub.ADD ( 'Copy_Quote - lx_jtf_note_context_id: ' || lx_jtf_note_context_id, 1 , 'Y' );
1107: END IF;
1108: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1101: );
1102:
1103: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1104: aso_debug_pub.ADD ( 'Copy_Quote - After Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1105: aso_debug_pub.ADD ( 'Copy_Quote - x_return_status : ' || x_return_status, 1 , 'Y' );
1106: aso_debug_pub.ADD ( 'Copy_Quote - lx_jtf_note_context_id: ' || lx_jtf_note_context_id, 1 , 'Y' );
1107: END IF;
1108: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1109: RAISE FND_API.G_EXC_ERROR;
1102:
1103: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1104: aso_debug_pub.ADD ( 'Copy_Quote - After Calling JTF_NOTES_PUB.Create_Note_Context', 1 , 'Y' );
1105: aso_debug_pub.ADD ( 'Copy_Quote - x_return_status : ' || x_return_status, 1 , 'Y' );
1106: aso_debug_pub.ADD ( 'Copy_Quote - lx_jtf_note_context_id: ' || lx_jtf_note_context_id, 1 , 'Y' );
1107: END IF;
1108: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
1109: RAISE FND_API.G_EXC_ERROR;
1110: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1114: END IF; -- end if for the new version and rsa check
1115:
1116: -- ER 3177722
1117: if l_copy_config_profile='N' then
1118: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1119: aso_debug_pub.add('Copy Quote -before ASO_QUOTE_PUB.validate_model_configuration x_qte_header_id: '||x_qte_header_id, 1, 'N');
1120: end if;
1121:
1122: ASO_QUOTE_PUB.validate_model_configuration
1115:
1116: -- ER 3177722
1117: if l_copy_config_profile='N' then
1118: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1119: aso_debug_pub.add('Copy Quote -before ASO_QUOTE_PUB.validate_model_configuration x_qte_header_id: '||x_qte_header_id, 1, 'N');
1120: end if;
1121:
1122: ASO_QUOTE_PUB.validate_model_configuration
1123: (
1133: X_Msg_Count => x_msg_count,
1134: X_Msg_Data => x_msg_data
1135: );
1136:
1137: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1138: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
1139: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
1140: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration x_msg_count: '||x_msg_count, 1, 'N');
1141: END IF;
1134: X_Msg_Data => x_msg_data
1135: );
1136:
1137: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1138: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
1139: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
1140: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration x_msg_count: '||x_msg_count, 1, 'N');
1141: END IF;
1142: /* if (l_Return_Status=FND_API.G_RET_STS_SUCCESS) and (lx_config_tbl.count>0) then
1135: );
1136:
1137: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1138: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
1139: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
1140: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration x_msg_count: '||x_msg_count, 1, 'N');
1141: END IF;
1142: /* if (l_Return_Status=FND_API.G_RET_STS_SUCCESS) and (lx_config_tbl.count>0) then
1143: commit work;
1136:
1137: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1138: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration return status: '||l_Return_Status, 1, 'N');
1139: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration lx_config_tbl: '||lx_config_tbl.count, 1, 'N');
1140: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration x_msg_count: '||x_msg_count, 1, 'N');
1141: END IF;
1142: /* if (l_Return_Status=FND_API.G_RET_STS_SUCCESS) and (lx_config_tbl.count>0) then
1143: commit work;
1144: aso_debug_pub.add('rassharm Copy Quote -after ASO_QUOTE_PUB.validate_model_configuration committing data return status: ', 1, 'N');
1140: aso_debug_pub.add('Copy Quote -After ASO_QUOTE_PUB.validate_model_configuration x_msg_count: '||x_msg_count, 1, 'N');
1141: END IF;
1142: /* if (l_Return_Status=FND_API.G_RET_STS_SUCCESS) and (lx_config_tbl.count>0) then
1143: commit work;
1144: aso_debug_pub.add('rassharm Copy Quote -after ASO_QUOTE_PUB.validate_model_configuration committing data return status: ', 1, 'N');
1145:
1146: end if;
1147: */
1148:
1159:
1160: end if; -- profile
1161:
1162:
1163: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1164: aso_debug_pub.ADD ( 'Copy_Quote - END ' , 1 , 'Y' );
1165: END IF;
1166:
1167: x_return_status := FND_API.G_RET_STS_SUCCESS;
1160: end if; -- profile
1161:
1162:
1163: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1164: aso_debug_pub.ADD ( 'Copy_Quote - END ' , 1 , 'Y' );
1165: END IF;
1166:
1167: x_return_status := FND_API.G_RET_STS_SUCCESS;
1168:
1362: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows (
1363: p_qte_header_id => l_qte_header_id,
1364: p_qte_line_id => NULL );
1365:
1366: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1367: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_shipment_tbl.count: ' || TO_CHAR ( l_shipment_tbl.COUNT ) , 1 , 'N' );
1368: END IF;
1369:
1370: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows (
1363: p_qte_header_id => l_qte_header_id,
1364: p_qte_line_id => NULL );
1365:
1366: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1367: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_shipment_tbl.count: ' || TO_CHAR ( l_shipment_tbl.COUNT ) , 1 , 'N' );
1368: END IF;
1369:
1370: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows (
1371: P_Shipment_Tbl => l_shipment_tbl );
1369:
1370: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows (
1371: P_Shipment_Tbl => l_shipment_tbl );
1372:
1373: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1374: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_freight_charge_tbl.count: ' || TO_CHAR ( l_freight_charge_tbl.COUNT ) , 1 , 'N' );
1375: END IF;
1376:
1377: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows (
1370: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows (
1371: P_Shipment_Tbl => l_shipment_tbl );
1372:
1373: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1374: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_freight_charge_tbl.count: ' || TO_CHAR ( l_freight_charge_tbl.COUNT ) , 1 , 'N' );
1375: END IF;
1376:
1377: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows (
1378: p_qte_header_id => l_qte_header_id,
1378: p_qte_header_id => l_qte_header_id,
1379: p_qte_line_id => NULL,
1380: p_shipment_tbl => ASO_QUOTE_PUB.g_miss_shipment_tbl );
1381:
1382: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1383: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_tax_detail_tbl.count: ' || TO_CHAR ( l_tax_detail_tbl.COUNT ) , 1 , 'N' );
1384: END IF;
1385: /* Code change for Quoting Usability Sun ER End */
1386:
1379: p_qte_line_id => NULL,
1380: p_shipment_tbl => ASO_QUOTE_PUB.g_miss_shipment_tbl );
1381:
1382: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1383: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_tax_detail_tbl.count: ' || TO_CHAR ( l_tax_detail_tbl.COUNT ) , 1 , 'N' );
1384: END IF;
1385: /* Code change for Quoting Usability Sun ER End */
1386:
1387: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
1385: /* Code change for Quoting Usability Sun ER End */
1386:
1387: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
1388:
1389: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1390: aso_debug_pub.ADD ( 'Copy_Header_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is True ', 1 , 'N' );
1391: END IF;
1392:
1393: l_price_adj_tbl :=
1386:
1387: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
1388:
1389: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1390: aso_debug_pub.ADD ( 'Copy_Header_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is True ', 1 , 'N' );
1391: END IF;
1392:
1393: l_price_adj_tbl :=
1394: ASO_UTILITY_PVT.Query_Price_Adj_Rows (
1414: p_qte_header_id => l_qte_header_id
1415: , p_qte_line_id => NULL
1416: );
1417:
1418: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1419: aso_debug_pub.ADD ( 'Copy_Rows - payment_tbl.count: ' || TO_CHAR ( l_payment_tbl.COUNT ) , 1 , 'N' );
1420: END IF; */
1421:
1422: /* Code change for Quoting Usability Sun ER Start */
1415: , p_qte_line_id => NULL
1416: );
1417:
1418: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1419: aso_debug_pub.ADD ( 'Copy_Rows - payment_tbl.count: ' || TO_CHAR ( l_payment_tbl.COUNT ) , 1 , 'N' );
1420: END IF; */
1421:
1422: /* Code change for Quoting Usability Sun ER Start */
1423:
1485: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row (
1486: P_qte_header_Id => l_qte_header_id ,
1487: P_qte_line_id => NULL );
1488:
1489: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1490: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_sales_credit_tbl.count: ' || TO_CHAR ( l_sales_credit_tbl.COUNT ) , 1 , 'N' );
1491: END IF;
1492: End If;
1493:
1486: P_qte_header_Id => l_qte_header_id ,
1487: P_qte_line_id => NULL );
1488:
1489: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1490: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_sales_credit_tbl.count: ' || TO_CHAR ( l_sales_credit_tbl.COUNT ) , 1 , 'N' );
1491: END IF;
1492: End If;
1493:
1494: ElsIf P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
1492: End If;
1493:
1494: ElsIf P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
1495:
1496: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1497: aso_debug_pub.ADD ( 'Copy_Header_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is False ', 1 , 'N' );
1498: END IF;
1499:
1500: l_shipment_tbl(1).SHIP_TO_CUST_ACCOUNT_ID := P_Hd_Shipment_Rec.SHIP_TO_CUST_ACCOUNT_ID;
1493:
1494: ElsIf P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
1495:
1496: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1497: aso_debug_pub.ADD ( 'Copy_Header_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is False ', 1 , 'N' );
1498: END IF;
1499:
1500: l_shipment_tbl(1).SHIP_TO_CUST_ACCOUNT_ID := P_Hd_Shipment_Rec.SHIP_TO_CUST_ACCOUNT_ID;
1501: l_shipment_tbl(1).SHIP_TO_CUST_PARTY_ID := P_Hd_Shipment_Rec.SHIP_TO_CUST_PARTY_ID;
1549: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row (
1550: P_qte_header_Id => l_qte_header_id ,
1551: P_qte_line_id => NULL );
1552:
1553: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1554: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_sales_credit_tbl.count: ' || TO_CHAR ( l_sales_credit_tbl.COUNT ) , 1 , 'N' );
1555: END IF;
1556:
1557: End If;
1550: P_qte_header_Id => l_qte_header_id ,
1551: P_qte_line_id => NULL );
1552:
1553: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1554: aso_debug_pub.ADD ( 'Copy_Header_Rows - l_sales_credit_tbl.count: ' || TO_CHAR ( l_sales_credit_tbl.COUNT ) , 1 , 'N' );
1555: END IF;
1556:
1557: End If;
1558:
1628: -- bug 5159758
1629: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_FALSE ) THEN
1630: l_qte_header_rec.ASSISTANCE_REQUESTED := null;
1631: l_qte_header_rec.ASSISTANCE_REASON_CODE := null;
1632: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1633: aso_debug_pub.ADD ( 'Copy_Rows - Nulled out the ASSISTANCE_REQUESTED and ASSISTANCE_REASON_CODE' , 1 , 'N' );
1634: END IF;
1635: END IF;
1636:
1629: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_FALSE ) THEN
1630: l_qte_header_rec.ASSISTANCE_REQUESTED := null;
1631: l_qte_header_rec.ASSISTANCE_REASON_CODE := null;
1632: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1633: aso_debug_pub.ADD ( 'Copy_Rows - Nulled out the ASSISTANCE_REQUESTED and ASSISTANCE_REASON_CODE' , 1 , 'N' );
1634: END IF;
1635: END IF;
1636:
1637:
1690: l_qte_header_rec.object_version_number := FND_API.G_MISS_NUM;
1691:
1692: --End of BC4J Primary Key Fix
1693:
1694: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1695: aso_debug_pub.ADD ( 'Copy_Header_Rows - Before insert_rows ', 1 , 'Y' );
1696: END IF;
1697:
1698: ASO_QUOTE_HEADERS_PVT.Insert_Rows (
1691:
1692: --End of BC4J Primary Key Fix
1693:
1694: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1695: aso_debug_pub.ADD ( 'Copy_Header_Rows - Before insert_rows ', 1 , 'Y' );
1696: END IF;
1697:
1698: ASO_QUOTE_HEADERS_PVT.Insert_Rows (
1699: p_qte_header_rec => l_qte_header_rec
1734: l_tax_detail_tbl := l_tax_detail_tbl_out ;
1735: l_payment_tbl := l_payment_tbl_out;
1736:
1737:
1738: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1739: aso_debug_pub.ADD ( 'Copy_Header_Rows - After insert_rows - status: ' || l_return_status , 1 , 'Y' );
1740: END IF;
1741:
1742: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1735: l_payment_tbl := l_payment_tbl_out;
1736:
1737:
1738: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1739: aso_debug_pub.ADD ( 'Copy_Header_Rows - After insert_rows - status: ' || l_return_status , 1 , 'Y' );
1740: END IF;
1741:
1742: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1743: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1796: END LOOP;
1797:
1798: If P_Copy_Quote_Control_Rec.Copy_Payment = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
1799:
1800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1801: aso_debug_pub.add('Copy_Header: Before call to copy_payment_row ', 1, 'Y');
1802: END IF;
1803:
1804: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
1797:
1798: If P_Copy_Quote_Control_Rec.Copy_Payment = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
1799:
1800: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1801: aso_debug_pub.add('Copy_Header: Before call to copy_payment_row ', 1, 'Y');
1802: END IF;
1803:
1804: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
1805: x_return_status => l_return_status,
1805: x_return_status => l_return_status,
1806: x_msg_count => x_msg_count,
1807: x_msg_data => x_msg_data);
1808:
1809: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1810: aso_debug_pub.add('Copy_Header: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
1811: END IF;
1812: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1813: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1806: x_msg_count => x_msg_count,
1807: x_msg_data => x_msg_data);
1808:
1809: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1810: aso_debug_pub.add('Copy_Header: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
1811: END IF;
1812: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1813: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1814: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
1835: -- see bug3805575 for more details
1836:
1837: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE THEN
1838:
1839: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1840: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-l_old_qte_header_id ' || l_old_qte_header_id , 1 , 'N' );
1841: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-x_qte_header_id ' || x_qte_header_id , 1 , 'N' );
1842: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_notes ' , 1, 'N' );
1843: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new reference for note ' , 1, 'N' );
1836:
1837: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE THEN
1838:
1839: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1840: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-l_old_qte_header_id ' || l_old_qte_header_id , 1 , 'N' );
1841: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-x_qte_header_id ' || x_qte_header_id , 1 , 'N' );
1842: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_notes ' , 1, 'N' );
1843: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new reference for note ' , 1, 'N' );
1844: END IF;
1837: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE THEN
1838:
1839: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1840: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-l_old_qte_header_id ' || l_old_qte_header_id , 1 , 'N' );
1841: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-x_qte_header_id ' || x_qte_header_id , 1 , 'N' );
1842: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_notes ' , 1, 'N' );
1843: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new reference for note ' , 1, 'N' );
1844: END IF;
1845:
1838:
1839: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1840: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-l_old_qte_header_id ' || l_old_qte_header_id , 1 , 'N' );
1841: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-x_qte_header_id ' || x_qte_header_id , 1 , 'N' );
1842: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_notes ' , 1, 'N' );
1843: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new reference for note ' , 1, 'N' );
1844: END IF;
1845:
1846: ASO_NOTES_INT.COPY_NOTES (
1839: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1840: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-l_old_qte_header_id ' || l_old_qte_header_id , 1 , 'N' );
1841: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_notes-x_qte_header_id ' || x_qte_header_id , 1 , 'N' );
1842: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_notes ' , 1, 'N' );
1843: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new reference for note ' , 1, 'N' );
1844: END IF;
1845:
1846: ASO_NOTES_INT.COPY_NOTES (
1847: p_api_version => l_api_version
1854: , p_new_object_id => x_qte_header_id
1855: , p_old_object_type_code => 'ASO_QUOTE'
1856: , p_new_object_type_code => 'ASO_QUOTE'
1857: );
1858: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1859: aso_debug_pub.ADD ( 'Copy_Rows - after copy_notes status' || l_return_status , 1 , 'Y' );
1860: END IF;
1861:
1862: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1855: , p_old_object_type_code => 'ASO_QUOTE'
1856: , p_new_object_type_code => 'ASO_QUOTE'
1857: );
1858: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1859: aso_debug_pub.ADD ( 'Copy_Rows - after copy_notes status' || l_return_status , 1 , 'Y' );
1860: END IF;
1861:
1862: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1863: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1872: RAISE FND_API.G_EXC_ERROR;
1873: END IF;
1874:
1875: ELSE -- this means new quote is being created
1876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1877: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new note ' , 1, 'N' );
1878: END IF;
1879: ASO_NOTES_INT.Copy_Notes_copy_quote (
1880: p_api_version => l_api_version
1873: END IF;
1874:
1875: ELSE -- this means new quote is being created
1876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1877: aso_debug_pub.ADD ('Copy_Rows - Begin- creating new note ' , 1, 'N' );
1878: END IF;
1879: ASO_NOTES_INT.Copy_Notes_copy_quote (
1880: p_api_version => l_api_version
1881: , p_init_msg_list => FND_API.G_FALSE
1887: , x_return_status => l_return_status
1888: , x_msg_count => x_msg_count
1889: , x_msg_data => x_msg_data
1890: );
1891: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1892: aso_debug_pub.ADD ( 'Copy_Rows - after Copy_Notes_copy_quote status' || l_return_status , 1 , 'Y' );
1893: END IF;
1894:
1895: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1888: , x_msg_count => x_msg_count
1889: , x_msg_data => x_msg_data
1890: );
1891: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1892: aso_debug_pub.ADD ( 'Copy_Rows - after Copy_Notes_copy_quote status' || l_return_status , 1 , 'Y' );
1893: END IF;
1894:
1895: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1896: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1909:
1910: END IF; -- end if for copy notes flag
1911:
1912: IF P_Copy_Quote_Control_Rec.Copy_Task = FND_API.G_TRUE THEN
1913: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1914: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_tasks ' , 1, 'Y' );
1915: END IF;
1916:
1917: ASO_TASK_INT.COPY_TASKS (
1910: END IF; -- end if for copy notes flag
1911:
1912: IF P_Copy_Quote_Control_Rec.Copy_Task = FND_API.G_TRUE THEN
1913: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1914: aso_debug_pub.ADD ('Copy_Rows - Begin- before copy_tasks ' , 1, 'Y' );
1915: END IF;
1916:
1917: ASO_TASK_INT.COPY_TASKS (
1918: p_api_version => l_api_version
1929: || FND_GLOBAL.local_chr ( 45 )
1930: || l_qte_header_rec.quote_version ,
1931: p_quote_version_flag => P_Copy_Quote_Control_Rec.New_Version
1932: );
1933: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1934: aso_debug_pub.ADD ( 'Copy_Rows - after copy_tasks status' || l_return_status , 1 , 'Y' );
1935: END IF;
1936:
1937: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1930: || l_qte_header_rec.quote_version ,
1931: p_quote_version_flag => P_Copy_Quote_Control_Rec.New_Version
1932: );
1933: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1934: aso_debug_pub.ADD ( 'Copy_Rows - after copy_tasks status' || l_return_status , 1 , 'Y' );
1935: END IF;
1936:
1937: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1938: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1949:
1950: END IF;
1951:
1952: IF P_Copy_Quote_Control_Rec.Copy_Attachment = FND_API.G_TRUE THEN
1953: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1954: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_attch ' , 1 , 'Y' );
1955: END IF;
1956:
1957: ASO_ATTACHMENT_INT.COPY_ATTACHMENTS(
1950: END IF;
1951:
1952: IF P_Copy_Quote_Control_Rec.Copy_Attachment = FND_API.G_TRUE THEN
1953: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1954: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before copy_attch ' , 1 , 'Y' );
1955: END IF;
1956:
1957: ASO_ATTACHMENT_INT.COPY_ATTACHMENTS(
1958: p_api_version => l_api_version,
1963: x_return_status => l_return_status,
1964: x_msg_count => x_msg_count,
1965: x_msg_data => x_msg_data
1966: );
1967: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1968: aso_debug_pub.ADD ( 'Copy_Rows -After copy_attch ' || l_return_status , 1 , 'Y' );
1969: END IF;
1970:
1971: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1964: x_msg_count => x_msg_count,
1965: x_msg_data => x_msg_data
1966: );
1967: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1968: aso_debug_pub.ADD ( 'Copy_Rows -After copy_attch ' || l_return_status , 1 , 'Y' );
1969: END IF;
1970:
1971: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
1972: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1983:
1984: END IF;
1985:
1986: FOR j IN 1 .. l_price_adj_tbl.COUNT LOOP
1987: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1988: aso_debug_pub.ADD ( 'Copy_Header_Rows: lx_hd_price_adj_tbl(j).price_adjustment_id' || lx_hd_price_adj_tbl ( j ).price_adjustment_id , 1 , 'Y' );
1989: END IF;
1990:
1991: X_Price_Index_Link_Tbl ( l_dup_price_adj_tbl ( j ).price_adjustment_id ) :=
1984: END IF;
1985:
1986: FOR j IN 1 .. l_price_adj_tbl.COUNT LOOP
1987: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1988: aso_debug_pub.ADD ( 'Copy_Header_Rows: lx_hd_price_adj_tbl(j).price_adjustment_id' || lx_hd_price_adj_tbl ( j ).price_adjustment_id , 1 , 'Y' );
1989: END IF;
1990:
1991: X_Price_Index_Link_Tbl ( l_dup_price_adj_tbl ( j ).price_adjustment_id ) :=
1992: lx_hd_price_adj_tbl ( j ).price_adjustment_id;
1996:
1997: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_FALSE THEN
1998: -- security changes
1999:
2000: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2001: aso_debug_pub.ADD ( 'Copy_Header_Rows: value of ASO_API_ENABLE_SECURITY: ' || FND_PROFILE.VALUE ('ASO_API_ENABLE_SECURITY' ) , 1 , 'Y' );
2002: END IF;
2003:
2004: l_qte_header_rec.batch_price_flag := FND_API.G_FALSE;
1997: IF P_Copy_Quote_Control_Rec.New_Version = FND_API.G_FALSE THEN
1998: -- security changes
1999:
2000: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2001: aso_debug_pub.ADD ( 'Copy_Header_Rows: value of ASO_API_ENABLE_SECURITY: ' || FND_PROFILE.VALUE ('ASO_API_ENABLE_SECURITY' ) , 1 , 'Y' );
2002: END IF;
2003:
2004: l_qte_header_rec.batch_price_flag := FND_API.G_FALSE;
2005:
2004: l_qte_header_rec.batch_price_flag := FND_API.G_FALSE;
2005:
2006: IF NVL ( FND_PROFILE.VALUE ('ASO_API_ENABLE_SECURITY' ), 'N' ) = 'Y' THEN
2007:
2008: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2009: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof: ' || l_sales_team_prof , 1 , 'N' );
2010: END IF;
2011:
2012: If (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE And
2005:
2006: IF NVL ( FND_PROFILE.VALUE ('ASO_API_ENABLE_SECURITY' ), 'N' ) = 'Y' THEN
2007:
2008: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2009: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof: ' || l_sales_team_prof , 1 , 'N' );
2010: END IF;
2011:
2012: If (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE And
2013: P_Copy_Quote_Control_Rec.Copy_Sales_Team = FND_API.G_TRUE) Then -- Code change for Quoting Usability Sun ER
2011:
2012: If (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE And
2013: P_Copy_Quote_Control_Rec.Copy_Sales_Team = FND_API.G_TRUE) Then -- Code change for Quoting Usability Sun ER
2014:
2015: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2016: aso_debug_pub.ADD ( 'Copy_Header_Rows - Copy_To_Same_Customer is True and Copy_Sales_Team is True ', 1 , 'N' );
2017: END IF;
2018:
2019: IF l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL' THEN
2012: If (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE And
2013: P_Copy_Quote_Control_Rec.Copy_Sales_Team = FND_API.G_TRUE) Then -- Code change for Quoting Usability Sun ER
2014:
2015: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2016: aso_debug_pub.ADD ( 'Copy_Header_Rows - Copy_To_Same_Customer is True and Copy_Sales_Team is True ', 1 , 'N' );
2017: END IF;
2018:
2019: IF l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL' THEN
2020:
2021: OPEN C_Get_Old_Qte (l_old_qte_header_id);
2022: FETCH C_Get_Old_Qte INTO l_old_qte_num;
2023: CLOSE C_Get_Old_Qte;
2024:
2025: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2026: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_old_qte_num: ' || l_old_qte_num , 1 , 'N' );
2027: END IF;
2028: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2029:
2022: FETCH C_Get_Old_Qte INTO l_old_qte_num;
2023: CLOSE C_Get_Old_Qte;
2024:
2025: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2026: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_old_qte_num: ' || l_old_qte_num , 1 , 'N' );
2027: END IF;
2028: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2029:
2030: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2026: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_old_qte_num: ' || l_old_qte_num , 1 , 'N' );
2027: END IF;
2028: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2029:
2030: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2031: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2032: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2033: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2034: END IF;
2027: END IF;
2028: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2029:
2030: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2031: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2032: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2033: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2034: END IF;
2035:
2028: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2029:
2030: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2031: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2032: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2033: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2034: END IF;
2035:
2036: l_sequence := NULL;
2029:
2030: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2031: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2032: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2033: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2034: END IF;
2035:
2036: l_sequence := NULL;
2037:
2082: END LOOP;
2083:
2084: ELSE
2085:
2086: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2087: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof : ' || l_sales_team_prof , 1 , 'N' );
2088: END IF;
2089:
2090: ASO_SECURITY_INT.Add_SalesRep_QuoteCreator (
2083:
2084: ELSE
2085:
2086: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2087: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof : ' || l_sales_team_prof , 1 , 'N' );
2088: END IF;
2089:
2090: ASO_SECURITY_INT.Add_SalesRep_QuoteCreator (
2091: p_init_msg_list => FND_API.G_FALSE
2097: );
2098: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2099: RAISE FND_API.G_EXC_ERROR;
2100: END IF;
2101: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2102: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2103: END IF;
2104: END IF; -- sales_team_prof
2105:
2098: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2099: RAISE FND_API.G_EXC_ERROR;
2100: END IF;
2101: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2102: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2103: END IF;
2104: END IF; -- sales_team_prof
2105:
2106: /* Code change for Quoting Usability Sun ER Start */
2106: /* Code change for Quoting Usability Sun ER Start */
2107: ElsIf (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE And
2108: P_Copy_Quote_Control_Rec.Copy_Sales_Team = FND_API.G_FALSE) Then
2109:
2110: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2111: aso_debug_pub.ADD ( 'Copy_Header_Rows - Copy_To_Same_Customer is True and Copy_Sales_Team is False ', 1 , 'N' );
2112: END IF;
2113:
2114: ASO_SECURITY_INT.Add_SalesRep_QuoteCreator (
2107: ElsIf (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE And
2108: P_Copy_Quote_Control_Rec.Copy_Sales_Team = FND_API.G_FALSE) Then
2109:
2110: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2111: aso_debug_pub.ADD ( 'Copy_Header_Rows - Copy_To_Same_Customer is True and Copy_Sales_Team is False ', 1 , 'N' );
2112: END IF;
2113:
2114: ASO_SECURITY_INT.Add_SalesRep_QuoteCreator (
2115: p_init_msg_list => FND_API.G_FALSE
2121: );
2122: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2123: RAISE FND_API.G_EXC_ERROR;
2124: END IF;
2125: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2126: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2127: END IF;
2128:
2129: ElsIf (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE) Then
2122: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2123: RAISE FND_API.G_EXC_ERROR;
2124: END IF;
2125: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2126: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2127: END IF;
2128:
2129: ElsIf (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE) Then
2130:
2127: END IF;
2128:
2129: ElsIf (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE) Then
2130:
2131: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2132: aso_debug_pub.ADD ( 'Copy_Header_Rows - Copy_To_Same_Customer is False in Copy Sales Team flow', 1 , 'N' );
2133: END IF;
2134:
2135: IF l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL' THEN
2128:
2129: ElsIf (P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE) Then
2130:
2131: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2132: aso_debug_pub.ADD ( 'Copy_Header_Rows - Copy_To_Same_Customer is False in Copy Sales Team flow', 1 , 'N' );
2133: END IF;
2134:
2135: IF l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL' THEN
2136:
2133: END IF;
2134:
2135: IF l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL' THEN
2136:
2137: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2138: aso_debug_pub.ADD ( 'Copy_Header_Rows: Before calling ASO_SECURITY_INT.Add_SalesRep_QuoteCreator ' , 1 , 'N' );
2139: END IF;
2140:
2141: ASO_SECURITY_INT.Add_SalesRep_QuoteCreator (
2134:
2135: IF l_sales_team_prof = 'FULL' OR l_sales_team_prof = 'PARTIAL' THEN
2136:
2137: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2138: aso_debug_pub.ADD ( 'Copy_Header_Rows: Before calling ASO_SECURITY_INT.Add_SalesRep_QuoteCreator ' , 1 , 'N' );
2139: END IF;
2140:
2141: ASO_SECURITY_INT.Add_SalesRep_QuoteCreator (
2142: p_init_msg_list => FND_API.G_FALSE
2148:
2149: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2150: RAISE FND_API.G_EXC_ERROR;
2151: END IF;
2152: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2153: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2154: END IF;
2155: Else
2156: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2149: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2150: RAISE FND_API.G_EXC_ERROR;
2151: END IF;
2152: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2153: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2154: END IF;
2155: Else
2156: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2157: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof : ' || l_sales_team_prof , 1 , 'N' );
2152: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2153: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2154: END IF;
2155: Else
2156: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2157: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof : ' || l_sales_team_prof , 1 , 'N' );
2158: END IF;
2159:
2160: OPEN C_Get_Old_Qte (l_old_qte_header_id);
2153: aso_debug_pub.ADD ( 'Copy_Header_Rows: After Add Salesrep: x_return_status: ' || x_return_status , 1 , 'N' );
2154: END IF;
2155: Else
2156: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2157: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_sales_team_prof : ' || l_sales_team_prof , 1 , 'N' );
2158: END IF;
2159:
2160: OPEN C_Get_Old_Qte (l_old_qte_header_id);
2161: FETCH C_Get_Old_Qte INTO l_old_qte_num;
2160: OPEN C_Get_Old_Qte (l_old_qte_header_id);
2161: FETCH C_Get_Old_Qte INTO l_old_qte_num;
2162: CLOSE C_Get_Old_Qte;
2163:
2164: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2165: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_old_qte_num: ' || l_old_qte_num , 1 , 'N' );
2166: END IF;
2167:
2168: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2161: FETCH C_Get_Old_Qte INTO l_old_qte_num;
2162: CLOSE C_Get_Old_Qte;
2163:
2164: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2165: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: l_old_qte_num: ' || l_old_qte_num , 1 , 'N' );
2166: END IF;
2167:
2168: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2169:
2166: END IF;
2167:
2168: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2169:
2170: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2171: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2172: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2173: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2174: END IF;
2167:
2168: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2169:
2170: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2171: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2172: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2173: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2174: END IF;
2175:
2168: FOR C_Sales_Team_Rec IN C_Get_Sales_Team(l_old_qte_num) LOOP
2169:
2170: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2171: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2172: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2173: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2174: END IF;
2175:
2176: l_sequence := NULL;
2169:
2170: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2171: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Id: ' || C_Sales_Team_Rec.Resource_Id , 1 , 'N' );
2172: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: C_Sales_Team_Rec.Resource_Grp_Id: ' || C_Sales_Team_Rec.Resource_Grp_Id , 1 , 'N' );
2173: aso_debug_pub.ADD ( 'Copy_Header_Rows: Sales_Team: Add Res: l_qte_header_rec.Quote_Number: ' || l_qte_header_rec.Quote_Number , 1 , 'N' );
2174: END IF;
2175:
2176: l_sequence := NULL;
2177:
2568: --
2569: -- API body
2570: --
2571:
2572: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2573: aso_debug_pub.ADD ('Copy_Rows - Header and Lines' , 1, 'N' );
2574: END IF;
2575:
2576: -- hyang: for bug 2692785
2569: -- API body
2570: --
2571:
2572: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2573: aso_debug_pub.ADD ('Copy_Rows - Header and Lines' , 1, 'N' );
2574: END IF;
2575:
2576: -- hyang: for bug 2692785
2577: IF P_Qte_Header_Rec.batch_price_flag <> FND_API.G_FALSE THEN
2597: /* Code change for Quoting Usability Sun ER Start */
2598:
2599: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2600:
2601: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2602: aso_debug_pub.add('Copy_Line_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is FALSE ', 1, 'Y');
2603: END IF ;
2604:
2605: OPEN c_header_org;
2598:
2599: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2600:
2601: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2602: aso_debug_pub.add('Copy_Line_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is FALSE ', 1, 'Y');
2603: END IF ;
2604:
2605: OPEN c_header_org;
2606: FETCH c_header_org INTO l_header_org_id;
2623:
2624: IF (l_qte_line_tbl(i).AGREEMENT_ID IS NOT NULL AND
2625: l_qte_line_tbl(i).AGREEMENT_ID <> FND_API.G_MISS_NUM) THEN
2626:
2627: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2628: aso_debug_pub.add('Copy_Line_Rows - l_qte_line_tbl('||i||').AGREEMENT_ID : '||l_qte_line_tbl(i).AGREEMENT_ID, 1, 'Y');
2629: aso_debug_pub.add('Copy_Line_Rows - l_qte_line_tbl('||i||').INVOICE_TO_CUST_ACCOUNT_ID : '||l_qte_line_tbl(i).INVOICE_TO_CUST_ACCOUNT_ID, 1, 'Y');
2630: END IF ;
2631:
2624: IF (l_qte_line_tbl(i).AGREEMENT_ID IS NOT NULL AND
2625: l_qte_line_tbl(i).AGREEMENT_ID <> FND_API.G_MISS_NUM) THEN
2626:
2627: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2628: aso_debug_pub.add('Copy_Line_Rows - l_qte_line_tbl('||i||').AGREEMENT_ID : '||l_qte_line_tbl(i).AGREEMENT_ID, 1, 'Y');
2629: aso_debug_pub.add('Copy_Line_Rows - l_qte_line_tbl('||i||').INVOICE_TO_CUST_ACCOUNT_ID : '||l_qte_line_tbl(i).INVOICE_TO_CUST_ACCOUNT_ID, 1, 'Y');
2630: END IF ;
2631:
2632: Open C_AGREEMENT(l_qte_line_tbl(i).AGREEMENT_ID,l_qte_line_tbl(i).INVOICE_TO_CUST_ACCOUNT_ID);
2625: l_qte_line_tbl(i).AGREEMENT_ID <> FND_API.G_MISS_NUM) THEN
2626:
2627: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2628: aso_debug_pub.add('Copy_Line_Rows - l_qte_line_tbl('||i||').AGREEMENT_ID : '||l_qte_line_tbl(i).AGREEMENT_ID, 1, 'Y');
2629: aso_debug_pub.add('Copy_Line_Rows - l_qte_line_tbl('||i||').INVOICE_TO_CUST_ACCOUNT_ID : '||l_qte_line_tbl(i).INVOICE_TO_CUST_ACCOUNT_ID, 1, 'Y');
2630: END IF ;
2631:
2632: Open C_AGREEMENT(l_qte_line_tbl(i).AGREEMENT_ID,l_qte_line_tbl(i).INVOICE_TO_CUST_ACCOUNT_ID);
2633: Fetch C_AGREEMENT Into l_var;
2683: -- Line level defaulting for different customer
2684:
2685: If l_control_rec.defaulting_fwk_flag = 'Y' Then
2686:
2687: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2688: aso_debug_pub.add('Copy_Line_Rows - l_header_org_id'||l_header_org_id, 1, 'Y');
2689: aso_debug_pub.add('Copy_Line_Rows - before defaulting framework', 1, 'Y');
2690: aso_debug_pub.add('Copy_Line_Rows - populate defaulting control record from the header control record', 1, 'Y');
2691: END IF ;
2684:
2685: If l_control_rec.defaulting_fwk_flag = 'Y' Then
2686:
2687: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2688: aso_debug_pub.add('Copy_Line_Rows - l_header_org_id'||l_header_org_id, 1, 'Y');
2689: aso_debug_pub.add('Copy_Line_Rows - before defaulting framework', 1, 'Y');
2690: aso_debug_pub.add('Copy_Line_Rows - populate defaulting control record from the header control record', 1, 'Y');
2691: END IF ;
2692:
2685: If l_control_rec.defaulting_fwk_flag = 'Y' Then
2686:
2687: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2688: aso_debug_pub.add('Copy_Line_Rows - l_header_org_id'||l_header_org_id, 1, 'Y');
2689: aso_debug_pub.add('Copy_Line_Rows - before defaulting framework', 1, 'Y');
2690: aso_debug_pub.add('Copy_Line_Rows - populate defaulting control record from the header control record', 1, 'Y');
2691: END IF ;
2692:
2693: l_def_Qte_Line_Rec := l_qte_line_tbl(i);
2686:
2687: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2688: aso_debug_pub.add('Copy_Line_Rows - l_header_org_id'||l_header_org_id, 1, 'Y');
2689: aso_debug_pub.add('Copy_Line_Rows - before defaulting framework', 1, 'Y');
2690: aso_debug_pub.add('Copy_Line_Rows - populate defaulting control record from the header control record', 1, 'Y');
2691: END IF ;
2692:
2693: l_def_Qte_Line_Rec := l_qte_line_tbl(i);
2694: l_def_Qte_Line_Rec.org_id := l_header_org_id;
2698: l_def_control_rec.Application_Type_Code := 'QUOTING HTML';
2699: l_def_control_rec.Defaulting_Flow_Code := 'CREATE';
2700: l_db_object_name := ASO_QUOTE_HEADERS_PVT.G_QUOTE_LINE_DB_NAME;
2701:
2702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2703: aso_debug_pub.add('Copy_Line_Rows - Dependency_Flag: '|| l_def_control_rec.Dependency_Flag, 1, 'Y');
2704: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flag: '|| l_def_control_rec.Defaulting_Flag, 1, 'Y');
2705: aso_debug_pub.add('Copy_Line_Rows - Application_Type_Code: '|| l_def_control_rec.Application_Type_Code, 1, 'Y');
2706: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flow_Code: '|| l_def_control_rec.Defaulting_Flow_Code, 1, 'Y');
2699: l_def_control_rec.Defaulting_Flow_Code := 'CREATE';
2700: l_db_object_name := ASO_QUOTE_HEADERS_PVT.G_QUOTE_LINE_DB_NAME;
2701:
2702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2703: aso_debug_pub.add('Copy_Line_Rows - Dependency_Flag: '|| l_def_control_rec.Dependency_Flag, 1, 'Y');
2704: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flag: '|| l_def_control_rec.Defaulting_Flag, 1, 'Y');
2705: aso_debug_pub.add('Copy_Line_Rows - Application_Type_Code: '|| l_def_control_rec.Application_Type_Code, 1, 'Y');
2706: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flow_Code: '|| l_def_control_rec.Defaulting_Flow_Code, 1, 'Y');
2707: END IF ;
2700: l_db_object_name := ASO_QUOTE_HEADERS_PVT.G_QUOTE_LINE_DB_NAME;
2701:
2702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2703: aso_debug_pub.add('Copy_Line_Rows - Dependency_Flag: '|| l_def_control_rec.Dependency_Flag, 1, 'Y');
2704: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flag: '|| l_def_control_rec.Defaulting_Flag, 1, 'Y');
2705: aso_debug_pub.add('Copy_Line_Rows - Application_Type_Code: '|| l_def_control_rec.Application_Type_Code, 1, 'Y');
2706: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flow_Code: '|| l_def_control_rec.Defaulting_Flow_Code, 1, 'Y');
2707: END IF ;
2708:
2701:
2702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2703: aso_debug_pub.add('Copy_Line_Rows - Dependency_Flag: '|| l_def_control_rec.Dependency_Flag, 1, 'Y');
2704: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flag: '|| l_def_control_rec.Defaulting_Flag, 1, 'Y');
2705: aso_debug_pub.add('Copy_Line_Rows - Application_Type_Code: '|| l_def_control_rec.Application_Type_Code, 1, 'Y');
2706: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flow_Code: '|| l_def_control_rec.Defaulting_Flow_Code, 1, 'Y');
2707: END IF ;
2708:
2709: IF (l_shipment_tbl.COUNT > 0) then
2702: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2703: aso_debug_pub.add('Copy_Line_Rows - Dependency_Flag: '|| l_def_control_rec.Dependency_Flag, 1, 'Y');
2704: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flag: '|| l_def_control_rec.Defaulting_Flag, 1, 'Y');
2705: aso_debug_pub.add('Copy_Line_Rows - Application_Type_Code: '|| l_def_control_rec.Application_Type_Code, 1, 'Y');
2706: aso_debug_pub.add('Copy_Line_Rows - Defaulting_Flow_Code: '|| l_def_control_rec.Defaulting_Flow_Code, 1, 'Y');
2707: END IF ;
2708:
2709: IF (l_shipment_tbl.COUNT > 0) then
2710: l_shipment_rec := l_shipment_tbl(1);
2713: IF (l_payment_tbl.COUNT > 0) then
2714: l_payment_rec := l_payment_tbl(1);
2715: END IF;
2716:
2717: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2718: aso_debug_pub.add('Copy_Line_Rows - before call to ASO_DEFAULTING_INT.Default_Entity', 1, 'Y');
2719: END IF ;
2720:
2721: ASO_DEFAULTING_INT.Default_Entity ( p_api_version => 1.0,
2714: l_payment_rec := l_payment_tbl(1);
2715: END IF;
2716:
2717: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2718: aso_debug_pub.add('Copy_Line_Rows - before call to ASO_DEFAULTING_INT.Default_Entity', 1, 'Y');
2719: END IF ;
2720:
2721: ASO_DEFAULTING_INT.Default_Entity ( p_api_version => 1.0,
2722: p_control_rec => l_def_control_rec,
2738: x_return_status => x_return_status,
2739: x_msg_count => x_msg_count,
2740: x_msg_data => x_msg_data );
2741:
2742: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2743: aso_debug_pub.add('Copy_Line_Rows: After call to ASO_DEFAULTING_INT.Default_Entity', 1, 'Y');
2744: aso_debug_pub.add('Copy_Line_Rows: x_return_status: '|| x_return_status, 1, 'Y');
2745: End If;
2746:
2739: x_msg_count => x_msg_count,
2740: x_msg_data => x_msg_data );
2741:
2742: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2743: aso_debug_pub.add('Copy_Line_Rows: After call to ASO_DEFAULTING_INT.Default_Entity', 1, 'Y');
2744: aso_debug_pub.add('Copy_Line_Rows: x_return_status: '|| x_return_status, 1, 'Y');
2745: End If;
2746:
2747: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2740: x_msg_data => x_msg_data );
2741:
2742: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2743: aso_debug_pub.add('Copy_Line_Rows: After call to ASO_DEFAULTING_INT.Default_Entity', 1, 'Y');
2744: aso_debug_pub.add('Copy_Line_Rows: x_return_status: '|| x_return_status, 1, 'Y');
2745: End If;
2746:
2747: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2748:
2854: l_qte_line_dtl_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Qte_Line_Id );
2855:
2856:
2857: IF l_qte_line_rec.line_category_code = 'RETURN' THEN
2858: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2859: aso_debug_pub.ADD ('l_qte_line_dtl_tbl.count' , 1, 'N' );
2860: END IF;
2861:
2862: IF l_qte_line_dtl_tbl.count > 0 THEN
2855:
2856:
2857: IF l_qte_line_rec.line_category_code = 'RETURN' THEN
2858: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2859: aso_debug_pub.ADD ('l_qte_line_dtl_tbl.count' , 1, 'N' );
2860: END IF;
2861:
2862: IF l_qte_line_dtl_tbl.count > 0 THEN
2863:
2872: l_copy_flag:='F';
2873: End If;
2874: /* Code change for Quoting Usability Sun ER End */
2875:
2876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2877: aso_debug_pub.ADD ('Install Base Check Failed' , 1, 'N' );
2878: END IF;
2879:
2880: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
2873: End If;
2874: /* Code change for Quoting Usability Sun ER End */
2875:
2876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2877: aso_debug_pub.ADD ('Install Base Check Failed' , 1, 'N' );
2878: END IF;
2879:
2880: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
2881: FND_MESSAGE.Set_Name ('ASO' , 'ASO_RECONFIG_ITM_ERR' );
2932: /* Code change for Quoting Usability Sun ER Start */
2933: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2934: l_copy_flag:='F';
2935:
2936: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2937: aso_debug_pub.ADD ('Copy_Line_Rows : ASO_CFG_ITM_ERR error' , 1, 'N' );
2938: END IF;
2939: End If;
2940: /* Code change for Quoting Usability Sun ER End */
2933: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2934: l_copy_flag:='F';
2935:
2936: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2937: aso_debug_pub.ADD ('Copy_Line_Rows : ASO_CFG_ITM_ERR error' , 1, 'N' );
2938: END IF;
2939: End If;
2940: /* Code change for Quoting Usability Sun ER End */
2941:
2949:
2950:
2951: -- Check to see if it is a servicable product
2952:
2953: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2954: aso_debug_pub.ADD ( 'service item flag = ' || l_qte_line_rec.service_item_flag , 1 , 'N' );
2955: END IF;
2956: IF l_qte_line_rec.service_item_flag = 'Y' THEN
2957:
2950:
2951: -- Check to see if it is a servicable product
2952:
2953: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2954: aso_debug_pub.ADD ( 'service item flag = ' || l_qte_line_rec.service_item_flag , 1 , 'N' );
2955: END IF;
2956: IF l_qte_line_rec.service_item_flag = 'Y' THEN
2957:
2958: x_return_status := FND_API.G_RET_STS_ERROR;
2960: /* Code change for Quoting Usability Sun ER Start */
2961: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2962: l_copy_flag:='F';
2963:
2964: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2965: aso_debug_pub.ADD ('Copy_Line_Rows : ASO_SRV_ITM_ERR error' , 1, 'N' );
2966: END IF;
2967: End If;
2968: /* Code change for Quoting Usability Sun ER End */
2961: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2962: l_copy_flag:='F';
2963:
2964: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2965: aso_debug_pub.ADD ('Copy_Line_Rows : ASO_SRV_ITM_ERR error' , 1, 'N' );
2966: END IF;
2967: End If;
2968: /* Code change for Quoting Usability Sun ER End */
2969:
2980: l_service_item_flag := NULL;
2981: l_serviceable_product_flag := NULL;
2982:
2983: END IF;
2984: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2985: aso_debug_pub.ADD ('End Of New Code ' , 1, 'N' );
2986: END IF;
2987:
2988: -- End of New Code added
2981: l_serviceable_product_flag := NULL;
2982:
2983: END IF;
2984: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2985: aso_debug_pub.ADD ('End Of New Code ' , 1, 'N' );
2986: END IF;
2987:
2988: -- End of New Code added
2989:
2995: /* Code change for Quoting Usability Sun ER Start */
2996: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2997: l_copy_flag:='F';
2998:
2999: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3000: aso_debug_pub.ADD ('Copy_Line_Rows : ASO_CANNOT_COPY_EDU error' , 1, 'N' );
3001: END IF;
3002: End If;
3003: /* Code change for Quoting Usability Sun ER End */
2996: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
2997: l_copy_flag:='F';
2998:
2999: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3000: aso_debug_pub.ADD ('Copy_Line_Rows : ASO_CANNOT_COPY_EDU error' , 1, 'N' );
3001: END IF;
3002: End If;
3003: /* Code change for Quoting Usability Sun ER End */
3004:
3011:
3012: l_qte_line_tbl ( i ).quote_header_id := P_New_Qte_Header_Id;
3013: l_qte_line_id := l_qte_line_tbl ( i ).quote_line_id;
3014:
3015: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3016: aso_debug_pub.ADD ( 'qte line id = ' || l_qte_line_id, 1, 'N' );
3017: aso_debug_pub.ADD ( 'i = ' || i, 1, 'N' );
3018: aso_debug_pub.ADD ( 'item_type_code = ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'N' );
3019: END IF;
3012: l_qte_line_tbl ( i ).quote_header_id := P_New_Qte_Header_Id;
3013: l_qte_line_id := l_qte_line_tbl ( i ).quote_line_id;
3014:
3015: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3016: aso_debug_pub.ADD ( 'qte line id = ' || l_qte_line_id, 1, 'N' );
3017: aso_debug_pub.ADD ( 'i = ' || i, 1, 'N' );
3018: aso_debug_pub.ADD ( 'item_type_code = ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'N' );
3019: END IF;
3020:
3013: l_qte_line_id := l_qte_line_tbl ( i ).quote_line_id;
3014:
3015: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3016: aso_debug_pub.ADD ( 'qte line id = ' || l_qte_line_id, 1, 'N' );
3017: aso_debug_pub.ADD ( 'i = ' || i, 1, 'N' );
3018: aso_debug_pub.ADD ( 'item_type_code = ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'N' );
3019: END IF;
3020:
3021: IF l_line_index_link_tbl ( l_qte_line_id ) = FND_API.G_MISS_NUM THEN
3014:
3015: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3016: aso_debug_pub.ADD ( 'qte line id = ' || l_qte_line_id, 1, 'N' );
3017: aso_debug_pub.ADD ( 'i = ' || i, 1, 'N' );
3018: aso_debug_pub.ADD ( 'item_type_code = ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'N' );
3019: END IF;
3020:
3021: IF l_line_index_link_tbl ( l_qte_line_id ) = FND_API.G_MISS_NUM THEN
3022:
3027: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
3028: IF (l_qte_line_tbl(i).item_type_code = 'STD' ) and ( l_qte_line_tbl(i).line_category_code = 'RETURN' )THEN
3029: IF (l_qte_line_dtl_tbl(1).INSTANCE_ID IS NOT NULL) Then
3030: l_copy_flag:='F';
3031: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3032: aso_debug_pub.ADD ('Copy_Line_Rows : Trade in from install Base Check Failed' , 1, 'N' );
3033: END IF;
3034: End IF;
3035: End IF;
3028: IF (l_qte_line_tbl(i).item_type_code = 'STD' ) and ( l_qte_line_tbl(i).line_category_code = 'RETURN' )THEN
3029: IF (l_qte_line_dtl_tbl(1).INSTANCE_ID IS NOT NULL) Then
3030: l_copy_flag:='F';
3031: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3032: aso_debug_pub.ADD ('Copy_Line_Rows : Trade in from install Base Check Failed' , 1, 'N' );
3033: END IF;
3034: End IF;
3035: End IF;
3036:
3035: End IF;
3036:
3037: l_appl_param_rec.calling_application_id := 697;
3038:
3039: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3040: aso_debug_pub.add('Copy_Line_Rows:Call TO CZ_NETWORK_API_PUB.Is_Container ');
3041: END IF;
3042:
3043: -- Validation check for Container Model
3036:
3037: l_appl_param_rec.calling_application_id := 697;
3038:
3039: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3040: aso_debug_pub.add('Copy_Line_Rows:Call TO CZ_NETWORK_API_PUB.Is_Container ');
3041: END IF;
3042:
3043: -- Validation check for Container Model
3044: cz_network_api_pub.is_container(p_api_version => 1.0
3052:
3053: IF ( l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN
3054: IF l_return_value = 'Y' THEN
3055: l_copy_flag := 'F';
3056: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3057: aso_debug_pub.ADD ('Copy_Line_Rows : Container Model Check Failed' , 1, 'N' );
3058: END IF;
3059: END IF;
3060: ELSE
3053: IF ( l_return_status = FND_API.G_RET_STS_SUCCESS ) THEN
3054: IF l_return_value = 'Y' THEN
3055: l_copy_flag := 'F';
3056: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3057: aso_debug_pub.ADD ('Copy_Line_Rows : Container Model Check Failed' , 1, 'N' );
3058: END IF;
3059: END IF;
3060: ELSE
3061: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3084: l_ato_model := fnd_api.g_true;
3085: end if;
3086:
3087:
3088: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3089: aso_debug_pub.ADD ( 'Before Calling ASO_CGF_INT.Copy Configuration' , 1 , 'N' );
3090: END IF;
3091:
3092: ASO_CFG_INT.Copy_Configuration (
3085: end if;
3086:
3087:
3088: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3089: aso_debug_pub.ADD ( 'Before Calling ASO_CGF_INT.Copy Configuration' , 1 , 'N' );
3090: END IF;
3091:
3092: ASO_CFG_INT.Copy_Configuration (
3093: P_Api_version_NUmber => 1.0
3103: , x_msg_data => x_msg_data
3104: , p_autonomous_flag => FND_API.G_FALSE
3105: );
3106:
3107: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3108: aso_debug_pub.ADD ( 'After Calling ASO_CGF_INT.Copy Configuration' , 1 , 'N' );
3109: END IF;
3110:
3111: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3104: , p_autonomous_flag => FND_API.G_FALSE
3105: );
3106:
3107: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3108: aso_debug_pub.ADD ( 'After Calling ASO_CGF_INT.Copy Configuration' , 1 , 'N' );
3109: END IF;
3110:
3111: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
3112: l_old_config_header_id :=
3130:
3131: l_serviceable_product_flag := l_qte_line_tbl ( i ).SERVICEABLE_PRODUCT_FLAG;
3132: l_service_item_flag := l_qte_line_tbl ( i ).service_item_flag;
3133:
3134: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3135: aso_debug_pub.ADD ( 'service item flag = ' || l_service_item_flag , 1 , 'N' );
3136: aso_debug_pub.ADD ( 'serviceable_product_flag = ' || l_serviceable_product_flag , 1 , 'N' );
3137: END IF;
3138:
3131: l_serviceable_product_flag := l_qte_line_tbl ( i ).SERVICEABLE_PRODUCT_FLAG;
3132: l_service_item_flag := l_qte_line_tbl ( i ).service_item_flag;
3133:
3134: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3135: aso_debug_pub.ADD ( 'service item flag = ' || l_service_item_flag , 1 , 'N' );
3136: aso_debug_pub.ADD ( 'serviceable_product_flag = ' || l_serviceable_product_flag , 1 , 'N' );
3137: END IF;
3138:
3139: IF l_service_item_flag = 'Y'
3132: l_service_item_flag := l_qte_line_tbl ( i ).service_item_flag;
3133:
3134: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3135: aso_debug_pub.ADD ( 'service item flag = ' || l_service_item_flag , 1 , 'N' );
3136: aso_debug_pub.ADD ( 'serviceable_product_flag = ' || l_serviceable_product_flag , 1 , 'N' );
3137: END IF;
3138:
3139: IF l_service_item_flag = 'Y'
3140: AND (l_qte_line_dtl_tbl ( 1 ).service_ref_type_code IS NULL OR
3141: l_qte_line_dtl_tbl ( 1 ).service_ref_type_code <> 'QUOTE') THEN
3142: l_service_item_flag := 'N';
3143: END IF;
3144:
3145: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3146: aso_debug_pub.ADD ( 'service item flag 2= ' || l_service_item_flag , 1 , 'N' );
3147: END IF;
3148:
3149: /* Code change for Quoting Usability Sun ER Start */
3142: l_service_item_flag := 'N';
3143: END IF;
3144:
3145: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3146: aso_debug_pub.ADD ( 'service item flag 2= ' || l_service_item_flag , 1 , 'N' );
3147: END IF;
3148:
3149: /* Code change for Quoting Usability Sun ER Start */
3150: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
3154: -- Validation check for service reference - Install Base and Pending Order
3155: If (l_qte_line_dtl_tbl ( 1 ).service_ref_type_code = 'CUSTOMER_PRODUCT') Or
3156: (l_qte_line_dtl_tbl ( 1 ).service_ref_type_code = 'PENDING_ORDER') Then
3157: l_copy_flag := 'F';
3158: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3159: aso_debug_pub.ADD ('Copy_Line_Rows : service_ref_type_code = '||l_qte_line_dtl_tbl ( 1 ).service_ref_type_code , 1, 'N' );
3160: END IF;
3161:
3162: -- Validation check for service reference - Product Catalog
3155: If (l_qte_line_dtl_tbl ( 1 ).service_ref_type_code = 'CUSTOMER_PRODUCT') Or
3156: (l_qte_line_dtl_tbl ( 1 ).service_ref_type_code = 'PENDING_ORDER') Then
3157: l_copy_flag := 'F';
3158: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3159: aso_debug_pub.ADD ('Copy_Line_Rows : service_ref_type_code = '||l_qte_line_dtl_tbl ( 1 ).service_ref_type_code , 1, 'N' );
3160: END IF;
3161:
3162: -- Validation check for service reference - Product Catalog
3163: ElsIf l_qte_line_dtl_tbl ( 1 ).service_ref_type_code = 'PRODUCT_CATALOG' Then
3165: l_check_service_rec.product_item_id := l_qte_line_dtl_tbl ( 1 ).SERVICE_REF_LINE_ID;
3166: l_check_service_rec.customer_id := P_Qte_Header_Rec.CUST_ACCOUNT_ID;
3167: l_check_service_rec.service_item_id := l_qte_line_tbl ( i ).INVENTORY_ITEM_ID;
3168:
3169: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3170: aso_debug_pub.ADD( 'Copy_Line_Rows:Before calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for IB', 1 , 'N' );
3171: END IF;
3172:
3173: ASO_SERVICE_CONTRACTS_INT.is_service_available (
3166: l_check_service_rec.customer_id := P_Qte_Header_Rec.CUST_ACCOUNT_ID;
3167: l_check_service_rec.service_item_id := l_qte_line_tbl ( i ).INVENTORY_ITEM_ID;
3168:
3169: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3170: aso_debug_pub.ADD( 'Copy_Line_Rows:Before calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for IB', 1 , 'N' );
3171: END IF;
3172:
3173: ASO_SERVICE_CONTRACTS_INT.is_service_available (
3174: P_Api_Version_Number => 1.0 ,
3178: X_Return_Status => x_return_status ,
3179: p_check_service_rec => l_check_service_rec,
3180: X_Available_YN => x_Available_YN );
3181:
3182: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3183: aso_debug_pub.ADD( 'Copy_Line_Rows:After calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for IB', 1 , 'N' );
3184: END IF;
3185:
3186: If nvl(x_Available_YN, 'N') = 'N' Then
3179: p_check_service_rec => l_check_service_rec,
3180: X_Available_YN => x_Available_YN );
3181:
3182: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3183: aso_debug_pub.ADD( 'Copy_Line_Rows:After calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for IB', 1 , 'N' );
3184: END IF;
3185:
3186: If nvl(x_Available_YN, 'N') = 'N' Then
3187: l_copy_flag := 'F';
3184: END IF;
3185:
3186: If nvl(x_Available_YN, 'N') = 'N' Then
3187: l_copy_flag := 'F';
3188: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3189: aso_debug_pub.add('Copy_Line_Rows: PC Service Not Available');
3190: END IF;
3191: End If;
3192:
3185:
3186: If nvl(x_Available_YN, 'N') = 'N' Then
3187: l_copy_flag := 'F';
3188: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3189: aso_debug_pub.add('Copy_Line_Rows: PC Service Not Available');
3190: END IF;
3191: End If;
3192:
3193: -- Validation check for service reference - Quote
3199:
3200: l_check_service_rec.customer_id := P_Qte_Header_Rec.CUST_ACCOUNT_ID;
3201: l_check_service_rec.service_item_id := l_qte_line_tbl ( i ).INVENTORY_ITEM_ID;
3202:
3203: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3204: aso_debug_pub.ADD( 'Copy_Line_Rows:Before calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for Quote', 1 , 'N' );
3205: END IF;
3206:
3207: ASO_SERVICE_CONTRACTS_INT.is_service_available (
3200: l_check_service_rec.customer_id := P_Qte_Header_Rec.CUST_ACCOUNT_ID;
3201: l_check_service_rec.service_item_id := l_qte_line_tbl ( i ).INVENTORY_ITEM_ID;
3202:
3203: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3204: aso_debug_pub.ADD( 'Copy_Line_Rows:Before calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for Quote', 1 , 'N' );
3205: END IF;
3206:
3207: ASO_SERVICE_CONTRACTS_INT.is_service_available (
3208: P_Api_Version_Number => 1.0 ,
3212: X_Return_Status => x_return_status ,
3213: p_check_service_rec => l_check_service_rec,
3214: X_Available_YN => x_Available_YN );
3215:
3216: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3217: aso_debug_pub.ADD( 'Copy_Line_Rows:After calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for Quote', 1 , 'N' );
3218: END IF;
3219:
3220: If nvl(x_Available_YN, 'N') = 'N' Then
3213: p_check_service_rec => l_check_service_rec,
3214: X_Available_YN => x_Available_YN );
3215:
3216: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3217: aso_debug_pub.ADD( 'Copy_Line_Rows:After calling ASO_SERVICE_CONTRACTS_INT.Is_Service_Available for Quote', 1 , 'N' );
3218: END IF;
3219:
3220: If nvl(x_Available_YN, 'N') = 'N' Then
3221: l_copy_flag := 'F';
3218: END IF;
3219:
3220: If nvl(x_Available_YN, 'N') = 'N' Then
3221: l_copy_flag := 'F';
3222: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3223: aso_debug_pub.add('Copy_Line_Rows: Quote Service Not Available');
3224: END IF;
3225: End If;
3226:
3219:
3220: If nvl(x_Available_YN, 'N') = 'N' Then
3221: l_copy_flag := 'F';
3222: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3223: aso_debug_pub.add('Copy_Line_Rows: Quote Service Not Available');
3224: END IF;
3225: End If;
3226:
3227: End If;
3257:
3258: /* Code change for Quoting Usability Sun ER Start */
3259: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE Then
3260:
3261: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3262: aso_debug_pub.add('Copy_Line_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is True ', 1, 'Y');
3263: END IF ;
3264:
3265: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows(p_qte_header_id,l_qte_line_id);
3258: /* Code change for Quoting Usability Sun ER Start */
3259: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_TRUE Then
3260:
3261: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3262: aso_debug_pub.add('Copy_Line_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is True ', 1, 'Y');
3263: END IF ;
3264:
3265: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows(p_qte_header_id,l_qte_line_id);
3266:
3314: End If;
3315:
3316: ElsIf P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
3317:
3318: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3319: aso_debug_pub.add('Copy_Line_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is False 2 ', 1, 'Y');
3320: END IF ;
3321:
3322: If P_Copy_Quote_Control_Rec.Copy_Line_Shipping = FND_API.G_FALSE Then
3315:
3316: ElsIf P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
3317:
3318: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3319: aso_debug_pub.add('Copy_Line_Rows - P_Copy_Quote_Control_Rec.Copy_To_Same_Customer is False 2 ', 1, 'Y');
3320: END IF ;
3321:
3322: If P_Copy_Quote_Control_Rec.Copy_Line_Shipping = FND_API.G_FALSE Then
3323: l_shipment_tbl(1).SHIP_METHOD_CODE := Null;
3448:
3449: END IF;
3450:
3451:
3452: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3453: aso_debug_pub.ADD ( 'Copy_Line_Rows - Before insert_quote_line_rows: ' || l_qte_line_id , 1 , 'Y' );
3454: END IF;
3455: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
3456: p_control_rec => l_control_rec
3449: END IF;
3450:
3451:
3452: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3453: aso_debug_pub.ADD ( 'Copy_Line_Rows - Before insert_quote_line_rows: ' || l_qte_line_id , 1 , 'Y' );
3454: END IF;
3455: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
3456: p_control_rec => l_control_rec
3457: , P_qte_Line_Rec => l_qte_line_tbl ( i )
3506: ELSIF ( l_return_status = FND_API.G_RET_STS_ERROR ) THEN
3507: x_return_status := FND_API.G_RET_STS_ERROR;
3508: RAISE FND_API.G_EXC_ERROR;
3509: END IF;
3510: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3511: aso_debug_pub.ADD ( 'Copy_Rows - After insert_quote_line_rows - status: ' || l_return_status , 1 , 'Y' );
3512: END IF;
3513:
3514: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3507: x_return_status := FND_API.G_RET_STS_ERROR;
3508: RAISE FND_API.G_EXC_ERROR;
3509: END IF;
3510: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3511: aso_debug_pub.ADD ( 'Copy_Rows - After insert_quote_line_rows - status: ' || l_return_status , 1 , 'Y' );
3512: END IF;
3513:
3514: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3515: aso_debug_pub.ADD ( 'Copy_Rows - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
3510: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3511: aso_debug_pub.ADD ( 'Copy_Rows - After insert_quote_line_rows - status: ' || l_return_status , 1 , 'Y' );
3512: END IF;
3513:
3514: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3515: aso_debug_pub.ADD ( 'Copy_Rows - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
3516: aso_debug_pub.ADD ( 'Copy_Rows - l_ato_model: ' || l_ato_model , 1 , 'Y' );
3517: END IF;
3518: update aso_quote_line_details
3511: aso_debug_pub.ADD ( 'Copy_Rows - After insert_quote_line_rows - status: ' || l_return_status , 1 , 'Y' );
3512: END IF;
3513:
3514: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3515: aso_debug_pub.ADD ( 'Copy_Rows - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
3516: aso_debug_pub.ADD ( 'Copy_Rows - l_ato_model: ' || l_ato_model , 1 , 'Y' );
3517: END IF;
3518: update aso_quote_line_details
3519: set top_model_line_id = lx_qte_line_rec.quote_line_id,
3512: END IF;
3513:
3514: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3515: aso_debug_pub.ADD ( 'Copy_Rows - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
3516: aso_debug_pub.ADD ( 'Copy_Rows - l_ato_model: ' || l_ato_model , 1 , 'Y' );
3517: END IF;
3518: update aso_quote_line_details
3519: set top_model_line_id = lx_qte_line_rec.quote_line_id,
3520: ato_line_id = decode(l_ato_model,fnd_api.g_true,lx_qte_line_rec.quote_line_id,null)
3550: END LOOP;
3551:
3552: If P_Copy_Quote_Control_Rec.Copy_Line_Payment = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
3553:
3554: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3555: aso_debug_pub.add('Copy_Rows: Before call to copy_payment_row ', 1, 'Y');
3556: END IF;
3557:
3558: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
3551:
3552: If P_Copy_Quote_Control_Rec.Copy_Line_Payment = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
3553:
3554: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3555: aso_debug_pub.add('Copy_Rows: Before call to copy_payment_row ', 1, 'Y');
3556: END IF;
3557:
3558: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
3559: x_return_status => l_return_status,
3559: x_return_status => l_return_status,
3560: x_msg_count => x_msg_count,
3561: x_msg_data => x_msg_data);
3562:
3563: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3564: aso_debug_pub.add('Copy_Rows: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
3565: END IF;
3566: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3567: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3560: x_msg_count => x_msg_count,
3561: x_msg_data => x_msg_data);
3562:
3563: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3564: aso_debug_pub.add('Copy_Rows: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
3565: END IF;
3566: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3567: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3568: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
3574: ELSIF ( l_return_status = FND_API.G_RET_STS_ERROR ) THEN
3575: x_return_status := FND_API.G_RET_STS_ERROR;
3576: RAISE FND_API.G_EXC_ERROR;
3577: END IF;
3578: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3579: aso_debug_pub.ADD ( 'Copy_Rows - After insert_quote_line_rows - status: ' || l_return_status , 1 , 'Y' );
3580: END IF;
3581:
3582: END IF;
3575: x_return_status := FND_API.G_RET_STS_ERROR;
3576: RAISE FND_API.G_EXC_ERROR;
3577: END IF;
3578: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3579: aso_debug_pub.ADD ( 'Copy_Rows - After insert_quote_line_rows - status: ' || l_return_status , 1 , 'Y' );
3580: END IF;
3581:
3582: END IF;
3583:
3589: -- IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE ) THEN code commented for Quoting Usability Sun ER
3590:
3591: If P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
3592:
3593: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3594: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
3595: END IF;
3596:
3597: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
3590:
3591: If P_Copy_Quote_Control_Rec.Copy_Line_Sales_Supplement = FND_API.G_TRUE Then -- Code change for Quoting Usability Sun ER
3592:
3593: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3594: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
3595: END IF;
3596:
3597: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
3598: (
3605: X_Msg_Count => X_Msg_Count,
3606: X_Msg_Data => X_Msg_Data );
3607:
3608:
3609: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3610: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
3611: END IF;
3612:
3613:
3606: X_Msg_Data => X_Msg_Data );
3607:
3608:
3609: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3610: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
3611: END IF;
3612:
3613:
3614: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3640: IF P_Copy_Quote_Control_Rec.Copy_Line_Attachment = FND_API.G_TRUE -- Code change for Quoting Usability Sun ER
3641:
3642: OR ( ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM)) THEN
3643:
3644: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3645: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_attch ' , 1 , 'Y' );
3646: END IF;
3647:
3648: ASO_ATTACHMENT_INT.Copy_Attachments(
3641:
3642: OR ( ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM)) THEN
3643:
3644: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3645: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_attch ' , 1 , 'Y' );
3646: END IF;
3647:
3648: ASO_ATTACHMENT_INT.Copy_Attachments(
3649: p_api_version => l_api_version,
3654: x_return_status => l_return_status,
3655: x_msg_count => x_msg_count,
3656: x_msg_data => x_msg_data
3657: );
3658: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3659: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_attch ' || x_return_status , 1 , 'Y' );
3660: END IF;
3661:
3662: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3655: x_msg_count => x_msg_count,
3656: x_msg_data => x_msg_data
3657: );
3658: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3659: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_attch ' || x_return_status , 1 , 'Y' );
3660: END IF;
3661:
3662: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3663: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3676:
3677: FOR j IN 1 .. l_dup_price_adj_tbl.COUNT LOOP
3678: l_price_index_link_tbl ( l_dup_price_adj_tbl ( j ).price_adjustment_id ) :=
3679: lx_ln_price_adj_tbl ( j ).price_adjustment_id;
3680: aso_debug_pub.ADD ( 'Copy - l_dup_price_adj_tbl ( j ).price_adjustment_id ' || l_dup_price_adj_tbl ( j ).price_adjustment_id , 1 , 'Y' );
3681: aso_debug_pub.ADD ( 'Copy - lx_ln_price_adj_tbl ( j ).price_adjustment_id ' || lx_ln_price_adj_tbl ( j ).price_adjustment_id , 1 , 'Y' );
3682: END LOOP;
3683:
3684: l_line_index_link_tbl ( l_qte_line_id ) :=
3677: FOR j IN 1 .. l_dup_price_adj_tbl.COUNT LOOP
3678: l_price_index_link_tbl ( l_dup_price_adj_tbl ( j ).price_adjustment_id ) :=
3679: lx_ln_price_adj_tbl ( j ).price_adjustment_id;
3680: aso_debug_pub.ADD ( 'Copy - l_dup_price_adj_tbl ( j ).price_adjustment_id ' || l_dup_price_adj_tbl ( j ).price_adjustment_id , 1 , 'Y' );
3681: aso_debug_pub.ADD ( 'Copy - lx_ln_price_adj_tbl ( j ).price_adjustment_id ' || lx_ln_price_adj_tbl ( j ).price_adjustment_id , 1 , 'Y' );
3682: END LOOP;
3683:
3684: l_line_index_link_tbl ( l_qte_line_id ) :=
3685: lx_qte_line_rec.quote_line_id;
3682: END LOOP;
3683:
3684: l_line_index_link_tbl ( l_qte_line_id ) :=
3685: lx_qte_line_rec.quote_line_id;
3686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3687: aso_debug_pub.ADD ( 'Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'Y' );
3688: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_tbl ( i ).inventory_item_id , 1 , 'Y' );
3689: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
3690: END IF;
3683:
3684: l_line_index_link_tbl ( l_qte_line_id ) :=
3685: lx_qte_line_rec.quote_line_id;
3686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3687: aso_debug_pub.ADD ( 'Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'Y' );
3688: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_tbl ( i ).inventory_item_id , 1 , 'Y' );
3689: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
3690: END IF;
3691:
3684: l_line_index_link_tbl ( l_qte_line_id ) :=
3685: lx_qte_line_rec.quote_line_id;
3686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3687: aso_debug_pub.ADD ( 'Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'Y' );
3688: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_tbl ( i ).inventory_item_id , 1 , 'Y' );
3689: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
3690: END IF;
3691:
3692: IF l_serviceable_product_flag = 'Y' THEN
3685: lx_qte_line_rec.quote_line_id;
3686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3687: aso_debug_pub.ADD ( 'Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_tbl ( i ).item_type_code , 1 , 'Y' );
3688: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_tbl ( i ).inventory_item_id , 1 , 'Y' );
3689: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
3690: END IF;
3691:
3692: IF l_serviceable_product_flag = 'Y' THEN
3693:
3690: END IF;
3691:
3692: IF l_serviceable_product_flag = 'Y' THEN
3693:
3694: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3695: aso_debug_pub.ADD ( 'Before Calling Service Copy ' , 1 , 'N' );
3696: END IF;
3697:
3698: ASO_COPY_QUOTE_PVT.service_copy (
3691:
3692: IF l_serviceable_product_flag = 'Y' THEN
3693:
3694: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3695: aso_debug_pub.ADD ( 'Before Calling Service Copy ' , 1 , 'N' );
3696: END IF;
3697:
3698: ASO_COPY_QUOTE_PVT.service_copy (
3699: p_qte_line_id => l_qte_line_id
3709: );
3710:
3711: END IF;
3712:
3713: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3714: aso_debug_pub.ADD ( ' After Calling Service Copy' , 1 , 'N' );
3715: END IF;
3716:
3717:
3710:
3711: END IF;
3712:
3713: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3714: aso_debug_pub.ADD ( ' After Calling Service Copy' , 1 , 'N' );
3715: END IF;
3716:
3717:
3718: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3740: l_config_rev_nbr;
3741: END LOOP;
3742: END IF;
3743:
3744: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3745: aso_debug_pub.ADD ( 'l_old_config_header_id = ' || l_old_config_header_id , 1 , 'N' );
3746: aso_debug_pub.ADD ( ' Before Calling Copy Quote Config Copy' , 1 , 'N' );
3747: END IF;
3748:
3741: END LOOP;
3742: END IF;
3743:
3744: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3745: aso_debug_pub.ADD ( 'l_old_config_header_id = ' || l_old_config_header_id , 1 , 'N' );
3746: aso_debug_pub.ADD ( ' Before Calling Copy Quote Config Copy' , 1 , 'N' );
3747: END IF;
3748:
3749: ASO_COPY_QUOTE_PVT.config_copy (
3742: END IF;
3743:
3744: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3745: aso_debug_pub.ADD ( 'l_old_config_header_id = ' || l_old_config_header_id , 1 , 'N' );
3746: aso_debug_pub.ADD ( ' Before Calling Copy Quote Config Copy' , 1 , 'N' );
3747: END IF;
3748:
3749: ASO_COPY_QUOTE_PVT.config_copy (
3750: p_old_config_header_id => l_old_config_header_id
3761: , X_Msg_Data => x_msg_data
3762: , p_line_quantity => FND_API.G_MISS_NUM
3763: );
3764:
3765: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3766: aso_debug_pub.ADD ( ' After Calling Copy Quote Config Copy' , 1 , 'N' );
3767: END IF;
3768:
3769:
3762: , p_line_quantity => FND_API.G_MISS_NUM
3763: );
3764:
3765: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3766: aso_debug_pub.ADD ( ' After Calling Copy Quote Config Copy' , 1 , 'N' );
3767: END IF;
3768:
3769:
3770: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
3786: /* bug 1903605*/
3787:
3788: IF (l_orig_item_id_tbl IS NOT NULL) AND (l_new_item_id_tbl IS NOT NULL) THEN
3789:
3790: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3791: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
3792: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
3793: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
3794:
3787:
3788: IF (l_orig_item_id_tbl IS NOT NULL) AND (l_new_item_id_tbl IS NOT NULL) THEN
3789:
3790: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3791: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
3792: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
3793: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
3794:
3795: END IF;
3788: IF (l_orig_item_id_tbl IS NOT NULL) AND (l_new_item_id_tbl IS NOT NULL) THEN
3789:
3790: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3791: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
3792: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
3793: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
3794:
3795: END IF;
3796:
3789:
3790: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3791: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
3792: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
3793: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
3794:
3795: END IF;
3796:
3797: IF l_orig_item_id_tbl.count > 0 AND l_new_item_id_tbl.count > 0 THEN
3824:
3825: FOR price_adj_rltship_rec IN c_price_adj_rel ( p_qte_header_id ) LOOP
3826: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
3827:
3828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3829: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = ' || l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
3830: END IF;
3831:
3832: OPEN C_Get_Ship_Id (
3825: FOR price_adj_rltship_rec IN c_price_adj_rel ( p_qte_header_id ) LOOP
3826: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
3827:
3828: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3829: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = ' || l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
3830: END IF;
3831:
3832: OPEN C_Get_Ship_Id (
3833: l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id )
3834: );
3835: FETCH C_Get_Ship_Id INTO l_ship_id;
3836: CLOSE C_Get_Ship_Id;
3837:
3838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3839: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
3840: aso_debug_pub.ADD ( 'price_adj_rltship_rec.price_adjustment_id = ' || price_adj_rltship_rec.price_adjustment_id , 1 , 'N' );
3841: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' || price_adj_rltship_rec.rltd_price_adj_id , 1 , 'N' );
3842: END IF;
3835: FETCH C_Get_Ship_Id INTO l_ship_id;
3836: CLOSE C_Get_Ship_Id;
3837:
3838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3839: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
3840: aso_debug_pub.ADD ( 'price_adj_rltship_rec.price_adjustment_id = ' || price_adj_rltship_rec.price_adjustment_id , 1 , 'N' );
3841: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' || price_adj_rltship_rec.rltd_price_adj_id , 1 , 'N' );
3842: END IF;
3843:
3836: CLOSE C_Get_Ship_Id;
3837:
3838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3839: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
3840: aso_debug_pub.ADD ( 'price_adj_rltship_rec.price_adjustment_id = ' || price_adj_rltship_rec.price_adjustment_id , 1 , 'N' );
3841: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' || price_adj_rltship_rec.rltd_price_adj_id , 1 , 'N' );
3842: END IF;
3843:
3844: ASO_PRICE_RLTSHIPS_PKG.Insert_Row (
3837:
3838: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3839: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
3840: aso_debug_pub.ADD ( 'price_adj_rltship_rec.price_adjustment_id = ' || price_adj_rltship_rec.price_adjustment_id , 1 , 'N' );
3841: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' || price_adj_rltship_rec.rltd_price_adj_id , 1 , 'N' );
3842: END IF;
3843:
3844: ASO_PRICE_RLTSHIPS_PKG.Insert_Row (
3845: px_ADJ_RELATIONSHIP_ID => lx_price_adj_rltship_id
3885:
3886: -- Copy for only that line if a line id was passed in
3887: ELSIF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
3888:
3889: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3890: aso_debug_pub.ADD ( ' Copying price adj records ', 1 , 'N' );
3891: aso_debug_pub.ADD ( 'Line Index Tbl Count = '||to_char(l_line_index_link_tbl.count) , 1 , 'N' );
3892: END IF;
3893:
3886: -- Copy for only that line if a line id was passed in
3887: ELSIF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
3888:
3889: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3890: aso_debug_pub.ADD ( ' Copying price adj records ', 1 , 'N' );
3891: aso_debug_pub.ADD ( 'Line Index Tbl Count = '||to_char(l_line_index_link_tbl.count) , 1 , 'N' );
3892: END IF;
3893:
3894: FOR price_adj_rltship_rec IN c_price_adj_rel_from_line_id ( P_Qte_Line_Id ) LOOP
3887: ELSIF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
3888:
3889: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3890: aso_debug_pub.ADD ( ' Copying price adj records ', 1 , 'N' );
3891: aso_debug_pub.ADD ( 'Line Index Tbl Count = '||to_char(l_line_index_link_tbl.count) , 1 , 'N' );
3892: END IF;
3893:
3894: FOR price_adj_rltship_rec IN c_price_adj_rel_from_line_id ( P_Qte_Line_Id ) LOOP
3895: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
3892: END IF;
3893:
3894: FOR price_adj_rltship_rec IN c_price_adj_rel_from_line_id ( P_Qte_Line_Id ) LOOP
3895: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
3896: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3897: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = '
3898: || l_line_index_link_tbl( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
3899: END IF;
3900:
3893:
3894: FOR price_adj_rltship_rec IN c_price_adj_rel_from_line_id ( P_Qte_Line_Id ) LOOP
3895: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
3896: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3897: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = '
3898: || l_line_index_link_tbl( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
3899: END IF;
3900:
3901: OPEN C_Get_Ship_Id (
3903: );
3904: FETCH C_Get_Ship_Id INTO l_ship_id;
3905: CLOSE C_Get_Ship_Id;
3906:
3907: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3908: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
3909: END IF;
3910:
3911: ASO_PRICE_RLTSHIPS_PKG.Insert_Row (
3904: FETCH C_Get_Ship_Id INTO l_ship_id;
3905: CLOSE C_Get_Ship_Id;
3906:
3907: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3908: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
3909: END IF;
3910:
3911: ASO_PRICE_RLTSHIPS_PKG.Insert_Row (
3912: px_ADJ_RELATIONSHIP_ID => lx_price_adj_rltship_id
3929:
3930:
3931: -- copy line relationships
3932:
3933: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3934: aso_debug_pub.ADD ( ' Copying line relationship records ', 1 , 'N' );
3935: END IF;
3936:
3937: FOR line_rel_rec IN c_line_relation_from_line_id ( P_Qte_Line_Id ) LOOP
3930:
3931: -- copy line relationships
3932:
3933: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3934: aso_debug_pub.ADD ( ' Copying line relationship records ', 1 , 'N' );
3935: END IF;
3936:
3937: FOR line_rel_rec IN c_line_relation_from_line_id ( P_Qte_Line_Id ) LOOP
3938: lx_LINE_RELATIONSHIP_ID := FND_API.G_MISS_NUM;
3960:
3961: -- Pass back the new quote line id which was created
3962: IF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
3963:
3964: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3965: aso_debug_pub.ADD ( 'Calling Update Quote to re-price the quote ', 1 , 'N' );
3966: END IF;
3967: -- Call Update Quote for repricing the quote
3968:
3961: -- Pass back the new quote line id which was created
3962: IF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
3963:
3964: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3965: aso_debug_pub.ADD ( 'Calling Update Quote to re-price the quote ', 1 , 'N' );
3966: END IF;
3967: -- Call Update Quote for repricing the quote
3968:
3969: -- l_control_rec.pricing_request_type := 'ASO';
4022: x_msg_count => x_msg_count,
4023: x_msg_data => x_msg_data
4024: );
4025:
4026: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4027: aso_debug_pub.ADD ( ' Return Status from Update Quote = '||l_return_status, 1 , 'N' );
4028: END IF;
4029:
4030: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4023: x_msg_data => x_msg_data
4024: );
4025:
4026: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4027: aso_debug_pub.ADD ( ' Return Status from Update Quote = '||l_return_status, 1 , 'N' );
4028: END IF;
4029:
4030: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4031: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4038: x_return_status := FND_API.G_RET_STS_ERROR;
4039: RAISE FND_API.G_EXC_ERROR;
4040: END IF;
4041:
4042: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4043: aso_debug_pub.ADD ( ' After Calling Update Quote ', 1 , 'N' );
4044: END IF;
4045:
4046: X_Qte_Line_Id := lx_qte_line_rec.quote_line_id;
4039: RAISE FND_API.G_EXC_ERROR;
4040: END IF;
4041:
4042: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4043: aso_debug_pub.ADD ( ' After Calling Update Quote ', 1 , 'N' );
4044: END IF;
4045:
4046: X_Qte_Line_Id := lx_qte_line_rec.quote_line_id;
4047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4043: aso_debug_pub.ADD ( ' After Calling Update Quote ', 1 , 'N' );
4044: END IF;
4045:
4046: X_Qte_Line_Id := lx_qte_line_rec.quote_line_id;
4047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4048: aso_debug_pub.ADD ('X_Qte_Line_Id = '||to_char(X_Qte_Line_Id), 1 , 'N' );
4049: END IF;
4050:
4051: ELSE
4044: END IF;
4045:
4046: X_Qte_Line_Id := lx_qte_line_rec.quote_line_id;
4047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4048: aso_debug_pub.ADD ('X_Qte_Line_Id = '||to_char(X_Qte_Line_Id), 1 , 'N' );
4049: END IF;
4050:
4051: ELSE
4052:
4054: END IF;
4055:
4056: /* Code change for Quoting Usability Sun ER Start */
4057: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
4058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4059: aso_debug_pub.ADD ( 'Copy_Line_Rows : Calling Update Quote for lines in change customer flow', 1 , 'N' );
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4055:
4056: /* Code change for Quoting Usability Sun ER Start */
4057: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
4058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4059: aso_debug_pub.ADD ( 'Copy_Line_Rows : Calling Update Quote for lines in change customer flow', 1 , 'N' );
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4063: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.price_updated_date :'||P_Qte_Header_Rec.price_updated_date, 1 , 'N' );
4056: /* Code change for Quoting Usability Sun ER Start */
4057: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
4058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4059: aso_debug_pub.ADD ( 'Copy_Line_Rows : Calling Update Quote for lines in change customer flow', 1 , 'N' );
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4063: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.price_updated_date :'||P_Qte_Header_Rec.price_updated_date, 1 , 'N' );
4064: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.tax_updated_date :'||P_Qte_Header_Rec.tax_updated_date, 1 , 'N' );
4057: If P_Copy_Quote_Control_Rec.Copy_To_Same_Customer = FND_API.G_FALSE Then
4058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4059: aso_debug_pub.ADD ( 'Copy_Line_Rows : Calling Update Quote for lines in change customer flow', 1 , 'N' );
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4063: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.price_updated_date :'||P_Qte_Header_Rec.price_updated_date, 1 , 'N' );
4064: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.tax_updated_date :'||P_Qte_Header_Rec.tax_updated_date, 1 , 'N' );
4065: END IF;
4058: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4059: aso_debug_pub.ADD ( 'Copy_Line_Rows : Calling Update Quote for lines in change customer flow', 1 , 'N' );
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4063: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.price_updated_date :'||P_Qte_Header_Rec.price_updated_date, 1 , 'N' );
4064: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.tax_updated_date :'||P_Qte_Header_Rec.tax_updated_date, 1 , 'N' );
4065: END IF;
4066:
4059: aso_debug_pub.ADD ( 'Copy_Line_Rows : Calling Update Quote for lines in change customer flow', 1 , 'N' );
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4063: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.price_updated_date :'||P_Qte_Header_Rec.price_updated_date, 1 , 'N' );
4064: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.tax_updated_date :'||P_Qte_Header_Rec.tax_updated_date, 1 , 'N' );
4065: END IF;
4066:
4067: -- Call Update Quote for repricing the quote
4060: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Id :'||P_Qte_Header_Id, 1 , 'N' );
4061: aso_debug_pub.ADD ( 'Copy_Line_Rows : l_last_update_date :'||l_last_update_date, 1 , 'N' );
4062: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.pricing_status_indicator :'||P_Qte_Header_Rec.pricing_status_indicator, 1 , 'N' );
4063: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.price_updated_date :'||P_Qte_Header_Rec.price_updated_date, 1 , 'N' );
4064: aso_debug_pub.ADD ( 'Copy_Line_Rows : P_Qte_Header_Rec.tax_updated_date :'||P_Qte_Header_Rec.tax_updated_date, 1 , 'N' );
4065: END IF;
4066:
4067: -- Call Update Quote for repricing the quote
4068:
4123: x_msg_count => x_msg_count,
4124: x_msg_data => x_msg_data
4125: );
4126:
4127: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4128: aso_debug_pub.ADD ( ' Copy_Line_Rows : Return Status from Update Quote = '||l_return_status, 1 , 'N' );
4129: END IF;
4130:
4131: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4124: x_msg_data => x_msg_data
4125: );
4126:
4127: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4128: aso_debug_pub.ADD ( ' Copy_Line_Rows : Return Status from Update Quote = '||l_return_status, 1 , 'N' );
4129: END IF;
4130:
4131: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4132: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4139: x_return_status := FND_API.G_RET_STS_ERROR;
4140: RAISE FND_API.G_EXC_ERROR;
4141: END IF;
4142:
4143: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4144: aso_debug_pub.ADD ( 'Copy_Line_Rows : After Calling Update Quote for lines in change customer flow ', 1 , 'N' );
4145: END IF;
4146: End If;
4147: /* Code change for Quoting Usability Sun ER End */
4140: RAISE FND_API.G_EXC_ERROR;
4141: END IF;
4142:
4143: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4144: aso_debug_pub.ADD ( 'Copy_Line_Rows : After Calling Update Quote for lines in change customer flow ', 1 , 'N' );
4145: END IF;
4146: End If;
4147: /* Code change for Quoting Usability Sun ER End */
4148:
4145: END IF;
4146: End If;
4147: /* Code change for Quoting Usability Sun ER End */
4148:
4149: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4150: aso_debug_pub.ADD ( ' End Copy Line Rows API ', 1 , 'N' );
4151: END IF;
4152:
4153: x_return_status := FND_API.G_RET_STS_SUCCESS;
4146: End If;
4147: /* Code change for Quoting Usability Sun ER End */
4148:
4149: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4150: aso_debug_pub.ADD ( ' End Copy Line Rows API ', 1 , 'N' );
4151: END IF;
4152:
4153: x_return_status := FND_API.G_RET_STS_SUCCESS;
4154:
4324:
4325:
4326: BEGIN
4327:
4328: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4329: aso_debug_pub.ADD ('Copy_Config - Begin ' , 1, 'Y' );
4330: aso_debug_pub.ADD ( 'Copy_Config - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4331: aso_debug_pub.ADD ( 'Copy_Config - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4332: END IF;
4325:
4326: BEGIN
4327:
4328: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4329: aso_debug_pub.ADD ('Copy_Config - Begin ' , 1, 'Y' );
4330: aso_debug_pub.ADD ( 'Copy_Config - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4331: aso_debug_pub.ADD ( 'Copy_Config - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4332: END IF;
4333:
4326: BEGIN
4327:
4328: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4329: aso_debug_pub.ADD ('Copy_Config - Begin ' , 1, 'Y' );
4330: aso_debug_pub.ADD ( 'Copy_Config - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4331: aso_debug_pub.ADD ( 'Copy_Config - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4332: END IF;
4333:
4334: x_return_status := FND_API.G_RET_STS_SUCCESS;
4327:
4328: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4329: aso_debug_pub.ADD ('Copy_Config - Begin ' , 1, 'Y' );
4330: aso_debug_pub.ADD ( 'Copy_Config - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4331: aso_debug_pub.ADD ( 'Copy_Config - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4332: END IF;
4333:
4334: x_return_status := FND_API.G_RET_STS_SUCCESS;
4335:
4340: );
4341: LOOP
4342: FETCH line_id_from_config INTO qte_line_id;
4343: EXIT WHEN line_id_from_config%NOTFOUND;
4344: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4345: aso_debug_pub.ADD ( 'Copy_Config - inside cursor qte_line_id ' || qte_line_id , 1 , 'Y' );
4346: END IF;
4347:
4348: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( qte_line_id );
4341: LOOP
4342: FETCH line_id_from_config INTO qte_line_id;
4343: EXIT WHEN line_id_from_config%NOTFOUND;
4344: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4345: aso_debug_pub.ADD ( 'Copy_Config - inside cursor qte_line_id ' || qte_line_id , 1 , 'Y' );
4346: END IF;
4347:
4348: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( qte_line_id );
4349:
4361: OPEN get_qte_line_number(lx_line_index_link_tbl(l_old_quote_line_id));
4362: FETCH get_qte_line_number into l_line_number;
4363: CLOSE get_qte_line_number;
4364:
4365: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4366: aso_debug_pub.ADD ( 'Line Number -- ' || l_line_number , 1 , 'Y' );
4367: END IF;
4368:
4369:
4362: FETCH get_qte_line_number into l_line_number;
4363: CLOSE get_qte_line_number;
4364:
4365: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4366: aso_debug_pub.ADD ( 'Line Number -- ' || l_line_number , 1 , 'Y' );
4367: END IF;
4368:
4369:
4370: l_qte_line_rec.line_number := l_line_number;
4409: OPEN C_Serviceable_Product ( l_qte_line_rec.organization_id , l_qte_line_rec.inventory_item_id );
4410: FETCH C_Serviceable_Product INTO l_serviceable_product_flag;
4411: CLOSE C_Serviceable_Product;
4412:
4413: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4414: aso_debug_pub.ADD ('Copy_Config - After querying all the records for the line ' , 1, 'Y' );
4415: END IF;
4416:
4417: FOR j IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
4410: FETCH C_Serviceable_Product INTO l_serviceable_product_flag;
4411: CLOSE C_Serviceable_Product;
4412:
4413: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4414: aso_debug_pub.ADD ('Copy_Config - After querying all the records for the line ' , 1, 'Y' );
4415: END IF;
4416:
4417: FOR j IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
4418:
4415: END IF;
4416:
4417: FOR j IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
4418:
4419: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4420: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ref_line_id: '||l_qte_line_dtl_tbl(j).ref_line_id , 1, 'Y' );
4421: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')top_model_line_id: '||l_qte_line_dtl_tbl(j).top_model_line_id , 1, 'Y' );
4422: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ato_line_id: '||l_qte_line_dtl_tbl(j).ato_line_id , 1, 'Y' );
4423: END IF;
4416:
4417: FOR j IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
4418:
4419: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4420: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ref_line_id: '||l_qte_line_dtl_tbl(j).ref_line_id , 1, 'Y' );
4421: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')top_model_line_id: '||l_qte_line_dtl_tbl(j).top_model_line_id , 1, 'Y' );
4422: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ato_line_id: '||l_qte_line_dtl_tbl(j).ato_line_id , 1, 'Y' );
4423: END IF;
4424:
4417: FOR j IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
4418:
4419: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4420: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ref_line_id: '||l_qte_line_dtl_tbl(j).ref_line_id , 1, 'Y' );
4421: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')top_model_line_id: '||l_qte_line_dtl_tbl(j).top_model_line_id , 1, 'Y' );
4422: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ato_line_id: '||l_qte_line_dtl_tbl(j).ato_line_id , 1, 'Y' );
4423: END IF;
4424:
4425: l_ref_ln_id := lx_line_index_link_tbl ( l_qte_line_dtl_tbl ( j ).ref_line_id );
4418:
4419: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4420: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ref_line_id: '||l_qte_line_dtl_tbl(j).ref_line_id , 1, 'Y' );
4421: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')top_model_line_id: '||l_qte_line_dtl_tbl(j).top_model_line_id , 1, 'Y' );
4422: aso_debug_pub.ADD ('Copy_Config - l_qte_line_dtl_tbl('||j||')ato_line_id: '||l_qte_line_dtl_tbl(j).ato_line_id , 1, 'Y' );
4423: END IF;
4424:
4425: l_ref_ln_id := lx_line_index_link_tbl ( l_qte_line_dtl_tbl ( j ).ref_line_id );
4426: l_qte_line_dtl_tbl ( j ).ref_line_id := l_ref_ln_id;
4512:
4513:
4514: --End of BC4J Fix
4515:
4516: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4517: aso_debug_pub.ADD ( 'Copy_Config - Before insert_quote_line_rows: ' || l_quote_line_id , 1 , 'Y' );
4518: END IF;
4519: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
4520: p_control_rec => l_control_rec
4513:
4514: --End of BC4J Fix
4515:
4516: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4517: aso_debug_pub.ADD ( 'Copy_Config - Before insert_quote_line_rows: ' || l_quote_line_id , 1 , 'Y' );
4518: END IF;
4519: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
4520: p_control_rec => l_control_rec
4521: , P_qte_Line_Rec => l_qte_line_rec
4584: l_payment_tbl ( j ).payment_id := NULL;
4585: l_payment_tbl ( j ).object_version_number := FND_API.G_MISS_NUM;
4586: END LOOP;
4587:
4588: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4589: aso_debug_pub.add('Copy_Config: Before call to copy_payment_row ', 1, 'Y');
4590: END IF;
4591:
4592: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
4585: l_payment_tbl ( j ).object_version_number := FND_API.G_MISS_NUM;
4586: END LOOP;
4587:
4588: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4589: aso_debug_pub.add('Copy_Config: Before call to copy_payment_row ', 1, 'Y');
4590: END IF;
4591:
4592: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
4593: x_return_status => l_return_status,
4593: x_return_status => l_return_status,
4594: x_msg_count => x_msg_count,
4595: x_msg_data => x_msg_data);
4596:
4597: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4598: aso_debug_pub.add('Copy_Config: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
4599: END IF;
4600: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4601: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4594: x_msg_count => x_msg_count,
4595: x_msg_data => x_msg_data);
4596:
4597: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4598: aso_debug_pub.add('Copy_Config: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
4599: END IF;
4600: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4601: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4602: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
4616:
4617: -- Copying the sales supplement data for the line
4618: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE ) THEN
4619:
4620: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4621: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
4622: END IF;
4623:
4624: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
4617: -- Copying the sales supplement data for the line
4618: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE ) THEN
4619:
4620: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4621: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
4622: END IF;
4623:
4624: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
4625: (
4632: X_Msg_Count => X_Msg_Count,
4633: X_Msg_Data => X_Msg_Data );
4634:
4635:
4636: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4637: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
4638: END IF;
4639:
4640:
4633: X_Msg_Data => X_Msg_Data );
4634:
4635:
4636: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4637: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
4638: END IF;
4639:
4640:
4641: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4656:
4657:
4658:
4659: IF P_Copy_Quote_Control_Rec.copy_attachment = FND_API.G_TRUE THEN
4660: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4661: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before config line copy_attch ' , 1 , 'Y' );
4662: END IF;
4663:
4664: ASO_ATTACHMENT_INT.Copy_Attachments(
4657:
4658:
4659: IF P_Copy_Quote_Control_Rec.copy_attachment = FND_API.G_TRUE THEN
4660: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4661: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before config line copy_attch ' , 1 , 'Y' );
4662: END IF;
4663:
4664: ASO_ATTACHMENT_INT.Copy_Attachments(
4665: p_api_version => l_api_version,
4670: x_return_status => x_return_status ,
4671: x_msg_count => x_msg_count,
4672: x_msg_data => x_msg_data
4673: );
4674: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4675: aso_debug_pub.ADD ( 'Copy_Rows -After config line copy_attch ' || x_return_status , 1 , 'Y' );
4676: END IF;
4677: IF ( x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4678: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
4671: x_msg_count => x_msg_count,
4672: x_msg_data => x_msg_data
4673: );
4674: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4675: aso_debug_pub.ADD ( 'Copy_Rows -After config line copy_attch ' || x_return_status , 1 , 'Y' );
4676: END IF;
4677: IF ( x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
4678: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
4679: FND_MESSAGE.Set_Name ('ASO' , 'ASO_API_UNEXP_ERROR' );
4694: lx_line_index_link_tbl(qte_line_id) := lx_qte_line_rec.quote_line_id;
4695:
4696: -- CLOSE line_id_from_config;
4697:
4698: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4699: aso_debug_pub.ADD('Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_rec.item_type_code , 1 , 'Y' );
4700: aso_debug_pub.ADD('Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_rec.inventory_item_id , 1 , 'Y' );
4701: aso_debug_pub.ADD('Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
4702: END IF;
4695:
4696: -- CLOSE line_id_from_config;
4697:
4698: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4699: aso_debug_pub.ADD('Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_rec.item_type_code , 1 , 'Y' );
4700: aso_debug_pub.ADD('Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_rec.inventory_item_id , 1 , 'Y' );
4701: aso_debug_pub.ADD('Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
4702: END IF;
4703:
4696: -- CLOSE line_id_from_config;
4697:
4698: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4699: aso_debug_pub.ADD('Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_rec.item_type_code , 1 , 'Y' );
4700: aso_debug_pub.ADD('Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_rec.inventory_item_id , 1 , 'Y' );
4701: aso_debug_pub.ADD('Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
4702: END IF;
4703:
4704: IF l_serviceable_product_flag = 'Y' THEN
4697:
4698: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4699: aso_debug_pub.ADD('Copy_Config - l_qte_line_tbl(i).item_type_code ' || l_qte_line_rec.item_type_code , 1 , 'Y' );
4700: aso_debug_pub.ADD('Copy - l_qte_line_tbl(i).inventory_item_id ' || l_qte_line_rec.inventory_item_id , 1 , 'Y' );
4701: aso_debug_pub.ADD('Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
4702: END IF;
4703:
4704: IF l_serviceable_product_flag = 'Y' THEN
4705: ASO_COPY_QUOTE_PVT.service_copy (
4809:
4810:
4811: BEGIN
4812:
4813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4814: aso_debug_pub.ADD ('Copy_Service - Begin ' , 1, 'Y' );
4815: aso_debug_pub.ADD ( 'Copy_Service - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4816: aso_debug_pub.ADD ( 'Copy_Service - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4817: aso_debug_pub.ADD ( 'Copy_Service - p_qte_line_id ' || p_qte_line_id , 1 , 'Y' );
4810:
4811: BEGIN
4812:
4813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4814: aso_debug_pub.ADD ('Copy_Service - Begin ' , 1, 'Y' );
4815: aso_debug_pub.ADD ( 'Copy_Service - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4816: aso_debug_pub.ADD ( 'Copy_Service - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4817: aso_debug_pub.ADD ( 'Copy_Service - p_qte_line_id ' || p_qte_line_id , 1 , 'Y' );
4818: END IF;
4811: BEGIN
4812:
4813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4814: aso_debug_pub.ADD ('Copy_Service - Begin ' , 1, 'Y' );
4815: aso_debug_pub.ADD ( 'Copy_Service - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4816: aso_debug_pub.ADD ( 'Copy_Service - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4817: aso_debug_pub.ADD ( 'Copy_Service - p_qte_line_id ' || p_qte_line_id , 1 , 'Y' );
4818: END IF;
4819:
4812:
4813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4814: aso_debug_pub.ADD ('Copy_Service - Begin ' , 1, 'Y' );
4815: aso_debug_pub.ADD ( 'Copy_Service - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4816: aso_debug_pub.ADD ( 'Copy_Service - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4817: aso_debug_pub.ADD ( 'Copy_Service - p_qte_line_id ' || p_qte_line_id , 1 , 'Y' );
4818: END IF;
4819:
4820: x_return_status := FND_API.G_RET_STS_SUCCESS;
4813: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4814: aso_debug_pub.ADD ('Copy_Service - Begin ' , 1, 'Y' );
4815: aso_debug_pub.ADD ( 'Copy_Service - p_new_qte_header_id ' || p_new_qte_header_id , 1 , 'Y' );
4816: aso_debug_pub.ADD ( 'Copy_Service - p_qte_header_id ' || p_qte_header_id , 1 , 'Y' );
4817: aso_debug_pub.ADD ( 'Copy_Service - p_qte_line_id ' || p_qte_line_id , 1 , 'Y' );
4818: END IF;
4819:
4820: x_return_status := FND_API.G_RET_STS_SUCCESS;
4821:
4823:
4824: LOOP
4825: FETCH line_id_from_service INTO qte_line_id;
4826: EXIT WHEN line_id_from_service%NOTFOUND;
4827: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4828: aso_debug_pub.ADD ( 'Copy_Service - inside cursor qte_line_id ' || qte_line_id , 1 , 'Y' );
4829: END IF;
4830:
4831: l_qte_line_rec :=
4824: LOOP
4825: FETCH line_id_from_service INTO qte_line_id;
4826: EXIT WHEN line_id_from_service%NOTFOUND;
4827: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4828: aso_debug_pub.ADD ( 'Copy_Service - inside cursor qte_line_id ' || qte_line_id , 1 , 'Y' );
4829: END IF;
4830:
4831: l_qte_line_rec :=
4832: ASO_UTILITY_PVT.Query_Qte_Line_Row ( qte_line_id );
4857: IF l_qte_line_dtl_tbl ( k ).service_ref_type_code = 'QUOTE' THEN
4858:
4859: IF l_qte_line_dtl_tbl ( k ).service_ref_line_id IS NOT NULL THEN
4860:
4861: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4862: aso_debug_pub.ADD ( 'Copy_Service - l_qte_line_dtl_tbl(k).service_ref_line_id ' || l_qte_line_dtl_tbl ( k ).service_ref_line_id , 1 , 'Y' );
4863: END IF;
4864: l_service_ref_line_id :=
4865: lx_line_index_link_tbl ( l_qte_line_dtl_tbl ( k ).service_ref_line_id );
4858:
4859: IF l_qte_line_dtl_tbl ( k ).service_ref_line_id IS NOT NULL THEN
4860:
4861: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4862: aso_debug_pub.ADD ( 'Copy_Service - l_qte_line_dtl_tbl(k).service_ref_line_id ' || l_qte_line_dtl_tbl ( k ).service_ref_line_id , 1 , 'Y' );
4863: END IF;
4864: l_service_ref_line_id :=
4865: lx_line_index_link_tbl ( l_qte_line_dtl_tbl ( k ).service_ref_line_id );
4866: l_qte_line_dtl_tbl ( k ).service_ref_line_id :=
4872: END LOOP;
4873:
4874: END IF;
4875:
4876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4877: aso_debug_pub.ADD ( 'Copy_Service - 2 l_service_ref_line_id ' || l_service_ref_line_id , 1 , 'Y' );
4878: END IF;
4879:
4880: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( qte_line_id );
4873:
4874: END IF;
4875:
4876: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4877: aso_debug_pub.ADD ( 'Copy_Service - 2 l_service_ref_line_id ' || l_service_ref_line_id , 1 , 'Y' );
4878: END IF;
4879:
4880: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( qte_line_id );
4881:
4970:
4971:
4972: --End of BC4J Fix
4973:
4974: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4975: aso_debug_pub.ADD ( 'Copy_Service - Before insert_quote_line_rows: ' || p_qte_line_id , 1 , 'Y' );
4976: END IF;
4977: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
4978: p_control_rec => l_control_rec
4971:
4972: --End of BC4J Fix
4973:
4974: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4975: aso_debug_pub.ADD ( 'Copy_Service - Before insert_quote_line_rows: ' || p_qte_line_id , 1 , 'Y' );
4976: END IF;
4977: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
4978: p_control_rec => l_control_rec
4979: , P_qte_Line_Rec => l_qte_line_rec
5043: l_payment_tbl ( j ).payment_id := NULL;
5044: l_payment_tbl ( j ).object_version_number := FND_API.G_MISS_NUM;
5045: END LOOP;
5046:
5047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5048: aso_debug_pub.add('Service_Copy: Before call to copy_payment_row ', 1, 'Y');
5049: END IF;
5050:
5051: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
5044: l_payment_tbl ( j ).object_version_number := FND_API.G_MISS_NUM;
5045: END LOOP;
5046:
5047: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5048: aso_debug_pub.add('Service_Copy: Before call to copy_payment_row ', 1, 'Y');
5049: END IF;
5050:
5051: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
5052: x_return_status => l_return_status,
5052: x_return_status => l_return_status,
5053: x_msg_count => x_msg_count,
5054: x_msg_data => x_msg_data);
5055:
5056: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5057: aso_debug_pub.add('Service_Copy:: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
5058: END IF;
5059: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
5060: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5053: x_msg_count => x_msg_count,
5054: x_msg_data => x_msg_data);
5055:
5056: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5057: aso_debug_pub.add('Service_Copy:: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
5058: END IF;
5059: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
5060: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5061: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
5074:
5075: -- Copying the sales supplement data for the line
5076: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE ) THEN
5077:
5078: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5079: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
5080: END IF;
5081:
5082: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
5075: -- Copying the sales supplement data for the line
5076: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_TRUE ) THEN
5077:
5078: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5079: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
5080: END IF;
5081:
5082: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
5083: (
5090: X_Msg_Count => X_Msg_Count,
5091: X_Msg_Data => X_Msg_Data );
5092:
5093:
5094: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5095: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
5096: END IF;
5097:
5098:
5091: X_Msg_Data => X_Msg_Data );
5092:
5093:
5094: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5095: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
5096: END IF;
5097:
5098:
5099: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
5113:
5114:
5115:
5116: IF P_Copy_Quote_Control_Rec.copy_attachment = FND_API.G_TRUE THEN
5117: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5118: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before config line copy_attch ' , 1 , 'Y' );
5119: END IF;
5120:
5121: ASO_ATTACHMENT_INT.Copy_Attachments (
5114:
5115:
5116: IF P_Copy_Quote_Control_Rec.copy_attachment = FND_API.G_TRUE THEN
5117: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5118: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before config line copy_attch ' , 1 , 'Y' );
5119: END IF;
5120:
5121: ASO_ATTACHMENT_INT.Copy_Attachments (
5122: p_api_version => l_api_version,
5127: x_return_status => x_return_status,
5128: x_msg_count => x_msg_count,
5129: x_msg_data => x_msg_data
5130: );
5131: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5132: aso_debug_pub.ADD ( 'Copy_Rows -After config line copy_attch ' || x_return_status , 1 , 'Y' );
5133: END IF;
5134: IF ( x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
5135: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
5128: x_msg_count => x_msg_count,
5129: x_msg_data => x_msg_data
5130: );
5131: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5132: aso_debug_pub.ADD ( 'Copy_Rows -After config line copy_attch ' || x_return_status , 1 , 'Y' );
5133: END IF;
5134: IF ( x_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
5135: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
5136: FND_MESSAGE.Set_Name ('ASO' , 'ASO_API_UNEXP_ERROR' );
5278: FND_MSG_PUB.initialize;
5279: END IF;
5280:
5281: -- API BODY
5282: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5283: aso_debug_pub.ADD ('COPY_SALES_SUPPLEMENT API: Begin' , 1, 'N' );
5284: aso_debug_pub.ADD ( 'Old Qte Header Id : ' || TO_CHAR ( p_old_quote_header_id ) , 1 , 'N' );
5285: aso_debug_pub.ADD ( 'New Qte Header Id : ' || TO_CHAR ( p_new_quote_header_id ) , 1 , 'N' );
5286: END IF;
5279: END IF;
5280:
5281: -- API BODY
5282: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5283: aso_debug_pub.ADD ('COPY_SALES_SUPPLEMENT API: Begin' , 1, 'N' );
5284: aso_debug_pub.ADD ( 'Old Qte Header Id : ' || TO_CHAR ( p_old_quote_header_id ) , 1 , 'N' );
5285: aso_debug_pub.ADD ( 'New Qte Header Id : ' || TO_CHAR ( p_new_quote_header_id ) , 1 , 'N' );
5286: END IF;
5287:
5280:
5281: -- API BODY
5282: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5283: aso_debug_pub.ADD ('COPY_SALES_SUPPLEMENT API: Begin' , 1, 'N' );
5284: aso_debug_pub.ADD ( 'Old Qte Header Id : ' || TO_CHAR ( p_old_quote_header_id ) , 1 , 'N' );
5285: aso_debug_pub.ADD ( 'New Qte Header Id : ' || TO_CHAR ( p_new_quote_header_id ) , 1 , 'N' );
5286: END IF;
5287:
5288: -- Get the template id's and template_instance_id's based upon the
5281: -- API BODY
5282: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5283: aso_debug_pub.ADD ('COPY_SALES_SUPPLEMENT API: Begin' , 1, 'N' );
5284: aso_debug_pub.ADD ( 'Old Qte Header Id : ' || TO_CHAR ( p_old_quote_header_id ) , 1 , 'N' );
5285: aso_debug_pub.ADD ( 'New Qte Header Id : ' || TO_CHAR ( p_new_quote_header_id ) , 1 , 'N' );
5286: END IF;
5287:
5288: -- Get the template id's and template_instance_id's based upon the
5289: -- quote header id
5288: -- Get the template id's and template_instance_id's based upon the
5289: -- quote header id
5290:
5291: FOR template_val IN get_template_id ( p_old_quote_header_id ) LOOP
5292: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5293: aso_debug_pub.ADD ( 'Template Id : ' || TO_CHAR ( template_val.template_id ) , 1 , 'N' );
5294: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N' );
5295:
5296: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
5289: -- quote header id
5290:
5291: FOR template_val IN get_template_id ( p_old_quote_header_id ) LOOP
5292: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5293: aso_debug_pub.ADD ( 'Template Id : ' || TO_CHAR ( template_val.template_id ) , 1 , 'N' );
5294: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N' );
5295:
5296: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
5297:
5290:
5291: FOR template_val IN get_template_id ( p_old_quote_header_id ) LOOP
5292: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5293: aso_debug_pub.ADD ( 'Template Id : ' || TO_CHAR ( template_val.template_id ) , 1 , 'N' );
5294: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N' );
5295:
5296: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
5297:
5298: aso_debug_pub.ADD ( 'Inserting a row into tmpl_instance table' , 1 , 'N' );
5294: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N' );
5295:
5296: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
5297:
5298: aso_debug_pub.ADD ( 'Inserting a row into tmpl_instance table' , 1 , 'N' );
5299: END IF;
5300:
5301: -- Initiate the variable to null,
5302: -- so that each time they contain new value for every pass of loop
5314: , P_Owner_Table_Name => 'ASO_QUOTE_HEADERS'
5315: , P_Owner_Table_Id => p_new_quote_header_id
5316: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
5317: );
5318: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5319: aso_debug_pub.ADD ( ' New Template Instance Id : ' || TO_CHAR ( l_new_template_instance_id ) , 1 , 'N' );
5320: END IF;
5321:
5322: -- Get the values for that instance
5315: , P_Owner_Table_Id => p_new_quote_header_id
5316: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
5317: );
5318: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5319: aso_debug_pub.ADD ( ' New Template Instance Id : ' || TO_CHAR ( l_new_template_instance_id ) , 1 , 'N' );
5320: END IF;
5321:
5322: -- Get the values for that instance
5323: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
5320: END IF;
5321:
5322: -- Get the values for that instance
5323: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
5324: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5325: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
5326: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
5327: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
5328: END IF;
5321:
5322: -- Get the values for that instance
5323: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
5324: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5325: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
5326: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
5327: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
5328: END IF;
5329:
5322: -- Get the values for that instance
5323: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
5324: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5325: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
5326: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
5327: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
5328: END IF;
5329:
5330: -- If values are fetched then insert rows
5323: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
5324: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5325: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
5326: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
5327: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
5328: END IF;
5329:
5330: -- If values are fetched then insert rows
5331: IF inst_val.sect_comp_map_id IS NOT NULL THEN
5332: -- Initiate the variables to null,
5333: -- so that each time they contain new value for every pass of loop
5334:
5335: l_instance_value_id := NULL;
5336: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5337: aso_debug_pub.ADD ( 'Inserting a row into instance_value table' , 1 , 'N' );
5338: END IF;
5339:
5340: -- Create a new row in the ASO_SUP_INSTANCE_VALUE table
5333: -- so that each time they contain new value for every pass of loop
5334:
5335: l_instance_value_id := NULL;
5336: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5337: aso_debug_pub.ADD ( 'Inserting a row into instance_value table' , 1 , 'N' );
5338: END IF;
5339:
5340: -- Create a new row in the ASO_SUP_INSTANCE_VALUE table
5341: ASO_SUP_INSTANCE_VALUE_PKG.INSERT_ROW (
5350: , P_last_updated_by => FND_GLOBAL.USER_ID
5351: , P_last_update_login => FND_GLOBAL.CONC_LOGIN_ID
5352: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
5353: );
5354: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5355: aso_debug_pub.ADD ( 'New Instance Value Id : ' || TO_CHAR ( l_instance_value_id ) , 1 , 'N' );
5356: END IF;
5357: END IF;
5358:
5351: , P_last_update_login => FND_GLOBAL.CONC_LOGIN_ID
5352: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
5353: );
5354: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5355: aso_debug_pub.ADD ( 'New Instance Value Id : ' || TO_CHAR ( l_instance_value_id ) , 1 , 'N' );
5356: END IF;
5357: END IF;
5358:
5359: END LOOP; -- instance value loop
5367:
5368: -- Initialize API return status to success
5369: x_return_status := FND_API.G_RET_STS_SUCCESS;
5370:
5371: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5372: aso_debug_pub.ADD ( 'COPY_SALES_SUPPLEMENT API: ' || l_api_name || 'end' , 1 , 'N' );
5373: END IF;
5374:
5375: EXCEPTION
5368: -- Initialize API return status to success
5369: x_return_status := FND_API.G_RET_STS_SUCCESS;
5370:
5371: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5372: aso_debug_pub.ADD ( 'COPY_SALES_SUPPLEMENT API: ' || l_api_name || 'end' , 1 , 'N' );
5373: END IF;
5374:
5375: EXCEPTION
5376:
5436:
5437: BEGIN
5438:
5439: x_return_status := FND_API.G_RET_STS_SUCCESS;
5440: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5441: aso_debug_pub.ADD ( 'Copy_Opp_Quote: p_qte_header_id: ' || p_qte_header_id, 1 , 'N' );
5442: aso_debug_pub.ADD ( 'Copy_Opp_Quote: p_new_qte_header_id: ' || p_new_qte_header_id, 1 , 'N' );
5443: END IF;
5444:
5437: BEGIN
5438:
5439: x_return_status := FND_API.G_RET_STS_SUCCESS;
5440: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5441: aso_debug_pub.ADD ( 'Copy_Opp_Quote: p_qte_header_id: ' || p_qte_header_id, 1 , 'N' );
5442: aso_debug_pub.ADD ( 'Copy_Opp_Quote: p_new_qte_header_id: ' || p_new_qte_header_id, 1 , 'N' );
5443: END IF;
5444:
5445: OPEN C_Get_Opp_From_Hdr (p_qte_header_id);
5438:
5439: x_return_status := FND_API.G_RET_STS_SUCCESS;
5440: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5441: aso_debug_pub.ADD ( 'Copy_Opp_Quote: p_qte_header_id: ' || p_qte_header_id, 1 , 'N' );
5442: aso_debug_pub.ADD ( 'Copy_Opp_Quote: p_new_qte_header_id: ' || p_new_qte_header_id, 1 , 'N' );
5443: END IF;
5444:
5445: OPEN C_Get_Opp_From_Hdr (p_qte_header_id);
5446: FETCH C_Get_Opp_From_Hdr INTO l_related_obj_rec.request_id, l_related_obj_rec.program_application_id,
5448: l_related_obj_rec.quote_object_type_code, l_related_obj_rec.quote_object_id,
5449: l_related_obj_rec.object_type_code, l_related_obj_rec.object_id,
5450: l_related_obj_rec.relationship_type_code, l_related_obj_rec.reciprocal_flag;
5451: IF C_Get_Opp_From_Hdr%NOTFOUND THEN
5452: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5453: aso_debug_pub.ADD ( 'Copy_Opp_Quote: Not from Opportunity ', 1 , 'N' );
5454: END IF;
5455: CLOSE C_Get_Opp_From_Hdr;
5456: RETURN;
5449: l_related_obj_rec.object_type_code, l_related_obj_rec.object_id,
5450: l_related_obj_rec.relationship_type_code, l_related_obj_rec.reciprocal_flag;
5451: IF C_Get_Opp_From_Hdr%NOTFOUND THEN
5452: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5453: aso_debug_pub.ADD ( 'Copy_Opp_Quote: Not from Opportunity ', 1 , 'N' );
5454: END IF;
5455: CLOSE C_Get_Opp_From_Hdr;
5456: RETURN;
5457: END IF;
5459:
5460: l_related_obj_rec.quote_object_id := p_new_qte_header_id;
5461:
5462:
5463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5464: aso_debug_pub.ADD ( 'Copy_Opp_Quote: before insert rel object ', 1 , 'N' );
5465: END IF;
5466: aso_related_obj_pvt.create_related_obj (
5467: p_api_version_number => 1.0,
5460: l_related_obj_rec.quote_object_id := p_new_qte_header_id;
5461:
5462:
5463: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5464: aso_debug_pub.ADD ( 'Copy_Opp_Quote: before insert rel object ', 1 , 'N' );
5465: END IF;
5466: aso_related_obj_pvt.create_related_obj (
5467: p_api_version_number => 1.0,
5468: p_validation_level => fnd_api.g_valid_level_none,
5472: x_msg_count => x_msg_count,
5473: x_msg_data => x_msg_data
5474: );
5475:
5476: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5477: aso_debug_pub.ADD ( 'Copy_Opp_Quote: after insert_rel_object:x_return_status: ' || x_return_status, 1 , 'N' );
5478: END IF;
5479: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5480: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
5473: x_msg_data => x_msg_data
5474: );
5475:
5476: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5477: aso_debug_pub.ADD ( 'Copy_Opp_Quote: after insert_rel_object:x_return_status: ' || x_return_status, 1 , 'N' );
5478: END IF;
5479: IF x_return_status <> fnd_api.g_ret_sts_success THEN
5480: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
5481: fnd_message.set_name ( 'ASO', 'ASO_API_ERROR_IN_CREATING_RLTSHIPS');
5682:
5683:
5684: BEGIN
5685:
5686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5687: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Begin- ASO_COPY_QUOTE_PVT.SPLIT_MODEL_LINE ' , 1 , 'Y' );
5688: END IF;
5689: -- Standard Start of API savepoint
5690: SAVEPOINT SPLIT_MODEL_LINE_PVT;
5683:
5684: BEGIN
5685:
5686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5687: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Begin- ASO_COPY_QUOTE_PVT.SPLIT_MODEL_LINE ' , 1 , 'Y' );
5688: END IF;
5689: -- Standard Start of API savepoint
5690: SAVEPOINT SPLIT_MODEL_LINE_PVT;
5691:
5729: END IF;
5730: RAISE FND_API.G_EXC_ERROR;
5731: END IF;
5732:
5733: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5734: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Vaildating the quote ' , 1 , 'Y' );
5735: END IF;
5736:
5737: OPEN C_Validate_Quote ( P_Qte_Header_Rec.quote_header_id);
5730: RAISE FND_API.G_EXC_ERROR;
5731: END IF;
5732:
5733: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5734: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Vaildating the quote ' , 1 , 'Y' );
5735: END IF;
5736:
5737: OPEN C_Validate_Quote ( P_Qte_Header_Rec.quote_header_id);
5738: FETCH C_Validate_Quote INTO l_val;
5751: END IF;
5752:
5753: CLOSE C_Validate_Quote;
5754:
5755: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5756: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - After Validating the Quote ' , 1 , 'N' );
5757: END IF;
5758: -- Validating if the quote_line_id belongs to the qte_header_id
5759:
5752:
5753: CLOSE C_Validate_Quote;
5754:
5755: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5756: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - After Validating the Quote ' , 1 , 'N' );
5757: END IF;
5758: -- Validating if the quote_line_id belongs to the qte_header_id
5759:
5760: OPEN C_Validate_Quote_Line ( P_Qte_Header_Rec.quote_header_id, P_Original_Qte_Line_Rec.quote_line_id);
5772: END IF;
5773:
5774: CLOSE C_Validate_Quote_Line;
5775:
5776: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5777: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - After Validating the Quote Line ' , 1 , 'N' );
5778: END IF;
5779:
5780: -- Getting the quote line record
5773:
5774: CLOSE C_Validate_Quote_Line;
5775:
5776: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5777: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - After Validating the Quote Line ' , 1 , 'N' );
5778: END IF;
5779:
5780: -- Getting the quote line record
5781: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( P_Original_Qte_Line_Rec.quote_line_id );
5801: l_quantity := l_quantity + l_qty_qte_line_tbl(i).quantity;
5802:
5803: END LOOP;
5804:
5805: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5806: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Total Qty Passed = '||to_char(l_quantity) , 1 , 'N' );
5807: END IF;
5808:
5809:
5802:
5803: END LOOP;
5804:
5805: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5806: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Total Qty Passed = '||to_char(l_quantity) , 1 , 'N' );
5807: END IF;
5808:
5809:
5810: -- If quantity list total is less than quote line quantity
5813:
5814: -- storing the remaining quantity
5815: l_remaining_quantity := l_qte_line_rec.quantity - l_quantity;
5816:
5817: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5818: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Remaining Qty = '||to_char(l_remaining_quantity) , 1 , 'N' );
5819: END IF;
5820:
5821: l_qty_qte_line_tbl( l_qty_qte_line_tbl.count + 1 ).quantity := l_remaining_quantity;
5814: -- storing the remaining quantity
5815: l_remaining_quantity := l_qte_line_rec.quantity - l_quantity;
5816:
5817: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5818: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Remaining Qty = '||to_char(l_remaining_quantity) , 1 , 'N' );
5819: END IF;
5820:
5821: l_qty_qte_line_tbl( l_qty_qte_line_tbl.count + 1 ).quantity := l_remaining_quantity;
5822:
5838:
5839: -- Check to see if the item is a component
5840: IF l_qte_line_rec.item_type_code <> 'MDL' then
5841:
5842: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5843: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Item is not a Model Item', 1 , 'N' );
5844: END IF;
5845: x_return_status := FND_API.G_RET_STS_ERROR;
5846:
5839: -- Check to see if the item is a component
5840: IF l_qte_line_rec.item_type_code <> 'MDL' then
5841:
5842: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5843: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Item is not a Model Item', 1 , 'N' );
5844: END IF;
5845: x_return_status := FND_API.G_RET_STS_ERROR;
5846:
5847: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
5855:
5856: -- Check to see if the item is a service item
5857: IF l_qte_line_rec.service_item_flag = 'Y' THEN
5858:
5859: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5860: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Item is Service Item', 1 , 'N' );
5861: END IF;
5862: x_return_status := FND_API.G_RET_STS_ERROR;
5863:
5856: -- Check to see if the item is a service item
5857: IF l_qte_line_rec.service_item_flag = 'Y' THEN
5858:
5859: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5860: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Item is Service Item', 1 , 'N' );
5861: END IF;
5862: x_return_status := FND_API.G_RET_STS_ERROR;
5863:
5864: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
5908: END IF;
5909: */
5910:
5911: IF l_qte_line_rec.line_category_code = 'RETURN' THEN
5912: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5913: aso_debug_pub.ADD ('l_qte_line_dtl_tbl.count' , 1, 'N' );
5914: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Line Category Code is RETURN ', 1 , 'N' );
5915: END IF;
5916:
5909: */
5910:
5911: IF l_qte_line_rec.line_category_code = 'RETURN' THEN
5912: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5913: aso_debug_pub.ADD ('l_qte_line_dtl_tbl.count' , 1, 'N' );
5914: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Line Category Code is RETURN ', 1 , 'N' );
5915: END IF;
5916:
5917: IF l_qte_line_detail_tbl.count > 0 THEN
5910:
5911: IF l_qte_line_rec.line_category_code = 'RETURN' THEN
5912: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5913: aso_debug_pub.ADD ('l_qte_line_dtl_tbl.count' , 1, 'N' );
5914: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Line Category Code is RETURN ', 1 , 'N' );
5915: END IF;
5916:
5917: IF l_qte_line_detail_tbl.count > 0 THEN
5918:
5933:
5934: END IF;
5935:
5936:
5937: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5938: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Line Tbl Count = '||to_char(l_qty_qte_line_tbl.count), 1 , 'N' );
5939: END IF;
5940: -- Copying the line
5941: For i in 1..l_qty_qte_line_tbl.count-1 LOOP
5934: END IF;
5935:
5936:
5937: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5938: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - Line Tbl Count = '||to_char(l_qty_qte_line_tbl.count), 1 , 'N' );
5939: END IF;
5940: -- Copying the line
5941: For i in 1..l_qty_qte_line_tbl.count-1 LOOP
5942:
5960: ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Original_Qte_Line_Rec.quote_line_id );
5961:
5962: IF l_qte_line_rec.item_type_code = 'MDL' THEN
5963:
5964: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5965: aso_debug_pub.ADD ( 'item_type_code = ' || l_qte_line_rec.item_type_code , 1 , 'N' );
5966: END IF;
5967:
5968: IF l_qte_line_detail_tbl.COUNT > 0 THEN
5961:
5962: IF l_qte_line_rec.item_type_code = 'MDL' THEN
5963:
5964: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5965: aso_debug_pub.ADD ( 'item_type_code = ' || l_qte_line_rec.item_type_code , 1 , 'N' );
5966: END IF;
5967:
5968: IF l_qte_line_detail_tbl.COUNT > 0 THEN
5969:
5975: IF (l_qte_line_detail_tbl(1).ato_line_id is not null and l_qte_line_detail_tbl(1).ato_line_id <> fnd_api.g_miss_num) then
5976: l_ato_model := fnd_api.g_true;
5977: end if;
5978:
5979: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5980: aso_debug_pub.ADD ( ' Calling Copy Configuration ', 1 , 'N' );
5981: END IF;
5982:
5983: ASO_CFG_INT.Copy_Configuration (
5976: l_ato_model := fnd_api.g_true;
5977: end if;
5978:
5979: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5980: aso_debug_pub.ADD ( ' Calling Copy Configuration ', 1 , 'N' );
5981: END IF;
5982:
5983: ASO_CFG_INT.Copy_Configuration (
5984: P_Api_version_NUmber => 1.0
5994: , x_msg_data => x_msg_data
5995: , p_autonomous_flag => FND_API.G_TRUE
5996: );
5997:
5998: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5999: aso_debug_pub.ADD ( ' After Calling Copy Configuration ', 1 , 'N' );
6000: END IF;
6001:
6002: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
5995: , p_autonomous_flag => FND_API.G_TRUE
5996: );
5997:
5998: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5999: aso_debug_pub.ADD ( ' After Calling Copy Configuration ', 1 , 'N' );
6000: END IF;
6001:
6002: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
6003: l_old_config_header_id :=
6008: l_config_hdr_id;
6009: l_qte_line_detail_tbl ( 1 ).config_revision_num :=
6010: l_config_rev_nbr;
6011:
6012: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6013: aso_debug_pub.ADD ( ' Old Config Hdr Id = '||to_char(l_old_config_header_id) , 1 , 'N' );
6014: aso_debug_pub.ADD ( ' Old Rev Nbr = '||to_char(l_old_config_revision_num), 1 , 'N' );
6015: aso_debug_pub.ADD ( 'New Config Hdr Id = '||to_char(l_config_hdr_id), 1 , 'N' );
6016: aso_debug_pub.ADD ( ' New Rev Nbr = '||to_char(l_config_rev_nbr), 1 , 'N' );
6009: l_qte_line_detail_tbl ( 1 ).config_revision_num :=
6010: l_config_rev_nbr;
6011:
6012: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6013: aso_debug_pub.ADD ( ' Old Config Hdr Id = '||to_char(l_old_config_header_id) , 1 , 'N' );
6014: aso_debug_pub.ADD ( ' Old Rev Nbr = '||to_char(l_old_config_revision_num), 1 , 'N' );
6015: aso_debug_pub.ADD ( 'New Config Hdr Id = '||to_char(l_config_hdr_id), 1 , 'N' );
6016: aso_debug_pub.ADD ( ' New Rev Nbr = '||to_char(l_config_rev_nbr), 1 , 'N' );
6017: END IF;
6010: l_config_rev_nbr;
6011:
6012: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6013: aso_debug_pub.ADD ( ' Old Config Hdr Id = '||to_char(l_old_config_header_id) , 1 , 'N' );
6014: aso_debug_pub.ADD ( ' Old Rev Nbr = '||to_char(l_old_config_revision_num), 1 , 'N' );
6015: aso_debug_pub.ADD ( 'New Config Hdr Id = '||to_char(l_config_hdr_id), 1 , 'N' );
6016: aso_debug_pub.ADD ( ' New Rev Nbr = '||to_char(l_config_rev_nbr), 1 , 'N' );
6017: END IF;
6018:
6011:
6012: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6013: aso_debug_pub.ADD ( ' Old Config Hdr Id = '||to_char(l_old_config_header_id) , 1 , 'N' );
6014: aso_debug_pub.ADD ( ' Old Rev Nbr = '||to_char(l_old_config_revision_num), 1 , 'N' );
6015: aso_debug_pub.ADD ( 'New Config Hdr Id = '||to_char(l_config_hdr_id), 1 , 'N' );
6016: aso_debug_pub.ADD ( ' New Rev Nbr = '||to_char(l_config_rev_nbr), 1 , 'N' );
6017: END IF;
6018:
6019: ELSE
6012: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6013: aso_debug_pub.ADD ( ' Old Config Hdr Id = '||to_char(l_old_config_header_id) , 1 , 'N' );
6014: aso_debug_pub.ADD ( ' Old Rev Nbr = '||to_char(l_old_config_revision_num), 1 , 'N' );
6015: aso_debug_pub.ADD ( 'New Config Hdr Id = '||to_char(l_config_hdr_id), 1 , 'N' );
6016: aso_debug_pub.ADD ( ' New Rev Nbr = '||to_char(l_config_rev_nbr), 1 , 'N' );
6017: END IF;
6018:
6019: ELSE
6020: x_return_status := FND_API.G_RET_STS_ERROR;
6034: FETCH C_Serviceable_Product INTO l_serviceable_product_flag
6035: , l_service_item_flag;
6036: CLOSE C_Serviceable_Product;
6037:
6038: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6039: aso_debug_pub.ADD ( 'service item flag = ' || l_service_item_flag , 1 , 'N' );
6040: END IF;
6041: IF l_service_item_flag = 'Y'
6042: AND l_qte_line_detail_tbl ( 1 ).service_ref_type_code <> 'QUOTE' THEN
6035: , l_service_item_flag;
6036: CLOSE C_Serviceable_Product;
6037:
6038: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6039: aso_debug_pub.ADD ( 'service item flag = ' || l_service_item_flag , 1 , 'N' );
6040: END IF;
6041: IF l_service_item_flag = 'Y'
6042: AND l_qte_line_detail_tbl ( 1 ).service_ref_type_code <> 'QUOTE' THEN
6043: l_service_item_flag := 'N';
6041: IF l_service_item_flag = 'Y'
6042: AND l_qte_line_detail_tbl ( 1 ).service_ref_type_code <> 'QUOTE' THEN
6043: l_service_item_flag := 'N';
6044: END IF;
6045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6046: aso_debug_pub.ADD ( 'service item flag 2= ' || l_service_item_flag , 1 , 'N' );
6047: END IF;
6048:
6049: IF l_qte_line_rec.item_type_code <> 'CFG'
6042: AND l_qte_line_detail_tbl ( 1 ).service_ref_type_code <> 'QUOTE' THEN
6043: l_service_item_flag := 'N';
6044: END IF;
6045: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6046: aso_debug_pub.ADD ( 'service item flag 2= ' || l_service_item_flag , 1 , 'N' );
6047: END IF;
6048:
6049: IF l_qte_line_rec.item_type_code <> 'CFG'
6050: AND l_qte_line_rec.item_type_code <> 'OPT'
6165: l_qte_line_rec.line_number := l_line_number + 10000;
6166:
6167: END IF;
6168:
6169: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6170: aso_debug_pub.ADD ( 'Split_Model_Line - Before insert_quote_line_rows: ' ||
6171: P_Original_Qte_Line_Rec.quote_line_id , 1 , 'Y' );
6172: END IF;
6173:
6166:
6167: END IF;
6168:
6169: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6170: aso_debug_pub.ADD ( 'Split_Model_Line - Before insert_quote_line_rows: ' ||
6171: P_Original_Qte_Line_Rec.quote_line_id , 1 , 'Y' );
6172: END IF;
6173:
6174: ASO_QUOTE_LINES_PVT.Insert_Quote_Line_Rows (
6224: ELSIF ( l_return_status = FND_API.G_RET_STS_ERROR ) THEN
6225: x_return_status := FND_API.G_RET_STS_ERROR;
6226: RAISE FND_API.G_EXC_ERROR;
6227: END IF;
6228: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6229: aso_debug_pub.ADD ( 'Split_Model_Line - After insert_quote_line_rows - status: ' ||l_return_status ,1 , 'Y' );
6230: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - New Qte Line ID ='||to_char(lx_qte_line_rec.quote_line_id), 1 , 'N' );
6231: aso_debug_pub.ADD ( 'Split_Model_Line - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
6232: aso_debug_pub.ADD ( 'Split_Model_Line - l_ato_model: ' || l_ato_model , 1 , 'Y' );
6225: x_return_status := FND_API.G_RET_STS_ERROR;
6226: RAISE FND_API.G_EXC_ERROR;
6227: END IF;
6228: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6229: aso_debug_pub.ADD ( 'Split_Model_Line - After insert_quote_line_rows - status: ' ||l_return_status ,1 , 'Y' );
6230: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - New Qte Line ID ='||to_char(lx_qte_line_rec.quote_line_id), 1 , 'N' );
6231: aso_debug_pub.ADD ( 'Split_Model_Line - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
6232: aso_debug_pub.ADD ( 'Split_Model_Line - l_ato_model: ' || l_ato_model , 1 , 'Y' );
6233: END IF;
6226: RAISE FND_API.G_EXC_ERROR;
6227: END IF;
6228: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6229: aso_debug_pub.ADD ( 'Split_Model_Line - After insert_quote_line_rows - status: ' ||l_return_status ,1 , 'Y' );
6230: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - New Qte Line ID ='||to_char(lx_qte_line_rec.quote_line_id), 1 , 'N' );
6231: aso_debug_pub.ADD ( 'Split_Model_Line - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
6232: aso_debug_pub.ADD ( 'Split_Model_Line - l_ato_model: ' || l_ato_model , 1 , 'Y' );
6233: END IF;
6234: update aso_quote_line_details
6227: END IF;
6228: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6229: aso_debug_pub.ADD ( 'Split_Model_Line - After insert_quote_line_rows - status: ' ||l_return_status ,1 , 'Y' );
6230: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - New Qte Line ID ='||to_char(lx_qte_line_rec.quote_line_id), 1 , 'N' );
6231: aso_debug_pub.ADD ( 'Split_Model_Line - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
6232: aso_debug_pub.ADD ( 'Split_Model_Line - l_ato_model: ' || l_ato_model , 1 , 'Y' );
6233: END IF;
6234: update aso_quote_line_details
6235: set top_model_line_id = lx_qte_line_rec.quote_line_id,
6228: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6229: aso_debug_pub.ADD ( 'Split_Model_Line - After insert_quote_line_rows - status: ' ||l_return_status ,1 , 'Y' );
6230: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - New Qte Line ID ='||to_char(lx_qte_line_rec.quote_line_id), 1 , 'N' );
6231: aso_debug_pub.ADD ( 'Split_Model_Line - Updating the top model and ato line id for the top model line ', 1 , 'Y' );
6232: aso_debug_pub.ADD ( 'Split_Model_Line - l_ato_model: ' || l_ato_model , 1 , 'Y' );
6233: END IF;
6234: update aso_quote_line_details
6235: set top_model_line_id = lx_qte_line_rec.quote_line_id,
6236: ato_line_id = decode(l_ato_model,fnd_api.g_true,lx_qte_line_rec.quote_line_id,null)
6239: -- Storing the new quote line id to be used later in update quote
6240: l_inserted_qte_line_tbl(i).quote_line_id := lx_qte_line_rec.quote_line_id;
6241: l_inserted_qte_line_tbl(i).quantity := l_qty_qte_line_tbl(i).quantity;
6242:
6243: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6244: aso_debug_pub.ADD ( ' Qty for new line = '||to_char(l_qty_qte_line_tbl(i).quantity), 1 , 'N' );
6245: END IF;
6246:
6247:
6240: l_inserted_qte_line_tbl(i).quote_line_id := lx_qte_line_rec.quote_line_id;
6241: l_inserted_qte_line_tbl(i).quantity := l_qty_qte_line_tbl(i).quantity;
6242:
6243: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6244: aso_debug_pub.ADD ( ' Qty for new line = '||to_char(l_qty_qte_line_tbl(i).quantity), 1 , 'N' );
6245: END IF;
6246:
6247:
6248: -- Copy the payment record
6259: l_payment_tbl ( j ).payment_id := NULL;
6260: l_payment_tbl ( j ).object_version_number := FND_API.G_MISS_NUM;
6261: END LOOP;
6262:
6263: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6264: aso_debug_pub.add('SPLIT_MODEL_LINE: Before call to copy_payment_row ', 1, 'Y');
6265: END IF;
6266:
6267: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
6260: l_payment_tbl ( j ).object_version_number := FND_API.G_MISS_NUM;
6261: END LOOP;
6262:
6263: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6264: aso_debug_pub.add('SPLIT_MODEL_LINE: Before call to copy_payment_row ', 1, 'Y');
6265: END IF;
6266:
6267: aso_copy_quote_pvt.copy_payment_row(p_payment_rec => l_payment_tbl(1) ,
6268: x_return_status => l_return_status,
6268: x_return_status => l_return_status,
6269: x_msg_count => x_msg_count,
6270: x_msg_data => x_msg_data);
6271:
6272: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6273: aso_debug_pub.add('SPLIT_MODEL_LINE: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
6274: END IF;
6275: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
6276: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6269: x_msg_count => x_msg_count,
6270: x_msg_data => x_msg_data);
6271:
6272: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6273: aso_debug_pub.add('SPLIT_MODEL_LINE: After call to copy_payment_row: x_return_status: '||l_return_status, 1, 'Y');
6274: END IF;
6275: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
6276: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6277: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
6289: -- End Copy payment record
6290:
6291:
6292: -- Copying the sales supplement data for the line
6293: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6294: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
6295: END IF;
6296:
6297: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
6290:
6291:
6292: -- Copying the sales supplement data for the line
6293: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6294: aso_debug_pub.ADD ( 'Copy_Rows - Begin- before line copy_sales_supplement ' , 1 , 'Y' );
6295: END IF;
6296:
6297: ASO_COPY_QUOTE_PVT.INSERT_SALES_SUPP_DATA
6298: (
6305: X_Msg_Count => X_Msg_Count,
6306: X_Msg_Data => X_Msg_Data );
6307:
6308:
6309: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6310: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
6311: END IF;
6312:
6313:
6306: X_Msg_Data => X_Msg_Data );
6307:
6308:
6309: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6310: aso_debug_pub.ADD ( 'Copy_Rows -After line copy_sales_supplement ' || x_return_status , 1 , 'Y' );
6311: END IF;
6312:
6313:
6314: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
6326: END IF;
6327:
6328:
6329: -- IF P_Copy_Quote_Control_Rec.Copy_Attachment = FND_API.G_TRUE THEN
6330: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6331: aso_debug_pub.ADD ( 'Split_Model_Line- Begin- before line copy_attch ' , 1 , 'Y' );
6332: END IF;
6333:
6334: ASO_ATTACHMENT_INT.Copy_Attachments(
6327:
6328:
6329: -- IF P_Copy_Quote_Control_Rec.Copy_Attachment = FND_API.G_TRUE THEN
6330: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6331: aso_debug_pub.ADD ( 'Split_Model_Line- Begin- before line copy_attch ' , 1 , 'Y' );
6332: END IF;
6333:
6334: ASO_ATTACHMENT_INT.Copy_Attachments(
6335: p_api_version => l_api_version,
6340: x_return_status => l_return_status,
6341: x_msg_count => x_msg_count,
6342: x_msg_data => x_msg_data
6343: );
6344: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6345: aso_debug_pub.ADD ( 'Split_Model_Line -After line copy_attch ' || x_return_status , 1 , 'Y' );
6346: END IF;
6347:
6348: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
6341: x_msg_count => x_msg_count,
6342: x_msg_data => x_msg_data
6343: );
6344: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6345: aso_debug_pub.ADD ( 'Split_Model_Line -After line copy_attch ' || x_return_status , 1 , 'Y' );
6346: END IF;
6347:
6348: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
6349: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6366: END LOOP;
6367:
6368: l_line_index_link_tbl ( P_Original_Qte_Line_Rec.quote_line_id) :=
6369: lx_qte_line_rec.quote_line_id;
6370: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6371: aso_debug_pub.ADD ( 'Split_Model_Line - l_qte_line_tbl(i).item_type_code ' ||
6372: l_qte_line_rec.item_type_code , 1 , 'Y' );
6373: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' ||
6374: l_qte_line_rec.inventory_item_id, 1 , 'Y' );
6367:
6368: l_line_index_link_tbl ( P_Original_Qte_Line_Rec.quote_line_id) :=
6369: lx_qte_line_rec.quote_line_id;
6370: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6371: aso_debug_pub.ADD ( 'Split_Model_Line - l_qte_line_tbl(i).item_type_code ' ||
6372: l_qte_line_rec.item_type_code , 1 , 'Y' );
6373: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' ||
6374: l_qte_line_rec.inventory_item_id, 1 , 'Y' );
6375: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
6369: lx_qte_line_rec.quote_line_id;
6370: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6371: aso_debug_pub.ADD ( 'Split_Model_Line - l_qte_line_tbl(i).item_type_code ' ||
6372: l_qte_line_rec.item_type_code , 1 , 'Y' );
6373: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' ||
6374: l_qte_line_rec.inventory_item_id, 1 , 'Y' );
6375: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
6376: END IF;
6377:
6371: aso_debug_pub.ADD ( 'Split_Model_Line - l_qte_line_tbl(i).item_type_code ' ||
6372: l_qte_line_rec.item_type_code , 1 , 'Y' );
6373: aso_debug_pub.ADD ( 'Copy - l_qte_line_tbl(i).inventory_item_id ' ||
6374: l_qte_line_rec.inventory_item_id, 1 , 'Y' );
6375: aso_debug_pub.ADD ( 'Copy - l_serviceable_product_flag ' || l_serviceable_product_flag , 1 , 'Y' );
6376: END IF;
6377:
6378: IF l_serviceable_product_flag = 'Y' THEN
6379:
6420: l_config_rev_nbr;
6421: END LOOP;
6422: END IF;
6423:
6424: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6425: aso_debug_pub.ADD ( 'l_old_config_header_id = ' || l_old_config_header_id , 1 , 'N' );
6426: END IF;
6427:
6428: l_copy_quote_control_rec.Copy_Note := FND_API.G_TRUE;
6421: END LOOP;
6422: END IF;
6423:
6424: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6425: aso_debug_pub.ADD ( 'l_old_config_header_id = ' || l_old_config_header_id , 1 , 'N' );
6426: END IF;
6427:
6428: l_copy_quote_control_rec.Copy_Note := FND_API.G_TRUE;
6429: l_copy_quote_control_rec.Copy_Task := FND_API.G_TRUE;
6465: -- bug 1903605
6466:
6467: IF (l_orig_item_id_tbl IS NOT NULL) AND (l_new_item_id_tbl IS NOT NULL) THEN
6468:
6469: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6470: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
6471: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
6472: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
6473: END IF;
6466:
6467: IF (l_orig_item_id_tbl IS NOT NULL) AND (l_new_item_id_tbl IS NOT NULL) THEN
6468:
6469: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6470: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
6471: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
6472: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
6473: END IF;
6474:
6467: IF (l_orig_item_id_tbl IS NOT NULL) AND (l_new_item_id_tbl IS NOT NULL) THEN
6468:
6469: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6470: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
6471: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
6472: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
6473: END IF;
6474:
6475: IF l_orig_item_id_tbl.count > 0 AND l_new_item_id_tbl.count > 0 THEN
6468:
6469: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6470: aso_debug_pub.ADD ( 'item_id_count > 0 ', 1 , 'N' );
6471: aso_debug_pub.ADD ( 'Orig Tbl Count ' ||l_orig_item_id_tbl.count, 1 , 'N' );
6472: aso_debug_pub.ADD ( 'New Tbl Count '||l_new_item_id_tbl.count, 1 , 'N' );
6473: END IF;
6474:
6475: IF l_orig_item_id_tbl.count > 0 AND l_new_item_id_tbl.count > 0 THEN
6476:
6495:
6496: END IF; -- Checking the index line table
6497:
6498: --Insert rows for line relationships and line price relationships for that quote line---
6499: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6500: aso_debug_pub.ADD ( ' Copying the line relationship and price relation records for the new qte line' , 1 , 'N' );
6501: END IF;
6502:
6503:
6496: END IF; -- Checking the index line table
6497:
6498: --Insert rows for line relationships and line price relationships for that quote line---
6499: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6500: aso_debug_pub.ADD ( ' Copying the line relationship and price relation records for the new qte line' , 1 , 'N' );
6501: END IF;
6502:
6503:
6504: FOR price_adj_rltship_rec IN c_price_adj_rel ( P_Original_Qte_Line_Rec.quote_line_id ) LOOP
6503:
6504: FOR price_adj_rltship_rec IN c_price_adj_rel ( P_Original_Qte_Line_Rec.quote_line_id ) LOOP
6505: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
6506:
6507: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6508: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = ' ||
6509: l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
6510: aso_debug_pub.ADD ( 'l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) = ' ||
6511: l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) , 1 , 'N' );
6504: FOR price_adj_rltship_rec IN c_price_adj_rel ( P_Original_Qte_Line_Rec.quote_line_id ) LOOP
6505: lx_price_adj_rltship_id := FND_API.G_MISS_NUM;
6506:
6507: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6508: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = ' ||
6509: l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
6510: aso_debug_pub.ADD ( 'l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) = ' ||
6511: l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) , 1 , 'N' );
6512: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' ||
6506:
6507: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6508: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = ' ||
6509: l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
6510: aso_debug_pub.ADD ( 'l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) = ' ||
6511: l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) , 1 , 'N' );
6512: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' ||
6513: price_adj_rltship_rec.rltd_price_adj_id , 1 , 'N' );
6514: END IF;
6508: aso_debug_pub.ADD ( 'l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) = ' ||
6509: l_line_index_link_tbl ( price_adj_rltship_rec.quote_line_id ) , 1 , 'N' );
6510: aso_debug_pub.ADD ( 'l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) = ' ||
6511: l_price_index_link_tbl ( price_adj_rltship_rec.rltd_price_adj_id ) , 1 , 'N' );
6512: aso_debug_pub.ADD ( 'price_adj_rltship_rec.rltd_price_adj_id = ' ||
6513: price_adj_rltship_rec.rltd_price_adj_id , 1 , 'N' );
6514: END IF;
6515:
6516: OPEN C_Get_Ship_Id (
6518: );
6519: FETCH C_Get_Ship_Id INTO l_ship_id;
6520: CLOSE C_Get_Ship_Id;
6521:
6522: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6523: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
6524: END IF;
6525:
6526: ASO_PRICE_RLTSHIPS_PKG.Insert_Row (
6519: FETCH C_Get_Ship_Id INTO l_ship_id;
6520: CLOSE C_Get_Ship_Id;
6521:
6522: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6523: aso_debug_pub.ADD ( 'l_ship_id from line_id = ' || l_ship_id , 1 , 'N' );
6524: END IF;
6525:
6526: ASO_PRICE_RLTSHIPS_PKG.Insert_Row (
6527: px_ADJ_RELATIONSHIP_ID => lx_price_adj_rltship_id
6571: END LOOP;
6572: -- End Copying the Line Loop
6573: -- Calling Update Quote to update the quantities
6574:
6575: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6576: aso_debug_pub.ADD ( ' Getting the last update date of the quote before updating the quote ', 1 , 'N' );
6577: END IF;
6578:
6579: l_quote_header_rec := ASO_UTILITY_PVT.Query_Header_Row(P_Qte_Header_Rec.quote_header_id);
6572: -- End Copying the Line Loop
6573: -- Calling Update Quote to update the quantities
6574:
6575: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6576: aso_debug_pub.ADD ( ' Getting the last update date of the quote before updating the quote ', 1 , 'N' );
6577: END IF;
6578:
6579: l_quote_header_rec := ASO_UTILITY_PVT.Query_Header_Row(P_Qte_Header_Rec.quote_header_id);
6580:
6599:
6600:
6601: l_qte_line_tbl := ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL;
6602:
6603: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6604: aso_debug_pub.ADD ( 'No Of Qte Lines 1 = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6605: aso_debug_pub.ADD ( ' Setting the qty and op code for new line created ', 1 , 'N' );
6606: END IF;
6607:
6600:
6601: l_qte_line_tbl := ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL;
6602:
6603: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6604: aso_debug_pub.ADD ( 'No Of Qte Lines 1 = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6605: aso_debug_pub.ADD ( ' Setting the qty and op code for new line created ', 1 , 'N' );
6606: END IF;
6607:
6608: FOR i in 1..l_inserted_qte_line_tbl.count LOOP
6601: l_qte_line_tbl := ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL;
6602:
6603: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6604: aso_debug_pub.ADD ( 'No Of Qte Lines 1 = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6605: aso_debug_pub.ADD ( ' Setting the qty and op code for new line created ', 1 , 'N' );
6606: END IF;
6607:
6608: FOR i in 1..l_inserted_qte_line_tbl.count LOOP
6609: l_qte_line_tbl(i).quote_header_id := P_Qte_Header_Rec.quote_header_id;
6611: l_qte_line_tbl(i).quote_line_id := l_inserted_qte_line_tbl(i).quote_line_id;
6612: l_qte_line_tbl(i).operation_code := 'UPDATE';
6613:
6614:
6615: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6616: aso_debug_pub.ADD ( 'New Qte Line '|| to_char(l_inserted_qte_line_tbl(i).quote_line_id), 1 , 'N' );
6617: aso_debug_pub.ADD ( 'New Qty '|| to_char(l_inserted_qte_line_tbl(i).quantity), 1 , 'N' );
6618: END IF;
6619:
6612: l_qte_line_tbl(i).operation_code := 'UPDATE';
6613:
6614:
6615: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6616: aso_debug_pub.ADD ( 'New Qte Line '|| to_char(l_inserted_qte_line_tbl(i).quote_line_id), 1 , 'N' );
6617: aso_debug_pub.ADD ( 'New Qty '|| to_char(l_inserted_qte_line_tbl(i).quantity), 1 , 'N' );
6618: END IF;
6619:
6620: END LOOP;
6613:
6614:
6615: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6616: aso_debug_pub.ADD ( 'New Qte Line '|| to_char(l_inserted_qte_line_tbl(i).quote_line_id), 1 , 'N' );
6617: aso_debug_pub.ADD ( 'New Qty '|| to_char(l_inserted_qte_line_tbl(i).quantity), 1 , 'N' );
6618: END IF;
6619:
6620: END LOOP;
6621:
6618: END IF;
6619:
6620: END LOOP;
6621:
6622: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6623: aso_debug_pub.ADD ( 'No Of Qte Lines 2 = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6624: aso_debug_pub.ADD ( ' Setting the qty and op code for orig line to be updated ', 1 , 'N' );
6625: END IF;
6626:
6619:
6620: END LOOP;
6621:
6622: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6623: aso_debug_pub.ADD ( 'No Of Qte Lines 2 = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6624: aso_debug_pub.ADD ( ' Setting the qty and op code for orig line to be updated ', 1 , 'N' );
6625: END IF;
6626:
6627: l_total_lines := l_qte_line_tbl.count;
6620: END LOOP;
6621:
6622: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6623: aso_debug_pub.ADD ( 'No Of Qte Lines 2 = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6624: aso_debug_pub.ADD ( ' Setting the qty and op code for orig line to be updated ', 1 , 'N' );
6625: END IF;
6626:
6627: l_total_lines := l_qte_line_tbl.count;
6628:
6631: l_qte_line_tbl(l_total_lines + 1).quote_header_id := P_Qte_Header_Rec.quote_header_id;
6632: l_qte_line_tbl(l_total_lines + 1).operation_code := 'UPDATE';
6633: l_qte_line_tbl(l_total_lines + 1).quote_line_id := P_Original_Qte_Line_Rec.quote_line_id;
6634:
6635: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6636: aso_debug_pub.ADD ( 'No Of Qte Lines before update qty = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6637: aso_debug_pub.ADD ( ' Calling Update Quote to update all lines ', 1 , 'N' );
6638: END IF;
6639:
6632: l_qte_line_tbl(l_total_lines + 1).operation_code := 'UPDATE';
6633: l_qte_line_tbl(l_total_lines + 1).quote_line_id := P_Original_Qte_Line_Rec.quote_line_id;
6634:
6635: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6636: aso_debug_pub.ADD ( 'No Of Qte Lines before update qty = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6637: aso_debug_pub.ADD ( ' Calling Update Quote to update all lines ', 1 , 'N' );
6638: END IF;
6639:
6640: aso_quote_pub.update_quote (
6633: l_qte_line_tbl(l_total_lines + 1).quote_line_id := P_Original_Qte_Line_Rec.quote_line_id;
6634:
6635: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6636: aso_debug_pub.ADD ( 'No Of Qte Lines before update qty = '|| to_char(l_qte_line_tbl.count), 1 , 'N' );
6637: aso_debug_pub.ADD ( ' Calling Update Quote to update all lines ', 1 , 'N' );
6638: END IF;
6639:
6640: aso_quote_pub.update_quote (
6641: p_api_version_number => 1.0,
6682: x_msg_count => x_msg_count,
6683: x_msg_data => x_msg_data
6684: );
6685:
6686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6687: aso_debug_pub.ADD ( ' Return Status from Update Quote = '||l_return_status, 1 , 'N' );
6688: END IF;
6689:
6690:
6683: x_msg_data => x_msg_data
6684: );
6685:
6686: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6687: aso_debug_pub.ADD ( ' Return Status from Update Quote = '||l_return_status, 1 , 'N' );
6688: END IF;
6689:
6690:
6691: IF ( l_return_status = FND_API.G_RET_STS_UNEXP_ERROR ) THEN
6699: x_return_status := FND_API.G_RET_STS_ERROR;
6700: RAISE FND_API.G_EXC_ERROR;
6701: END IF;
6702:
6703: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6704: aso_debug_pub.ADD ( ' After Calling Update Quote to update all lines ', 1 , 'N' );
6705: END IF;
6706:
6707:
6700: RAISE FND_API.G_EXC_ERROR;
6701: END IF;
6702:
6703: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6704: aso_debug_pub.ADD ( ' After Calling Update Quote to update all lines ', 1 , 'N' );
6705: END IF;
6706:
6707:
6708: X_Quote_Line_Tbl := x_qte_line_tbl;
6718: p_count => x_msg_count
6719: , p_data => x_msg_data
6720: );
6721:
6722: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6723: aso_debug_pub.ADD ( ' End of Split_Model_Line ', 1 , 'N' );
6724: END IF;
6725: EXCEPTION
6726: WHEN FND_API.G_EXC_ERROR THEN
6719: , p_data => x_msg_data
6720: );
6721:
6722: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6723: aso_debug_pub.ADD ( ' End of Split_Model_Line ', 1 , 'N' );
6724: END IF;
6725: EXCEPTION
6726: WHEN FND_API.G_EXC_ERROR THEN
6727: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
6818: FND_MSG_PUB.initialize;
6819: END IF;
6820:
6821: -- API BODY
6822: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6823: aso_debug_pub.ADD ('INSERT_SALES_SUPP_DATA: Begin' , 1, 'N' );
6824: aso_debug_pub.ADD ( 'Old QTE Line Id : ' || TO_CHAR ( P_OLD_QUOTE_LINE_ID ) , 1 , 'N' );
6825: aso_debug_pub.ADD ( 'New QTE Line Id : ' || TO_CHAR ( P_NEW_QUOTE_LINE_ID ) , 1 , 'N' );
6826: END IF;
6819: END IF;
6820:
6821: -- API BODY
6822: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6823: aso_debug_pub.ADD ('INSERT_SALES_SUPP_DATA: Begin' , 1, 'N' );
6824: aso_debug_pub.ADD ( 'Old QTE Line Id : ' || TO_CHAR ( P_OLD_QUOTE_LINE_ID ) , 1 , 'N' );
6825: aso_debug_pub.ADD ( 'New QTE Line Id : ' || TO_CHAR ( P_NEW_QUOTE_LINE_ID ) , 1 , 'N' );
6826: END IF;
6827:
6820:
6821: -- API BODY
6822: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6823: aso_debug_pub.ADD ('INSERT_SALES_SUPP_DATA: Begin' , 1, 'N' );
6824: aso_debug_pub.ADD ( 'Old QTE Line Id : ' || TO_CHAR ( P_OLD_QUOTE_LINE_ID ) , 1 , 'N' );
6825: aso_debug_pub.ADD ( 'New QTE Line Id : ' || TO_CHAR ( P_NEW_QUOTE_LINE_ID ) , 1 , 'N' );
6826: END IF;
6827:
6828: -- Get the template id and template_instance_id based upon the
6821: -- API BODY
6822: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6823: aso_debug_pub.ADD ('INSERT_SALES_SUPP_DATA: Begin' , 1, 'N' );
6824: aso_debug_pub.ADD ( 'Old QTE Line Id : ' || TO_CHAR ( P_OLD_QUOTE_LINE_ID ) , 1 , 'N' );
6825: aso_debug_pub.ADD ( 'New QTE Line Id : ' || TO_CHAR ( P_NEW_QUOTE_LINE_ID ) , 1 , 'N' );
6826: END IF;
6827:
6828: -- Get the template id and template_instance_id based upon the
6829: -- quote line id
6828: -- Get the template id and template_instance_id based upon the
6829: -- quote line id
6830:
6831: FOR template_val IN get_template_id ( P_OLD_QUOTE_LINE_ID ) LOOP
6832: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6833: aso_debug_pub.ADD ( 'Template Id : ' || TO_CHAR ( template_val.template_id ) , 1 , 'N' );
6834: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N
6835: ' );
6836:
6829: -- quote line id
6830:
6831: FOR template_val IN get_template_id ( P_OLD_QUOTE_LINE_ID ) LOOP
6832: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6833: aso_debug_pub.ADD ( 'Template Id : ' || TO_CHAR ( template_val.template_id ) , 1 , 'N' );
6834: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N
6835: ' );
6836:
6837: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
6830:
6831: FOR template_val IN get_template_id ( P_OLD_QUOTE_LINE_ID ) LOOP
6832: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6833: aso_debug_pub.ADD ( 'Template Id : ' || TO_CHAR ( template_val.template_id ) , 1 , 'N' );
6834: aso_debug_pub.ADD ( ' Old Template Instance Id : ' || TO_CHAR ( template_val.template_instance_id ) , 1 , 'N
6835: ' );
6836:
6837: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
6838:
6835: ' );
6836:
6837: -- Create a new row in the ASO_SUP_TMPL_INSTANCE Table with the template id
6838:
6839: aso_debug_pub.ADD ( 'Inserting a row into tmpl_instance table' , 1 , 'N' );
6840: END IF;
6841:
6842: -- Initiate the variable to null,
6843: -- so that each time they contain new value for every pass of loop
6856: , P_Owner_Table_Id => P_NEW_QUOTE_LINE_ID
6857: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
6858: );
6859:
6860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6861: aso_debug_pub.ADD ( ' New Template Instance Id : ' || TO_CHAR ( l_new_template_instance_id ) , 1 , 'N' );
6862: END IF;
6863:
6864: -- Get the values for that instance
6857: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
6858: );
6859:
6860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6861: aso_debug_pub.ADD ( ' New Template Instance Id : ' || TO_CHAR ( l_new_template_instance_id ) , 1 , 'N' );
6862: END IF;
6863:
6864: -- Get the values for that instance
6865: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
6862: END IF;
6863:
6864: -- Get the values for that instance
6865: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
6866: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6867: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
6868: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
6869: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
6870: END IF;
6863:
6864: -- Get the values for that instance
6865: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
6866: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6867: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
6868: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
6869: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
6870: END IF;
6871:
6864: -- Get the values for that instance
6865: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
6866: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6867: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
6868: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
6869: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
6870: END IF;
6871:
6872: -- If values are fetched then insert rows
6865: FOR inst_val IN get_values ( template_val.template_instance_id ) LOOP
6866: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6867: aso_debug_pub.ADD ( 'Value : ' || inst_val.VALUE, 1, 'N' );
6868: aso_debug_pub.ADD ( 'Value Type Qualifier : ' || inst_val.value_type_qualifier , 1 , 'N' );
6869: aso_debug_pub.ADD ( 'Response Id : ' || TO_CHAR ( inst_val.response_id ) , 1 , 'N' );
6870: END IF;
6871:
6872: -- If values are fetched then insert rows
6873: IF inst_val.sect_comp_map_id IS NOT NULL THEN
6874: -- Initiate the variables to null,
6875: -- so that each time they contain new value for every pass of loop
6876:
6877: l_instance_value_id := NULL;
6878: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6879: aso_debug_pub.ADD ( 'Inserting a row into instance_value table' , 1 , 'N' );
6880: END IF;
6881:
6882: -- Create a new row in the ASO_SUP_INSTANCE_VALUE table
6875: -- so that each time they contain new value for every pass of loop
6876:
6877: l_instance_value_id := NULL;
6878: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6879: aso_debug_pub.ADD ( 'Inserting a row into instance_value table' , 1 , 'N' );
6880: END IF;
6881:
6882: -- Create a new row in the ASO_SUP_INSTANCE_VALUE table
6883: ASO_SUP_INSTANCE_VALUE_PKG.INSERT_ROW (
6892: , P_last_updated_by => FND_GLOBAL.USER_ID
6893: , P_last_update_login => FND_GLOBAL.CONC_LOGIN_ID
6894: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
6895: );
6896: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6897: aso_debug_pub.ADD ( 'New Instance Value Id : ' || TO_CHAR ( l_instance_value_id ) , 1 , 'N' );
6898: END IF;
6899: END IF;
6900:
6893: , P_last_update_login => FND_GLOBAL.CONC_LOGIN_ID
6894: , P_OBJECT_VERSION_NUMBER => FND_API.G_MISS_NUM
6895: );
6896: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6897: aso_debug_pub.ADD ( 'New Instance Value Id : ' || TO_CHAR ( l_instance_value_id ) , 1 , 'N' );
6898: END IF;
6899: END IF;
6900:
6901: END LOOP; -- instance value loop
6909:
6910: -- Initialize API return status to success
6911: x_return_status := FND_API.G_RET_STS_SUCCESS;
6912:
6913: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6914: aso_debug_pub.ADD ( 'INSERT_SALES_SUPP_DATA: ' || l_api_name || 'end' , 1 , 'N' );
6915: END IF;
6916:
6917:
6910: -- Initialize API return status to success
6911: x_return_status := FND_API.G_RET_STS_SUCCESS;
6912:
6913: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6914: aso_debug_pub.ADD ( 'INSERT_SALES_SUPP_DATA: ' || l_api_name || 'end' , 1 , 'N' );
6915: END IF;
6916:
6917:
6918:
6984: SELECT ASO_PAYMENTS_S.nextval FROM sys.dual;
6985:
6986: begin
6987: SAVEPOINT COPY_PAYMENT_ROW_PVT;
6988: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
6989:
6990: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6986: begin
6987: SAVEPOINT COPY_PAYMENT_ROW_PVT;
6988: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
6989:
6990: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6987: SAVEPOINT COPY_PAYMENT_ROW_PVT;
6988: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
6989:
6990: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6995: aso_debug_pub.add('l_payment_rec.PAYMENT_REF_NUMBER:'|| l_payment_rec.PAYMENT_REF_NUMBER , 1, 'Y');
6988: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
6989:
6990: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6995: aso_debug_pub.add('l_payment_rec.PAYMENT_REF_NUMBER:'|| l_payment_rec.PAYMENT_REF_NUMBER , 1, 'Y');
6996: aso_debug_pub.add('l_payment_rec.PAYMENT_TERM_ID: ' || l_payment_rec.PAYMENT_TERM_ID, 1, 'Y');
6989:
6990: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6995: aso_debug_pub.add('l_payment_rec.PAYMENT_REF_NUMBER:'|| l_payment_rec.PAYMENT_REF_NUMBER , 1, 'Y');
6996: aso_debug_pub.add('l_payment_rec.PAYMENT_TERM_ID: ' || l_payment_rec.PAYMENT_TERM_ID, 1, 'Y');
6997: END IF;
6990: IF aso_debug_pub.g_debug_flag = 'Y' THEN
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6995: aso_debug_pub.add('l_payment_rec.PAYMENT_REF_NUMBER:'|| l_payment_rec.PAYMENT_REF_NUMBER , 1, 'Y');
6996: aso_debug_pub.add('l_payment_rec.PAYMENT_TERM_ID: ' || l_payment_rec.PAYMENT_TERM_ID, 1, 'Y');
6997: END IF;
6998:
6991: aso_debug_pub.add('Begin copy_payment_row ', 1, 'Y');
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6995: aso_debug_pub.add('l_payment_rec.PAYMENT_REF_NUMBER:'|| l_payment_rec.PAYMENT_REF_NUMBER , 1, 'Y');
6996: aso_debug_pub.add('l_payment_rec.PAYMENT_TERM_ID: ' || l_payment_rec.PAYMENT_TERM_ID, 1, 'Y');
6997: END IF;
6998:
6999: x_return_status := FND_API.G_RET_STS_SUCCESS;
6992: aso_debug_pub.add('l_payment_rec.Quote_Header_Id: ' || l_payment_rec.Quote_Header_Id, 1, 'Y');
6993: aso_debug_pub.add('l_payment_rec.Quote_Line_Id: ' || l_payment_rec.Quote_Line_Id, 1, 'Y');
6994: aso_debug_pub.add('l_payment_rec.trxn_extension_id:' || l_payment_rec.trxn_extension_id, 1, 'Y');
6995: aso_debug_pub.add('l_payment_rec.PAYMENT_REF_NUMBER:'|| l_payment_rec.PAYMENT_REF_NUMBER , 1, 'Y');
6996: aso_debug_pub.add('l_payment_rec.PAYMENT_TERM_ID: ' || l_payment_rec.PAYMENT_TERM_ID, 1, 'Y');
6997: END IF;
6998:
6999: x_return_status := FND_API.G_RET_STS_SUCCESS;
7000:
7005:
7006: if (l_payment_rec.trxn_extension_id is not null or l_payment_rec.trxn_extension_id <> fnd_api.g_miss_num) then
7007:
7008: -- Check to see if cvv2 is mandatory or not
7009: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7010: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7011: END IF;
7012:
7013: IBY_FNDCPT_SETUP_PUB.Get_Payment_Channel_Attribs
7006: if (l_payment_rec.trxn_extension_id is not null or l_payment_rec.trxn_extension_id <> fnd_api.g_miss_num) then
7007:
7008: -- Check to see if cvv2 is mandatory or not
7009: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7010: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7011: END IF;
7012:
7013: IBY_FNDCPT_SETUP_PUB.Get_Payment_Channel_Attribs
7014: (
7020: p_channel_code => 'CREDIT_CARD',
7021: x_channel_attrib_uses => lx_channel_attrib_uses,
7022: x_response => lx_response);
7023:
7024: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7025: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7021: x_channel_attrib_uses => lx_channel_attrib_uses,
7022: x_response => lx_response);
7023:
7024: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7025: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7029: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7022: x_response => lx_response);
7023:
7024: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7025: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7029: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7030: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7023:
7024: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7025: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7029: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7030: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7031: END IF;
7024: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7025: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7029: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7030: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7031: END IF;
7032:
7025: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Get_Payment_Channel_Attribs ', 1, 'Y');
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7029: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7030: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7031: END IF;
7032:
7033: -- if cvv2 is not mandatory then call IBY API to create the new trxn extension
7026: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7027: aso_debug_pub.add('cvv2 use: '||lx_channel_attrib_uses.Instr_SecCode_Use, 1, 'Y');
7028: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7029: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7030: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7031: END IF;
7032:
7033: -- if cvv2 is not mandatory then call IBY API to create the new trxn extension
7034: -- if cvv2 is mandatory then do not call IBY API, make payment ref as null and insert row
7068: l_trxn_attribs.VoiceAuth_Date := null;
7069: l_trxn_attribs.VoiceAuth_Code := null;
7070: l_trxn_attribs.Additional_Info := null;
7071:
7072: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7073: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7074: aso_debug_pub.add('Instrument Assignment id: '|| l_payment_rec.instr_assignment_id, 1, 'Y');
7075: aso_debug_pub.add('payment id is : '|| l_payment_rec.payment_id,1,'Y');
7076: aso_debug_pub.add('quote line id is : '|| l_payment_rec.quote_line_id,1,'Y');
7069: l_trxn_attribs.VoiceAuth_Code := null;
7070: l_trxn_attribs.Additional_Info := null;
7071:
7072: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7073: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7074: aso_debug_pub.add('Instrument Assignment id: '|| l_payment_rec.instr_assignment_id, 1, 'Y');
7075: aso_debug_pub.add('payment id is : '|| l_payment_rec.payment_id,1,'Y');
7076: aso_debug_pub.add('quote line id is : '|| l_payment_rec.quote_line_id,1,'Y');
7077: aso_debug_pub.add('party_id is : '|| l_payer.party_id,1,'Y');
7070: l_trxn_attribs.Additional_Info := null;
7071:
7072: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7073: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7074: aso_debug_pub.add('Instrument Assignment id: '|| l_payment_rec.instr_assignment_id, 1, 'Y');
7075: aso_debug_pub.add('payment id is : '|| l_payment_rec.payment_id,1,'Y');
7076: aso_debug_pub.add('quote line id is : '|| l_payment_rec.quote_line_id,1,'Y');
7077: aso_debug_pub.add('party_id is : '|| l_payer.party_id,1,'Y');
7078: END IF;
7071:
7072: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7073: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7074: aso_debug_pub.add('Instrument Assignment id: '|| l_payment_rec.instr_assignment_id, 1, 'Y');
7075: aso_debug_pub.add('payment id is : '|| l_payment_rec.payment_id,1,'Y');
7076: aso_debug_pub.add('quote line id is : '|| l_payment_rec.quote_line_id,1,'Y');
7077: aso_debug_pub.add('party_id is : '|| l_payer.party_id,1,'Y');
7078: END IF;
7079:
7072: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7073: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7074: aso_debug_pub.add('Instrument Assignment id: '|| l_payment_rec.instr_assignment_id, 1, 'Y');
7075: aso_debug_pub.add('payment id is : '|| l_payment_rec.payment_id,1,'Y');
7076: aso_debug_pub.add('quote line id is : '|| l_payment_rec.quote_line_id,1,'Y');
7077: aso_debug_pub.add('party_id is : '|| l_payer.party_id,1,'Y');
7078: END IF;
7079:
7080: IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension
7073: aso_debug_pub.add('Before calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7074: aso_debug_pub.add('Instrument Assignment id: '|| l_payment_rec.instr_assignment_id, 1, 'Y');
7075: aso_debug_pub.add('payment id is : '|| l_payment_rec.payment_id,1,'Y');
7076: aso_debug_pub.add('quote line id is : '|| l_payment_rec.quote_line_id,1,'Y');
7077: aso_debug_pub.add('party_id is : '|| l_payer.party_id,1,'Y');
7078: END IF;
7079:
7080: IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension
7081: (
7092: p_trxn_attribs => l_trxn_attribs,
7093: x_entity_id => lx_entity_id,
7094: x_response => lx_response);
7095:
7096: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7097: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7093: x_entity_id => lx_entity_id,
7094: x_response => lx_response);
7095:
7096: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7097: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7101: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7094: x_response => lx_response);
7095:
7096: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7097: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7101: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7102: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7095:
7096: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7097: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7101: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7102: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7103: END IF;
7096: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7097: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7101: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7102: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7103: END IF;
7104:
7097: aso_debug_pub.add('after calling IBY_FNDCPT_TRXN_PUB.Create_Transaction_Extension ', 1, 'Y');
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7101: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7102: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7103: END IF;
7104:
7105: if x_return_status <> fnd_api.g_ret_sts_success then
7098: aso_debug_pub.add('Return Status: '||x_return_status, 1, 'Y');
7099: aso_debug_pub.add('lx_entity_id: '||lx_entity_id, 1, 'Y');
7100: aso_debug_pub.add('x_response.result_code: '|| to_char(lx_response.result_code), 1, 'Y');
7101: aso_debug_pub.add('x_response.result_category:'|| to_char(lx_response.result_category), 1, 'Y');
7102: aso_debug_pub.add('x_response.result_message: '|| to_char(lx_response.result_message), 1, 'Y');
7103: END IF;
7104:
7105: if x_return_status <> fnd_api.g_ret_sts_success then
7106: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
7119: l_payment_rec.trxn_extension_id := lx_entity_id;
7120:
7121: ELSE
7122:
7123: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7124: aso_debug_pub.add('Instr Sec Code cvv2 is mandatory hence setting the payment ref number and trxn ext id to null ', 1, 'Y');
7125: END IF;
7126:
7127: l_payment_rec.PAYMENT_REF_NUMBER := null;
7120:
7121: ELSE
7122:
7123: IF aso_debug_pub.g_debug_flag = 'Y' THEN
7124: aso_debug_pub.add('Instr Sec Code cvv2 is mandatory hence setting the payment ref number and trxn ext id to null ', 1, 'Y');
7125: END IF;
7126:
7127: l_payment_rec.PAYMENT_REF_NUMBER := null;
7128: l_payment_rec.trxn_extension_id := null;
7194: ( p_count => x_msg_count,
7195: p_data => x_msg_data
7196: );
7197:
7198: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
7199: aso_debug_pub.ADD ('END copy_payment_row',1,'N');
7200: END IF;
7201:
7202: EXCEPTION
7195: p_data => x_msg_data
7196: );
7197:
7198: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
7199: aso_debug_pub.ADD ('END copy_payment_row',1,'N');
7200: END IF;
7201:
7202: EXCEPTION
7203: WHEN FND_API.G_EXC_ERROR THEN