76: p_QUOTE_SHAREE_ID => l_recip_id
77: ,p_party_id => p_party_id
78: ,p_cust_account_id => p_cust_account_id);
79: ELSE
80: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
81: IBE_UTIL.DEBUG('Not saving party and cust_account_id because account_ids do not match');
82: END IF;
83: IF FND_Msg_Pub.Check_Msg_Level (FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
84: FND_Message.Set_Name('IBE', 'IBE_SC_ERR_USERACCESS');
77: ,p_party_id => p_party_id
78: ,p_cust_account_id => p_cust_account_id);
79: ELSE
80: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
81: IBE_UTIL.DEBUG('Not saving party and cust_account_id because account_ids do not match');
82: END IF;
83: IF FND_Msg_Pub.Check_Msg_Level (FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
84: FND_Message.Set_Name('IBE', 'IBE_SC_ERR_USERACCESS');
85: FND_Msg_Pub.Add;
141: x_return_status := FND_API.G_RET_STS_SUCCESS;
142: -------------------------------------------------------------------------------------------------------------
143: --API Body start
144: -------------------------------------------------------------------------------------------------------------
145: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
146: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2: START');
147: IBE_UTIL.DEBUG('saveshare_control_rec.operation_code is '||p_saveshare_control_rec.operation_code);
148: END IF;
149:
142: -------------------------------------------------------------------------------------------------------------
143: --API Body start
144: -------------------------------------------------------------------------------------------------------------
145: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
146: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2: START');
147: IBE_UTIL.DEBUG('saveshare_control_rec.operation_code is '||p_saveshare_control_rec.operation_code);
148: END IF;
149:
150: Validate_share_Update(
143: --API Body start
144: -------------------------------------------------------------------------------------------------------------
145: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
146: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2: START');
147: IBE_UTIL.DEBUG('saveshare_control_rec.operation_code is '||p_saveshare_control_rec.operation_code);
148: END IF;
149:
150: Validate_share_Update(
151: p_api_version_number => 1.0
169:
170: --DBMS_OUTPUT.PUT_LINE('saveshare_control_rec.operation_code is '||p_saveshare_control_rec.operation_code);
171: IF ((p_saveshare_control_rec.operation_code = OP_NAME_CART)
172: OR (p_saveshare_control_rec.operation_code = OP_SAVE_CART_AND_RECIPIENTS)) THEN
173: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
174: IBE_UTIL.DEBUG('calling IBE_Quote_Save_pvt.SAVE to save the quote name');
175: END IF;
176: --DBMS_OUTPUT.PUT_LINE_LINE('calling IBE_Quote_Save_pvt.SAVE to save the quote name');
177: --DBMS_OUTPUT.PUT_LINE_LINE('incoming quote_name :'||P_Quote_header_rec.quote_name);
170: --DBMS_OUTPUT.PUT_LINE('saveshare_control_rec.operation_code is '||p_saveshare_control_rec.operation_code);
171: IF ((p_saveshare_control_rec.operation_code = OP_NAME_CART)
172: OR (p_saveshare_control_rec.operation_code = OP_SAVE_CART_AND_RECIPIENTS)) THEN
173: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
174: IBE_UTIL.DEBUG('calling IBE_Quote_Save_pvt.SAVE to save the quote name');
175: END IF;
176: --DBMS_OUTPUT.PUT_LINE_LINE('calling IBE_Quote_Save_pvt.SAVE to save the quote name');
177: --DBMS_OUTPUT.PUT_LINE_LINE('incoming quote_name :'||P_Quote_header_rec.quote_name);
178: --DBMS_OUTPUT.PUT_LINE_LINE('incoming quote_headeR_id :'||P_Quote_header_rec.quote_header_id);
200: END IF;
201:
202: IF ((p_saveshare_control_rec.operation_code = OP_SAVE_RECIPIENTS)
203: OR (p_saveshare_control_rec.operation_code = OP_SAVE_CART_AND_RECIPIENTS)) THEN
204: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
205: IBE_UTIL.DEBUG('Calling save_recipients to save recipient information');
206: END IF;
207: --DBMS_OUTPUT.PUT_LINE('Calling save_recipients to save recipient information ');
208: --dbms_output.put_line('Comments passed : '||p_notes);
201:
202: IF ((p_saveshare_control_rec.operation_code = OP_SAVE_RECIPIENTS)
203: OR (p_saveshare_control_rec.operation_code = OP_SAVE_CART_AND_RECIPIENTS)) THEN
204: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
205: IBE_UTIL.DEBUG('Calling save_recipients to save recipient information');
206: END IF;
207: --DBMS_OUTPUT.PUT_LINE('Calling save_recipients to save recipient information ');
208: --dbms_output.put_line('Comments passed : '||p_notes);
209: IF(nvl(p_quote_access_tbl.count,0) > 0) THEN
233: END IF;
234:
235:
236: IF(p_saveshare_control_rec.operation_code = OP_APPEND) THEN
237: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
238: IBE_UTIL.DEBUG('cALLING APPEND_QUOTE');
239: END IF;
240: IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE(
241: P_source_quote_header_id => P_source_quote_header_id,
234:
235:
236: IF(p_saveshare_control_rec.operation_code = OP_APPEND) THEN
237: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
238: IBE_UTIL.DEBUG('cALLING APPEND_QUOTE');
239: END IF;
240: IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE(
241: P_source_quote_header_id => P_source_quote_header_id,
242: P_source_last_update_date => P_source_last_update_date,
260: END IF;
261:
262:
263: ELSIF(p_saveshare_control_rec.operation_code = OP_ACTIVATE_QUOTE) THEN
264: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
265: IBE_UTIL.DEBUG('OPERATION_CODE IS: '||p_saveshare_control_rec.operation_code||'CALLING ACTIVATE_QUOTE');
266: END IF;
267: --DBMS_OUTPUT.PUT_LINE_LINE('OPERATION_CODE IS: '||p_saveshare_control_rec.operation_code||'CALLING ACTIVATE_QUOTE');
268: IBE_QUOTE_SAVESHARE_V2_PVT.ACTIVATE_QUOTE(
261:
262:
263: ELSIF(p_saveshare_control_rec.operation_code = OP_ACTIVATE_QUOTE) THEN
264: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
265: IBE_UTIL.DEBUG('OPERATION_CODE IS: '||p_saveshare_control_rec.operation_code||'CALLING ACTIVATE_QUOTE');
266: END IF;
267: --DBMS_OUTPUT.PUT_LINE_LINE('OPERATION_CODE IS: '||p_saveshare_control_rec.operation_code||'CALLING ACTIVATE_QUOTE');
268: IBE_QUOTE_SAVESHARE_V2_PVT.ACTIVATE_QUOTE(
269: P_Quote_header_rec => P_Quote_header_rec ,
285: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
286: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
287: END IF;
288: --DBMS_OUTPUT.PUT_LINE_LINE('Finished calling ACTIVATE_QUOTE ');
289: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
290: IBE_UTIL.DEBUG('Finished calling ACTIVATE_QUOTE');
291: END IF;
292:
293: ELSIF(p_saveshare_control_rec.operation_code = OP_END_WORKING) THEN
286: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
287: END IF;
288: --DBMS_OUTPUT.PUT_LINE_LINE('Finished calling ACTIVATE_QUOTE ');
289: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
290: IBE_UTIL.DEBUG('Finished calling ACTIVATE_QUOTE');
291: END IF;
292:
293: ELSIF(p_saveshare_control_rec.operation_code = OP_END_WORKING) THEN
294: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
290: IBE_UTIL.DEBUG('Finished calling ACTIVATE_QUOTE');
291: END IF;
292:
293: ELSIF(p_saveshare_control_rec.operation_code = OP_END_WORKING) THEN
294: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
295: IBE_UTIL.DEBUG(' Calling IBE_QUOTE_SAVE_SHARE_V2_PVT.END_WORKING');
296: END IF;
297: IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING(
298: P_Quote_access_tbl => p_quote_access_tbl ,
291: END IF;
292:
293: ELSIF(p_saveshare_control_rec.operation_code = OP_END_WORKING) THEN
294: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
295: IBE_UTIL.DEBUG(' Calling IBE_QUOTE_SAVE_SHARE_V2_PVT.END_WORKING');
296: END IF;
297: IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING(
298: P_Quote_access_tbl => p_quote_access_tbl ,
299: p_quote_header_id => p_quote_header_rec.quote_header_id,
316: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
318: END IF;
319:
320: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
321: IBE_UTIL.DEBUG('Done calling IBE_QUOTE_SAVE_SHARE_V2_PVT.END_WORKING');
322: END IF;
323:
324: ELSIF(p_saveshare_control_rec.operation_code = OP_STOP_SHARING) THEN
317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
318: END IF;
319:
320: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
321: IBE_UTIL.DEBUG('Done calling IBE_QUOTE_SAVE_SHARE_V2_PVT.END_WORKING');
322: END IF;
323:
324: ELSIF(p_saveshare_control_rec.operation_code = OP_STOP_SHARING) THEN
325: IBE_QUOTE_SAVESHARE_V2_PVT.STOP_SHARING (
341: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
342: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
343: END IF;
344: END IF;--Check for p_saveshare_control_rec.operation_code
345: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
346: IBE_UTIL.DEBUG('P_saveshare_control_rec.deactivate_cart: '||P_saveshare_control_rec.deactivate_cart);
347: END IF;
348: IF ((P_saveshare_control_rec.deactivate_cart = FND_API.G_TRUE)
349: OR (p_saveshare_control_rec.operation_code = OP_DEACTIVATE)) THEN
342: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
343: END IF;
344: END IF;--Check for p_saveshare_control_rec.operation_code
345: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
346: IBE_UTIL.DEBUG('P_saveshare_control_rec.deactivate_cart: '||P_saveshare_control_rec.deactivate_cart);
347: END IF;
348: IF ((P_saveshare_control_rec.deactivate_cart = FND_API.G_TRUE)
349: OR (p_saveshare_control_rec.operation_code = OP_DEACTIVATE)) THEN
350:
347: END IF;
348: IF ((P_saveshare_control_rec.deactivate_cart = FND_API.G_TRUE)
349: OR (p_saveshare_control_rec.operation_code = OP_DEACTIVATE)) THEN
350:
351: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
352: IBE_UTIL.DEBUG('Calling deactivate API');
353: END IF;
354: --DBMS_OUTPUT.PUT_LINE_LINE('Calling deactivate API');
355: IBE_QUOTE_SAVESHARE_V2_PVT.DEACTIVATE_QUOTE (
348: IF ((P_saveshare_control_rec.deactivate_cart = FND_API.G_TRUE)
349: OR (p_saveshare_control_rec.operation_code = OP_DEACTIVATE)) THEN
350:
351: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
352: IBE_UTIL.DEBUG('Calling deactivate API');
353: END IF;
354: --DBMS_OUTPUT.PUT_LINE_LINE('Calling deactivate API');
355: IBE_QUOTE_SAVESHARE_V2_PVT.DEACTIVATE_QUOTE (
356: P_Quote_header_id => P_Quote_header_rec.quote_header_id ,
369:
370: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
372: END IF;
373: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
374: IBE_UTIL.DEBUG('Deactivate owner cart after sharing:Done');
375: END IF;
376: END IF; --op_code = name_cart with deactivate
377:
370: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
372: END IF;
373: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
374: IBE_UTIL.DEBUG('Deactivate owner cart after sharing:Done');
375: END IF;
376: END IF; --op_code = name_cart with deactivate
377:
378: IF (p_saveshare_control_rec.operation_code = OP_DELETE_CART) THEN
375: END IF;
376: END IF; --op_code = name_cart with deactivate
377:
378: IF (p_saveshare_control_rec.operation_code = OP_DELETE_CART) THEN
379: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
380: IBE_UTIL.DEBUG('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
381: IBE_UTIL.DEBUG('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
382: IBE_UTIL.DEBUG('save_share_v2:Expunge flag passed to delete_cart is: '||p_saveshare_control_rec.delete_source_cart);
383: IBE_UTIL.DEBUG('save_share_v2:P_Quote_header_rec.last_update_date: '||P_Quote_header_rec.last_update_date);
376: END IF; --op_code = name_cart with deactivate
377:
378: IF (p_saveshare_control_rec.operation_code = OP_DELETE_CART) THEN
379: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
380: IBE_UTIL.DEBUG('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
381: IBE_UTIL.DEBUG('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
382: IBE_UTIL.DEBUG('save_share_v2:Expunge flag passed to delete_cart is: '||p_saveshare_control_rec.delete_source_cart);
383: IBE_UTIL.DEBUG('save_share_v2:P_Quote_header_rec.last_update_date: '||P_Quote_header_rec.last_update_date);
384: END IF;
377:
378: IF (p_saveshare_control_rec.operation_code = OP_DELETE_CART) THEN
379: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
380: IBE_UTIL.DEBUG('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
381: IBE_UTIL.DEBUG('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
382: IBE_UTIL.DEBUG('save_share_v2:Expunge flag passed to delete_cart is: '||p_saveshare_control_rec.delete_source_cart);
383: IBE_UTIL.DEBUG('save_share_v2:P_Quote_header_rec.last_update_date: '||P_Quote_header_rec.last_update_date);
384: END IF;
385: --dbms_output.put_line('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
378: IF (p_saveshare_control_rec.operation_code = OP_DELETE_CART) THEN
379: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
380: IBE_UTIL.DEBUG('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
381: IBE_UTIL.DEBUG('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
382: IBE_UTIL.DEBUG('save_share_v2:Expunge flag passed to delete_cart is: '||p_saveshare_control_rec.delete_source_cart);
383: IBE_UTIL.DEBUG('save_share_v2:P_Quote_header_rec.last_update_date: '||P_Quote_header_rec.last_update_date);
384: END IF;
385: --dbms_output.put_line('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
386: --dbms_output.put_line('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
379: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
380: IBE_UTIL.DEBUG('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
381: IBE_UTIL.DEBUG('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
382: IBE_UTIL.DEBUG('save_share_v2:Expunge flag passed to delete_cart is: '||p_saveshare_control_rec.delete_source_cart);
383: IBE_UTIL.DEBUG('save_share_v2:P_Quote_header_rec.last_update_date: '||P_Quote_header_rec.last_update_date);
384: END IF;
385: --dbms_output.put_line('Save_share_v2:Op_code in p_saveshare_control_rec.operation_code: '||p_saveshare_control_rec.operation_code);
386: --dbms_output.put_line('Save_share_v2:Ready to call IBE_QUOTE_SAVE_PVT.Delete on: '||P_Quote_header_rec.quote_header_id);
387:
406:
407: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
408: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
409: END IF;
410: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
411: IBE_UTIL.DEBUG('Delete owner cart :Done');
412: END IF;
413: END IF; --op_code = OP_DELETE_CART
414:
407: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
408: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
409: END IF;
410: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
411: IBE_UTIL.DEBUG('Delete owner cart :Done');
412: END IF;
413: END IF; --op_code = OP_DELETE_CART
414:
415: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
411: IBE_UTIL.DEBUG('Delete owner cart :Done');
412: END IF;
413: END IF; --op_code = OP_DELETE_CART
414:
415: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
416: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2: END');
417: END IF;
418: EXCEPTION
419: WHEN FND_API.G_EXC_ERROR THEN
412: END IF;
413: END IF; --op_code = OP_DELETE_CART
414:
415: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
416: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2: END');
417: END IF;
418: EXCEPTION
419: WHEN FND_API.G_EXC_ERROR THEN
420: ROLLBACK TO SAVESHARE_V2;
421: x_return_status := FND_API.G_RET_STS_ERROR;
422: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
423: p_count => x_msg_count ,
424: p_data => x_msg_data);
425: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
426: IBE_Util.Debug('Expected Error in IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2()');
427: END IF;
428:
429: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
422: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
423: p_count => x_msg_count ,
424: p_data => x_msg_data);
425: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
426: IBE_Util.Debug('Expected Error in IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2()');
427: END IF;
428:
429: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
430: ROLLBACK TO SAVESHARE_V2;
431: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
432: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
433: p_count => x_msg_count ,
434: p_data => x_msg_data);
435: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
436: IBE_Util.Debug('Unexpected Error in IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2()');
437: END IF;
438:
439: WHEN OTHERS THEN
432: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
433: p_count => x_msg_count ,
434: p_data => x_msg_data);
435: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
436: IBE_Util.Debug('Unexpected Error in IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2()');
437: END IF;
438:
439: WHEN OTHERS THEN
440: ROLLBACK TO SAVESHARE_V2;
445: END IF;
446: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
447: p_count => x_msg_count ,
448: p_data => x_msg_data);
449: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
450: IBE_Util.Debug('Unknown error IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2()');
451: END IF;
452:
453:
446: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
447: p_count => x_msg_count ,
448: p_data => x_msg_data);
449: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
450: IBE_Util.Debug('Unknown error IBE_QUOTE_SAVESHARE_V2_PVT.save_share_v2()');
451: END IF;
452:
453:
454: END;
569: --API Body start
570: -------------------------------------------------------------------------------------------------------------
571:
572:
573: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
574: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_recipients: START');
575: END IF;
576: /*Obtain the party id of the user performing the action on the UI from the env*/
577: FOR rec_userenv_partyid in c_userenv_partyid LOOP
570: -------------------------------------------------------------------------------------------------------------
571:
572:
573: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
574: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_recipients: START');
575: END IF;
576: /*Obtain the party id of the user performing the action on the UI from the env*/
577: FOR rec_userenv_partyid in c_userenv_partyid LOOP
578: l_sharing_partyid := rec_userenv_partyid.customer_id;
595: and quote_hdr_id available in the input quote access record.
596: This query will tell us if there is already a recipiet record avialable to re-use.*/
597: --Old_access_level will be relevant only when the Op-code in P_Quote_access_tbl(counter) is UPDATE
598: --Old_access_level will be passed to notify_access_change API
599: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
600: IBE_UTIL.DEBUG('Incoming Quote_sharee_id = '||P_Quote_access_tbl(counter).quote_sharee_id);
601: IBE_UTIL.DEBUG('Incoming Quote_header_id = '||P_Quote_access_tbl(counter).quote_header_id);
602: IBE_UTIL.DEBUG('Incoming party_id = '||P_Quote_access_tbl(counter).party_id);
603: END IF;
596: This query will tell us if there is already a recipiet record avialable to re-use.*/
597: --Old_access_level will be relevant only when the Op-code in P_Quote_access_tbl(counter) is UPDATE
598: --Old_access_level will be passed to notify_access_change API
599: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
600: IBE_UTIL.DEBUG('Incoming Quote_sharee_id = '||P_Quote_access_tbl(counter).quote_sharee_id);
601: IBE_UTIL.DEBUG('Incoming Quote_header_id = '||P_Quote_access_tbl(counter).quote_header_id);
602: IBE_UTIL.DEBUG('Incoming party_id = '||P_Quote_access_tbl(counter).party_id);
603: END IF;
604:
597: --Old_access_level will be relevant only when the Op-code in P_Quote_access_tbl(counter) is UPDATE
598: --Old_access_level will be passed to notify_access_change API
599: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
600: IBE_UTIL.DEBUG('Incoming Quote_sharee_id = '||P_Quote_access_tbl(counter).quote_sharee_id);
601: IBE_UTIL.DEBUG('Incoming Quote_header_id = '||P_Quote_access_tbl(counter).quote_header_id);
602: IBE_UTIL.DEBUG('Incoming party_id = '||P_Quote_access_tbl(counter).party_id);
603: END IF;
604:
605: IF(((P_Quote_access_tbl(counter).quote_sharee_id is not null) and
598: --Old_access_level will be passed to notify_access_change API
599: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
600: IBE_UTIL.DEBUG('Incoming Quote_sharee_id = '||P_Quote_access_tbl(counter).quote_sharee_id);
601: IBE_UTIL.DEBUG('Incoming Quote_header_id = '||P_Quote_access_tbl(counter).quote_header_id);
602: IBE_UTIL.DEBUG('Incoming party_id = '||P_Quote_access_tbl(counter).party_id);
603: END IF;
604:
605: IF(((P_Quote_access_tbl(counter).quote_sharee_id is not null) and
606: (P_Quote_access_tbl(counter).quote_sharee_id <> FND_API.G_MISS_NUM))or
642: END IF;
643: EXIT WHEN c_recip_details%notfound;
644: END LOOP;
645: ELSE
646: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
647: IBE_UTIL.DEBUG('Cannot query recipient details ,recipient_id is null or g_miss');
648: IBE_UTIL.DEBUG('Saving recipients for first time?!');
649: END IF;
650: END IF; --if p_quote_access_tbl(counter).quote_sharee_id is not null and g_miss
643: EXIT WHEN c_recip_details%notfound;
644: END LOOP;
645: ELSE
646: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
647: IBE_UTIL.DEBUG('Cannot query recipient details ,recipient_id is null or g_miss');
648: IBE_UTIL.DEBUG('Saving recipients for first time?!');
649: END IF;
650: END IF; --if p_quote_access_tbl(counter).quote_sharee_id is not null and g_miss
651:
644: END LOOP;
645: ELSE
646: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
647: IBE_UTIL.DEBUG('Cannot query recipient details ,recipient_id is null or g_miss');
648: IBE_UTIL.DEBUG('Saving recipients for first time?!');
649: END IF;
650: END IF; --if p_quote_access_tbl(counter).quote_sharee_id is not null and g_miss
651:
652: /*Processing the recipients in the input access table according to the op-codes
653: corresponding to each recipient record*/
654: --Start with 'CREATE' op_code
655: IF( p_quote_access_tbl(counter).operation_code = 'CREATE') THEN
656:
657: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
658: IBE_UTIL.DEBUG('Operation code in quote_access_tbl is '||p_quote_access_tbl(counter).operation_code);
659: END IF;
660: /*Open this cursor to check if there are any inactive(end-dated) rows existing in sh_quote_access
661: for this party, cust and quote combination */
654: --Start with 'CREATE' op_code
655: IF( p_quote_access_tbl(counter).operation_code = 'CREATE') THEN
656:
657: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
658: IBE_UTIL.DEBUG('Operation code in quote_access_tbl is '||p_quote_access_tbl(counter).operation_code);
659: END IF;
660: /*Open this cursor to check if there are any inactive(end-dated) rows existing in sh_quote_access
661: for this party, cust and quote combination */
662: /*If there is an end-dated record present for the given combination of party, cust_account,
660: /*Open this cursor to check if there are any inactive(end-dated) rows existing in sh_quote_access
661: for this party, cust and quote combination */
662: /*If there is an end-dated record present for the given combination of party, cust_account,
663: quote_hdr in quote_access then use this record, else insert a new record*/
664: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
665: IBE_UTIL.DEBUG('Save_recipients: Opening c_get_created_recip');
666: IBE_UTIL.DEBUG('Save_recipients: FND_GLOBAL.USER_ID: '||FND_GLOBAL.USER_ID);
667: END IF;
668: l_quote_access_rec.quote_sharee_id := FND_API.G_MISS_NUM;
661: for this party, cust and quote combination */
662: /*If there is an end-dated record present for the given combination of party, cust_account,
663: quote_hdr in quote_access then use this record, else insert a new record*/
664: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
665: IBE_UTIL.DEBUG('Save_recipients: Opening c_get_created_recip');
666: IBE_UTIL.DEBUG('Save_recipients: FND_GLOBAL.USER_ID: '||FND_GLOBAL.USER_ID);
667: END IF;
668: l_quote_access_rec.quote_sharee_id := FND_API.G_MISS_NUM;
669: FOR rec_get_created_recip in c_get_created_recip(p_quote_access_tbl(counter).quote_header_id,
662: /*If there is an end-dated record present for the given combination of party, cust_account,
663: quote_hdr in quote_access then use this record, else insert a new record*/
664: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
665: IBE_UTIL.DEBUG('Save_recipients: Opening c_get_created_recip');
666: IBE_UTIL.DEBUG('Save_recipients: FND_GLOBAL.USER_ID: '||FND_GLOBAL.USER_ID);
667: END IF;
668: l_quote_access_rec.quote_sharee_id := FND_API.G_MISS_NUM;
669: FOR rec_get_created_recip in c_get_created_recip(p_quote_access_tbl(counter).quote_header_id,
670: p_quote_access_tbl(counter).party_id,
669: FOR rec_get_created_recip in c_get_created_recip(p_quote_access_tbl(counter).quote_header_id,
670: p_quote_access_tbl(counter).party_id,
671: FND_GLOBAL.USER_ID) LOOP
672: l_quote_access_rec.quote_sharee_id := rec_get_created_recip.quote_sharee_id;
673: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
674: IBE_UTIL.DEBUG('Save_recipients: rec_get_created_recip found quote_sharee_id: '||l_quote_access_rec.quote_sharee_id);
675: END IF;
676:
677: EXIT when c_get_created_recip%NOTFOUND;
670: p_quote_access_tbl(counter).party_id,
671: FND_GLOBAL.USER_ID) LOOP
672: l_quote_access_rec.quote_sharee_id := rec_get_created_recip.quote_sharee_id;
673: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
674: IBE_UTIL.DEBUG('Save_recipients: rec_get_created_recip found quote_sharee_id: '||l_quote_access_rec.quote_sharee_id);
675: END IF;
676:
677: EXIT when c_get_created_recip%NOTFOUND;
678: END LOOP;
677: EXIT when c_get_created_recip%NOTFOUND;
678: END LOOP;
679: IF (l_quote_access_rec.quote_sharee_id is not null AND
680: l_quote_access_rec.quote_sharee_id <> FND_API.G_MISS_NUM) THEN
681: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
682: IBE_UTIL.DEBUG('Record found for the recipient in quote_access table, need to update it');
683: END IF;
684:
685: IBE_SH_QUOTE_ACCESS_PKG.update_Row(
678: END LOOP;
679: IF (l_quote_access_rec.quote_sharee_id is not null AND
680: l_quote_access_rec.quote_sharee_id <> FND_API.G_MISS_NUM) THEN
681: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
682: IBE_UTIL.DEBUG('Record found for the recipient in quote_access table, need to update it');
683: END IF;
684:
685: IBE_SH_QUOTE_ACCESS_PKG.update_Row(
686: p_quote_sharee_id => l_quote_access_rec.quote_sharee_id
690: ,p_update_privilege_type_code => p_quote_access_tbl(counter).update_privilege_type_code
691: ,p_contact_point_id => p_quote_access_tbl(counter).contact_point_id
692: ,p_start_date_active => sysdate
693: ,p_end_date_active => null);
694: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
695: IBE_UTIL.DEBUG('Finsihed calling update handler of quote_access table');
696: END IF;
697: --Calling save_contact_point for the updated recipient record just in case the
698: --contact point has changed
691: ,p_contact_point_id => p_quote_access_tbl(counter).contact_point_id
692: ,p_start_date_active => sysdate
693: ,p_end_date_active => null);
694: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
695: IBE_UTIL.DEBUG('Finsihed calling update handler of quote_access table');
696: END IF;
697: --Calling save_contact_point for the updated recipient record just in case the
698: --contact point has changed
699: IF(p_quote_access_tbl(counter).contact_point_id is null and
701: l_call_save_contact_point := FND_API.G_TRUE;
702: END IF;
703:
704: ELSE --Need to create a new record
705: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
706: IBE_UTIL.DEBUG('Record not found for this recipient in quote_access table');
707: END IF;
708: --Obtain the recipient number here
709: select IBE_SH_QUOTE_ACCESS_s1.nextval into l_quote_recip_id
702: END IF;
703:
704: ELSE --Need to create a new record
705: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
706: IBE_UTIL.DEBUG('Record not found for this recipient in quote_access table');
707: END IF;
708: --Obtain the recipient number here
709: select IBE_SH_QUOTE_ACCESS_s1.nextval into l_quote_recip_id
710: from dual;
707: END IF;
708: --Obtain the recipient number here
709: select IBE_SH_QUOTE_ACCESS_s1.nextval into l_quote_recip_id
710: from dual;
711: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
712: IBE_UTIL.DEBUG('sharee id from the sequence is '||l_quote_recip_id );
713: END IF;
714:
715: IBE_QUOTE_SAVESHARE_pvt.GenerateShareeNumber(
708: --Obtain the recipient number here
709: select IBE_SH_QUOTE_ACCESS_s1.nextval into l_quote_recip_id
710: from dual;
711: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
712: IBE_UTIL.DEBUG('sharee id from the sequence is '||l_quote_recip_id );
713: END IF;
714:
715: IBE_QUOTE_SAVESHARE_pvt.GenerateShareeNumber(
716: p_quote_header_id => p_quote_header_id,
716: p_quote_header_id => p_quote_header_id,
717: p_recip_id => l_quote_recip_id,
718: x_sharee_number => l_quote_access_rec.quote_sharee_number);
719:
720: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
721: IBE_UTIL.DEBUG('sharee number is '||l_quote_access_rec.quote_sharee_number );
722: END IF;
723:
724: --Deal with saving the contact point here
717: p_recip_id => l_quote_recip_id,
718: x_sharee_number => l_quote_access_rec.quote_sharee_number);
719:
720: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
721: IBE_UTIL.DEBUG('sharee number is '||l_quote_access_rec.quote_sharee_number );
722: END IF;
723:
724: --Deal with saving the contact point here
725: /*A contact point is created when there is an input e-mail address and a null
727: IF (p_quote_access_tbl(counter).EMAIL_CONTACT_ADDRESS is not null
728: and p_quote_access_tbl(counter).EMAIL_CONTACT_ADDRESS <> fnd_api.g_miss_char
729: and (p_quote_access_tbl(counter).contact_point_id is null or
730: p_quote_access_tbl(counter).contact_point_id = FND_API.G_MISS_NUM)) THEN
731: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
732: IBE_UTIL.DEBUG('saving contact point for the current recipient record');
733: END IF;
734: l_call_save_contact_point := FND_API.G_TRUE;
735:
728: and p_quote_access_tbl(counter).EMAIL_CONTACT_ADDRESS <> fnd_api.g_miss_char
729: and (p_quote_access_tbl(counter).contact_point_id is null or
730: p_quote_access_tbl(counter).contact_point_id = FND_API.G_MISS_NUM)) THEN
731: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
732: IBE_UTIL.DEBUG('saving contact point for the current recipient record');
733: END IF;
734: l_call_save_contact_point := FND_API.G_TRUE;
735:
736: --This is the case when the incoming B2B record has a valid contact_point_id
735:
736: --This is the case when the incoming B2B record has a valid contact_point_id
737: ELSIF((p_quote_access_tbl(counter).contact_point_id is not null )
738: and (p_quote_access_tbl(counter).contact_point_id <> FND_API.G_MISS_NUM)) THEN
739: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
740: IBE_UTIL.DEBUG('Contact point Id found in the input quote access record');
741: END IF;
742: l_contact_point_id := p_quote_access_tbl(counter).contact_point_id;
743:
736: --This is the case when the incoming B2B record has a valid contact_point_id
737: ELSIF((p_quote_access_tbl(counter).contact_point_id is not null )
738: and (p_quote_access_tbl(counter).contact_point_id <> FND_API.G_MISS_NUM)) THEN
739: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
740: IBE_UTIL.DEBUG('Contact point Id found in the input quote access record');
741: END IF;
742: l_contact_point_id := p_quote_access_tbl(counter).contact_point_id;
743:
744: END IF;--save_contact_point
747: END IF;-- existing recip or new recip
748:
749: --Constructing the URL here
750: l_url := p_url||l_quote_access_rec.quote_sharee_number;
751: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
752: IBE_UTIL.DEBUG('URL of shared cart is: '||l_url);
753: END IF;
754:
755: --Saving the contact_point here
748:
749: --Constructing the URL here
750: l_url := p_url||l_quote_access_rec.quote_sharee_number;
751: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
752: IBE_UTIL.DEBUG('URL of shared cart is: '||l_url);
753: END IF;
754:
755: --Saving the contact_point here
756: IF l_call_save_contact_point = FND_API.G_TRUE THEN
771: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
772: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
773: END IF;
774:
775: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
776: IBE_UTIL.DEBUG('Done saving contact point: '||l_contact_point_id);
777: END IF;
778: l_quote_access_rec.contact_point_id := l_contact_point_id;
779:
772: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
773: END IF;
774:
775: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
776: IBE_UTIL.DEBUG('Done saving contact point: '||l_contact_point_id);
777: END IF;
778: l_quote_access_rec.contact_point_id := l_contact_point_id;
779:
780: END IF;-- l_call_save_contact_point
779:
780: END IF;-- l_call_save_contact_point
781:
782: IF (l_call_insert_handler = FND_API.G_TRUE) THEN
783: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
784: IBE_UTIL.DEBUG('calling ins handler ');
785: IBE_UTIL.DEBUG('p_quote_access_tbl(counter).recipient_name: '||p_quote_access_tbl(counter).recipient_name);
786: END IF;
787: IBE_SH_QUOTE_ACCESS_PKG.Insert_Row(
780: END IF;-- l_call_save_contact_point
781:
782: IF (l_call_insert_handler = FND_API.G_TRUE) THEN
783: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
784: IBE_UTIL.DEBUG('calling ins handler ');
785: IBE_UTIL.DEBUG('p_quote_access_tbl(counter).recipient_name: '||p_quote_access_tbl(counter).recipient_name);
786: END IF;
787: IBE_SH_QUOTE_ACCESS_PKG.Insert_Row(
788: p_quote_sharee_id => l_quote_recip_id,
781:
782: IF (l_call_insert_handler = FND_API.G_TRUE) THEN
783: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
784: IBE_UTIL.DEBUG('calling ins handler ');
785: IBE_UTIL.DEBUG('p_quote_access_tbl(counter).recipient_name: '||p_quote_access_tbl(counter).recipient_name);
786: END IF;
787: IBE_SH_QUOTE_ACCESS_PKG.Insert_Row(
788: p_quote_sharee_id => l_quote_recip_id,
789: p_quote_header_id => p_quote_header_id,
792: p_party_id => p_quote_access_tbl(counter).party_id,
793: p_cust_account_id => p_quote_access_tbl(counter).cust_account_id,
794: p_recipient_name => p_quote_access_tbl(counter).recipient_name,
795: p_contact_point_id => l_contact_point_id);
796: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
797: IBE_UTIL.DEBUG('finished inserting ');
798: END IF;
799: END IF;
800: l_quote_access_rec.quote_sharee_id := l_quote_recip_id;
793: p_cust_account_id => p_quote_access_tbl(counter).cust_account_id,
794: p_recipient_name => p_quote_access_tbl(counter).recipient_name,
795: p_contact_point_id => l_contact_point_id);
796: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
797: IBE_UTIL.DEBUG('finished inserting ');
798: END IF;
799: END IF;
800: l_quote_access_rec.quote_sharee_id := l_quote_recip_id;
801: --calling the new shared cart notification API here
825: --DBMS_OUTPUT.PUT_LINE('Done calling the new shared cart notification API ');
826:
827: ELSIF(p_quote_access_tbl(counter).operation_code = 'UPDATE') THEN
828:
829: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
830: IBE_UTIL.DEBUG('Operation code in quote_access_table is UPDATE');
831: END IF;
832: IF((l_quote_access_rec.update_privilege_type_code is not null) and
833: (l_quote_access_rec.update_privilege_type_code <> FND_API.G_MISS_CHAR) and
826:
827: ELSIF(p_quote_access_tbl(counter).operation_code = 'UPDATE') THEN
828:
829: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
830: IBE_UTIL.DEBUG('Operation code in quote_access_table is UPDATE');
831: END IF;
832: IF((l_quote_access_rec.update_privilege_type_code is not null) and
833: (l_quote_access_rec.update_privilege_type_code <> FND_API.G_MISS_CHAR) and
834: (l_old_access_level <> l_quote_access_rec.update_privilege_type_code)) then
831: END IF;
832: IF((l_quote_access_rec.update_privilege_type_code is not null) and
833: (l_quote_access_rec.update_privilege_type_code <> FND_API.G_MISS_CHAR) and
834: (l_old_access_level <> l_quote_access_rec.update_privilege_type_code)) then
835: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
836: IBE_UTIL.DEBUG('Calling IBE_SH_QUOTE_ACCESS_PKG.Update_Row to update the recip record');
837: IBE_UTIL.DEBUG('p_quote_access_tbl(counter).quote_sharee_id: '||p_quote_access_tbl(counter).quote_sharee_id);
838: END IF;
839:
832: IF((l_quote_access_rec.update_privilege_type_code is not null) and
833: (l_quote_access_rec.update_privilege_type_code <> FND_API.G_MISS_CHAR) and
834: (l_old_access_level <> l_quote_access_rec.update_privilege_type_code)) then
835: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
836: IBE_UTIL.DEBUG('Calling IBE_SH_QUOTE_ACCESS_PKG.Update_Row to update the recip record');
837: IBE_UTIL.DEBUG('p_quote_access_tbl(counter).quote_sharee_id: '||p_quote_access_tbl(counter).quote_sharee_id);
838: END IF;
839:
840: IBE_SH_QUOTE_ACCESS_PKG.Update_Row(
833: (l_quote_access_rec.update_privilege_type_code <> FND_API.G_MISS_CHAR) and
834: (l_old_access_level <> l_quote_access_rec.update_privilege_type_code)) then
835: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
836: IBE_UTIL.DEBUG('Calling IBE_SH_QUOTE_ACCESS_PKG.Update_Row to update the recip record');
837: IBE_UTIL.DEBUG('p_quote_access_tbl(counter).quote_sharee_id: '||p_quote_access_tbl(counter).quote_sharee_id);
838: END IF;
839:
840: IBE_SH_QUOTE_ACCESS_PKG.Update_Row(
841: p_QUOTE_HEADER_ID => p_quote_header_id,
841: p_QUOTE_HEADER_ID => p_quote_header_id,
842: p_quote_sharee_id => p_quote_access_tbl(counter).quote_sharee_id,
843: p_UPDATE_PRIVILEGE_TYPE_CODE => p_quote_access_tbl(counter).update_privilege_type_code);
844:
845: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
846: IBE_UTIL.DEBUG('Done IBE_SH_QUOTE_ACCESS_PKG.Update_Row ');
847: END IF;
848:
849: /*If access level is being downgraded to 'read-only' */
842: p_quote_sharee_id => p_quote_access_tbl(counter).quote_sharee_id,
843: p_UPDATE_PRIVILEGE_TYPE_CODE => p_quote_access_tbl(counter).update_privilege_type_code);
844:
845: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
846: IBE_UTIL.DEBUG('Done IBE_SH_QUOTE_ACCESS_PKG.Update_Row ');
847: END IF;
848:
849: /*If access level is being downgraded to 'read-only' */
850: IF(p_quote_access_tbl(counter).UPDATE_PRIVILEGE_TYPE_CODE = 'R') THEN
847: END IF;
848:
849: /*If access level is being downgraded to 'read-only' */
850: IF(p_quote_access_tbl(counter).UPDATE_PRIVILEGE_TYPE_CODE = 'R') THEN
851: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
852: IBE_UTIL.DEBUG('Update privilege type is downgraded to read-only');
853: END IF;
854: FOR rec_check_active_cart in c_check_active_cart(l_quote_access_rec.party_id ,
855: l_quote_access_rec.cust_account_id) loop
848:
849: /*If access level is being downgraded to 'read-only' */
850: IF(p_quote_access_tbl(counter).UPDATE_PRIVILEGE_TYPE_CODE = 'R') THEN
851: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
852: IBE_UTIL.DEBUG('Update privilege type is downgraded to read-only');
853: END IF;
854: FOR rec_check_active_cart in c_check_active_cart(l_quote_access_rec.party_id ,
855: l_quote_access_rec.cust_account_id) loop
856: l_quote_present := rec_check_active_cart.quote_header_id;
853: END IF;
854: FOR rec_check_active_cart in c_check_active_cart(l_quote_access_rec.party_id ,
855: l_quote_access_rec.cust_account_id) loop
856: l_quote_present := rec_check_active_cart.quote_header_id;
857: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
858: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||'as active cart');
859: END IF;
860: IF((l_quote_present is not null) AND (p_quote_header_id = l_quote_present)) THEN
861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
854: FOR rec_check_active_cart in c_check_active_cart(l_quote_access_rec.party_id ,
855: l_quote_access_rec.cust_account_id) loop
856: l_quote_present := rec_check_active_cart.quote_header_id;
857: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
858: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||'as active cart');
859: END IF;
860: IF((l_quote_present is not null) AND (p_quote_header_id = l_quote_present)) THEN
861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
862: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||' shared cart as the active-cart , delete this while downgrading level');
857: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
858: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||'as active cart');
859: END IF;
860: IF((l_quote_present is not null) AND (p_quote_header_id = l_quote_present)) THEN
861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
862: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||' shared cart as the active-cart , delete this while downgrading level');
863: END IF;
864: --if this recipient has this shared cart as the active cart , then need to delete this
865: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
858: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||'as active cart');
859: END IF;
860: IF((l_quote_present is not null) AND (p_quote_header_id = l_quote_present)) THEN
861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
862: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||' shared cart as the active-cart , delete this while downgrading level');
863: END IF;
864: --if this recipient has this shared cart as the active cart , then need to delete this
865: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
866: IBE_UTIL.DEBUG('Calling delete handler of active_quotes_all table');
861: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
862: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||' shared cart as the active-cart , delete this while downgrading level');
863: END IF;
864: --if this recipient has this shared cart as the active cart , then need to delete this
865: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
866: IBE_UTIL.DEBUG('Calling delete handler of active_quotes_all table');
867: END IF;
868:
869: IBE_ACTIVE_QUOTES_ALL_PKG.UPDATE_ROW(
862: IBE_UTIL.DEBUG('Recipient has '||l_quote_present||' shared cart as the active-cart , delete this while downgrading level');
863: END IF;
864: --if this recipient has this shared cart as the active cart , then need to delete this
865: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
866: IBE_UTIL.DEBUG('Calling delete handler of active_quotes_all table');
867: END IF;
868:
869: IBE_ACTIVE_QUOTES_ALL_PKG.UPDATE_ROW(
870: x_object_version_number => 1,
875: X_CURRENCY_CODE => null,
876: x_last_update_date => sysdate,
877: x_last_updated_by => fnd_global.user_id,
878: x_last_update_login => 1);
879: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
880: IBE_UTIL.DEBUG('Done calling Update handler of active_quotes_all table to erase the quote header id' );
881: END IF;
882: END IF;
883: EXIT WHEN c_check_active_cart%NOTFOUND;
876: x_last_update_date => sysdate,
877: x_last_updated_by => fnd_global.user_id,
878: x_last_update_login => 1);
879: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
880: IBE_UTIL.DEBUG('Done calling Update handler of active_quotes_all table to erase the quote header id' );
881: END IF;
882: END IF;
883: EXIT WHEN c_check_active_cart%NOTFOUND;
884: END LOOP; -- for c_check_active_cart
885: END IF; -- when privelege is read_only
886:
887: -- new access level is available in the quote access record
888: IF(p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) THEN
889: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
890: IBE_UTIL.DEBUG('Save_recipients: Ready to call Notify_access_change' );
891: END IF;
892: --dbms_output.put_line('Save_recipients: Ready to call Notify_access_change ');
893: IBE_WORKFLOW_PVT.Notify_access_change(
886:
887: -- new access level is available in the quote access record
888: IF(p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) THEN
889: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
890: IBE_UTIL.DEBUG('Save_recipients: Ready to call Notify_access_change' );
891: END IF;
892: --dbms_output.put_line('Save_recipients: Ready to call Notify_access_change ');
893: IBE_WORKFLOW_PVT.Notify_access_change(
894: p_api_version => p_api_version ,
911: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
912: END IF;
913: END IF; -- end if notify flag = true for notify access change email
914: ELSE
915: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
916: IBE_UTIL.DEBUG('Opcode was update but access level has not changed. Consider generic email');
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
912: END IF;
913: END IF; -- end if notify flag = true for notify access change email
914: ELSE
915: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
916: IBE_UTIL.DEBUG('Opcode was update but access level has not changed. Consider generic email');
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
920: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.qute_sharee_num: '||l_quote_access_rec.quote_sharee_number);
913: END IF; -- end if notify flag = true for notify access change email
914: ELSE
915: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
916: IBE_UTIL.DEBUG('Opcode was update but access level has not changed. Consider generic email');
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
920: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.qute_sharee_num: '||l_quote_access_rec.quote_sharee_number);
921: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.party_id: '||l_quote_access_rec.party_id);
914: ELSE
915: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
916: IBE_UTIL.DEBUG('Opcode was update but access level has not changed. Consider generic email');
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
920: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.qute_sharee_num: '||l_quote_access_rec.quote_sharee_number);
921: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.party_id: '||l_quote_access_rec.party_id);
922: END IF;
915: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
916: IBE_UTIL.DEBUG('Opcode was update but access level has not changed. Consider generic email');
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
920: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.qute_sharee_num: '||l_quote_access_rec.quote_sharee_number);
921: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.party_id: '||l_quote_access_rec.party_id);
922: END IF;
923: IF ((p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) AND
916: IBE_UTIL.DEBUG('Opcode was update but access level has not changed. Consider generic email');
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
920: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.qute_sharee_num: '||l_quote_access_rec.quote_sharee_number);
921: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.party_id: '||l_quote_access_rec.party_id);
922: END IF;
923: IF ((p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) AND
924: (nvl(l_quote_access_rec.party_id,-1) <> l_sharing_partyid)) THEN
917: IBE_UTIL.DEBUG('view_shared_cart: l_sharing_partyid : ' || l_sharing_partyid);
918: IBE_UTIL.DEBUG('view_shared_cart: l_owner_partyid : ' || l_owner_partyid);
919: IBE_UTIL.DEBUG('view_shared_cart: p_notes : ' || p_notes);
920: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.qute_sharee_num: '||l_quote_access_rec.quote_sharee_number);
921: IBE_UTIL.DEBUG('view_shared_cart: l_quote_access_rec.party_id: '||l_quote_access_rec.party_id);
922: END IF;
923: IF ((p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) AND
924: (nvl(l_quote_access_rec.party_id,-1) <> l_sharing_partyid)) THEN
925: l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE := l_old_access_level;
922: END IF;
923: IF ((p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) AND
924: (nvl(l_quote_access_rec.party_id,-1) <> l_sharing_partyid)) THEN
925: l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE := l_old_access_level;
926: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
927: IBE_UTIL.DEBUG('l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE '||l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE);
928: END IF;
929: IBE_WORKFLOW_PVT.Notify_view_shared_cart(
930: p_api_version => p_api_version ,
923: IF ((p_quote_access_tbl(counter).notify_flag = FND_API.G_TRUE) AND
924: (nvl(l_quote_access_rec.party_id,-1) <> l_sharing_partyid)) THEN
925: l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE := l_old_access_level;
926: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
927: IBE_UTIL.DEBUG('l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE '||l_quote_access_rec.UPDATE_PRIVILEGE_TYPE_CODE);
928: END IF;
929: IBE_WORKFLOW_PVT.Notify_view_shared_cart(
930: p_api_version => p_api_version ,
931: p_init_msg_list => p_init_msg_list ,
948: ELSIF(p_quote_access_tbl(counter).operation_code = 'DELETE') then
949: --ELSE --orig functionality was to default to delete, so we've got to keep it that way
950: --IF(p_quote_access_tbl(counter).operation_code = 'DELETE') THEN --OPERATION_CODE IS DELETE
951: --DBMS_OUTPUT.PUT_LINE('Operation code in save recip is delete: Caling delete_recipient');
952: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
953: IBE_UTIL.DEBUG('Operation code in save recip is delete');
954: IBE_UTIL.DEBUG('Calling delete_recipient');
955: IBE_UTIL.DEBUG('l_quote_access_rec.quote_sharee_id: '||l_quote_access_rec.quote_sharee_id);
956: END IF;
949: --ELSE --orig functionality was to default to delete, so we've got to keep it that way
950: --IF(p_quote_access_tbl(counter).operation_code = 'DELETE') THEN --OPERATION_CODE IS DELETE
951: --DBMS_OUTPUT.PUT_LINE('Operation code in save recip is delete: Caling delete_recipient');
952: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
953: IBE_UTIL.DEBUG('Operation code in save recip is delete');
954: IBE_UTIL.DEBUG('Calling delete_recipient');
955: IBE_UTIL.DEBUG('l_quote_access_rec.quote_sharee_id: '||l_quote_access_rec.quote_sharee_id);
956: END IF;
957:
950: --IF(p_quote_access_tbl(counter).operation_code = 'DELETE') THEN --OPERATION_CODE IS DELETE
951: --DBMS_OUTPUT.PUT_LINE('Operation code in save recip is delete: Caling delete_recipient');
952: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
953: IBE_UTIL.DEBUG('Operation code in save recip is delete');
954: IBE_UTIL.DEBUG('Calling delete_recipient');
955: IBE_UTIL.DEBUG('l_quote_access_rec.quote_sharee_id: '||l_quote_access_rec.quote_sharee_id);
956: END IF;
957:
958: IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
951: --DBMS_OUTPUT.PUT_LINE('Operation code in save recip is delete: Caling delete_recipient');
952: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
953: IBE_UTIL.DEBUG('Operation code in save recip is delete');
954: IBE_UTIL.DEBUG('Calling delete_recipient');
955: IBE_UTIL.DEBUG('l_quote_access_rec.quote_sharee_id: '||l_quote_access_rec.quote_sharee_id);
956: END IF;
957:
958: IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
959: P_Quote_access_rec => l_quote_access_rec ,
969: END IF;
970: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
971: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
972: END IF;
973: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
974: IBE_UTIL.DEBUG('Done calling delete_recipient');
975: END IF;
976: END IF ;--FOR OPERATION CODE
977: END LOOP; -- end loop over input table of recipients
970: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
971: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
972: END IF;
973: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
974: IBE_UTIL.DEBUG('Done calling delete_recipient');
975: END IF;
976: END IF ;--FOR OPERATION CODE
977: END LOOP; -- end loop over input table of recipients
978:
979: --To send a generic notification to the owner of the cart
980: l_quote_access_rec_owr.party_id := l_owner_partyid;
981: l_quote_access_rec_owr.quote_header_id := P_Quote_header_id;
982:
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.DEBUG('l_sharing_partyid: '||l_sharing_partyid);
985: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_partyid);
986: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_accountid);
987: END IF;
980: l_quote_access_rec_owr.party_id := l_owner_partyid;
981: l_quote_access_rec_owr.quote_header_id := P_Quote_header_id;
982:
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.DEBUG('l_sharing_partyid: '||l_sharing_partyid);
985: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_partyid);
986: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_accountid);
987: END IF;
988:
981: l_quote_access_rec_owr.quote_header_id := P_Quote_header_id;
982:
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.DEBUG('l_sharing_partyid: '||l_sharing_partyid);
985: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_partyid);
986: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_accountid);
987: END IF;
988:
989: IF (l_sharing_partyid <> l_owner_partyid) THEN
982:
983: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
984: IBE_UTIL.DEBUG('l_sharing_partyid: '||l_sharing_partyid);
985: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_partyid);
986: IBE_UTIL.DEBUG('l_owner_partyid: '||l_owner_accountid);
987: END IF;
988:
989: IF (l_sharing_partyid <> l_owner_partyid) THEN
990: -- for generic email to owner, we need to add some special parameters since we will not have a retrieval number
988:
989: IF (l_sharing_partyid <> l_owner_partyid) THEN
990: -- for generic email to owner, we need to add some special parameters since we will not have a retrieval number
991: l_url := p_url || '&opid=' || l_owner_partyid || '&oaid=' || l_owner_accountid;
992: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
993: IBE_UTIL.DEBUG('url for generic email to OWNER: '||l_url);
994: END IF;
995: IBE_WORKFLOW_PVT.Notify_view_shared_cart(
996: p_api_version => p_api_version
989: IF (l_sharing_partyid <> l_owner_partyid) THEN
990: -- for generic email to owner, we need to add some special parameters since we will not have a retrieval number
991: l_url := p_url || '&opid=' || l_owner_partyid || '&oaid=' || l_owner_accountid;
992: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
993: IBE_UTIL.DEBUG('url for generic email to OWNER: '||l_url);
994: END IF;
995: IBE_WORKFLOW_PVT.Notify_view_shared_cart(
996: p_api_version => p_api_version
997: ,p_init_msg_list => p_init_msg_list
1022: -- Standard call to get message count and if count is 1, get message info.
1023: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1024: p_count => x_msg_count ,
1025: p_data => x_msg_data);
1026: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1027: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_recipients: END');
1028: END IF;
1029:
1030: EXCEPTION
1023: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1024: p_count => x_msg_count ,
1025: p_data => x_msg_data);
1026: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1027: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.save_recipients: END');
1028: END IF;
1029:
1030: EXCEPTION
1031: WHEN FND_API.G_EXC_ERROR THEN
1033: x_return_status := FND_API.G_RET_STS_ERROR;
1034: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1035: p_count => x_msg_count ,
1036: p_data => x_msg_data);
1037: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1038: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.SAVE_RECIPIENTS()');
1039: END IF;
1040:
1041: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1034: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1035: p_count => x_msg_count ,
1036: p_data => x_msg_data);
1037: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1038: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.SAVE_RECIPIENTS()');
1039: END IF;
1040:
1041: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1042: ROLLBACK TO SAVERECIPIENTS_V2;
1043: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1044: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1045: p_count => x_msg_count ,
1046: p_data => x_msg_data);
1047: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1048: IBE_Util.Debug('Unxpected error in IBE_QUOTE_SAVESHARE_V2_PVT.SAVE_RECIPIENTS()');
1049: END IF;
1050:
1051: WHEN OTHERS THEN
1044: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1045: p_count => x_msg_count ,
1046: p_data => x_msg_data);
1047: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1048: IBE_Util.Debug('Unxpected error in IBE_QUOTE_SAVESHARE_V2_PVT.SAVE_RECIPIENTS()');
1049: END IF;
1050:
1051: WHEN OTHERS THEN
1052: ROLLBACK TO SAVERECIPIENTS_V2;
1057: END IF;
1058: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1059: p_count => x_msg_count ,
1060: p_data => x_msg_data);
1061: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1062: IBE_Util.Debug('Unknown exception IBE_QUOTE_SAVESHARE_V2_PVT.SAVE_RECIPIENTS()');
1063: END IF;
1064:
1065: END;
1058: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1059: p_count => x_msg_count ,
1060: p_data => x_msg_data);
1061: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1062: IBE_Util.Debug('Unknown exception IBE_QUOTE_SAVESHARE_V2_PVT.SAVE_RECIPIENTS()');
1063: END IF;
1064:
1065: END;
1066:
1128: BEGIN
1129:
1130: SAVEPOINT ACTIVATEQUOTE_V2;
1131: -- Standard call to check for call compatibility.
1132: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1133: IBE_UTIL.DEBUG('Activate_quote:Before caling the compatible_api_call API');
1134: END IF;
1135: IF NOT FND_API.Compatible_API_Call ( l_api_version,
1136: P_Api_Version,
1129:
1130: SAVEPOINT ACTIVATEQUOTE_V2;
1131: -- Standard call to check for call compatibility.
1132: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1133: IBE_UTIL.DEBUG('Activate_quote:Before caling the compatible_api_call API');
1134: END IF;
1135: IF NOT FND_API.Compatible_API_Call ( l_api_version,
1136: P_Api_Version,
1137: l_api_name,
1147: -- Initialize API return status to success
1148: x_return_status := FND_API.G_RET_STS_SUCCESS;
1149:
1150:
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1153: IBE_UTIL.DEBUG('p_party_id : '||p_party_id);
1154: IBE_UTIL.DEBUG('p_cust_account_id: '||p_cust_account_id);
1155: IBE_UTIL.DEBUG('p_retrieval_number: '||p_retrieval_number);
1148: x_return_status := FND_API.G_RET_STS_SUCCESS;
1149:
1150:
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1153: IBE_UTIL.DEBUG('p_party_id : '||p_party_id);
1154: IBE_UTIL.DEBUG('p_cust_account_id: '||p_cust_account_id);
1155: IBE_UTIL.DEBUG('p_retrieval_number: '||p_retrieval_number);
1156: IBE_UTIL.DEBUG('p_quote_header_id: '||p_quote_header_rec.quote_header_id);
1149:
1150:
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1153: IBE_UTIL.DEBUG('p_party_id : '||p_party_id);
1154: IBE_UTIL.DEBUG('p_cust_account_id: '||p_cust_account_id);
1155: IBE_UTIL.DEBUG('p_retrieval_number: '||p_retrieval_number);
1156: IBE_UTIL.DEBUG('p_quote_header_id: '||p_quote_header_rec.quote_header_id);
1157: END IF;
1150:
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1153: IBE_UTIL.DEBUG('p_party_id : '||p_party_id);
1154: IBE_UTIL.DEBUG('p_cust_account_id: '||p_cust_account_id);
1155: IBE_UTIL.DEBUG('p_retrieval_number: '||p_retrieval_number);
1156: IBE_UTIL.DEBUG('p_quote_header_id: '||p_quote_header_rec.quote_header_id);
1157: END IF;
1158: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1152: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1153: IBE_UTIL.DEBUG('p_party_id : '||p_party_id);
1154: IBE_UTIL.DEBUG('p_cust_account_id: '||p_cust_account_id);
1155: IBE_UTIL.DEBUG('p_retrieval_number: '||p_retrieval_number);
1156: IBE_UTIL.DEBUG('p_quote_header_id: '||p_quote_header_rec.quote_header_id);
1157: END IF;
1158: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1159: FOR rec_check_guest_oneclk in c_check_guest_oneclk(p_quote_header_rec.quote_header_id) LOOP
1152: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1153: IBE_UTIL.DEBUG('p_party_id : '||p_party_id);
1154: IBE_UTIL.DEBUG('p_cust_account_id: '||p_cust_account_id);
1155: IBE_UTIL.DEBUG('p_retrieval_number: '||p_retrieval_number);
1156: IBE_UTIL.DEBUG('p_quote_header_id: '||p_quote_header_rec.quote_header_id);
1157: END IF;
1158: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: START');
1159: FOR rec_check_guest_oneclk in c_check_guest_oneclk(p_quote_header_rec.quote_header_id) LOOP
1160: l_cart_type := rec_check_guest_oneclk.quote_source_code;
1184: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1185: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1186: END IF;
1187: --DBMS_OUTPUT.PUT_LINE('Opening the cursor to check active cart present in active carts table');
1188: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1189: IBE_UTIL.DEBUG('Opening the cursor to check active cart present in active carts table');
1190: END IF;
1191: /*c_check_ac_aqa will query to check if p_party_id already has an active cart in active_quotes table
1192: If yes then update the quote_header_id of this record to p_quote_header_rec.quote_header_id(new active_cart hdr_id)
1185: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1186: END IF;
1187: --DBMS_OUTPUT.PUT_LINE('Opening the cursor to check active cart present in active carts table');
1188: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1189: IBE_UTIL.DEBUG('Opening the cursor to check active cart present in active carts table');
1190: END IF;
1191: /*c_check_ac_aqa will query to check if p_party_id already has an active cart in active_quotes table
1192: If yes then update the quote_header_id of this record to p_quote_header_rec.quote_header_id(new active_cart hdr_id)
1193: else insert a record into the active_quotes table*/
1201:
1202: IF (l_ac_present is not null) THEN
1203: --There already an active cart for p_party_id in active_quotes_table
1204: --DBMS_OUTPUT.PUT_LINE('active cart present in active carts table for: '||l_quote_header_rec.quote_header_id);
1205: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1206: IBE_UTIL.DEBUG('active cart present in active carts table l_ac_present: '||l_ac_present);
1207: END IF;
1208:
1209: IF(FND_API.G_TRUE=IBE_QUOTE_MISC_PVT.is_quote_usable(l_ac_present,p_party_id,p_cust_account_id)) THEN
1202: IF (l_ac_present is not null) THEN
1203: --There already an active cart for p_party_id in active_quotes_table
1204: --DBMS_OUTPUT.PUT_LINE('active cart present in active carts table for: '||l_quote_header_rec.quote_header_id);
1205: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1206: IBE_UTIL.DEBUG('active cart present in active carts table l_ac_present: '||l_ac_present);
1207: END IF;
1208:
1209: IF(FND_API.G_TRUE=IBE_QUOTE_MISC_PVT.is_quote_usable(l_ac_present,p_party_id,p_cust_account_id)) THEN
1210: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1206: IBE_UTIL.DEBUG('active cart present in active carts table l_ac_present: '||l_ac_present);
1207: END IF;
1208:
1209: IF(FND_API.G_TRUE=IBE_QUOTE_MISC_PVT.is_quote_usable(l_ac_present,p_party_id,p_cust_account_id)) THEN
1210: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1211: IBE_UTIL.DEBUG('current active cart is still validate.');
1212: IBE_UTIL.DEBUG('checking if it is a unnamed cart.');
1213: END IF;
1214: for rec_check_ac_qh in c_check_ac_qh(l_ac_present) loop
1207: END IF;
1208:
1209: IF(FND_API.G_TRUE=IBE_QUOTE_MISC_PVT.is_quote_usable(l_ac_present,p_party_id,p_cust_account_id)) THEN
1210: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1211: IBE_UTIL.DEBUG('current active cart is still validate.');
1212: IBE_UTIL.DEBUG('checking if it is a unnamed cart.');
1213: END IF;
1214: for rec_check_ac_qh in c_check_ac_qh(l_ac_present) loop
1215: --Openin this cursor to check if the active cart name is IBEUNNAMED
1208:
1209: IF(FND_API.G_TRUE=IBE_QUOTE_MISC_PVT.is_quote_usable(l_ac_present,p_party_id,p_cust_account_id)) THEN
1210: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1211: IBE_UTIL.DEBUG('current active cart is still validate.');
1212: IBE_UTIL.DEBUG('checking if it is a unnamed cart.');
1213: END IF;
1214: for rec_check_ac_qh in c_check_ac_qh(l_ac_present) loop
1215: --Openin this cursor to check if the active cart name is IBEUNNAMED
1216: --DBMS_OUTPUT.PUT_LINE('Opened cursor c_check_ac_qh ');
1217: l_qhac_present := rec_check_ac_qh.quote_header_id;
1218: l_qhac_quote_name := rec_check_ac_qh.quote_name;
1219: exit when c_check_ac_qh%notfound;
1220:
1221: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1222: IBE_UTIL.DEBUG('l_qhac_present: '||l_qhac_present);
1223: IBE_UTIL.DEBUG('l_qhac_quote_name: '||l_qhac_quote_name);
1224: END IF;
1225:
1218: l_qhac_quote_name := rec_check_ac_qh.quote_name;
1219: exit when c_check_ac_qh%notfound;
1220:
1221: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1222: IBE_UTIL.DEBUG('l_qhac_present: '||l_qhac_present);
1223: IBE_UTIL.DEBUG('l_qhac_quote_name: '||l_qhac_quote_name);
1224: END IF;
1225:
1226: end loop;
1219: exit when c_check_ac_qh%notfound;
1220:
1221: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1222: IBE_UTIL.DEBUG('l_qhac_present: '||l_qhac_present);
1223: IBE_UTIL.DEBUG('l_qhac_quote_name: '||l_qhac_quote_name);
1224: END IF;
1225:
1226: end loop;
1227: --DBMS_OUTPUT.PUT_LINE('after end loop of c_check_ac_qh ');
1232: l_quote_header_rec.quote_header_id := l_qhac_present;
1233: l_quote_header_rec.quote_name := 'IBE_PRMT_SC_DEFAULTNAMED';
1234: --reasons for calling save here
1235: --to save the IBEUNNAMED cart to IBEDEFAULTNAMED
1236: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1237: IBE_UTIL.DEBUG('Unnamed cart found for: '||l_quote_header_rec.quote_header_id);
1238: IBE_UTIL.DEBUG('renaming it to IBEDEFAULTNAMED...');
1239: END IF;
1240: IBE_Quote_Save_pvt.save(
1233: l_quote_header_rec.quote_name := 'IBE_PRMT_SC_DEFAULTNAMED';
1234: --reasons for calling save here
1235: --to save the IBEUNNAMED cart to IBEDEFAULTNAMED
1236: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1237: IBE_UTIL.DEBUG('Unnamed cart found for: '||l_quote_header_rec.quote_header_id);
1238: IBE_UTIL.DEBUG('renaming it to IBEDEFAULTNAMED...');
1239: END IF;
1240: IBE_Quote_Save_pvt.save(
1241: p_api_version_number => p_api_version ,
1234: --reasons for calling save here
1235: --to save the IBEUNNAMED cart to IBEDEFAULTNAMED
1236: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1237: IBE_UTIL.DEBUG('Unnamed cart found for: '||l_quote_header_rec.quote_header_id);
1238: IBE_UTIL.DEBUG('renaming it to IBEDEFAULTNAMED...');
1239: END IF;
1240: IBE_Quote_Save_pvt.save(
1241: p_api_version_number => p_api_version ,
1242: p_init_msg_list => fnd_api.g_false ,
1250: x_return_status => x_return_status ,
1251: x_msg_count => x_msg_count ,
1252: x_msg_data => x_msg_data);
1253: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
1254: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1255: IBE_UTIL.DEBUG('failed to rename the cart.');
1256: END IF;
1257: RAISE FND_API.G_EXC_ERROR;
1258: END IF;
1251: x_msg_count => x_msg_count ,
1252: x_msg_data => x_msg_data);
1253: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
1254: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1255: IBE_UTIL.DEBUG('failed to rename the cart.');
1256: END IF;
1257: RAISE FND_API.G_EXC_ERROR;
1258: END IF;
1259:
1257: RAISE FND_API.G_EXC_ERROR;
1258: END IF;
1259:
1260: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1261: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1262: IBE_UTIL.DEBUG('failed to rename the cart, unexpected error.');
1263: END IF;
1264: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1265: END IF;
1258: END IF;
1259:
1260: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1261: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1262: IBE_UTIL.DEBUG('failed to rename the cart, unexpected error.');
1263: END IF;
1264: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1265: END IF;
1266:
1265: END IF;
1266:
1267: END IF;--l_qhac_quote_name = 'IBEUNNAMED'
1268: ELSE
1269: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1270: IBE_UTIL.DEBUG('invalid or expired active cart ignored.');
1271: END IF;
1272: END IF; -- end of is_quote_usable
1273: END IF; --l_ac_present
1266:
1267: END IF;--l_qhac_quote_name = 'IBEUNNAMED'
1268: ELSE
1269: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1270: IBE_UTIL.DEBUG('invalid or expired active cart ignored.');
1271: END IF;
1272: END IF; -- end of is_quote_usable
1273: END IF; --l_ac_present
1274:
1272: END IF; -- end of is_quote_usable
1273: END IF; --l_ac_present
1274:
1275: IF (l_ac_party_id is not null) THEN
1276: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1277: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote:User already has a row in active_quotes table');
1278: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote:Calling update row hdlr');
1279: END IF;
1280: --DBMS_OUTPUT.PUT_LINE('Calling update row handler for active carts');
1273: END IF; --l_ac_present
1274:
1275: IF (l_ac_party_id is not null) THEN
1276: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1277: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote:User already has a row in active_quotes table');
1278: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote:Calling update row hdlr');
1279: END IF;
1280: --DBMS_OUTPUT.PUT_LINE('Calling update row handler for active carts');
1281:
1274:
1275: IF (l_ac_party_id is not null) THEN
1276: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1277: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote:User already has a row in active_quotes table');
1278: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote:Calling update row hdlr');
1279: END IF;
1280: --DBMS_OUTPUT.PUT_LINE('Calling update row handler for active carts');
1281:
1282: IBE_ACTIVE_QUOTES_ALL_PKG.update_row(
1293: ELSE
1294:
1295: --no previous active carts present for p_party_id hence inserting a new record
1296: --DBMS_OUTPUT.PUT_LINE('no active carts present for p_party_id hence inserting a new record');
1297: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1298: IBE_UTIL.DEBUG('no active carts present for p_party_id hence inserting a new record');
1299: IBE_UTIL.DEBUG('Quote header id of new active active cart is: '||p_quote_header_rec.quote_header_id);
1300: END IF;
1301: IBE_ACTIVE_QUOTES_ALL_PKG.Insert_row(
1294:
1295: --no previous active carts present for p_party_id hence inserting a new record
1296: --DBMS_OUTPUT.PUT_LINE('no active carts present for p_party_id hence inserting a new record');
1297: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1298: IBE_UTIL.DEBUG('no active carts present for p_party_id hence inserting a new record');
1299: IBE_UTIL.DEBUG('Quote header id of new active active cart is: '||p_quote_header_rec.quote_header_id);
1300: END IF;
1301: IBE_ACTIVE_QUOTES_ALL_PKG.Insert_row(
1302: X_OBJECT_VERSION_NUMBER => 1,
1295: --no previous active carts present for p_party_id hence inserting a new record
1296: --DBMS_OUTPUT.PUT_LINE('no active carts present for p_party_id hence inserting a new record');
1297: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1298: IBE_UTIL.DEBUG('no active carts present for p_party_id hence inserting a new record');
1299: IBE_UTIL.DEBUG('Quote header id of new active active cart is: '||p_quote_header_rec.quote_header_id);
1300: END IF;
1301: IBE_ACTIVE_QUOTES_ALL_PKG.Insert_row(
1302: X_OBJECT_VERSION_NUMBER => 1,
1303: X_QUOTE_HEADER_ID => p_quote_header_rec.quote_header_id,
1319: (P_control_rec.CALCULATE_TAX_FLAG <> FND_API.G_MISS_CHAR) or
1320: (P_control_rec.CALCULATE_FREIGHT_CHARGE_FLAG <> FND_API.G_MISS_CHAR))
1321: then
1322: --1. re-price cart based on the state of control_rec
1323: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1324: IBE_UTIL.DEBUG('Calling SAVE');
1325: IBE_UTIL.DEBUG('reprice cart based on the state of control_rec');
1326: END IF;
1327: if (p_retrieval_number <> FND_API.G_MISS_NUM) then
1320: (P_control_rec.CALCULATE_FREIGHT_CHARGE_FLAG <> FND_API.G_MISS_CHAR))
1321: then
1322: --1. re-price cart based on the state of control_rec
1323: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1324: IBE_UTIL.DEBUG('Calling SAVE');
1325: IBE_UTIL.DEBUG('reprice cart based on the state of control_rec');
1326: END IF;
1327: if (p_retrieval_number <> FND_API.G_MISS_NUM) then
1328: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1321: then
1322: --1. re-price cart based on the state of control_rec
1323: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1324: IBE_UTIL.DEBUG('Calling SAVE');
1325: IBE_UTIL.DEBUG('reprice cart based on the state of control_rec');
1326: END IF;
1327: if (p_retrieval_number <> FND_API.G_MISS_NUM) then
1328: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1329: IBE_UTIL.DEBUG('repricing as recipient; retrieval num: ' || p_retrieval_number);
1324: IBE_UTIL.DEBUG('Calling SAVE');
1325: IBE_UTIL.DEBUG('reprice cart based on the state of control_rec');
1326: END IF;
1327: if (p_retrieval_number <> FND_API.G_MISS_NUM) then
1328: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1329: IBE_UTIL.DEBUG('repricing as recipient; retrieval num: ' || p_retrieval_number);
1330: END IF;
1331:
1332: l_sharee_number := p_retrieval_number;
1325: IBE_UTIL.DEBUG('reprice cart based on the state of control_rec');
1326: END IF;
1327: if (p_retrieval_number <> FND_API.G_MISS_NUM) then
1328: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1329: IBE_UTIL.DEBUG('repricing as recipient; retrieval num: ' || p_retrieval_number);
1330: END IF;
1331:
1332: l_sharee_number := p_retrieval_number;
1333: l_sharee_party_id := p_party_id;
1359: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1360: END IF;
1361: end if;
1362: ELSE
1363: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1364: IBE_UTIL.DEBUG('Cannot activate a '||nvl(l_cart_type,'Invalid ')||' Cart');
1365: END IF;
1366: --DBMS_OUTPUT.PUT_LINE('Cannot activate a '||nvl(l_cart_type,'Invalid ')||' Cart');
1367:
1360: END IF;
1361: end if;
1362: ELSE
1363: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1364: IBE_UTIL.DEBUG('Cannot activate a '||nvl(l_cart_type,'Invalid ')||' Cart');
1365: END IF;
1366: --DBMS_OUTPUT.PUT_LINE('Cannot activate a '||nvl(l_cart_type,'Invalid ')||' Cart');
1367:
1368: END IF; --qute source code check
1365: END IF;
1366: --DBMS_OUTPUT.PUT_LINE('Cannot activate a '||nvl(l_cart_type,'Invalid ')||' Cart');
1367:
1368: END IF; --qute source code check
1369: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1370: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: END');
1371: END IF;
1372:
1373: EXCEPTION
1366: --DBMS_OUTPUT.PUT_LINE('Cannot activate a '||nvl(l_cart_type,'Invalid ')||' Cart');
1367:
1368: END IF; --qute source code check
1369: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1370: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote: END');
1371: END IF;
1372:
1373: EXCEPTION
1374: WHEN FND_API.G_EXC_ERROR THEN
1376: x_return_status := FND_API.G_RET_STS_ERROR;
1377: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1378: p_count => x_msg_count ,
1379: p_data => x_msg_data);
1380: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1381: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote()');
1382: END IF;
1383:
1384: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1377: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1378: p_count => x_msg_count ,
1379: p_data => x_msg_data);
1380: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1381: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote()');
1382: END IF;
1383:
1384: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1385: ROLLBACK TO ACTIVATEQUOTE_V2;
1386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1387: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1388: p_count => x_msg_count ,
1389: p_data => x_msg_data);
1390: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1391: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote()');
1392: END IF;
1393:
1394: WHEN OTHERS THEN
1387: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1388: p_count => x_msg_count ,
1389: p_data => x_msg_data);
1390: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1391: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote()');
1392: END IF;
1393:
1394: WHEN OTHERS THEN
1395: ROLLBACK TO ACTIVATEQUOTE_V2;
1400: END IF;
1401: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1402: p_count => x_msg_count ,
1403: p_data => x_msg_data);
1404: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1405: IBE_Util.Debug('Unknown error IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote()');
1406: END IF;
1407:
1408: END;
1401: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1402: p_count => x_msg_count ,
1403: p_data => x_msg_data);
1404: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1405: IBE_Util.Debug('Unknown error IBE_QUOTE_SAVESHARE_V2_PVT.activate_quote()');
1406: END IF;
1407:
1408: END;
1409:
1465:
1466: -- Initialize API return status to success
1467: x_return_status := FND_API.G_RET_STS_SUCCESS;
1468:
1469: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1470: IBE_UTIL.debug('Inside Save_contact_point API');
1471: END IF;
1472: --DBMS_OUTPUT.PUT_LINE('Inside Save_contact_point API');
1473: l_contact_points_rec.status := 'A';
1466: -- Initialize API return status to success
1467: x_return_status := FND_API.G_RET_STS_SUCCESS;
1468:
1469: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1470: IBE_UTIL.debug('Inside Save_contact_point API');
1471: END IF;
1472: --DBMS_OUTPUT.PUT_LINE('Inside Save_contact_point API');
1473: l_contact_points_rec.status := 'A';
1474: l_contact_points_rec.owner_table_id := p_owner_table_id;
1476: l_contact_points_rec.application_id := l_application_id;
1477:
1478: IF (p_mode = 'EMAIL') THEN
1479: --DBMS_OUTPUT.PUT_LINE('Mode of contact point is EMAIL');
1480: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1481: IBE_UTIL.debug('Mode of contact point is EMAIL');
1482: END IF;
1483: l_contact_points_rec.contact_point_type := 'EMAIL';
1484: l_contact_points_rec.owner_table_name := 'IBE_SH_QUOTE_ACCESS';
1477:
1478: IF (p_mode = 'EMAIL') THEN
1479: --DBMS_OUTPUT.PUT_LINE('Mode of contact point is EMAIL');
1480: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1481: IBE_UTIL.debug('Mode of contact point is EMAIL');
1482: END IF;
1483: l_contact_points_rec.contact_point_type := 'EMAIL';
1484: l_contact_points_rec.owner_table_name := 'IBE_SH_QUOTE_ACCESS';
1485: l_email_rec.email_address := P_EMAIL;
1483: l_contact_points_rec.contact_point_type := 'EMAIL';
1484: l_contact_points_rec.owner_table_name := 'IBE_SH_QUOTE_ACCESS';
1485: l_email_rec.email_address := P_EMAIL;
1486: elsif (p_mode = 'WEB') THEN
1487: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1488: IBE_UTIL.debug('Mode of contact point is WEB');
1489: END IF;
1490:
1491: l_contact_points_rec.contact_point_type := 'WEB';
1484: l_contact_points_rec.owner_table_name := 'IBE_SH_QUOTE_ACCESS';
1485: l_email_rec.email_address := P_EMAIL;
1486: elsif (p_mode = 'WEB') THEN
1487: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1488: IBE_UTIL.debug('Mode of contact point is WEB');
1489: END IF;
1490:
1491: l_contact_points_rec.contact_point_type := 'WEB';
1492: l_contact_points_rec.owner_table_name := 'IBE_SH_QUOTE_ACCESS';
1501: WHERE owner_table_name = l_contact_points_rec.owner_table_name
1502: AND owner_table_id = l_contact_points_rec.owner_table_id;
1503:
1504: IF l_test = 0 THEN
1505: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1506: IBE_UTIL.DEBUG('call hz_conteact_point_pub.create_contact_points at'
1507: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1508: END IF;
1509:
1502: AND owner_table_id = l_contact_points_rec.owner_table_id;
1503:
1504: IF l_test = 0 THEN
1505: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1506: IBE_UTIL.DEBUG('call hz_conteact_point_pub.create_contact_points at'
1507: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1508: END IF;
1509:
1510: --DBMS_OUTPUT.PUT_LINE('Create contact point ');
1523: END IF;
1524: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1525: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1526: END IF;
1527: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1528: IBE_UTIL.DEBUG('done hz_conteact_point_pub.create_contact_points at'
1529: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1530: END IF;
1531:
1524: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1525: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1526: END IF;
1527: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1528: IBE_UTIL.DEBUG('done hz_conteact_point_pub.create_contact_points at'
1529: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1530: END IF;
1531:
1532: else
1536: ,l_contact_points_rec.owner_table_name);
1537: fetch c_getContactInfo into l_contact_points_rec.contact_point_id
1538: ,l_object_version_number;
1539: close c_getContactInfo;
1540: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1541: IBE_UTIL.DEBUG('call hz_conteact_point_pub.update_contact_points at'
1542: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1543: END IF;
1544:
1537: fetch c_getContactInfo into l_contact_points_rec.contact_point_id
1538: ,l_object_version_number;
1539: close c_getContactInfo;
1540: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1541: IBE_UTIL.DEBUG('call hz_conteact_point_pub.update_contact_points at'
1542: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1543: END IF;
1544:
1545: hz_contact_point_v2pub.update_contact_point(
1558:
1559: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1560: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1561: END IF;
1562: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1563: IBE_UTIL.DEBUG('done hz_conteact_point_pub.update_contact_points at'
1564: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1565: END IF;
1566: END IF;
1559: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1560: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1561: END IF;
1562: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1563: IBE_UTIL.DEBUG('done hz_conteact_point_pub.update_contact_points at'
1564: || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
1565: END IF;
1566: END IF;
1567:
1576: p_data => x_msg_data);
1577: EXCEPTION
1578: WHEN FND_API.G_EXC_ERROR THEN
1579: ROLLBACK TO SAVECONTACTPOINT_PVT;
1580: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1581: IBE_UTIL.DEBUG('Expected exception in Ibe_quote_saveshare_v2_pvt.SaveContactPoint');
1582: end if;
1583: x_return_status := FND_API.G_RET_STS_ERROR;
1584: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
1577: EXCEPTION
1578: WHEN FND_API.G_EXC_ERROR THEN
1579: ROLLBACK TO SAVECONTACTPOINT_PVT;
1580: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1581: IBE_UTIL.DEBUG('Expected exception in Ibe_quote_saveshare_v2_pvt.SaveContactPoint');
1582: end if;
1583: x_return_status := FND_API.G_RET_STS_ERROR;
1584: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
1585: p_count => x_msg_count,
1584: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
1585: p_count => x_msg_count,
1586: p_data => x_msg_data);
1587: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1588: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1589: IBE_UTIL.DEBUG('Unexpected exception in Ibe_quote_saveshare_v2_pvt.SaveContactPoint');
1590: end if;
1591:
1592: ROLLBACK TO SAVECONTACTPOINT_PVT;
1585: p_count => x_msg_count,
1586: p_data => x_msg_data);
1587: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1588: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1589: IBE_UTIL.DEBUG('Unexpected exception in Ibe_quote_saveshare_v2_pvt.SaveContactPoint');
1590: end if;
1591:
1592: ROLLBACK TO SAVECONTACTPOINT_PVT;
1593: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1594: FND_MSG_PUB.Count_And_Get(p_encoded => FND_API.G_FALSE,
1595: p_count => x_msg_count,
1596: p_data => x_msg_data);
1597: WHEN OTHERS THEN
1598: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1599: IBE_UTIL.DEBUG('Unknown exception in Ibe_quote_saveshare_v2_pvt.SaveContactPoint');
1600: end if;
1601:
1602: ROLLBACK TO SAVECONTACTPOINT_PVT;
1595: p_count => x_msg_count,
1596: p_data => x_msg_data);
1597: WHEN OTHERS THEN
1598: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1599: IBE_UTIL.DEBUG('Unknown exception in Ibe_quote_saveshare_v2_pvt.SaveContactPoint');
1600: end if;
1601:
1602: ROLLBACK TO SAVECONTACTPOINT_PVT;
1603: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1668: --dbms_output.put_line(' Deactivate API: Trying to deactivate: '||rec_check_active_cart.quote_header_id);
1669: FOR rec_check_active_cart in c_check_active_cart(p_party_id,
1670: p_cust_account_id) LOOP
1671: IF(rec_check_active_cart.quote_header_id is not null) THEN
1672: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1673: IBE_UTIL.DEBUG('Deactivate API: Trying to deactivate: '||rec_check_active_cart.quote_header_id);
1674: --dbms_output.put_line(' Deactivate API: Trying to deactivate: '||rec_check_active_cart.quote_header_id);
1675: END IF;
1676:
1669: FOR rec_check_active_cart in c_check_active_cart(p_party_id,
1670: p_cust_account_id) LOOP
1671: IF(rec_check_active_cart.quote_header_id is not null) THEN
1672: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1673: IBE_UTIL.DEBUG('Deactivate API: Trying to deactivate: '||rec_check_active_cart.quote_header_id);
1674: --dbms_output.put_line(' Deactivate API: Trying to deactivate: '||rec_check_active_cart.quote_header_id);
1675: END IF;
1676:
1677: --DBMS_OUTPUT.PUT_LINE('rec_check_active_cart.quote_header_id '||rec_check_active_cart.quote_header_id );
1674: --dbms_output.put_line(' Deactivate API: Trying to deactivate: '||rec_check_active_cart.quote_header_id);
1675: END IF;
1676:
1677: --DBMS_OUTPUT.PUT_LINE('rec_check_active_cart.quote_header_id '||rec_check_active_cart.quote_header_id );
1678: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1679: IBE_UTIL.DEBUG('Calling update handler of active_quotes_all table');
1680: END IF;
1681: --DBMS_OUTPUT.PUT_LINE('Calling update handler of active_quotes_all table');
1682:
1675: END IF;
1676:
1677: --DBMS_OUTPUT.PUT_LINE('rec_check_active_cart.quote_header_id '||rec_check_active_cart.quote_header_id );
1678: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1679: IBE_UTIL.DEBUG('Calling update handler of active_quotes_all table');
1680: END IF;
1681: --DBMS_OUTPUT.PUT_LINE('Calling update handler of active_quotes_all table');
1682:
1683: --DBMS_OUTPUT.PUT_LINE('P_quote_header_id '||P_quote_header_id);
1693: X_CURRENCY_CODE => null,
1694: x_last_update_date => sysdate,
1695: x_last_updated_by => fnd_global.user_id,
1696: x_last_update_login => 1);
1697: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1698: IBE_UTIL.DEBUG('Done calling Update handler of active_quotes_all table to erase the quote header id' );
1699: END IF;
1700: --DBMS_OUTPUT.PUT_LINE('Done calling delete handler of active_quotes_all table');
1701: END IF;
1694: x_last_update_date => sysdate,
1695: x_last_updated_by => fnd_global.user_id,
1696: x_last_update_login => 1);
1697: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1698: IBE_UTIL.DEBUG('Done calling Update handler of active_quotes_all table to erase the quote header id' );
1699: END IF;
1700: --DBMS_OUTPUT.PUT_LINE('Done calling delete handler of active_quotes_all table');
1701: END IF;
1702: EXIT when c_check_active_cart%notfound;
1706: IF FND_API.To_Boolean( p_commit ) THEN
1707: COMMIT WORK;
1708: END IF;
1709:
1710: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1711: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote: END');
1712: END IF;
1713:
1714: EXCEPTION
1707: COMMIT WORK;
1708: END IF;
1709:
1710: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1711: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote: END');
1712: END IF;
1713:
1714: EXCEPTION
1715: WHEN FND_API.G_EXC_ERROR THEN
1713:
1714: EXCEPTION
1715: WHEN FND_API.G_EXC_ERROR THEN
1716: ROLLBACK TO DEACTIVATEQUOTE_V2;
1717: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1718: IBE_UTIL.DEBUG('Expected exception in Ibe_quote_saveshare_v2_pvt.Deactivate_quote');
1719: end if;
1720:
1721: x_return_status := FND_API.G_RET_STS_ERROR;
1714: EXCEPTION
1715: WHEN FND_API.G_EXC_ERROR THEN
1716: ROLLBACK TO DEACTIVATEQUOTE_V2;
1717: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1718: IBE_UTIL.DEBUG('Expected exception in Ibe_quote_saveshare_v2_pvt.Deactivate_quote');
1719: end if;
1720:
1721: x_return_status := FND_API.G_RET_STS_ERROR;
1722: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1721: x_return_status := FND_API.G_RET_STS_ERROR;
1722: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1723: p_count => x_msg_count ,
1724: p_data => x_msg_data);
1725: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1726: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote');
1727: END IF;
1728:
1729: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1722: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1723: p_count => x_msg_count ,
1724: p_data => x_msg_data);
1725: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1726: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote');
1727: END IF;
1728:
1729: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1730: ROLLBACK TO DEACTIVATEQUOTE_V2;
1731: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1732: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1733: p_count => x_msg_count ,
1734: p_data => x_msg_data);
1735: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1736: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote');
1737: END IF;
1738:
1739: WHEN OTHERS THEN
1732: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1733: p_count => x_msg_count ,
1734: p_data => x_msg_data);
1735: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1736: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote');
1737: END IF;
1738:
1739: WHEN OTHERS THEN
1740: ROLLBACK TO DEACTIVATEQUOTE_V2;
1745: END IF;
1746: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1747: p_count => x_msg_count ,
1748: p_data => x_msg_data);
1749: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1750: IBE_Util.Debug('Abnormal end IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote');
1751: END IF;
1752:
1753: END;
1746: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1747: p_count => x_msg_count ,
1748: p_data => x_msg_data);
1749: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1750: IBE_Util.Debug('Abnormal end IBE_QUOTE_SAVESHARE_V2_PVT.deactivate_quote');
1751: END IF;
1752:
1753: END;
1754:
1811: x_return_status := FND_API.G_RET_STS_SUCCESS;
1812: -------------------------------------------------------------------------------------------------------------
1813: --API Body start
1814: -------------------------------------------------------------------------------------------------------------
1815: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1816: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: START');
1817: END IF;
1818:
1819: IBE_Quote_Misc_pvt.validate_user_update
1812: -------------------------------------------------------------------------------------------------------------
1813: --API Body start
1814: -------------------------------------------------------------------------------------------------------------
1815: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1816: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: START');
1817: END IF;
1818:
1819: IBE_Quote_Misc_pvt.validate_user_update
1820: (p_quote_header_id => P_source_quote_header_id,
1830: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1831: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1832: END IF;
1833:
1834: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1835: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Calling IBE_QUOTE_SAVESHARE_pvt.Copy_lines');
1836: END IF;
1837: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Calling IBE_QUOTE_SAVESHARE_pvt.Copy_lines ');
1838:
1831: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1832: END IF;
1833:
1834: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1835: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Calling IBE_QUOTE_SAVESHARE_pvt.Copy_lines');
1836: END IF;
1837: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Calling IBE_QUOTE_SAVESHARE_pvt.Copy_lines ');
1838:
1839: IBE_QUOTE_SAVESHARE_pvt.COPY_LINES(
1867: --l_hd_shipment_tbl(1) := p_hd_shipment_rec; $$ Verify this part. Ned to pass
1868: --p_to_hd_shipment_rec?? $$
1869: -- l_hd_shipment_tbl(1).quote_header_id := P_target_header_rec.quote_header_id;
1870:
1871: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1872: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:IBE_QUOTE_SAVESHARE_pvt.Copy_lines End');
1873: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: Calling IBE_Quote_Save_pvt.Save to save target cart');
1874: END IF;
1875: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: Calling IBE_Quote_Save_pvt.Save to save target cart ');
1868: --p_to_hd_shipment_rec?? $$
1869: -- l_hd_shipment_tbl(1).quote_header_id := P_target_header_rec.quote_header_id;
1870:
1871: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1872: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:IBE_QUOTE_SAVESHARE_pvt.Copy_lines End');
1873: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: Calling IBE_Quote_Save_pvt.Save to save target cart');
1874: END IF;
1875: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: Calling IBE_Quote_Save_pvt.Save to save target cart ');
1876: --DBMS_OUTPUT.PUT_LINE('before save p_target_header_rec.quote_header_id '||p_target_header_rec.quote_header_id);
1869: -- l_hd_shipment_tbl(1).quote_header_id := P_target_header_rec.quote_header_id;
1870:
1871: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1872: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:IBE_QUOTE_SAVESHARE_pvt.Copy_lines End');
1873: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: Calling IBE_Quote_Save_pvt.Save to save target cart');
1874: END IF;
1875: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: Calling IBE_Quote_Save_pvt.Save to save target cart ');
1876: --DBMS_OUTPUT.PUT_LINE('before save p_target_header_rec.quote_header_id '||p_target_header_rec.quote_header_id);
1877: IBE_Quote_Save_pvt.SAVE
1898: END IF;
1899: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1900: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1901: END IF;
1902: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1903: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart: '||P_delete_source_cart);
1904: END IF;
1905: IF (P_delete_source_cart = FND_API.G_TRUE ) THEN
1906: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1899: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1900: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1901: END IF;
1902: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1903: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart: '||P_delete_source_cart);
1904: END IF;
1905: IF (P_delete_source_cart = FND_API.G_TRUE ) THEN
1906: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1907: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart is true');
1902: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1903: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart: '||P_delete_source_cart);
1904: END IF;
1905: IF (P_delete_source_cart = FND_API.G_TRUE ) THEN
1906: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1907: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart is true');
1908: END IF;
1909: IBE_Quote_Save_pvt.Delete(
1910: p_api_version_number => p_api_version
1903: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart: '||P_delete_source_cart);
1904: END IF;
1905: IF (P_delete_source_cart = FND_API.G_TRUE ) THEN
1906: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1907: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: P_delete_source_cart is true');
1908: END IF;
1909: IBE_Quote_Save_pvt.Delete(
1910: p_api_version_number => p_api_version
1911: ,p_init_msg_list => FND_API.G_FALSE
1923: END IF;
1924: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1925: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1926: END IF;
1927: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1928: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Delete on source cart done');
1929: END IF;
1930: END IF;
1931:
1924: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1925: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1926: END IF;
1927: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1928: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Delete on source cart done');
1929: END IF;
1930: END IF;
1931:
1932: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1928: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE:Delete on source cart done');
1929: END IF;
1930: END IF;
1931:
1932: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1933: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: END');
1934: END IF;
1935:
1936: EXCEPTION
1929: END IF;
1930: END IF;
1931:
1932: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1933: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.APPEND_QUOTE: END');
1934: END IF;
1935:
1936: EXCEPTION
1937: WHEN FND_API.G_EXC_ERROR THEN
1939: x_return_status := FND_API.G_RET_STS_ERROR;
1940: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1941: p_count => x_msg_count ,
1942: p_data => x_msg_data);
1943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1944: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.append_quote()');
1945: END IF;
1946:
1947: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1940: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1941: p_count => x_msg_count ,
1942: p_data => x_msg_data);
1943: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1944: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.append_quote()');
1945: END IF;
1946:
1947: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1948: ROLLBACK TO APPENDQUOTE_V2;
1949: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1950: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1951: p_count => x_msg_count ,
1952: p_data => x_msg_data);
1953: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1954: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.append_quote()');
1955: END IF;
1956:
1957: WHEN OTHERS THEN
1950: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1951: p_count => x_msg_count ,
1952: p_data => x_msg_data);
1953: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1954: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.append_quote()');
1955: END IF;
1956:
1957: WHEN OTHERS THEN
1958: ROLLBACK TO APPENDQUOTE_V2;
1963: END IF;
1964: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1965: p_count => x_msg_count ,
1966: p_data => x_msg_data);
1967: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1968: IBE_Util.Debug('Abnormal end IBE_QUOTE_SAVESHARE_V2_PVT.append_quote()');
1969: END IF;
1970:
1971: END;
1964: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
1965: p_count => x_msg_count ,
1966: p_data => x_msg_data);
1967: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
1968: IBE_Util.Debug('Abnormal end IBE_QUOTE_SAVESHARE_V2_PVT.append_quote()');
1969: END IF;
1970:
1971: END;
1972:
2063: x_return_status := FND_API.G_RET_STS_SUCCESS;
2064: -------------------------------------------------------------------------------------------------------------
2065: --API Body start
2066: -------------------------------------------------------------------------------------------------------------
2067: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2068: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.STOP_SHARING: START');
2069: END IF;
2070: -- Stop sharing should deactivate owner's active cart if any.
2071: --dbms_output.put_line('p_quote_header_id: '||p_quote_header_id);
2064: -------------------------------------------------------------------------------------------------------------
2065: --API Body start
2066: -------------------------------------------------------------------------------------------------------------
2067: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2068: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.STOP_SHARING: START');
2069: END IF;
2070: -- Stop sharing should deactivate owner's active cart if any.
2071: --dbms_output.put_line('p_quote_header_id: '||p_quote_header_id);
2072: FOR rec_get_owner in c_get_owner(p_quote_header_id) LOOP
2074: l_owner_cust_account_id := rec_get_owner.cust_account_id;
2075: --dbms_output.put_line('loop one in cursor ');
2076: EXIT when c_get_owner%NOTFOUND;
2077: END LOOP;
2078: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2079: IBE_UTIL.DEBUG('STOP_SHARING:Calling deactivate API');
2080: END IF;
2081: --DBMS_OUTPUT.PUT_LINE('Calling deactivate API to deactivate owner''s cart');
2082: --dbms_output.put_line('PARTY_ID: '||l_owner_party_id);
2075: --dbms_output.put_line('loop one in cursor ');
2076: EXIT when c_get_owner%NOTFOUND;
2077: END LOOP;
2078: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2079: IBE_UTIL.DEBUG('STOP_SHARING:Calling deactivate API');
2080: END IF;
2081: --DBMS_OUTPUT.PUT_LINE('Calling deactivate API to deactivate owner''s cart');
2082: --dbms_output.put_line('PARTY_ID: '||l_owner_party_id);
2083: --dbms_output.put_line('CUST_ACCOUNT_ID: '||l_owner_cust_account_id );
2099:
2100: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2101: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2102: END IF;
2103: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2104: IBE_UTIL.DEBUG('STOP_SHARING:Deactivation of owner cart :Done');
2105: END IF;
2106: --dbms_output.put_line('STOP_SHARING:Deactivation of owner cart :Done');
2107: --If there is no input quote access tbl then send notification to all recipients.
2100: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2101: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2102: END IF;
2103: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2104: IBE_UTIL.DEBUG('STOP_SHARING:Deactivation of owner cart :Done');
2105: END IF;
2106: --dbms_output.put_line('STOP_SHARING:Deactivation of owner cart :Done');
2107: --If there is no input quote access tbl then send notification to all recipients.
2108: --dbms_output.put_line('p_quote_access_tbl(1).quote_sharee_id: '||nvl(p_quote_access_tbl(1).quote_sharee_id,0));
2148: EXIT when c_get_recipient_info%notfound;
2149: END LOOP;
2150: END LOOP;
2151: END IF;
2152: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2153: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient on the following recipients:');
2154: END IF;
2155: --dbms_output.put_line('STOP_SHARING:calling delete_recipient on the following recipients:');
2156: FOR i in 1.. l_quote_access_tbl.count LOOP
2149: END LOOP;
2150: END LOOP;
2151: END IF;
2152: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2153: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient on the following recipients:');
2154: END IF;
2155: --dbms_output.put_line('STOP_SHARING:calling delete_recipient on the following recipients:');
2156: FOR i in 1.. l_quote_access_tbl.count LOOP
2157: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2153: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient on the following recipients:');
2154: END IF;
2155: --dbms_output.put_line('STOP_SHARING:calling delete_recipient on the following recipients:');
2156: FOR i in 1.. l_quote_access_tbl.count LOOP
2157: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2158: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient');
2159: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2160: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl(i).contact_point_id);
2161: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl(i).party_id);
2154: END IF;
2155: --dbms_output.put_line('STOP_SHARING:calling delete_recipient on the following recipients:');
2156: FOR i in 1.. l_quote_access_tbl.count LOOP
2157: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2158: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient');
2159: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2160: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl(i).contact_point_id);
2161: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl(i).party_id);
2162: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl(i).cust_account_id);
2155: --dbms_output.put_line('STOP_SHARING:calling delete_recipient on the following recipients:');
2156: FOR i in 1.. l_quote_access_tbl.count LOOP
2157: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2158: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient');
2159: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2160: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl(i).contact_point_id);
2161: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl(i).party_id);
2162: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl(i).cust_account_id);
2163: END IF;
2156: FOR i in 1.. l_quote_access_tbl.count LOOP
2157: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2158: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient');
2159: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2160: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl(i).contact_point_id);
2161: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl(i).party_id);
2162: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl(i).cust_account_id);
2163: END IF;
2164: --dbms_output.put_line('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2157: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2158: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient');
2159: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2160: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl(i).contact_point_id);
2161: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl(i).party_id);
2162: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl(i).cust_account_id);
2163: END IF;
2164: --dbms_output.put_line('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2165: --dbms_output.put_line('Calling delete recipient for the recipient record ');
2158: IBE_UTIL.DEBUG('STOP_SHARING:calling delete_recipient');
2159: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2160: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl(i).contact_point_id);
2161: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl(i).party_id);
2162: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl(i).cust_account_id);
2163: END IF;
2164: --dbms_output.put_line('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl(i).quote_sharee_id);
2165: --dbms_output.put_line('Calling delete recipient for the recipient record ');
2166: IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
2199: EXIT when c_get_recipients%notfound;
2200: END LOOP;
2201:
2202: FOR i in 1.. l_quote_access_tbl_tmp.count LOOP
2203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2204: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part begins');
2205: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2206: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl_tmp(i).contact_point_id);
2207: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl_tmp(i).party_id);
2200: END LOOP;
2201:
2202: FOR i in 1.. l_quote_access_tbl_tmp.count LOOP
2203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2204: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part begins');
2205: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2206: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl_tmp(i).contact_point_id);
2207: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl_tmp(i).party_id);
2208: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl_tmp(i).cust_account_id);
2201:
2202: FOR i in 1.. l_quote_access_tbl_tmp.count LOOP
2203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2204: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part begins');
2205: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2206: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl_tmp(i).contact_point_id);
2207: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl_tmp(i).party_id);
2208: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl_tmp(i).cust_account_id);
2209: END IF;
2202: FOR i in 1.. l_quote_access_tbl_tmp.count LOOP
2203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2204: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part begins');
2205: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2206: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl_tmp(i).contact_point_id);
2207: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl_tmp(i).party_id);
2208: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl_tmp(i).cust_account_id);
2209: END IF;
2210: --dbms_output.put_line('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2203: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2204: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part begins');
2205: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2206: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl_tmp(i).contact_point_id);
2207: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl_tmp(i).party_id);
2208: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl_tmp(i).cust_account_id);
2209: END IF;
2210: --dbms_output.put_line('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2211: --dbms_output.put_line('Calling delete recipient for the recipient record ');
2204: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part begins');
2205: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2206: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':contact_point_id: '||l_quote_access_tbl_tmp(i).contact_point_id);
2207: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':party_id: '||l_quote_access_tbl_tmp(i).party_id);
2208: IBE_UTIL.DEBUG('STOP_SHARING:l_quote_access_tbl:'||i||':cust_account_id: '||l_quote_access_tbl_tmp(i).cust_account_id);
2209: END IF;
2210: --dbms_output.put_line('STOP_SHARING:l_quote_access_tbl:'||i||':quote_sharee_id: '||l_quote_access_tbl_tmp(i).quote_sharee_id);
2211: --dbms_output.put_line('Calling delete recipient for the recipient record ');
2212: IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
2224: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2225: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2226: END IF;
2227: END LOOP;
2228: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2229: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part ends');
2230: END IF;
2231:
2232: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2225: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2226: END IF;
2227: END LOOP;
2228: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2229: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part ends');
2230: END IF;
2231:
2232: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2233: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.STOP_SHARING: END');
2228: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2229: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part ends');
2230: END IF;
2231:
2232: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2233: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.STOP_SHARING: END');
2234: END IF;
2235:
2236: EXCEPTION
2229: IBE_UTIL.DEBUG('STOP_SHARING: Concurrency part ends');
2230: END IF;
2231:
2232: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2233: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.STOP_SHARING: END');
2234: END IF;
2235:
2236: EXCEPTION
2237:
2240: x_return_status := FND_API.G_RET_STS_ERROR;
2241: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2242: p_count => x_msg_count ,
2243: p_data => x_msg_data);
2244: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2245: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.STOPSHARING_V2');
2246: END IF;
2247:
2248: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2241: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2242: p_count => x_msg_count ,
2243: p_data => x_msg_data);
2244: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2245: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.STOPSHARING_V2');
2246: END IF;
2247:
2248: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2249: ROLLBACK TO STOPSHARING_V2;
2250: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2251: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2252: p_count => x_msg_count ,
2253: p_data => x_msg_data);
2254: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2255: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.STOPSHARING_V2');
2256: END IF;
2257:
2258: WHEN OTHERS THEN
2251: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2252: p_count => x_msg_count ,
2253: p_data => x_msg_data);
2254: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2255: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.STOPSHARING_V2');
2256: END IF;
2257:
2258: WHEN OTHERS THEN
2259: ROLLBACK TO STOPSHARING_V2;
2264: END IF;
2265: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2266: p_count => x_msg_count ,
2267: p_data => x_msg_data);
2268: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2269: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.STOPSHARING_V2');
2270: END IF;
2271:
2272: END;
2265: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2266: p_count => x_msg_count ,
2267: p_data => x_msg_data);
2268: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2269: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.STOPSHARING_V2');
2270: END IF;
2271:
2272: END;
2273:
2353: l_initiator_id := rec_userenv_partyid.customer_id;
2354: EXIT when c_userenv_partyid%notfound;
2355: END LOOP;
2356:
2357: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2358: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2359: END IF;
2360: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2361: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2354: EXIT when c_userenv_partyid%notfound;
2355: END LOOP;
2356:
2357: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2358: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2359: END IF;
2360: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2361: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2362: IBE_UTIL.DEBUG('Opening cursor to retrieve the recipient_id');
2357: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2358: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2359: END IF;
2360: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2361: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2362: IBE_UTIL.DEBUG('Opening cursor to retrieve the recipient_id');
2363: END IF;
2364: --DBMS_OUTPUT.PUT_LINE('Opening cursor to retrieve the recipient_id');
2365: --DBMS_OUTPUT.PUT_LINE('p_quote_access_rec.quote_sharee_number: '||p_quote_access_rec.quote_sharee_number);
2358: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2359: END IF;
2360: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: START');
2361: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2362: IBE_UTIL.DEBUG('Opening cursor to retrieve the recipient_id');
2363: END IF;
2364: --DBMS_OUTPUT.PUT_LINE('Opening cursor to retrieve the recipient_id');
2365: --DBMS_OUTPUT.PUT_LINE('p_quote_access_rec.quote_sharee_number: '||p_quote_access_rec.quote_sharee_number);
2366: --DBMS_OUTPUT.PUT_LINE('p_quote_access_rec.party_id: '||p_quote_access_rec.party_id);
2378: l_quote_access_rec.cust_account_id := p_cust_account_id;
2379: l_quote_access_rec.quote_header_id := rec_get_recip_id.quote_header_id;
2380: EXIT WHEN c_get_recip_id%NOTFOUND;
2381: END LOOP;
2382: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2383: IBE_UTIL.DEBUG('Recipient id obtained is: '||l_quote_access_rec.quote_sharee_id);
2384: END IF;
2385:
2386: --DBMS_OUTPUT.PUT_LINE('Recipient id obtained is: '||l_quote_access_rec.quote_sharee_id);
2379: l_quote_access_rec.quote_header_id := rec_get_recip_id.quote_header_id;
2380: EXIT WHEN c_get_recip_id%NOTFOUND;
2381: END LOOP;
2382: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2383: IBE_UTIL.DEBUG('Recipient id obtained is: '||l_quote_access_rec.quote_sharee_id);
2384: END IF;
2385:
2386: --DBMS_OUTPUT.PUT_LINE('Recipient id obtained is: '||l_quote_access_rec.quote_sharee_id);
2387: IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
2417:
2418: -- Assign the quote_sharee_id to l_quote_access_rec (value needed in the notification api,3349991)
2419: l_quote_access_rec_recip.quote_sharee_id := p_quote_access_tbl(counter).quote_sharee_id;
2420:
2421: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2422: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: Ready to call view shared cart');
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2418: -- Assign the quote_sharee_id to l_quote_access_rec (value needed in the notification api,3349991)
2419: l_quote_access_rec_recip.quote_sharee_id := p_quote_access_tbl(counter).quote_sharee_id;
2420:
2421: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2422: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: Ready to call view shared cart');
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2426: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient id: '||l_quote_access_rec_recip.quote_sharee_id);
2419: l_quote_access_rec_recip.quote_sharee_id := p_quote_access_tbl(counter).quote_sharee_id;
2420:
2421: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2422: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: Ready to call view shared cart');
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2426: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient id: '||l_quote_access_rec_recip.quote_sharee_id);
2427: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:contact_point_id: '||l_quote_access_rec_recip.contact_point_id);
2420:
2421: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2422: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: Ready to call view shared cart');
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2426: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient id: '||l_quote_access_rec_recip.quote_sharee_id);
2427: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:contact_point_id: '||l_quote_access_rec_recip.contact_point_id);
2428: END IF;
2421: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2422: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: Ready to call view shared cart');
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2426: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient id: '||l_quote_access_rec_recip.quote_sharee_id);
2427: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:contact_point_id: '||l_quote_access_rec_recip.contact_point_id);
2428: END IF;
2429:
2422: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: Ready to call view shared cart');
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2426: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient id: '||l_quote_access_rec_recip.quote_sharee_id);
2427: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:contact_point_id: '||l_quote_access_rec_recip.contact_point_id);
2428: END IF;
2429:
2430: IBE_WORKFLOW_PVT.Notify_view_shared_cart(
2423: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:initiator_party_id: '||l_initiator_id);
2424: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient party_id: '||l_quote_access_rec_recip.party_id);
2425: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient number: '||l_quote_access_rec_recip.quote_sharee_number);
2426: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:recipient id: '||l_quote_access_rec_recip.quote_sharee_id);
2427: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING:contact_point_id: '||l_quote_access_rec_recip.contact_point_id);
2428: END IF;
2429:
2430: IBE_WORKFLOW_PVT.Notify_view_shared_cart(
2431: p_api_version => p_api_version
2446: END IF;
2447: END IF;
2448: END LOOP;
2449:
2450: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2451: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: END');
2452: END IF;
2453: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: END ');
2454: EXCEPTION
2447: END IF;
2448: END LOOP;
2449:
2450: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2451: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: END');
2452: END IF;
2453: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.END_WORKING: END ');
2454: EXCEPTION
2455: WHEN FND_API.G_EXC_ERROR THEN
2457: x_return_status := FND_API.G_RET_STS_ERROR;
2458: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2459: p_count => x_msg_count ,
2460: p_data => x_msg_data);
2461: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2462: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.ENDWORKING');
2463: END IF;
2464:
2465: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2458: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2459: p_count => x_msg_count ,
2460: p_data => x_msg_data);
2461: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2462: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.ENDWORKING');
2463: END IF;
2464:
2465: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2466: ROLLBACK TO ENDWORKING_V2;
2467: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2468: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2469: p_count => x_msg_count ,
2470: p_data => x_msg_data);
2471: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2472: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.ENDWORKING)');
2473: END IF;
2474:
2475: WHEN OTHERS THEN
2468: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2469: p_count => x_msg_count ,
2470: p_data => x_msg_data);
2471: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2472: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.ENDWORKING)');
2473: END IF;
2474:
2475: WHEN OTHERS THEN
2476: ROLLBACK TO ENDWORKING_V2;
2481: END IF;
2482: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2483: p_count => x_msg_count ,
2484: p_data => x_msg_data);
2485: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2486: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.ENDWORKING');
2487: END IF;
2488:
2489:
2482: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2483: p_count => x_msg_count ,
2484: p_data => x_msg_data);
2485: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2486: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.ENDWORKING');
2487: END IF;
2488:
2489:
2490: END;
2543: -------------------------------------------------------------------------------------------------------------
2544: --API Body start
2545: -------------------------------------------------------------------------------------------------------------
2546:
2547: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2548: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: START');
2549: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY:quote_header_id: '||p_quote_header_id);
2550: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: Querying initiator party id');
2551: END IF;
2544: --API Body start
2545: -------------------------------------------------------------------------------------------------------------
2546:
2547: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2548: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: START');
2549: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY:quote_header_id: '||p_quote_header_id);
2550: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: Querying initiator party id');
2551: END IF;
2552:
2545: -------------------------------------------------------------------------------------------------------------
2546:
2547: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2548: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: START');
2549: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY:quote_header_id: '||p_quote_header_id);
2550: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: Querying initiator party id');
2551: END IF;
2552:
2553: FOR rec_userenv_partyid in c_userenv_partyid LOOP
2546:
2547: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2548: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: START');
2549: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY:quote_header_id: '||p_quote_header_id);
2550: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: Querying initiator party id');
2551: END IF;
2552:
2553: FOR rec_userenv_partyid in c_userenv_partyid LOOP
2554: l_initiator_id := rec_userenv_partyid.customer_id;
2554: l_initiator_id := rec_userenv_partyid.customer_id;
2555: EXIT when c_userenv_partyid%notfound;
2556: END LOOP;
2557:
2558: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2559: IBE_UTIL.DEBUG('Building quote access table');
2560: END IF;
2561:
2562: FOR rec_get_recipients in c_get_recipients(p_quote_header_id) LOOP
2555: EXIT when c_userenv_partyid%notfound;
2556: END LOOP;
2557:
2558: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2559: IBE_UTIL.DEBUG('Building quote access table');
2560: END IF;
2561:
2562: FOR rec_get_recipients in c_get_recipients(p_quote_header_id) LOOP
2563:
2564: --Omitting the initiator's details as initiator is not required to get the notification
2565: IF (l_initiator_id <> nvl(rec_get_recipients.party_id,-1) ) THEN
2566: l_quote_access_tbl(tbl_counter).quote_sharee_id := rec_get_recipients.quote_sharee_id;
2567:
2568: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2569: IBE_UTIL.DEBUG('Added sharee quote_sharee_id: '||rec_get_recipients.quote_sharee_id);
2570: END IF;
2571:
2572: l_quote_access_tbl(tbl_counter).update_privilege_type_code := 'R';
2565: IF (l_initiator_id <> nvl(rec_get_recipients.party_id,-1) ) THEN
2566: l_quote_access_tbl(tbl_counter).quote_sharee_id := rec_get_recipients.quote_sharee_id;
2567:
2568: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2569: IBE_UTIL.DEBUG('Added sharee quote_sharee_id: '||rec_get_recipients.quote_sharee_id);
2570: END IF;
2571:
2572: l_quote_access_tbl(tbl_counter).update_privilege_type_code := 'R';
2573: l_quote_access_tbl(tbl_counter).party_id := rec_get_recipients.party_id;
2577: tbl_counter := tbl_counter+1;
2578: END IF;
2579: EXIT when c_get_recipients%notfound;
2580: END LOOP;
2581: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2582: IBE_UTIL.DEBUG('Done building quote access table');
2583: END IF;
2584:
2585: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2578: END IF;
2579: EXIT when c_get_recipients%notfound;
2580: END LOOP;
2581: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2582: IBE_UTIL.DEBUG('Done building quote access table');
2583: END IF;
2584:
2585: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2586: IBE_UTIL.DEBUG('Calling save_recipients to update recipient access level');
2581: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2582: IBE_UTIL.DEBUG('Done building quote access table');
2583: END IF;
2584:
2585: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2586: IBE_UTIL.DEBUG('Calling save_recipients to update recipient access level');
2587: END IF;
2588: IBE_QUOTE_SAVESHARE_V2_PVT.save_recipients(
2589: P_Quote_access_tbl => l_quote_access_tbl ,
2582: IBE_UTIL.DEBUG('Done building quote access table');
2583: END IF;
2584:
2585: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2586: IBE_UTIL.DEBUG('Calling save_recipients to update recipient access level');
2587: END IF;
2588: IBE_QUOTE_SAVESHARE_V2_PVT.save_recipients(
2589: P_Quote_access_tbl => l_quote_access_tbl ,
2590: P_Quote_header_id => P_Quote_header_id ,
2596: x_return_status => x_return_status ,
2597: x_msg_count => x_msg_count ,
2598: x_msg_data => x_msg_data );
2599:
2600: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2601: IBE_UTIL.DEBUG('Done calling save_recipients to update recipient access level');
2602: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: END');
2603: END IF;
2604:
2597: x_msg_count => x_msg_count ,
2598: x_msg_data => x_msg_data );
2599:
2600: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2601: IBE_UTIL.DEBUG('Done calling save_recipients to update recipient access level');
2602: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: END');
2603: END IF;
2604:
2605: EXCEPTION
2598: x_msg_data => x_msg_data );
2599:
2600: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2601: IBE_UTIL.DEBUG('Done calling save_recipients to update recipient access level');
2602: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.SHARE_READONLY: END');
2603: END IF;
2604:
2605: EXCEPTION
2606:
2609: x_return_status := FND_API.G_RET_STS_ERROR;
2610: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2611: p_count => x_msg_count ,
2612: p_data => x_msg_data);
2613: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2614: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.SHAREREADONLY_V2');
2615: END IF;
2616:
2617: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2610: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2611: p_count => x_msg_count ,
2612: p_data => x_msg_data);
2613: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2614: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.SHAREREADONLY_V2');
2615: END IF;
2616:
2617: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2618: ROLLBACK TO STOPSHARING_V2;
2619: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2620: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2621: p_count => x_msg_count ,
2622: p_data => x_msg_data);
2623: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2624: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.SHAREREADONLY_V2');
2625: END IF;
2626:
2627: WHEN OTHERS THEN
2620: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2621: p_count => x_msg_count ,
2622: p_data => x_msg_data);
2623: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2624: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.SHAREREADONLY_V2');
2625: END IF;
2626:
2627: WHEN OTHERS THEN
2628: ROLLBACK TO STOPSHARING_V2;
2633: END IF;
2634: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2635: p_count => x_msg_count ,
2636: p_data => x_msg_data);
2637: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2638: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.SHAREREADONLY_V2');
2639: END IF;
2640: END;
2641:
2634: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2635: p_count => x_msg_count ,
2636: p_data => x_msg_data);
2637: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2638: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.SHAREREADONLY_V2');
2639: END IF;
2640: END;
2641:
2642: /*To delete a recipient (a sort of wrapper around the "raw" delete table hander)
2719: -------------------------------------------------------------------------------------------------------------
2720: --API Body start
2721: -------------------------------------------------------------------------------------------------------------
2722:
2723: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2724: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: START');
2725: END IF;
2726: FOR rec_find_active_cart in c_find_active_cart loop
2727: IF(rec_find_active_cart.quote_header_id is not null) THEN
2720: --API Body start
2721: -------------------------------------------------------------------------------------------------------------
2722:
2723: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2724: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: START');
2725: END IF;
2726: FOR rec_find_active_cart in c_find_active_cart loop
2727: IF(rec_find_active_cart.quote_header_id is not null) THEN
2728: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2724: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: START');
2725: END IF;
2726: FOR rec_find_active_cart in c_find_active_cart loop
2727: IF(rec_find_active_cart.quote_header_id is not null) THEN
2728: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2729: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT:user has an active cart');
2730: IBE_UTIL.DEBUG('Calling update row handler to deactivate the cart');
2731: END IF;
2732: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT:user has an active cart');
2725: END IF;
2726: FOR rec_find_active_cart in c_find_active_cart loop
2727: IF(rec_find_active_cart.quote_header_id is not null) THEN
2728: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2729: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT:user has an active cart');
2730: IBE_UTIL.DEBUG('Calling update row handler to deactivate the cart');
2731: END IF;
2732: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT:user has an active cart');
2733:
2726: FOR rec_find_active_cart in c_find_active_cart loop
2727: IF(rec_find_active_cart.quote_header_id is not null) THEN
2728: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2729: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT:user has an active cart');
2730: IBE_UTIL.DEBUG('Calling update row handler to deactivate the cart');
2731: END IF;
2732: --DBMS_OUTPUT.PUT_LINE('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT:user has an active cart');
2733:
2734: IBE_ACTIVE_QUOTES_ALL_PKG.UPDATE_ROW(
2740: X_CURRENCY_CODE => null ,
2741: x_last_update_date => sysdate ,
2742: x_last_updated_by => fnd_global.user_id ,
2743: x_last_update_login => 1);
2744: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2745: IBE_UTIL.DEBUG('Done calling update row handler to deactivate the cart');
2746: END IF;
2747: END IF;
2748: EXIT WHEN c_find_active_cart%NOTFOUND;
2741: x_last_update_date => sysdate ,
2742: x_last_updated_by => fnd_global.user_id ,
2743: x_last_update_login => 1);
2744: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2745: IBE_UTIL.DEBUG('Done calling update row handler to deactivate the cart');
2746: END IF;
2747: END IF;
2748: EXIT WHEN c_find_active_cart%NOTFOUND;
2749: END LOOP;
2746: END IF;
2747: END IF;
2748: EXIT WHEN c_find_active_cart%NOTFOUND;
2749: END LOOP;
2750: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2751: IBE_UTIL.DEBUG('Calling Update row handler on sh_quote_access table to end-date recipient row');
2752: END IF;
2753: --DBMS_OUTPUT.PUT_LINE('Calling Update row handler on sh_quote_access table to end-date recipient row');
2754:
2747: END IF;
2748: EXIT WHEN c_find_active_cart%NOTFOUND;
2749: END LOOP;
2750: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2751: IBE_UTIL.DEBUG('Calling Update row handler on sh_quote_access table to end-date recipient row');
2752: END IF;
2753: --DBMS_OUTPUT.PUT_LINE('Calling Update row handler on sh_quote_access table to end-date recipient row');
2754:
2755: open c_get_contact_point_ovn(P_Quote_access_rec.quote_sharee_id);
2774:
2775: IBE_SH_QUOTE_ACCESS_PKG.update_Row(
2776: p_quote_sharee_id => P_Quote_access_rec.quote_sharee_id
2777: ,p_end_date_active => sysdate);
2778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2779: IBE_UTIL.DEBUG('Done calling Update row handler on sh_quote_access table to end-date recipient row');
2780: END IF;
2781: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2782: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: END');
2775: IBE_SH_QUOTE_ACCESS_PKG.update_Row(
2776: p_quote_sharee_id => P_Quote_access_rec.quote_sharee_id
2777: ,p_end_date_active => sysdate);
2778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2779: IBE_UTIL.DEBUG('Done calling Update row handler on sh_quote_access table to end-date recipient row');
2780: END IF;
2781: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2782: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: END');
2783: IBE_UTIL.DEBUG('delete_code is: '||p_delete_code);
2777: ,p_end_date_active => sysdate);
2778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2779: IBE_UTIL.DEBUG('Done calling Update row handler on sh_quote_access table to end-date recipient row');
2780: END IF;
2781: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2782: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: END');
2783: IBE_UTIL.DEBUG('delete_code is: '||p_delete_code);
2784: END IF;
2785:
2778: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2779: IBE_UTIL.DEBUG('Done calling Update row handler on sh_quote_access table to end-date recipient row');
2780: END IF;
2781: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2782: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: END');
2783: IBE_UTIL.DEBUG('delete_code is: '||p_delete_code);
2784: END IF;
2785:
2786: IF (p_quote_access_rec.notify_flag = FND_API.G_TRUE) THEN
2779: IBE_UTIL.DEBUG('Done calling Update row handler on sh_quote_access table to end-date recipient row');
2780: END IF;
2781: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2782: IBE_UTIL.DEBUG('IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT: END');
2783: IBE_UTIL.DEBUG('delete_code is: '||p_delete_code);
2784: END IF;
2785:
2786: IF (p_quote_access_rec.notify_flag = FND_API.G_TRUE) THEN
2787: --Notify_finish_sharing API with the appropriate delete_code
2795:
2796: -- notification that goes to the owner (so and so has finished working this cart)
2797: -- for generic email to owner, we need to add some special parameters since we will not have a retrieval number
2798: l_url := p_url || '&opid=' || l_owner_partyid || '&oaid=' || l_owner_accountid;
2799: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2800: IBE_UTIL.DEBUG('url for generic email to OWNER: '||l_url);
2801: END IF;
2802:
2803: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2796: -- notification that goes to the owner (so and so has finished working this cart)
2797: -- for generic email to owner, we need to add some special parameters since we will not have a retrieval number
2798: l_url := p_url || '&opid=' || l_owner_partyid || '&oaid=' || l_owner_accountid;
2799: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2800: IBE_UTIL.DEBUG('url for generic email to OWNER: '||l_url);
2801: END IF;
2802:
2803: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2804: IBE_UTIL.DEBUG('Calling notify_end_working API');
2799: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2800: IBE_UTIL.DEBUG('url for generic email to OWNER: '||l_url);
2801: END IF;
2802:
2803: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2804: IBE_UTIL.DEBUG('Calling notify_end_working API');
2805: END IF;
2806: IBE_WORKFLOW_PVT.Notify_End_Working(
2807: p_api_version => p_api_version ,
2800: IBE_UTIL.DEBUG('url for generic email to OWNER: '||l_url);
2801: END IF;
2802:
2803: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2804: IBE_UTIL.DEBUG('Calling notify_end_working API');
2805: END IF;
2806: IBE_WORKFLOW_PVT.Notify_End_Working(
2807: p_api_version => p_api_version ,
2808: p_init_msg_list => p_init_msg_list ,
2822: END IF;
2823: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2824: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2825: END IF;
2826: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2827: IBE_UTIL.DEBUG('Done calling notify_end_working API');
2828: END IF;
2829: ELSE
2830: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2823: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2824: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2825: END IF;
2826: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2827: IBE_UTIL.DEBUG('Done calling notify_end_working API');
2828: END IF;
2829: ELSE
2830: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2831: IBE_UTIL.DEBUG('Calling notify_finish_sharing API');
2826: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2827: IBE_UTIL.DEBUG('Done calling notify_end_working API');
2828: END IF;
2829: ELSE
2830: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2831: IBE_UTIL.DEBUG('Calling notify_finish_sharing API');
2832: END IF;
2833: --DBMS_OUTPUT.PUT_LINE('Calling notify_stop_sharing API ');
2834: -- notification that goes to the member (you no longer have access to this cart)
2827: IBE_UTIL.DEBUG('Done calling notify_end_working API');
2828: END IF;
2829: ELSE
2830: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2831: IBE_UTIL.DEBUG('Calling notify_finish_sharing API');
2832: END IF;
2833: --DBMS_OUTPUT.PUT_LINE('Calling notify_stop_sharing API ');
2834: -- notification that goes to the member (you no longer have access to this cart)
2835: IBE_WORKFLOW_PVT.Notify_Finish_Sharing(
2850: END IF;
2851: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2852: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2853: END IF;
2854: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2855: IBE_UTIL.DEBUG('Done calling notify_finish_sharing API');
2856: END IF;
2857: END IF; --end working or finish sharing
2858: END IF; --IF notify_flag is true
2851: IF (x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
2852: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2853: END IF;
2854: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2855: IBE_UTIL.DEBUG('Done calling notify_finish_sharing API');
2856: END IF;
2857: END IF; --end working or finish sharing
2858: END IF; --IF notify_flag is true
2859:
2863: x_return_status := FND_API.G_RET_STS_ERROR;
2864: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2865: p_count => x_msg_count ,
2866: p_data => x_msg_data);
2867: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2868: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT()');
2869: END IF;
2870:
2871: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2864: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2865: p_count => x_msg_count ,
2866: p_data => x_msg_data);
2867: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2868: IBE_Util.Debug('Expected error in IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT()');
2869: END IF;
2870:
2871: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2872: ROLLBACK TO DELETERECIPIENT_V2;
2873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2874: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2875: p_count => x_msg_count ,
2876: p_data => x_msg_data);
2877: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2878: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT()');
2879: END IF;
2880:
2881: WHEN OTHERS THEN
2874: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2875: p_count => x_msg_count ,
2876: p_data => x_msg_data);
2877: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2878: IBE_Util.Debug('Unexpected error in IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT()');
2879: END IF;
2880:
2881: WHEN OTHERS THEN
2882: ROLLBACK TO DELETERECIPIENT_V2;
2887: END IF;
2888: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2889: p_count => x_msg_count ,
2890: p_data => x_msg_data);
2891: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2892: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT()');
2893: END IF;
2894:
2895: END;
2888: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
2889: p_count => x_msg_count ,
2890: p_data => x_msg_data);
2891: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2892: IBE_Util.Debug('Unknown error in IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT()');
2893: END IF;
2894:
2895: END;
2896:
2961: rec_get_recipient_info c_get_recipient_info%rowtype;
2962:
2963: BEGIN
2964:
2965: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2966: IBE_UTIL.DEBUG('Begin validate_share_update : ' || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
2967: END IF;
2968:
2969: -- Standard call to check for call compatibility.
2962:
2963: BEGIN
2964:
2965: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2966: IBE_UTIL.DEBUG('Begin validate_share_update : ' || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
2967: END IF;
2968:
2969: -- Standard call to check for call compatibility.
2970: IF NOT FND_API.Compatible_API_Call (l_api_version,
2986:
2987: -- API body
2988: -- start by returning the input
2989:
2990: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2991: IBE_UTIL.DEBUG('Incoming quote_header_id is :'||p_quote_header_rec.quote_header_id);
2992: IBE_UTIL.DEBUG('Incoming operation_code is :'||p_operation_code);
2993: IBE_UTIL.DEBUG('Incoming party_id is :'||p_party_id);
2994: IBE_UTIL.DEBUG('Incoming account_id is :'||p_cust_account_id);
2987: -- API body
2988: -- start by returning the input
2989:
2990: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2991: IBE_UTIL.DEBUG('Incoming quote_header_id is :'||p_quote_header_rec.quote_header_id);
2992: IBE_UTIL.DEBUG('Incoming operation_code is :'||p_operation_code);
2993: IBE_UTIL.DEBUG('Incoming party_id is :'||p_party_id);
2994: IBE_UTIL.DEBUG('Incoming account_id is :'||p_cust_account_id);
2995: IBE_UTIL.DEBUG('Incoming retrieval_number is :'||p_retrieval_number);
2988: -- start by returning the input
2989:
2990: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2991: IBE_UTIL.DEBUG('Incoming quote_header_id is :'||p_quote_header_rec.quote_header_id);
2992: IBE_UTIL.DEBUG('Incoming operation_code is :'||p_operation_code);
2993: IBE_UTIL.DEBUG('Incoming party_id is :'||p_party_id);
2994: IBE_UTIL.DEBUG('Incoming account_id is :'||p_cust_account_id);
2995: IBE_UTIL.DEBUG('Incoming retrieval_number is :'||p_retrieval_number);
2996: END IF;
2989:
2990: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2991: IBE_UTIL.DEBUG('Incoming quote_header_id is :'||p_quote_header_rec.quote_header_id);
2992: IBE_UTIL.DEBUG('Incoming operation_code is :'||p_operation_code);
2993: IBE_UTIL.DEBUG('Incoming party_id is :'||p_party_id);
2994: IBE_UTIL.DEBUG('Incoming account_id is :'||p_cust_account_id);
2995: IBE_UTIL.DEBUG('Incoming retrieval_number is :'||p_retrieval_number);
2996: END IF;
2997:
2990: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
2991: IBE_UTIL.DEBUG('Incoming quote_header_id is :'||p_quote_header_rec.quote_header_id);
2992: IBE_UTIL.DEBUG('Incoming operation_code is :'||p_operation_code);
2993: IBE_UTIL.DEBUG('Incoming party_id is :'||p_party_id);
2994: IBE_UTIL.DEBUG('Incoming account_id is :'||p_cust_account_id);
2995: IBE_UTIL.DEBUG('Incoming retrieval_number is :'||p_retrieval_number);
2996: END IF;
2997:
2998: /* FOR rec_userenv_partyid in c_userenv_partyid LOOP
2991: IBE_UTIL.DEBUG('Incoming quote_header_id is :'||p_quote_header_rec.quote_header_id);
2992: IBE_UTIL.DEBUG('Incoming operation_code is :'||p_operation_code);
2993: IBE_UTIL.DEBUG('Incoming party_id is :'||p_party_id);
2994: IBE_UTIL.DEBUG('Incoming account_id is :'||p_cust_account_id);
2995: IBE_UTIL.DEBUG('Incoming retrieval_number is :'||p_retrieval_number);
2996: END IF;
2997:
2998: /* FOR rec_userenv_partyid in c_userenv_partyid LOOP
2999: l_userenv_party_id := rec_userenv_partyid.customer_id;
3007: ------------ USER VALIDATION - must be either owner or valid recipient ------------------------------
3008: if (l_owner_party_id <> p_party_id) then
3009: l_is_owner := FND_API.G_FALSE;
3010: else
3011: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3012: IBE_Util.Debug('Initiator is OWNER');
3013: END IF;
3014: end if;
3015:
3008: if (l_owner_party_id <> p_party_id) then
3009: l_is_owner := FND_API.G_FALSE;
3010: else
3011: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3012: IBE_Util.Debug('Initiator is OWNER');
3013: END IF;
3014: end if;
3015:
3016: -- if ((l_is_owner = FND_API.G_FALSE) and (p_operation_code <> OP_END_WORKING)) then
3015:
3016: -- if ((l_is_owner = FND_API.G_FALSE) and (p_operation_code <> OP_END_WORKING)) then
3017: if (l_is_owner = FND_API.G_FALSE) then
3018: -- if user is not the owner then we need to make sure he is a valid member
3019: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3020: IBE_Util.Debug('Initiator may be RECIPIENT');
3021: END IF;
3022: if ((p_retrieval_number is not null) and (p_retrieval_number <> FND_API.G_MISS_NUM)) then
3023: FOR rec_get_role_by_retr_num in c_get_role_by_retr_num(p_retrieval_number, p_party_id, p_cust_account_id) LOOP
3016: -- if ((l_is_owner = FND_API.G_FALSE) and (p_operation_code <> OP_END_WORKING)) then
3017: if (l_is_owner = FND_API.G_FALSE) then
3018: -- if user is not the owner then we need to make sure he is a valid member
3019: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3020: IBE_Util.Debug('Initiator may be RECIPIENT');
3021: END IF;
3022: if ((p_retrieval_number is not null) and (p_retrieval_number <> FND_API.G_MISS_NUM)) then
3023: FOR rec_get_role_by_retr_num in c_get_role_by_retr_num(p_retrieval_number, p_party_id, p_cust_account_id) LOOP
3024: l_access_level := rec_get_role_by_retr_num.update_privilege_type_code;
3029: l_access_level := rec_get_role_by_user.update_privilege_type_code;
3030: EXIT when c_get_role_by_user%notfound;
3031: END LOOP;
3032: end if;
3033: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3034: IBE_Util.Debug('RECIPIENT access level: ' || l_access_level);
3035: END IF;
3036: if (l_access_level is null) then
3037: IF FND_Msg_Pub.Check_Msg_Level (FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
3030: EXIT when c_get_role_by_user%notfound;
3031: END LOOP;
3032: end if;
3033: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3034: IBE_Util.Debug('RECIPIENT access level: ' || l_access_level);
3035: END IF;
3036: if (l_access_level is null) then
3037: IF FND_Msg_Pub.Check_Msg_Level (FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
3038: FND_Message.Set_Name('IBE', 'IBE_SC_ERR_USERACCESS');
3079: elsif ((p_operation_code = OP_ACTIVATE_QUOTE) or (p_operation_code = OP_DEACTIVATE)) then
3080: l_check_updates := FND_API.G_FALSE; -- no validations to do here that have not already been done
3081: end if; -- end if else over operation_code
3082:
3083: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3084: IBE_UTIL.DEBUG('l_check_onlynotify is :'||l_check_onlynotify);
3085: IBE_UTIL.DEBUG('l_check_updates is :'||l_check_updates);
3086: END IF;
3087:
3080: l_check_updates := FND_API.G_FALSE; -- no validations to do here that have not already been done
3081: end if; -- end if else over operation_code
3082:
3083: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3084: IBE_UTIL.DEBUG('l_check_onlynotify is :'||l_check_onlynotify);
3085: IBE_UTIL.DEBUG('l_check_updates is :'||l_check_updates);
3086: END IF;
3087:
3088: ------------ VALIDATIONS ON THE INPUT QUOTE ACCESS TABLE ------------------------------
3081: end if; -- end if else over operation_code
3082:
3083: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3084: IBE_UTIL.DEBUG('l_check_onlynotify is :'||l_check_onlynotify);
3085: IBE_UTIL.DEBUG('l_check_updates is :'||l_check_updates);
3086: END IF;
3087:
3088: ------------ VALIDATIONS ON THE INPUT QUOTE ACCESS TABLE ------------------------------
3089: if ((l_check_updates = FND_API.G_TRUE) or (l_check_onlynotify = FND_API.G_TRUE)) then
3088: ------------ VALIDATIONS ON THE INPUT QUOTE ACCESS TABLE ------------------------------
3089: if ((l_check_updates = FND_API.G_TRUE) or (l_check_onlynotify = FND_API.G_TRUE)) then
3090: l_env_user_id := FND_GLOBAL.USER_ID;
3091: FOR i in 1..p_quote_access_tbl.count LOOP
3092: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3093: IBE_UTIL.DEBUG('current quote_sharee_id : '||p_quote_access_tbl(i).quote_sharee_id);
3094: end if;
3095: -- populate a local table with all the db data - but index it according to the input table
3096: -- in this loop, we will check every opcode if necessary
3089: if ((l_check_updates = FND_API.G_TRUE) or (l_check_onlynotify = FND_API.G_TRUE)) then
3090: l_env_user_id := FND_GLOBAL.USER_ID;
3091: FOR i in 1..p_quote_access_tbl.count LOOP
3092: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3093: IBE_UTIL.DEBUG('current quote_sharee_id : '||p_quote_access_tbl(i).quote_sharee_id);
3094: end if;
3095: -- populate a local table with all the db data - but index it according to the input table
3096: -- in this loop, we will check every opcode if necessary
3097: -- down below, we will end up only checking the ones that have a shareeid
3105: l_db_quote_access_tbl(i).end_date_active := rec_get_recipient_info.end_date_active;
3106: l_db_quote_access_tbl(i).update_privilege_type_code := rec_get_recipient_info.update_privilege_type_code;
3107: EXIT when c_get_recipient_info%notfound;
3108: END LOOP;
3109: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3110: IBE_UTIL.DEBUG('input op_code : '||p_quote_access_tbl(i).operation_code);
3111: IBE_UTIL.DEBUG('input last_update_date : '||to_char(p_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3112: IBE_UTIL.DEBUG('db last_update_date : '||to_char(l_db_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3113: IBE_UTIL.DEBUG('input access_level : '||p_quote_access_tbl(i).update_privilege_type_code);
3106: l_db_quote_access_tbl(i).update_privilege_type_code := rec_get_recipient_info.update_privilege_type_code;
3107: EXIT when c_get_recipient_info%notfound;
3108: END LOOP;
3109: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3110: IBE_UTIL.DEBUG('input op_code : '||p_quote_access_tbl(i).operation_code);
3111: IBE_UTIL.DEBUG('input last_update_date : '||to_char(p_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3112: IBE_UTIL.DEBUG('db last_update_date : '||to_char(l_db_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3113: IBE_UTIL.DEBUG('input access_level : '||p_quote_access_tbl(i).update_privilege_type_code);
3114: IBE_UTIL.DEBUG('db access_level : '||l_db_quote_access_tbl(i).update_privilege_type_code);
3107: EXIT when c_get_recipient_info%notfound;
3108: END LOOP;
3109: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3110: IBE_UTIL.DEBUG('input op_code : '||p_quote_access_tbl(i).operation_code);
3111: IBE_UTIL.DEBUG('input last_update_date : '||to_char(p_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3112: IBE_UTIL.DEBUG('db last_update_date : '||to_char(l_db_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3113: IBE_UTIL.DEBUG('input access_level : '||p_quote_access_tbl(i).update_privilege_type_code);
3114: IBE_UTIL.DEBUG('db access_level : '||l_db_quote_access_tbl(i).update_privilege_type_code);
3115: end if;
3108: END LOOP;
3109: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3110: IBE_UTIL.DEBUG('input op_code : '||p_quote_access_tbl(i).operation_code);
3111: IBE_UTIL.DEBUG('input last_update_date : '||to_char(p_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3112: IBE_UTIL.DEBUG('db last_update_date : '||to_char(l_db_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3113: IBE_UTIL.DEBUG('input access_level : '||p_quote_access_tbl(i).update_privilege_type_code);
3114: IBE_UTIL.DEBUG('db access_level : '||l_db_quote_access_tbl(i).update_privilege_type_code);
3115: end if;
3116: -- do the opcode permissions check as we loop
3109: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3110: IBE_UTIL.DEBUG('input op_code : '||p_quote_access_tbl(i).operation_code);
3111: IBE_UTIL.DEBUG('input last_update_date : '||to_char(p_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3112: IBE_UTIL.DEBUG('db last_update_date : '||to_char(l_db_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3113: IBE_UTIL.DEBUG('input access_level : '||p_quote_access_tbl(i).update_privilege_type_code);
3114: IBE_UTIL.DEBUG('db access_level : '||l_db_quote_access_tbl(i).update_privilege_type_code);
3115: end if;
3116: -- do the opcode permissions check as we loop
3117: if (l_check_onlynotify = FND_API.G_TRUE) then
3110: IBE_UTIL.DEBUG('input op_code : '||p_quote_access_tbl(i).operation_code);
3111: IBE_UTIL.DEBUG('input last_update_date : '||to_char(p_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3112: IBE_UTIL.DEBUG('db last_update_date : '||to_char(l_db_quote_access_tbl(i).last_update_date,'mm/dd/yyyy:hh24:MI:SS'));
3113: IBE_UTIL.DEBUG('input access_level : '||p_quote_access_tbl(i).update_privilege_type_code);
3114: IBE_UTIL.DEBUG('db access_level : '||l_db_quote_access_tbl(i).update_privilege_type_code);
3115: end if;
3116: -- do the opcode permissions check as we loop
3117: if (l_check_onlynotify = FND_API.G_TRUE) then
3118: -- make sure we are not creating, deleting, or doing any real updates
3133: end loop; -- end loop over input access tbl
3134: -- second loop to check last update dates
3135: if (l_check_updates = FND_API.G_TRUE) then
3136: FOR i in 1..p_quote_access_tbl.count LOOP
3137: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3138: IBE_UTIL.DEBUG('current quote_sharee_id : '||p_quote_access_tbl(i).quote_sharee_id);
3139: end if;
3140: if ((p_quote_access_tbl(i).quote_sharee_id is not null)
3141: and (p_quote_access_tbl(i).quote_sharee_id <> fnd_api.g_miss_num)) then
3134: -- second loop to check last update dates
3135: if (l_check_updates = FND_API.G_TRUE) then
3136: FOR i in 1..p_quote_access_tbl.count LOOP
3137: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3138: IBE_UTIL.DEBUG('current quote_sharee_id : '||p_quote_access_tbl(i).quote_sharee_id);
3139: end if;
3140: if ((p_quote_access_tbl(i).quote_sharee_id is not null)
3141: and (p_quote_access_tbl(i).quote_sharee_id <> fnd_api.g_miss_num)) then
3142:
3143: if ((p_quote_access_tbl(i).last_update_date <> FND_API.G_MISS_DATE) and
3144: (p_quote_access_tbl(i).last_update_date <> l_db_quote_access_tbl(i).last_update_date)) then
3145: -- i.e. don't throw exception if we want to end a row and it's already enddated.
3146: if ((p_quote_access_tbl(i).operation_code = 'DELETE') and (nvl(l_db_quote_access_tbl(i).end_date_active,sysdate-1) < sysdate)) then
3147: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3148: IBE_UTIL.DEBUG('deleteing an end dated row, allowing it to pass through');
3149: end if;
3150: elsif (l_env_user_id = l_db_quote_access_tbl(i).last_updated_by) then
3151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3144: (p_quote_access_tbl(i).last_update_date <> l_db_quote_access_tbl(i).last_update_date)) then
3145: -- i.e. don't throw exception if we want to end a row and it's already enddated.
3146: if ((p_quote_access_tbl(i).operation_code = 'DELETE') and (nvl(l_db_quote_access_tbl(i).end_date_active,sysdate-1) < sysdate)) then
3147: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3148: IBE_UTIL.DEBUG('deleteing an end dated row, allowing it to pass through');
3149: end if;
3150: elsif (l_env_user_id = l_db_quote_access_tbl(i).last_updated_by) then
3151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3152: IBE_UTIL.DEBUG('timestamps do not match, but user was the last to update the row so allowing it to go through');
3147: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3148: IBE_UTIL.DEBUG('deleteing an end dated row, allowing it to pass through');
3149: end if;
3150: elsif (l_env_user_id = l_db_quote_access_tbl(i).last_updated_by) then
3151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3152: IBE_UTIL.DEBUG('timestamps do not match, but user was the last to update the row so allowing it to go through');
3153: end if;
3154: else
3155: IF FND_Msg_Pub.Check_Msg_Level (FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
3148: IBE_UTIL.DEBUG('deleteing an end dated row, allowing it to pass through');
3149: end if;
3150: elsif (l_env_user_id = l_db_quote_access_tbl(i).last_updated_by) then
3151: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3152: IBE_UTIL.DEBUG('timestamps do not match, but user was the last to update the row so allowing it to go through');
3153: end if;
3154: else
3155: IF FND_Msg_Pub.Check_Msg_Level (FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
3156: FND_Message.Set_Name('IBE', 'IBE_SC_ERR_MEMBERS_OUT_OF_SYNC');
3164: end loop; -- end loop over input quote access tbl
3165: end if; -- end if doing check updates
3166: end if; -- end check of updates
3167:
3168: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3169: IBE_UTIL.DEBUG('End validate_share_update' || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
3170: END IF;
3171:
3172: EXCEPTION
3165: end if; -- end if doing check updates
3166: end if; -- end check of updates
3167:
3168: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3169: IBE_UTIL.DEBUG('End validate_share_update' || to_char(sysdate, 'mm/dd/yyyy:hh24:MI:SS'));
3170: END IF;
3171:
3172: EXCEPTION
3173: WHEN FND_API.G_EXC_ERROR THEN
3174: x_return_status := FND_API.G_RET_STS_ERROR;
3175: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3176: p_count => x_msg_count ,
3177: p_data => x_msg_data);
3178: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3179: IBE_Util.Debug('End IBE_Quote_Misc_pvt.validate_share_update: expected error');
3180: END IF;
3181: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3182: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3175: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3176: p_count => x_msg_count ,
3177: p_data => x_msg_data);
3178: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3179: IBE_Util.Debug('End IBE_Quote_Misc_pvt.validate_share_update: expected error');
3180: END IF;
3181: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
3182: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3183: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3182: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3183: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3184: p_count => x_msg_count ,
3185: p_data => x_msg_data);
3186: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3187: IBE_Util.Debug('End IBE_Quote_Misc_pvt.validate_share_update: unexpected error');
3188: END IF;
3189: WHEN OTHERS THEN
3190: IF FND_Msg_Pub.Check_Msg_Level(FND_Msg_Pub.G_MSG_LVL_UNEXP_ERROR) THEN
3183: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3184: p_count => x_msg_count ,
3185: p_data => x_msg_data);
3186: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3187: IBE_Util.Debug('End IBE_Quote_Misc_pvt.validate_share_update: unexpected error');
3188: END IF;
3189: WHEN OTHERS THEN
3190: IF FND_Msg_Pub.Check_Msg_Level(FND_Msg_Pub.G_MSG_LVL_UNEXP_ERROR) THEN
3191: FND_Msg_Pub.Add_Exc_Msg(G_PKG_NAME,
3193: END IF;
3194: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3195: p_count => x_msg_count ,
3196: p_data => x_msg_data);
3197: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3198: IBE_Util.Debug('End IBE_Quote_Misc_pvt.validate_share_update: other exception');
3199: END IF;
3200: END validate_share_update;
3201:
3194: FND_Msg_Pub.Count_And_Get(p_encoded => FND_API.G_FALSE,
3195: p_count => x_msg_count ,
3196: p_data => x_msg_data);
3197: IF (IBE_UTIL.G_DEBUGON = l_true) THEN
3198: IBE_Util.Debug('End IBE_Quote_Misc_pvt.validate_share_update: other exception');
3199: END IF;
3200: END validate_share_update;
3201:
3202: END IBE_QUOTE_SAVESHARE_V2_PVT;