DBA Data[Home] [Help]

APPS.CN_NOTIFY_ORDERS dependencies on CN_MESSAGE_PKG

Line 159: cn_message_pkg.debug('notify: adjust: entering notify_line (lid = '||p_line_id||') ');

155: CURSOR batch_size IS SELECT system_batch_size FROM cn_repositories WHERE org_id = x_org_id;
156:
157: BEGIN
158:
159: cn_message_pkg.debug('notify: adjust: entering notify_line (lid = '||p_line_id||') ');
160: fnd_file.put_line(fnd_file.Log, 'notify: adjust: entering notify_line (lid = '||p_line_id||') ');
161:
162: cn_process_audits_pkg.insert_row
163: ( l_rowid, l_proc_audit_id, NULL, 'NOT', 'Notification run',

Line 233: cn_message_pkg.debug('notify: adjust: . notified');

229: NVL(mtl.organization_id,NVL(oe_profile.value('OE_ORGANIZATION_ID',asoh.org_id),-99)) =
230: NVL(oe_profile.value('OE_ORGANIZATION_ID',asoh.org_id),-99)
231: AND mtl.inventory_item_id = asol.inventory_item_id
232: AND mtl.invoiceable_item_flag = 'Y'); -- only want invoiceable items
233: cn_message_pkg.debug('notify: adjust: . notified');
234: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . notified');
235: END IF;
236:
237: cn_message_pkg.debug('notify: adjust: exit from notify_line (lid = '||p_line_id||')');

Line 237: cn_message_pkg.debug('notify: adjust: exit from notify_line (lid = '||p_line_id||')');

233: cn_message_pkg.debug('notify: adjust: . notified');
234: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . notified');
235: END IF;
236:
237: cn_message_pkg.debug('notify: adjust: exit from notify_line (lid = '||p_line_id||')');
238: fnd_file.put_line(fnd_file.Log, 'notify: adjust: exit from notify_line (lid = '||p_line_id||')');
239: END notify_line;
240:
241:

Line 274: cn_message_pkg.debug('notify: adjust: entering notify_deleted_line (lid = '||p_line_id||')');

270: CURSOR batch_size IS SELECT system_batch_size FROM cn_repositories WHERE org_id = p_org_id;
271:
272: BEGIN
273:
274: cn_message_pkg.debug('notify: adjust: entering notify_deleted_line (lid = '||p_line_id||')');
275: fnd_file.put_line(fnd_file.Log, 'notify: adjust: entering notify_deleted_line (lid = '||p_line_id||')');
276:
277:
278: l_org_id := p_org_id;

Line 327: cn_message_pkg.debug('notify: adjust: . notified');

323: WHERE
324: asoh.header_id = p_header_id
325: AND asoh.booked_flag = 'Y'
326: AND asoh.org_id = l_org_id; -- only interested in status of booked
327: cn_message_pkg.debug('notify: adjust: . notified');
328: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . notified');
329: END IF;
330:
331: cn_message_pkg.debug('exit from notify_deleted_line (lid = '||p_line_id||')');

Line 331: cn_message_pkg.debug('exit from notify_deleted_line (lid = '||p_line_id||')');

327: cn_message_pkg.debug('notify: adjust: . notified');
328: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . notified');
329: END IF;
330:
331: cn_message_pkg.debug('exit from notify_deleted_line (lid = '||p_line_id||')');
332: fnd_file.put_line(fnd_file.Log, 'exit from notify_deleted_line (lid = '||p_line_id||')');
333: END notify_deleted_line;
334:
335: ---------------------------------------------------------------------------+

Line 366: cn_message_pkg.debug('notify: adjust: entering notify_affected_lines (lid = '||p_line_id||')');

362:
363: BEGIN
364: l_org_id := p_org_id;
365:
366: cn_message_pkg.debug('notify: adjust: entering notify_affected_lines (lid = '||p_line_id||')');
367: fnd_file.put_line(fnd_file.Log, 'notify: adjust: entering notify_affected_lines (lid = '||p_line_id||')');
368:
369: cn_process_audits_pkg.insert_row
370: ( l_rowid, l_proc_audit_id, NULL, 'NOT', 'Notification run',

Line 384: cn_message_pkg.debug('notify: adjust: . Header SC change');

380: -- Do this using a recursive self-call, so that any children of
381: -- these lines, which do not have their own sales credits, will
382: -- also be re-collected.
383: --+
384: cn_message_pkg.debug('notify: adjust: . Header SC change');
385: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . Header SC change');
386: FOR rec IN
387: (SELECT line_id
388: FROM aso_i_oe_order_lines_v asol

Line 406: cn_message_pkg.debug('notify: adjust: . Line SC change');

402: -- +
403: -- This is a line sales credt, so re-collect the line and
404: -- check if any child lines are affected.
405: --+
406: cn_message_pkg.debug('notify: adjust: . Line SC change');
407: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . Line SC change');
408: notify_line(p_header_id, p_line_id,x_org_id => l_org_id);
409: --+
410: -- Get some line information

Line 422: cn_message_pkg.debug('notify: adjust: .. Serv/Conf line');

418: --+
419: IF l_line_rec.service_reference_line_id IS NOT NULL OR
420: (l_line_rec.top_model_line_id IS NOT NULL
421: AND p_line_id <> l_line_rec.top_model_line_id) THEN
422: cn_message_pkg.debug('notify: adjust: .. Serv/Conf line');
423: fnd_file.put_line(fnd_file.Log, 'notify: adjust: .. Serv/Conf line');
424: NULL;
425: --+
426: -- If this is a 'Standard' line then also re-collect any Service

Line 433: cn_message_pkg.debug('notify: adjust: .. Standard line');

429: -- Note: Service Lines can be on a different order
430: --+
431: ELSIF l_line_rec.service_reference_line_id IS NULL
432: AND l_line_rec.top_model_line_id IS NULL THEN
433: cn_message_pkg.debug('notify: adjust: .. Standard line');
434: fnd_file.put_line(fnd_file.Log, 'notify: adjust: .. Standard line');
435: FOR rec IN
436: (SELECT header_id, line_id
437: FROM aso_i_oe_order_lines_v asol

Line 454: cn_message_pkg.debug('notify: adjust: .. Top Model line');

450: -- direct sales credits.
451: -- Note: Configured Lines will be on same order
452: --+
453: ELSIF p_line_id = l_line_rec.top_model_line_id THEN
454: cn_message_pkg.debug('notify: adjust: .. Top Model line');
455: fnd_file.put_line(fnd_file.Log, 'notify: adjust: .. Top Model line');
456: FOR rec IN
457: (SELECT line_id
458: FROM aso_i_oe_order_lines_v asol

Line 473: cn_message_pkg.debug('notify: adjust: exit from notify_affected_lines (lid = '||p_line_id||')');

469: END LOOP;
470: END IF;
471: END IF;
472:
473: cn_message_pkg.debug('notify: adjust: exit from notify_affected_lines (lid = '||p_line_id||')');
474: fnd_file.put_line(fnd_file.Log, 'notify: adjust: exit from notify_affected_lines (lid = '||p_line_id||')');
475: END notify_affected_lines;
476:
477: ------------------------------------------------------------------------------+

Line 544: cn_message_pkg.end_batch (p_parent_proc_audit_id);

540: --+
541: -- Create a Debug log file to track how the order was processed
542: --+
543: IF (p_parent_proc_audit_id IS NOT NULL) THEN
544: cn_message_pkg.end_batch (p_parent_proc_audit_id);
545: END IF;
546:
547: l_org_id := x_org_id;
548:

Line 549: cn_message_pkg.begin_batch(

545: END IF;
546:
547: l_org_id := x_org_id;
548:
549: cn_message_pkg.begin_batch(
550: x_parent_proc_audit_id => p_parent_proc_audit_id,
551: x_process_audit_id => l_process_audit_id,
552: x_request_id => fnd_global.conc_request_id,
553: x_process_type => 'ORD',

Line 556: cn_message_pkg.debug('notify: Got update information from Order Capture Feedback Queue for an adjusted order.');

552: x_request_id => fnd_global.conc_request_id,
553: x_process_type => 'ORD',
554: p_org_id => l_org_id);
555:
556: cn_message_pkg.debug('notify: Got update information from Order Capture Feedback Queue for an adjusted order.');
557: fnd_file.put_line(fnd_file.Log, 'notify: Got update information from Order Capture Feedback Queue for an adjusted order.');
558:
559: cn_message_pkg.debug('notify: Checking see if any changes have occured which are relevant to Sales Compensation.');
560: fnd_file.put_line(fnd_file.Log, 'notify: Checking see if any changes have occured which are relevant to Sales Compensation.');

Line 559: cn_message_pkg.debug('notify: Checking see if any changes have occured which are relevant to Sales Compensation.');

555:
556: cn_message_pkg.debug('notify: Got update information from Order Capture Feedback Queue for an adjusted order.');
557: fnd_file.put_line(fnd_file.Log, 'notify: Got update information from Order Capture Feedback Queue for an adjusted order.');
558:
559: cn_message_pkg.debug('notify: Checking see if any changes have occured which are relevant to Sales Compensation.');
560: fnd_file.put_line(fnd_file.Log, 'notify: Checking see if any changes have occured which are relevant to Sales Compensation.');
561:
562: cn_message_pkg.debug('notify: Entering adjust_order (hid = '||p_header_id||') ');
563: fnd_file.put_line(fnd_file.Log, 'notify: Entering adjust_order (hid = '||p_header_id||') ');

Line 562: cn_message_pkg.debug('notify: Entering adjust_order (hid = '||p_header_id||') ');

558:
559: cn_message_pkg.debug('notify: Checking see if any changes have occured which are relevant to Sales Compensation.');
560: fnd_file.put_line(fnd_file.Log, 'notify: Checking see if any changes have occured which are relevant to Sales Compensation.');
561:
562: cn_message_pkg.debug('notify: Entering adjust_order (hid = '||p_header_id||') ');
563: fnd_file.put_line(fnd_file.Log, 'notify: Entering adjust_order (hid = '||p_header_id||') ');
564:
565: -- Standard Start of API savepoint
566: SAVEPOINT Update_Headers;

Line 616: cn_message_pkg.debug('notify: adjust: Deleted Lines? - Line_Tbl');

612: l_order_changed := FALSE;
613: --+
614: -- Have any Lines been Deleted?
615: --+
616: cn_message_pkg.debug('notify: adjust: Deleted Lines? - Line_Tbl');
617: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Deleted Lines? - Line_Tbl');
618: FOR i IN NVL(p_line_tbl.FIRST,1)..NVL(p_line_tbl.LAST,0) LOOP
619: cn_message_pkg.debug('notify: adjust: . lid = '|| p_line_tbl(i).line_id || ' operation = ' || Nvl(p_line_tbl(i).operation,'NULL'));
620: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . lid = '|| p_line_tbl(i).line_id || ' operation = ' || Nvl(p_line_tbl(i).operation,'NULL'));

Line 619: cn_message_pkg.debug('notify: adjust: . lid = '|| p_line_tbl(i).line_id || ' operation = ' || Nvl(p_line_tbl(i).operation,'NULL'));

615: --+
616: cn_message_pkg.debug('notify: adjust: Deleted Lines? - Line_Tbl');
617: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Deleted Lines? - Line_Tbl');
618: FOR i IN NVL(p_line_tbl.FIRST,1)..NVL(p_line_tbl.LAST,0) LOOP
619: cn_message_pkg.debug('notify: adjust: . lid = '|| p_line_tbl(i).line_id || ' operation = ' || Nvl(p_line_tbl(i).operation,'NULL'));
620: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . lid = '|| p_line_tbl(i).line_id || ' operation = ' || Nvl(p_line_tbl(i).operation,'NULL'));
621: IF p_line_tbl(i).operation = 'DELETE' THEN
622: notify_deleted_line
623: (p_line_tbl(i).header_id,

Line 634: cn_message_pkg.debug('notify: adjust: Header Insert/Update?');

630: -- Or has a relevant Header field been Updated?
631: -- If so, collect (or re-collect) the entire Order
632: --+
633: IF NOT l_order_changed THEN
634: cn_message_pkg.debug('notify: adjust: Header Insert/Update?');
635: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Header Insert/Update?');
636:
637: cn_message_pkg.debug('notify: adjust: . operation = '|| Nvl(p_header_rec.operation,'NULL'));
638: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . operation = '|| Nvl(p_header_rec.operation,'NULL'));

Line 637: cn_message_pkg.debug('notify: adjust: . operation = '|| Nvl(p_header_rec.operation,'NULL'));

633: IF NOT l_order_changed THEN
634: cn_message_pkg.debug('notify: adjust: Header Insert/Update?');
635: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Header Insert/Update?');
636:
637: cn_message_pkg.debug('notify: adjust: . operation = '|| Nvl(p_header_rec.operation,'NULL'));
638: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . operation = '|| Nvl(p_header_rec.operation,'NULL'));
639:
640: IF p_header_rec.operation = 'CREATE' THEN
641: l_order_changed := TRUE;

Line 652: cn_message_pkg.debug('notify: adjust: . update of interest');

648: unequal(p_header_rec.transactional_curr_code , p_old_header_rec.transactional_curr_code) OR
649: unequal(p_header_rec.conversion_rate , p_old_header_rec.conversion_rate)
650: THEN
651: l_order_changed := TRUE;
652: cn_message_pkg.debug('notify: adjust: . update of interest');
653: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . update of interest');
654: END IF;
655: END IF;
656: IF l_order_changed THEN

Line 657: cn_message_pkg.debug('notify: adjust: . Calling Notify_Line for each line');

653: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . update of interest');
654: END IF;
655: END IF;
656: IF l_order_changed THEN
657: cn_message_pkg.debug('notify: adjust: . Calling Notify_Line for each line');
658: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . Calling Notify_Line for each line');
659: FOR l_affected_line_rec IN c_affected_lines(p_header_id)
660: LOOP
661: cn_notify_orders.notify_line

Line 683: cn_message_pkg.debug('notify: adjust: Line Insert/Update? - Line_Tbl');

679: -- Have any Order Lines been Inserted?
680: -- Or has a relevant Line field been Updated?
681: --+
682: IF NOT l_order_changed THEN
683: cn_message_pkg.debug('notify: adjust: Line Insert/Update? - Line_Tbl');
684: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Line Insert/Update? - Line_Tbl');
685:
686: -- Loop thru the 'new' table
687: <>

Line 689: cn_message_pkg.debug('notify: adjust: . lid = '||p_line_tbl(i).line_id||' operation = '|| Nvl(p_line_tbl(i).operation,'NULL'));

685:
686: -- Loop thru the 'new' table
687: <>
688: FOR i IN NVL(p_line_tbl.FIRST,1)..NVL(p_line_tbl.LAST,0) LOOP
689: cn_message_pkg.debug('notify: adjust: . lid = '||p_line_tbl(i).line_id||' operation = '|| Nvl(p_line_tbl(i).operation,'NULL'));
690: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . lid = '||p_line_tbl(i).line_id||' operation = '|| Nvl(p_line_tbl(i).operation,'NULL'));
691: --+
692: -- If operation CREATE, add notification for the line
693: --+

Line 736: cn_message_pkg.debug('notify: adjust: . update of interest');

732: unequal(p_line_tbl(i).ship_to_contact_id , p_old_line_tbl(l_idx).ship_to_contact_id) OR
733: unequal(p_line_tbl(i).line_category_code , p_old_line_tbl(l_idx).line_category_code) OR
734: (p_line_tbl(i).operation='UPDATE' AND p_old_line_tbl(l_idx).operation ='CREATE') -- Added for Main Line Placeholder Bug 4665116
735: THEN
736: cn_message_pkg.debug('notify: adjust: . update of interest');
737: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . update of interest');
738: cn_notify_orders.notify_line
739: (p_header_id, --p_line_tbl(i).header_id
740: p_line_tbl(i).line_id,x_org_id => l_org_id);

Line 749: cn_message_pkg.debug('notify: adjust: Header Sales Credit Deletion? - Header_Scredit_Tbl');

745: --+
746: -- Have any Header Sales Credits been Deleted?
747: --+
748: IF NOT l_order_changed THEN
749: cn_message_pkg.debug('notify: adjust: Header Sales Credit Deletion? - Header_Scredit_Tbl');
750: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Header Sales Credit Deletion? - Header_Scredit_Tbl');
751: FOR i IN NVL(p_header_scredit_tbl.FIRST,1)..NVL(p_header_scredit_tbl.LAST,0) LOOP
752: cn_message_pkg.debug('notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '|| Nvl(p_header_scredit_tbl(i).operation,'NULL'));
753: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '|| Nvl(p_header_scredit_tbl(i).operation,'NULL'));

Line 752: cn_message_pkg.debug('notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '|| Nvl(p_header_scredit_tbl(i).operation,'NULL'));

748: IF NOT l_order_changed THEN
749: cn_message_pkg.debug('notify: adjust: Header Sales Credit Deletion? - Header_Scredit_Tbl');
750: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Header Sales Credit Deletion? - Header_Scredit_Tbl');
751: FOR i IN NVL(p_header_scredit_tbl.FIRST,1)..NVL(p_header_scredit_tbl.LAST,0) LOOP
752: cn_message_pkg.debug('notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '|| Nvl(p_header_scredit_tbl(i).operation,'NULL'));
753: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '|| Nvl(p_header_scredit_tbl(i).operation,'NULL'));
754: IF p_header_scredit_tbl(i).operation = 'DELETE' THEN
755: cn_notify_orders.notify_affected_lines
756: (p_old_header_scredit_tbl(i).header_id,

Line 766: cn_message_pkg.debug('notify: adjust: Header Sales Credit Insert/Update? - Header_Scredit_Tbl');

762: -- Have any Header Sales Credits been Inserted?
763: -- Or has a relevant Sales Credit field been Updated?
764: --+
765: IF NOT l_order_changed THEN
766: cn_message_pkg.debug('notify: adjust: Header Sales Credit Insert/Update? - Header_Scredit_Tbl');
767: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Header Sales Credit Insert/Update? - Header_Scredit_Tbl');
768: -- Loop thru the 'new' table
769: <>
770: FOR i IN NVL(p_header_scredit_tbl.FIRST,1)..NVL(p_header_scredit_tbl.LAST,0) LOOP

Line 771: cn_message_pkg.debug('notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '||Nvl(p_header_scredit_tbl(i).operation,'NULL'));

767: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Header Sales Credit Insert/Update? - Header_Scredit_Tbl');
768: -- Loop thru the 'new' table
769: <>
770: FOR i IN NVL(p_header_scredit_tbl.FIRST,1)..NVL(p_header_scredit_tbl.LAST,0) LOOP
771: cn_message_pkg.debug('notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '||Nvl(p_header_scredit_tbl(i).operation,'NULL'));
772: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . scid = '||p_header_scredit_tbl(i).sales_credit_id|| ' operation = '||Nvl(p_header_scredit_tbl(i).operation,'NULL'));
773: --+
774: -- If we find an INSERT, flag the order changed and quit loop
775: --+

Line 811: cn_message_pkg.debug('notify: adjust: . update of interest');

807: unequal(p_header_scredit_tbl(i).line_id , p_old_header_scredit_tbl(l_idx).line_id) OR
808: unequal(p_header_scredit_tbl(i).salesrep_id , p_old_header_scredit_tbl(l_idx).salesrep_id) OR
809: unequal(p_header_scredit_tbl(i).percent , p_old_header_scredit_tbl(l_idx).percent)
810: THEN
811: cn_message_pkg.debug('notify: adjust: . update of interest');
812: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . update of interest');
813: cn_notify_orders.notify_affected_lines
814: (p_header_scredit_tbl(i).header_id,
815: p_header_scredit_tbl(i).line_id,p_org_id => l_org_id); -- this should be NULL

Line 824: cn_message_pkg.debug('notify: adjust: Line Sales Credit Deletion? - Line_Scredit_Tbl');

820: --+
821: -- Have any Line Sales Credits been Deleted?
822: --+
823: IF NOT l_order_changed THEN
824: cn_message_pkg.debug('notify: adjust: Line Sales Credit Deletion? - Line_Scredit_Tbl');
825: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Line Sales Credit Deletion? - Line_Scredit_Tbl');
826: FOR i IN NVL(p_line_scredit_tbl.FIRST,1)..NVL(p_line_scredit_tbl.LAST,0) LOOP
827: cn_message_pkg.debug('notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));
828: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));

Line 827: cn_message_pkg.debug('notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));

823: IF NOT l_order_changed THEN
824: cn_message_pkg.debug('notify: adjust: Line Sales Credit Deletion? - Line_Scredit_Tbl');
825: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Line Sales Credit Deletion? - Line_Scredit_Tbl');
826: FOR i IN NVL(p_line_scredit_tbl.FIRST,1)..NVL(p_line_scredit_tbl.LAST,0) LOOP
827: cn_message_pkg.debug('notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));
828: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));
829: IF p_line_scredit_tbl(i).operation = 'DELETE' THEN
830: cn_notify_orders.notify_affected_lines
831: (p_old_line_scredit_tbl(i).header_id,

Line 841: cn_message_pkg.debug('notify: adjust: Line Sales Credit Insert/Update? - Line_Scredit_Tbl');

837: -- Have any Line Sales Credits been Inserted?
838: -- Or has a relevant Sales Credit field been Updated?
839: --+
840: IF NOT l_order_changed THEN
841: cn_message_pkg.debug('notify: adjust: Line Sales Credit Insert/Update? - Line_Scredit_Tbl');
842: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Line Sales Credit Insert/Update? - Line_Scredit_Tbl');
843: -- Loop thru the 'new' table
844: <>
845: FOR i IN NVL(p_line_scredit_tbl.FIRST,1)..NVL(p_line_scredit_tbl.LAST,0) LOOP

Line 846: cn_message_pkg.debug('notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));

842: fnd_file.put_line(fnd_file.Log, 'notify: adjust: Line Sales Credit Insert/Update? - Line_Scredit_Tbl');
843: -- Loop thru the 'new' table
844: <>
845: FOR i IN NVL(p_line_scredit_tbl.FIRST,1)..NVL(p_line_scredit_tbl.LAST,0) LOOP
846: cn_message_pkg.debug('notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));
847: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . scid = '||p_line_scredit_tbl(i).sales_credit_id||' operation = '||Nvl(p_line_scredit_tbl(i).operation,'NULL'));
848: --+
849: -- If we find an INSERT, flag the order changed and quit loop
850: --+

Line 886: cn_message_pkg.debug('notify: adjust: . update of interest');

882: unequal(p_line_scredit_tbl(i).line_id , p_old_line_scredit_tbl(l_idx).line_id) OR
883: unequal(p_line_scredit_tbl(i).salesrep_id , p_old_line_scredit_tbl(l_idx).salesrep_id) OR
884: unequal(p_line_scredit_tbl(i).percent , p_old_line_scredit_tbl(l_idx).percent)
885: THEN
886: cn_message_pkg.debug('notify: adjust: . update of interest');
887: fnd_file.put_line(fnd_file.Log, 'notify: adjust: . update of interest');
888: cn_notify_orders.notify_affected_lines
889: (p_line_scredit_tbl(i).header_id,
890: p_line_scredit_tbl(i).line_id,p_org_id => l_org_id);

Line 895: cn_message_pkg.debug('notify: Exit from adjust_order (hid = '||p_header_id||') ');

891: END IF;
892: END IF;
893: END LOOP new_lsc_tbl_loop;
894: END IF;
895: cn_message_pkg.debug('notify: Exit from adjust_order (hid = '||p_header_id||') ');
896: fnd_file.put_line(fnd_file.Log, 'notify: Exit from adjust_order (hid = '||p_header_id||') ');
897:
898: cn_message_pkg.end_batch(l_process_audit_id);
899: -------------------+

Line 898: cn_message_pkg.end_batch(l_process_audit_id);

894: END IF;
895: cn_message_pkg.debug('notify: Exit from adjust_order (hid = '||p_header_id||') ');
896: fnd_file.put_line(fnd_file.Log, 'notify: Exit from adjust_order (hid = '||p_header_id||') ');
897:
898: cn_message_pkg.end_batch(l_process_audit_id);
899: -------------------+
900: -- End of API body.
901: -------------------+
902: -- Standard check of p_commit.

Line 913: cn_message_pkg.end_batch(l_process_audit_id);

909: p_data => x_msg_data ,
910: p_encoded => FND_API.G_FALSE);
911: EXCEPTION
912: WHEN FND_API.G_EXC_ERROR THEN
913: cn_message_pkg.end_batch(l_process_audit_id);
914: ROLLBACK TO Update_Headers;
915: x_return_status := FND_API.G_RET_STS_ERROR ;
916: FND_MSG_PUB.Count_And_Get
917: (p_count => x_msg_count,

Line 922: cn_message_pkg.end_batch(l_process_audit_id);

918: p_data => x_msg_data,
919: p_encoded => FND_API.G_FALSE);
920:
921: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
922: cn_message_pkg.end_batch(l_process_audit_id);
923: ROLLBACK TO Update_Headers;
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
925: FND_MSG_PUB.Count_And_Get
926: (p_count => x_msg_count,

Line 931: cn_message_pkg.end_batch(l_process_audit_id);

927: p_data => x_msg_data,
928: p_encoded => FND_API.G_FALSE);
929:
930: WHEN OTHERS THEN
931: cn_message_pkg.end_batch(l_process_audit_id);
932: ROLLBACK TO Update_Headers;
933: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
934: IF FND_MSG_PUB.Check_Msg_Level
935: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 1141: cn_message_pkg.end_batch (p_parent_proc_audit_id);

1137: --+
1138: -- Create a debug log file and dump out the error message list
1139: --+
1140: IF (p_parent_proc_audit_id IS NOT NULL) THEN
1141: cn_message_pkg.end_batch (p_parent_proc_audit_id);
1142: END IF;
1143: cn_message_pkg.begin_batch
1144: (x_parent_proc_audit_id => p_parent_proc_audit_id,
1145: x_process_audit_id => l_process_audit_id,

Line 1143: cn_message_pkg.begin_batch

1139: --+
1140: IF (p_parent_proc_audit_id IS NOT NULL) THEN
1141: cn_message_pkg.end_batch (p_parent_proc_audit_id);
1142: END IF;
1143: cn_message_pkg.begin_batch
1144: (x_parent_proc_audit_id => p_parent_proc_audit_id,
1145: x_process_audit_id => l_process_audit_id,
1146: x_request_id => fnd_global.conc_request_id,
1147: x_process_type => 'ORD',

Line 1150: cn_message_pkg.debug('<>');

1146: x_request_id => fnd_global.conc_request_id,
1147: x_process_type => 'ORD',
1148: p_org_id => x_org_id);
1149:
1150: cn_message_pkg.debug('<>');
1151: fnd_file.put_line(fnd_file.Log, '<>');
1152:
1153: cn_api.get_fnd_message(NULL,NULL);
1154: cn_message_pkg.end_batch (l_process_audit_id);

Line 1154: cn_message_pkg.end_batch (l_process_audit_id);

1150: cn_message_pkg.debug('<>');
1151: fnd_file.put_line(fnd_file.Log, '<>');
1152:
1153: cn_api.get_fnd_message(NULL,NULL);
1154: cn_message_pkg.end_batch (l_process_audit_id);
1155:
1156: RETURN;
1157:
1158: END IF;

Line 1312: cn_message_pkg.debug('notify: cn_notify_orders.regular_col_notify>>');

1308: END IF;
1309:
1310: cn_debug.print_msg('>>cn_notify_orders.regular_col_notify', 1);
1311:
1312: cn_message_pkg.debug('notify: cn_notify_orders.regular_col_notify>>');
1313: fnd_file.put_line(fnd_file.Log, 'notify: cn_notify_orders.regular_col_notify>>');
1314:
1315: --Added as per OM MOAC Mandate
1316: MO_GLOBAL.SET_POLICY_CONTEXT ('S', x_org_id);

Line 1322: cn_message_pkg.debug('notify: Get_Notice>>');

1318:
1319: --+
1320: -- Call Get_Notice to get any pending order updates off of the queue
1321: --+
1322: cn_message_pkg.debug('notify: Get_Notice>>');
1323: fnd_file.put_line(fnd_file.Log, 'notify: Get_Notice>>');
1324:
1325: cn_message_pkg.debug('notify: Getting any pending order updates off of the Order Capture Feedback Queue');
1326: fnd_file.put_line(fnd_file.Log, 'notify: Getting any pending order updates off of the Order Capture Feedback Queue');

Line 1325: cn_message_pkg.debug('notify: Getting any pending order updates off of the Order Capture Feedback Queue');

1321: --+
1322: cn_message_pkg.debug('notify: Get_Notice>>');
1323: fnd_file.put_line(fnd_file.Log, 'notify: Get_Notice>>');
1324:
1325: cn_message_pkg.debug('notify: Getting any pending order updates off of the Order Capture Feedback Queue');
1326: fnd_file.put_line(fnd_file.Log, 'notify: Getting any pending order updates off of the Order Capture Feedback Queue');
1327:
1328: l_client_org_id := x_org_id;
1329:

Line 1332: cn_message_pkg.debug('notify: Get_Notice<<');

1328: l_client_org_id := x_org_id;
1329:
1330: Get_Notice(p_parent_proc_audit_id => parent_proc_audit_id, x_org_id => l_client_org_id);
1331:
1332: cn_message_pkg.debug('notify: Get_Notice<<');
1333: fnd_file.put_line(fnd_file.Log, 'notify: Get_Notice<<');
1334:
1335: l_proc_audit_id := NULL; -- Gets a value in the call below
1336:

Line 1344: cn_message_pkg.debug

1340:
1341: cn_periods_api.set_dates(x_start_period, x_end_period, x_org_id,
1342: l_start_date, l_end_date);
1343:
1344: cn_message_pkg.debug
1345: ( 'notify: Inserting records into CN_NOT_TRX from period '
1346: || l_start_date ||' to period '|| l_end_date ||'.');
1347:
1348: fnd_file.put_line(fnd_file.Log, 'notify: Inserting records into CN_NOT_TRX from period '

Line 1427: cn_message_pkg.debug('notify: No rows inserted into CN_NOT_TRX. Possible reason: Order transactions may have already been collected.');

1423: --DBMS_OUTPUT.put_line('parent_proc_audit_id '||parent_proc_audit_id);
1424:
1425: IF ( l_trx_count = 0 ) THEN
1426:
1427: cn_message_pkg.debug('notify: No rows inserted into CN_NOT_TRX. Possible reason: Order transactions may have already been collected.');
1428: fnd_file.put_line(fnd_file.Log, 'notify: No rows inserted into CN_NOT_TRX. Possible reason: Order transactions may have already been collected.');
1429:
1430: END IF;
1431:

Line 1434: cn_message_pkg.debug('notify: Finished notification run: Notified ' || l_trx_count || ' orders.');

1430: END IF;
1431:
1432: -- COMMIT; -- Commit now done by Order Capture notification process or by CN_COLLECT_ORDERS
1433:
1434: cn_message_pkg.debug('notify: Finished notification run: Notified ' || l_trx_count || ' orders.');
1435: fnd_file.put_line(fnd_file.Log, 'notify: Finished notification run: Notified ' || l_trx_count || ' orders.');
1436:
1437: cn_debug.print_msg('cn_notify_orders.regular_col_notify<<', 1);
1438:

Line 1439: cn_message_pkg.debug('notify: cn_notify_orders.regular_col_notify<<');

1435: fnd_file.put_line(fnd_file.Log, 'notify: Finished notification run: Notified ' || l_trx_count || ' orders.');
1436:
1437: cn_debug.print_msg('cn_notify_orders.regular_col_notify<<', 1);
1438:
1439: cn_message_pkg.debug('notify: cn_notify_orders.regular_col_notify<<');
1440: fnd_file.put_line(fnd_file.Log, 'notify: cn_notify_orders.regular_col_notify<<');
1441:
1442: cn_message_pkg.end_batch (l_proc_audit_id);
1443:

Line 1442: cn_message_pkg.end_batch (l_proc_audit_id);

1438:
1439: cn_message_pkg.debug('notify: cn_notify_orders.regular_col_notify<<');
1440: fnd_file.put_line(fnd_file.Log, 'notify: cn_notify_orders.regular_col_notify<<');
1441:
1442: cn_message_pkg.end_batch (l_proc_audit_id);
1443:
1444:
1445: EXCEPTION
1446: WHEN OTHERS THEN ROLLBACK;

Line 1448: cn_message_pkg.debug('notify_orders: in exception handler');

1444:
1445: EXCEPTION
1446: WHEN OTHERS THEN ROLLBACK;
1447:
1448: cn_message_pkg.debug('notify_orders: in exception handler');
1449: fnd_file.put_line(fnd_file.Log, 'notify_orders: in exception handler');
1450:
1451: cn_message_pkg.debug(SQLCODE||' '||SQLERRM);
1452: fnd_file.put_line(fnd_file.Log, SQLCODE||' '||SQLERRM);

Line 1451: cn_message_pkg.debug(SQLCODE||' '||SQLERRM);

1447:
1448: cn_message_pkg.debug('notify_orders: in exception handler');
1449: fnd_file.put_line(fnd_file.Log, 'notify_orders: in exception handler');
1450:
1451: cn_message_pkg.debug(SQLCODE||' '||SQLERRM);
1452: fnd_file.put_line(fnd_file.Log, SQLCODE||' '||SQLERRM);
1453:
1454: cn_debug.print_msg('notify_orders: in exception handler', 1);
1455: cn_process_audits_pkg.update_row(l_proc_audit_id, NULL, SYSDATE, SQLCODE,

Line 1457: cn_message_pkg.end_batch (l_proc_audit_id);

1453:
1454: cn_debug.print_msg('notify_orders: in exception handler', 1);
1455: cn_process_audits_pkg.update_row(l_proc_audit_id, NULL, SYSDATE, SQLCODE,
1456: SQLERRM);
1457: cn_message_pkg.end_batch (l_proc_audit_id);
1458:
1459: app_exception.raise_exception;
1460:
1461: