DBA Data[Home] [Help]

APPS.ITG_SYNCPOINBOUND_PVT dependencies on ITG_DEBUG

Line 112: ITG_Debug.msg('GCC', 'Entering ...');

108: p_lloc IN lloc_rec,
109: p_qty_oper IN NUMBER
110: ) RETURN VARCHAR2 IS
111: BEGIN
112: ITG_Debug.msg('GCC', 'Entering ...');
113: ITG_Debug.msg('GCC', 'Quantity', p_lloc.quantity);
114: ITG_Debug.msg('GCC', 'Quantity operation', p_qty_oper);
115: ITG_Debug.msg('GCC', 'Tolerance', p_lloc.receive_close_tolerance);
116: ITG_Debug.msg('GCC', 'Closed code', p_lloc.closed_code);

Line 113: ITG_Debug.msg('GCC', 'Quantity', p_lloc.quantity);

109: p_qty_oper IN NUMBER
110: ) RETURN VARCHAR2 IS
111: BEGIN
112: ITG_Debug.msg('GCC', 'Entering ...');
113: ITG_Debug.msg('GCC', 'Quantity', p_lloc.quantity);
114: ITG_Debug.msg('GCC', 'Quantity operation', p_qty_oper);
115: ITG_Debug.msg('GCC', 'Tolerance', p_lloc.receive_close_tolerance);
116: ITG_Debug.msg('GCC', 'Closed code', p_lloc.closed_code);
117: IF p_qty_oper >= (p_lloc.quantity - ROUND(

Line 114: ITG_Debug.msg('GCC', 'Quantity operation', p_qty_oper);

110: ) RETURN VARCHAR2 IS
111: BEGIN
112: ITG_Debug.msg('GCC', 'Entering ...');
113: ITG_Debug.msg('GCC', 'Quantity', p_lloc.quantity);
114: ITG_Debug.msg('GCC', 'Quantity operation', p_qty_oper);
115: ITG_Debug.msg('GCC', 'Tolerance', p_lloc.receive_close_tolerance);
116: ITG_Debug.msg('GCC', 'Closed code', p_lloc.closed_code);
117: IF p_qty_oper >= (p_lloc.quantity - ROUND(
118: p_lloc.quantity * p_lloc.receive_close_tolerance/100)) THEN

Line 115: ITG_Debug.msg('GCC', 'Tolerance', p_lloc.receive_close_tolerance);

111: BEGIN
112: ITG_Debug.msg('GCC', 'Entering ...');
113: ITG_Debug.msg('GCC', 'Quantity', p_lloc.quantity);
114: ITG_Debug.msg('GCC', 'Quantity operation', p_qty_oper);
115: ITG_Debug.msg('GCC', 'Tolerance', p_lloc.receive_close_tolerance);
116: ITG_Debug.msg('GCC', 'Closed code', p_lloc.closed_code);
117: IF p_qty_oper >= (p_lloc.quantity - ROUND(
118: p_lloc.quantity * p_lloc.receive_close_tolerance/100)) THEN
119: IF NVL(p_lloc.closed_code, 'OPEN') = 'OPEN' THEN

Line 116: ITG_Debug.msg('GCC', 'Closed code', p_lloc.closed_code);

112: ITG_Debug.msg('GCC', 'Entering ...');
113: ITG_Debug.msg('GCC', 'Quantity', p_lloc.quantity);
114: ITG_Debug.msg('GCC', 'Quantity operation', p_qty_oper);
115: ITG_Debug.msg('GCC', 'Tolerance', p_lloc.receive_close_tolerance);
116: ITG_Debug.msg('GCC', 'Closed code', p_lloc.closed_code);
117: IF p_qty_oper >= (p_lloc.quantity - ROUND(
118: p_lloc.quantity * p_lloc.receive_close_tolerance/100)) THEN
119: IF NVL(p_lloc.closed_code, 'OPEN') = 'OPEN' THEN
120: IF p_doc_type = 'RECEIPT' THEN

Line 201: ITG_Debug.msg('AALL', 'Entering...');

197: x_rec.changed := 1;
198: END;
199:
200: BEGIN
201: ITG_Debug.msg('AALL', 'Entering...');
202:
203: l_lltab.delete;
204: l_qty := p_quantity;
205: IF l_release_id IS NULL THEN

Line 295: ITG_Debug.msg('AALL', 'Reading the data.');

291: END IF;
292: END IF;
293:
294: /* Read the data. */
295: ITG_Debug.msg('AALL', 'Reading the data.');
296: LOOP
297: FETCH line_loc_csr INTO l_tmp;
298: IF line_loc_csr%NOTFOUND THEN
299: EXIT;

Line 322: ITG_Debug.msg('AALL', 'Distributing the quantity.');

318: END IF;
319:
320: l_last := -1;
321: /* Distrubute the quantity. */
322: ITG_Debug.msg('AALL', 'Distributing the quantity.');
323: FOR i in 1 .. l_lltab.count LOOP
324: l_last := i;
325: setup_doctype_qtys(l_lltab(i));
326: IF l_qty > 0 THEN

Line 332: ITG_Debug.msg('AALL', 'Full allocate.');

328: /* Additional quantity available to allocate is greater than or
329: * equal to the Quantity to allocate, thus total quantity can be
330: * allocated here.
331: */
332: ITG_Debug.msg('AALL', 'Full allocate.');
333: l_subj_qty := l_subj_qty + l_qty;
334: l_lltab(i).new_quantity := l_qty;
335: l_qty := 0;
336: ELSE

Line 341: ITG_Debug.msg('AALL', 'Partial allocate.');

337: /* Quantity to allocate is more than the additional Quantity
338: * available to allocate, thus allocate the max available without
339: * tolerance.
340: */
341: ITG_Debug.msg('AALL', 'Partial allocate.');
342: l_lltab(i).new_quantity := l_base_qty - l_subj_qty;
343: l_subj_qty := l_base_qty;
344: l_qty := l_qty - l_lltab(i).new_quantity;
345: END IF;

Line 353: ITG_Debug.msg('AALL', 'Full CR allocate.');

349: /* Quantity previously received and available to return is
350: * greater than or equal to the Quantity to allocate, thus
351: * total quantity can be allocated here.
352: */
353: ITG_Debug.msg('AALL', 'Full CR allocate.');
354: l_subj_qty := l_subj_qty + l_qty;
355: l_lltab(i).new_quantity := l_qty;
356: l_qty := 0;
357: ELSE

Line 361: ITG_Debug.msg('AALL', 'Partial CR allocate.');

357: ELSE
358: /* Quantity to allocate is more than the Quantity previously
359: * received, thus allocate the max available without tolerance.
360: */
361: ITG_Debug.msg('AALL', 'Partial CR allocate.');
362: l_lltab(i).new_quantity := 0 - l_subj_qty;
363: l_subj_qty := 0;
364: l_qty := l_qty - l_lltab(i).new_quantity;
365: END IF;

Line 367: ITG_Debug.msg('AALL', 'l_qty', l_qty);

363: l_subj_qty := 0;
364: l_qty := l_qty - l_lltab(i).new_quantity;
365: END IF;
366: END IF;
367: ITG_Debug.msg('AALL', 'l_qty', l_qty);
368: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);
369: change_doctype_qtys(l_lltab(i));
370: EXIT WHEN l_qty = 0;
371: END LOOP;

Line 368: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);

364: l_qty := l_qty - l_lltab(i).new_quantity;
365: END IF;
366: END IF;
367: ITG_Debug.msg('AALL', 'l_qty', l_qty);
368: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);
369: change_doctype_qtys(l_lltab(i));
370: EXIT WHEN l_qty = 0;
371: END LOOP;
372:

Line 382: ITG_Debug.msg('AALL', 'More quantity', l_qty);

378: /* Trying to RETURN or CREDIT more than received or billed. */
379: ITG_MSG.allocship_toomany_rtn;
380: RAISE FND_API.G_EXC_ERROR;
381: ELSIF l_qty > 0 THEN
382: ITG_Debug.msg('AALL', 'More quantity', l_qty);
383: /* Still have more? Lets try put those in the last shipment line.
384: * We need to worry about the tolerance level while trying to
385: * allocate remaining l_qty if exception code is REJECT. Calculate
386: * the maximum additional tolerance quantity receiveable on this

Line 406: ITG_Debug.msg('AALL', 'Partial DB tolerance.');

402: */
403: l_subj_qty := l_subj_qty + l_tmp_qty;
404: l_tmp.new_quantity := l_tmp.new_quantity + l_tmp_qty;
405: l_qty := l_qty - l_tmp_qty;
406: ITG_Debug.msg('AALL', 'Partial DB tolerance.');
407: ELSE
408: /* Exception code is not REJECT or the tolerance quantity is
409: * enough to cover the extra needed, put everything in last
410: * shipment line.

Line 416: ITG_Debug.msg('AALL', 'Full DB tolerance.');

412: l_subj_qty := l_subj_qty + l_qty;
413: l_tmp.new_quantity := l_tmp.new_quantity + l_qty;
414: l_qty := 0;
415: IF l_tmp.qty_rcv_exception_code = 'REJECT' THEN
416: ITG_Debug.msg('AALL', 'Full DB tolerance.');
417: ELSE
418: ITG_Debug.msg('AALL', 'Partial DB no tolerance.');
419: END IF;
420: END IF;

Line 418: ITG_Debug.msg('AALL', 'Partial DB no tolerance.');

414: l_qty := 0;
415: IF l_tmp.qty_rcv_exception_code = 'REJECT' THEN
416: ITG_Debug.msg('AALL', 'Full DB tolerance.');
417: ELSE
418: ITG_Debug.msg('AALL', 'Partial DB no tolerance.');
419: END IF;
420: END IF;
421: ITG_Debug.msg('AALL', 'l_qty', l_qty);
422: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);

Line 421: ITG_Debug.msg('AALL', 'l_qty', l_qty);

417: ELSE
418: ITG_Debug.msg('AALL', 'Partial DB no tolerance.');
419: END IF;
420: END IF;
421: ITG_Debug.msg('AALL', 'l_qty', l_qty);
422: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);
423: change_doctype_qtys(l_tmp);
424: l_lltab(l_last) := l_tmp;
425: END IF;

Line 422: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);

418: ITG_Debug.msg('AALL', 'Partial DB no tolerance.');
419: END IF;
420: END IF;
421: ITG_Debug.msg('AALL', 'l_qty', l_qty);
422: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);
423: change_doctype_qtys(l_tmp);
424: l_lltab(l_last) := l_tmp;
425: END IF;
426: ITG_Debug.msg('AALL', 'Leaving with leftover', l_qty);

Line 426: ITG_Debug.msg('AALL', 'Leaving with leftover', l_qty);

422: ITG_Debug.msg('AALL', 'l_subj_qty', l_subj_qty);
423: change_doctype_qtys(l_tmp);
424: l_lltab(l_last) := l_tmp;
425: END IF;
426: ITG_Debug.msg('AALL', 'Leaving with leftover', l_qty);
427: /* Indicate any leftover quantity problem. */
428: RETURN l_qty <> 0;
429: END aa_llocs;
430:

Line 463: ITG_Debug.msg('AAD', 'Entering..');

459: l_quantity NUMBER;
460: l_disttab po_dist_tab;
461:
462: BEGIN
463: ITG_Debug.msg('AAD', 'Entering..');
464: ITG_Debug.msg('AAD', 'line_loc_id', p_line_loc_id);
465: ITG_Debug.msg('AAD', 'quantity', p_quantity);
466: l_quantity := p_quantity;
467: l_disttab.DELETE;

Line 464: ITG_Debug.msg('AAD', 'line_loc_id', p_line_loc_id);

460: l_disttab po_dist_tab;
461:
462: BEGIN
463: ITG_Debug.msg('AAD', 'Entering..');
464: ITG_Debug.msg('AAD', 'line_loc_id', p_line_loc_id);
465: ITG_Debug.msg('AAD', 'quantity', p_quantity);
466: l_quantity := p_quantity;
467: l_disttab.DELETE;
468: FOR rec IN po_dist_csr LOOP

Line 465: ITG_Debug.msg('AAD', 'quantity', p_quantity);

461:
462: BEGIN
463: ITG_Debug.msg('AAD', 'Entering..');
464: ITG_Debug.msg('AAD', 'line_loc_id', p_line_loc_id);
465: ITG_Debug.msg('AAD', 'quantity', p_quantity);
466: l_quantity := p_quantity;
467: l_disttab.DELETE;
468: FOR rec IN po_dist_csr LOOP
469: /* Determine how much to allocate to each distribution line. */

Line 472: ITG_Debug.msg('AAD', 'i', i);

468: FOR rec IN po_dist_csr LOOP
469: /* Determine how much to allocate to each distribution line. */
470: i := po_dist_csr%ROWCOUNT;
471: l_disttab(i) := rec;
472: ITG_Debug.msg('AAD', 'i', i);
473: ITG_Debug.msg('AAD', 'po_distribution_id',
474: l_disttab(i).po_distribution_id);
475: ITG_Debug.msg('AAD', 'quantity_ordered',
476: l_disttab(i).quantity_ordered);

Line 473: ITG_Debug.msg('AAD', 'po_distribution_id',

469: /* Determine how much to allocate to each distribution line. */
470: i := po_dist_csr%ROWCOUNT;
471: l_disttab(i) := rec;
472: ITG_Debug.msg('AAD', 'i', i);
473: ITG_Debug.msg('AAD', 'po_distribution_id',
474: l_disttab(i).po_distribution_id);
475: ITG_Debug.msg('AAD', 'quantity_ordered',
476: l_disttab(i).quantity_ordered);
477: ITG_Debug.msg('AAD', 'quantity_billed',

Line 475: ITG_Debug.msg('AAD', 'quantity_ordered',

471: l_disttab(i) := rec;
472: ITG_Debug.msg('AAD', 'i', i);
473: ITG_Debug.msg('AAD', 'po_distribution_id',
474: l_disttab(i).po_distribution_id);
475: ITG_Debug.msg('AAD', 'quantity_ordered',
476: l_disttab(i).quantity_ordered);
477: ITG_Debug.msg('AAD', 'quantity_billed',
478: l_disttab(i).quantity_billed);
479: ITG_Debug.msg('AAD', 'quantity_delivered',

Line 477: ITG_Debug.msg('AAD', 'quantity_billed',

473: ITG_Debug.msg('AAD', 'po_distribution_id',
474: l_disttab(i).po_distribution_id);
475: ITG_Debug.msg('AAD', 'quantity_ordered',
476: l_disttab(i).quantity_ordered);
477: ITG_Debug.msg('AAD', 'quantity_billed',
478: l_disttab(i).quantity_billed);
479: ITG_Debug.msg('AAD', 'quantity_delivered',
480: l_disttab(i).quantity_delivered);
481: ITG_Debug.msg('AAD', 'amount_billed',

Line 479: ITG_Debug.msg('AAD', 'quantity_delivered',

475: ITG_Debug.msg('AAD', 'quantity_ordered',
476: l_disttab(i).quantity_ordered);
477: ITG_Debug.msg('AAD', 'quantity_billed',
478: l_disttab(i).quantity_billed);
479: ITG_Debug.msg('AAD', 'quantity_delivered',
480: l_disttab(i).quantity_delivered);
481: ITG_Debug.msg('AAD', 'amount_billed',
482: l_disttab(i).amount_billed);
483:

Line 481: ITG_Debug.msg('AAD', 'amount_billed',

477: ITG_Debug.msg('AAD', 'quantity_billed',
478: l_disttab(i).quantity_billed);
479: ITG_Debug.msg('AAD', 'quantity_delivered',
480: l_disttab(i).quantity_delivered);
481: ITG_Debug.msg('AAD', 'amount_billed',
482: l_disttab(i).amount_billed);
483:
484: /* Get the appropriate quantity to compare, based on doctype. */
485: IF p_doc_type = 'RECEIPT' THEN

Line 490: ITG_Debug.msg('AAD', 'quantity_ordered',l_disttab(i).quantity_ordered);

486: l_oper := l_disttab(i).quantity_delivered;
487: ELSIF p_doc_type = 'INVOICE' THEN
488: l_oper := l_disttab(i).quantity_billed;
489: END IF;
490: ITG_Debug.msg('AAD', 'quantity_ordered',l_disttab(i).quantity_ordered);
491: ITG_Debug.msg('AAD', 'quantity_operate',l_oper);
492: ITG_Debug.msg('AAD', 'quantity', l_quantity);
493:
494: IF l_quantity > 0 THEN

Line 491: ITG_Debug.msg('AAD', 'quantity_operate',l_oper);

487: ELSIF p_doc_type = 'INVOICE' THEN
488: l_oper := l_disttab(i).quantity_billed;
489: END IF;
490: ITG_Debug.msg('AAD', 'quantity_ordered',l_disttab(i).quantity_ordered);
491: ITG_Debug.msg('AAD', 'quantity_operate',l_oper);
492: ITG_Debug.msg('AAD', 'quantity', l_quantity);
493:
494: IF l_quantity > 0 THEN
495: IF l_disttab(i).quantity_ordered - l_oper >= l_quantity THEN

Line 492: ITG_Debug.msg('AAD', 'quantity', l_quantity);

488: l_oper := l_disttab(i).quantity_billed;
489: END IF;
490: ITG_Debug.msg('AAD', 'quantity_ordered',l_disttab(i).quantity_ordered);
491: ITG_Debug.msg('AAD', 'quantity_operate',l_oper);
492: ITG_Debug.msg('AAD', 'quantity', l_quantity);
493:
494: IF l_quantity > 0 THEN
495: IF l_disttab(i).quantity_ordered - l_oper >= l_quantity THEN
496: /* Additional quantity which can be allocated is greater than or

Line 502: ITG_Debug.msg('AAD', 'Full allocate ...');

498: * allocated here.
499: */
500: l_oper := l_oper + l_quantity;
501: l_quantity := 0;
502: ITG_Debug.msg('AAD', 'Full allocate ...');
503: ELSE
504: /* Quantity to allocate is more than the additional quantity
505: * available to allocate, thus allocate the max available.
506: */

Line 510: ITG_Debug.msg('AAD', 'Partial allocate ...');

506: */
507: l_quantity := l_quantity -
508: (l_disttab(i).quantity_ordered - l_oper);
509: l_oper := l_disttab(i).quantity_ordered;
510: ITG_Debug.msg('AAD', 'Partial allocate ...');
511: END IF; /* Full or Partial allocation to this line? */
512: ELSIF l_quantity < 0 THEN
513: IF l_oper >= ABS(l_quantity) THEN
514: /* Quantity previously received and available to return is

Line 520: ITG_Debug.msg('AAD', 'Full CR allocate ...');

516: * total quantity can be allocated here.
517: */
518: l_oper := l_oper + l_quantity;
519: l_quantity := 0;
520: ITG_Debug.msg('AAD', 'Full CR allocate ...');
521: ELSE
522: /* Quantity to allocate is more than the quantity previously
523: * received, thus allocate the max available without tolerance.
524: */

Line 527: ITG_Debug.msg('AAD', 'Partial CR allocate ...');

523: * received, thus allocate the max available without tolerance.
524: */
525: l_quantity := l_quantity + l_oper;
526: l_oper := 0;
527: ITG_Debug.msg('AAD', 'Partial CR allocate ...');
528: END IF; /* Full or Partial allocation to this line? */
529: END IF; /* POS or NEG totalQuantity? */
530: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);
531: ITG_Debug.msg('AAD', 'quantity', l_quantity);

Line 530: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);

526: l_oper := 0;
527: ITG_Debug.msg('AAD', 'Partial CR allocate ...');
528: END IF; /* Full or Partial allocation to this line? */
529: END IF; /* POS or NEG totalQuantity? */
530: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);
531: ITG_Debug.msg('AAD', 'quantity', l_quantity);
532:
533: /* Return the newly allocated value for this line to the appropriate
534: * PLS table field, based on doctype.

Line 531: ITG_Debug.msg('AAD', 'quantity', l_quantity);

527: ITG_Debug.msg('AAD', 'Partial CR allocate ...');
528: END IF; /* Full or Partial allocation to this line? */
529: END IF; /* POS or NEG totalQuantity? */
530: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);
531: ITG_Debug.msg('AAD', 'quantity', l_quantity);
532:
533: /* Return the newly allocated value for this line to the appropriate
534: * PLS table field, based on doctype.
535: */

Line 552: ITG_Debug.msg('AAD', 'Recv. DB no tolerance ...');

548: IF p_doc_type = 'RECEIPT' THEN
549: l_disttab(i).quantity_delivered := l_disttab(i).quantity_delivered +
550: l_quantity;
551: l_quantity := 0;
552: ITG_Debug.msg('AAD', 'Recv. DB no tolerance ...');
553: ELSIF p_doc_type = 'INVOICE' THEN
554: l_disttab(i).quantity_billed := l_disttab(i).quantity_billed +
555: l_quantity;
556: l_quantity := 0;

Line 557: ITG_Debug.msg('AAD', 'Invoice DB no tolerance ...');

553: ELSIF p_doc_type = 'INVOICE' THEN
554: l_disttab(i).quantity_billed := l_disttab(i).quantity_billed +
555: l_quantity;
556: l_quantity := 0;
557: ITG_Debug.msg('AAD', 'Invoice DB no tolerance ...');
558: END IF;
559: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);
560: ITG_Debug.msg('AAD', 'quantity', l_quantity);
561: ELSIF l_quantity < 0 THEN

Line 559: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);

555: l_quantity;
556: l_quantity := 0;
557: ITG_Debug.msg('AAD', 'Invoice DB no tolerance ...');
558: END IF;
559: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);
560: ITG_Debug.msg('AAD', 'quantity', l_quantity);
561: ELSIF l_quantity < 0 THEN
562: /* Trying to distribute a RETURN and more is needed to RETURN than
563: * was initially distributed. This should NOT be able to happen.

Line 560: ITG_Debug.msg('AAD', 'quantity', l_quantity);

556: l_quantity := 0;
557: ITG_Debug.msg('AAD', 'Invoice DB no tolerance ...');
558: END IF;
559: ITG_Debug.msg('AAD', 'quantity_operate', l_oper);
560: ITG_Debug.msg('AAD', 'quantity', l_quantity);
561: ELSIF l_quantity < 0 THEN
562: /* Trying to distribute a RETURN and more is needed to RETURN than
563: * was initially distributed. This should NOT be able to happen.
564: */

Line 570: ITG_Debug.msg('AAD', 'Update po_distributions_all ...');

566: RAISE FND_API.G_EXC_ERROR;
567: END IF;
568:
569: /* Ok time to update the table.. */
570: ITG_Debug.msg('AAD', 'Update po_distributions_all ...');
571: IF p_doc_type = 'RECEIPT' THEN
572: FOR i IN 1 .. l_disttab.COUNT LOOP
573: UPDATE po_distributions_all
574: SET quantity_delivered = l_disttab(i).quantity_delivered,

Line 578: ITG_Debug.msg('AAD', 'po_distribution_id',

574: SET quantity_delivered = l_disttab(i).quantity_delivered,
575: last_update_date = SYSDATE,
576: last_updated_by = FND_GLOBAL.user_id
577: WHERE po_distribution_id = l_disttab(i).po_distribution_id;
578: ITG_Debug.msg('AAD', 'po_distribution_id',
579: l_disttab(i).po_distribution_id);
580: ITG_Debug.msg('AAD', 'quantity_delivered',
581: l_disttab(i).quantity_delivered);
582: END LOOP;

Line 580: ITG_Debug.msg('AAD', 'quantity_delivered',

576: last_updated_by = FND_GLOBAL.user_id
577: WHERE po_distribution_id = l_disttab(i).po_distribution_id;
578: ITG_Debug.msg('AAD', 'po_distribution_id',
579: l_disttab(i).po_distribution_id);
580: ITG_Debug.msg('AAD', 'quantity_delivered',
581: l_disttab(i).quantity_delivered);
582: END LOOP;
583: ELSIF p_doc_type = 'INVOICE' THEN
584: FOR i IN 1 .. l_disttab.COUNT LOOP

Line 593: ITG_Debug.msg('AAD', 'po_distribution_id',

589: p_total_amount,
590: last_update_date = SYSDATE,
591: last_updated_by = FND_GLOBAL.user_id
592: WHERE po_distribution_id = l_disttab(i).po_distribution_id;
593: ITG_Debug.msg('AAD', 'po_distribution_id',
594: l_disttab(i).po_distribution_id);
595: ITG_Debug.msg('AAD', 'quantity_billed',
596: l_disttab(i).quantity_billed);
597: END LOOP;

Line 595: ITG_Debug.msg('AAD', 'quantity_billed',

591: last_updated_by = FND_GLOBAL.user_id
592: WHERE po_distribution_id = l_disttab(i).po_distribution_id;
593: ITG_Debug.msg('AAD', 'po_distribution_id',
594: l_disttab(i).po_distribution_id);
595: ITG_Debug.msg('AAD', 'quantity_billed',
596: l_disttab(i).quantity_billed);
597: END LOOP;
598: END IF;
599: ITG_Debug.msg('AAD', 'Leaving.');

Line 599: ITG_Debug.msg('AAD', 'Leaving.');

595: ITG_Debug.msg('AAD', 'quantity_billed',
596: l_disttab(i).quantity_billed);
597: END LOOP;
598: END IF;
599: ITG_Debug.msg('AAD', 'Leaving.');
600: END aa_dists;
601:
602: /* allocateAcrossReqLineLocs */
603: PROCEDURE aa_rllocs(

Line 638: ITG_Debug.msg('ARL', 'Entering...');

634: i NUMBER := 0;
635: l_qty NUMBER;
636:
637: BEGIN
638: ITG_Debug.msg('ARL', 'Entering...');
639: ITG_Debug.msg('ARL', 'new_quantity', p_new_quantity);
640: l_qty := p_new_quantity;
641: l_reqlltab.DELETE;
642:

Line 639: ITG_Debug.msg('ARL', 'new_quantity', p_new_quantity);

635: l_qty NUMBER;
636:
637: BEGIN
638: ITG_Debug.msg('ARL', 'Entering...');
639: ITG_Debug.msg('ARL', 'new_quantity', p_new_quantity);
640: l_qty := p_new_quantity;
641: l_reqlltab.DELETE;
642:
643: FOR rec IN po_req_lines_csr LOOP

Line 647: ITG_Debug.msg('ARL', 'i', i);

643: FOR rec IN po_req_lines_csr LOOP
644: /* Determine how much to allocate to each requisition line */
645: i := po_req_lines_csr%ROWCOUNT;
646: l_reqlltab(i) := rec;
647: ITG_Debug.msg('ARL', 'i', i);
648:
649: IF l_qty > 0 THEN
650: IF l_reqlltab(i).quantity -
651: l_reqlltab(i).quantity_delivered >= l_qty THEN

Line 656: ITG_Debug.msg('ARL', 'Allocating full ...');

652: /* Additional quantity which can be allocated is greater than
653: * or to the quantity to allocate, thus totalQuantity can be
654: * allocated here.
655: */
656: ITG_Debug.msg('ARL', 'Allocating full ...');
657: l_reqlltab(i).quantity_delivered :=
658: l_reqlltab(i).quantity_delivered + l_qty;
659: l_qty := 0;
660: ELSE

Line 664: ITG_Debug.msg('ARL', 'Allocating max ...');

660: ELSE
661: /* Quantity to allocate is more than the additional Quantity to
662: * allocate, thus allocate the max available.
663: */
664: ITG_Debug.msg('ARL', 'Allocating max ...');
665: l_qty := l_qty -
666: (l_reqlltab(i).quantity - l_reqlltab(i).quantity_delivered);
667: l_reqlltab(i).quantity_delivered := l_reqlltab(i).quantity;
668: END IF; /* Full or Partial allocation to this line? */

Line 669: ITG_Debug.msg('ARL', 'quantity', l_reqlltab(i).quantity);

665: l_qty := l_qty -
666: (l_reqlltab(i).quantity - l_reqlltab(i).quantity_delivered);
667: l_reqlltab(i).quantity_delivered := l_reqlltab(i).quantity;
668: END IF; /* Full or Partial allocation to this line? */
669: ITG_Debug.msg('ARL', 'quantity', l_reqlltab(i).quantity);
670: ITG_Debug.msg('ARL', 'quantity_delivered',
671: l_reqlltab(i).quantity_delivered);
672: ITG_Debug.msg('ARL', 'quantity need', l_qty);
673: ELSIF l_qty < 0 THEN

Line 670: ITG_Debug.msg('ARL', 'quantity_delivered',

666: (l_reqlltab(i).quantity - l_reqlltab(i).quantity_delivered);
667: l_reqlltab(i).quantity_delivered := l_reqlltab(i).quantity;
668: END IF; /* Full or Partial allocation to this line? */
669: ITG_Debug.msg('ARL', 'quantity', l_reqlltab(i).quantity);
670: ITG_Debug.msg('ARL', 'quantity_delivered',
671: l_reqlltab(i).quantity_delivered);
672: ITG_Debug.msg('ARL', 'quantity need', l_qty);
673: ELSIF l_qty < 0 THEN
674: IF l_reqlltab(i).quantity_delivered >= ABS(l_qty) THEN

Line 672: ITG_Debug.msg('ARL', 'quantity need', l_qty);

668: END IF; /* Full or Partial allocation to this line? */
669: ITG_Debug.msg('ARL', 'quantity', l_reqlltab(i).quantity);
670: ITG_Debug.msg('ARL', 'quantity_delivered',
671: l_reqlltab(i).quantity_delivered);
672: ITG_Debug.msg('ARL', 'quantity need', l_qty);
673: ELSIF l_qty < 0 THEN
674: IF l_reqlltab(i).quantity_delivered >= ABS(l_qty) THEN
675: /* Quantity previously received and available to return is greater
676: * than or equal to the quantity to allocate, thus totalQuantity

Line 679: ITG_Debug.msg('ARL', 'Allocating CR full ...');

675: /* Quantity previously received and available to return is greater
676: * than or equal to the quantity to allocate, thus totalQuantity
677: * can be allocated here.
678: */
679: ITG_Debug.msg('ARL', 'Allocating CR full ...');
680: l_reqlltab(i).quantity_delivered :=
681: l_reqlltab(i).quantity_delivered + l_qty;
682: l_qty := 0;
683: ELSE

Line 687: ITG_Debug.msg('ARL', 'Allocating CR Partial ...');

683: ELSE
684: /* Quantity to allocate is more than the additional quantity to
685: * allocate, thus allocate the max available.
686: */
687: ITG_Debug.msg('ARL', 'Allocating CR Partial ...');
688: l_qty := l_qty + l_reqlltab(i).quantity_delivered;
689: l_reqlltab(i).quantity_delivered := 0;
690: END IF; /* Full or Partial CR allocation to this line? */
691: ELSE /* l_qty = 0, so all have been allocated */

Line 697: ITG_Debug.msg('ARL', '# of req. ship lines', i);

693: END IF; /* POS or NEG totalQuantity? */
694: EXIT WHEN l_qty = 0;
695: END LOOP; /* For each requisition line */
696:
697: ITG_Debug.msg('ARL', '# of req. ship lines', i);
698: /* IF no lines were found, THEN return. */
699: IF i = 0 THEN
700: ITG_Debug.msg('ARL', 'NO req. ship lines found ...');
701: RETURN;

Line 700: ITG_Debug.msg('ARL', 'NO req. ship lines found ...');

696:
697: ITG_Debug.msg('ARL', '# of req. ship lines', i);
698: /* IF no lines were found, THEN return. */
699: IF i = 0 THEN
700: ITG_Debug.msg('ARL', 'NO req. ship lines found ...');
701: RETURN;
702: END IF;
703:
704: /* If there is more to allocate, the allocate all to the LAST

Line 709: ITG_Debug.msg('ARL', 'Over-allocating to the last ...');

705: * requisition line, as there is no tolerance processing for
706: * requisitions.
707: */
708: IF l_qty > 0 THEN
709: ITG_Debug.msg('ARL', 'Over-allocating to the last ...');
710: l_reqlltab(i).quantity_delivered := l_reqlltab(i).quantity_delivered +
711: l_qty;
712: l_qty := 0;
713: ELSIF l_qty < 0 THEN

Line 722: ITG_Debug.msg('ARL', 'Updating po_requisition_lines_all ...');

718: RAISE FND_API.G_EXC_ERROR;
719: END IF;
720:
721: /* Time to update the table */
722: ITG_Debug.msg('ARL', 'Updating po_requisition_lines_all ...');
723: ITG_Debug.msg('ARL', 'l_reqlltab.COUNT', l_reqlltab.COUNT);
724: FOR i IN 1 .. l_reqlltab.COUNT LOOP
725: UPDATE po_requisition_lines_all
726: SET quantity_delivered = l_reqlltab(i).quantity_delivered,

Line 723: ITG_Debug.msg('ARL', 'l_reqlltab.COUNT', l_reqlltab.COUNT);

719: END IF;
720:
721: /* Time to update the table */
722: ITG_Debug.msg('ARL', 'Updating po_requisition_lines_all ...');
723: ITG_Debug.msg('ARL', 'l_reqlltab.COUNT', l_reqlltab.COUNT);
724: FOR i IN 1 .. l_reqlltab.COUNT LOOP
725: UPDATE po_requisition_lines_all
726: SET quantity_delivered = l_reqlltab(i).quantity_delivered,
727: last_update_date = SYSDATE,

Line 730: ITG_Debug.msg('ARL', 'requisition_line_id',

726: SET quantity_delivered = l_reqlltab(i).quantity_delivered,
727: last_update_date = SYSDATE,
728: last_updated_by = FND_GLOBAL.user_id
729: WHERE requisition_line_id = l_reqlltab(i).requisition_line_id;
730: ITG_Debug.msg('ARL', 'requisition_line_id',
731: l_reqlltab(i).requisition_line_id);
732: ITG_Debug.msg('ARL', 'quantity_delivered',
733: l_reqlltab(i).quantity_delivered);
734: END LOOP;

Line 732: ITG_Debug.msg('ARL', 'quantity_delivered',

728: last_updated_by = FND_GLOBAL.user_id
729: WHERE requisition_line_id = l_reqlltab(i).requisition_line_id;
730: ITG_Debug.msg('ARL', 'requisition_line_id',
731: l_reqlltab(i).requisition_line_id);
732: ITG_Debug.msg('ARL', 'quantity_delivered',
733: l_reqlltab(i).quantity_delivered);
734: END LOOP;
735: ITG_Debug.msg('ARL', 'Leaving.');
736: END aa_rllocs;

Line 735: ITG_Debug.msg('ARL', 'Leaving.');

731: l_reqlltab(i).requisition_line_id);
732: ITG_Debug.msg('ARL', 'quantity_delivered',
733: l_reqlltab(i).quantity_delivered);
734: END LOOP;
735: ITG_Debug.msg('ARL', 'Leaving.');
736: END aa_rllocs;
737:
738: /* ~processReceipt */
739: PROCEDURE process_receipt_doc IS

Line 748: ITG_Debug.msg('PRD', 'Entering...');

744: l_return_code VARCHAR2(25) := ' ';
745: l_lltab lloc_tab;
746: BEGIN
747: g_action := 'processing receipt information';
748: ITG_Debug.msg('PRD', 'Entering...');
749: IF p_quantity > 0 AND (l_rec.closed_code = 'CLOSED FOR RECEIVING' OR
750: l_rec.closed_code = 'CLOSED') THEN
751: ITG_MSG.poline_closed_rcv;
752: RAISE FND_API.G_EXC_ERROR;

Line 777: ITG_Debug.msg('PRD', 'Line location id',l_lltab(i).line_location_id);

773: l_doc_subtype := 'BLANKET';
774: END IF;
775:
776: FOR i IN 1 .. l_lltab.count LOOP
777: ITG_Debug.msg('PRD', 'Line location id',l_lltab(i).line_location_id);
778: IF l_lltab(i).changed <> 0 THEN
779: ITG_Debug.msg('PRD', 'Call distributions', i);
780: ITG_Debug.msg('PRD', 'New quantity',
781: l_lltab(i).new_quantity);

Line 779: ITG_Debug.msg('PRD', 'Call distributions', i);

775:
776: FOR i IN 1 .. l_lltab.count LOOP
777: ITG_Debug.msg('PRD', 'Line location id',l_lltab(i).line_location_id);
778: IF l_lltab(i).changed <> 0 THEN
779: ITG_Debug.msg('PRD', 'Call distributions', i);
780: ITG_Debug.msg('PRD', 'New quantity',
781: l_lltab(i).new_quantity);
782: aa_dists(l_lltab(i).line_location_id,
783: l_lltab(i).new_quantity, 0);

Line 780: ITG_Debug.msg('PRD', 'New quantity',

776: FOR i IN 1 .. l_lltab.count LOOP
777: ITG_Debug.msg('PRD', 'Line location id',l_lltab(i).line_location_id);
778: IF l_lltab(i).changed <> 0 THEN
779: ITG_Debug.msg('PRD', 'Call distributions', i);
780: ITG_Debug.msg('PRD', 'New quantity',
781: l_lltab(i).new_quantity);
782: aa_dists(l_lltab(i).line_location_id,
783: l_lltab(i).new_quantity, 0);
784: aa_rllocs(l_lltab(i).new_quantity);

Line 787: ITG_Debug.msg('PRD', 'update po_line_locations_all');

783: l_lltab(i).new_quantity, 0);
784: aa_rllocs(l_lltab(i).new_quantity);
785: END IF;
786:
787: ITG_Debug.msg('PRD', 'update po_line_locations_all');
788: UPDATE po_line_locations_all
789: SET quantity_received = l_lltab(i).quantity_received,
790: last_update_date = SYSDATE,
791: last_updated_by = FND_GLOBAL.user_id

Line 793: ITG_Debug.msg('PRD', 'quantity_received',

789: SET quantity_received = l_lltab(i).quantity_received,
790: last_update_date = SYSDATE,
791: last_updated_by = FND_GLOBAL.user_id
792: WHERE line_location_id = l_lltab(i).line_location_id;
793: ITG_Debug.msg('PRD', 'quantity_received',
794: l_lltab(i).quantity_received);
795:
796: l_closed_code := get_closed_code(
797: l_lltab(i), l_lltab(i).quantity_received);

Line 798: ITG_Debug.msg('PRD', 'closed_code', l_closed_code);

794: l_lltab(i).quantity_received);
795:
796: l_closed_code := get_closed_code(
797: l_lltab(i), l_lltab(i).quantity_received);
798: ITG_Debug.msg('PRD', 'closed_code', l_closed_code);
799: IF l_closed_code IS NOT NULL THEN
800: ITG_Debug.msg('PRD', 'close PO called...');
801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);
802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);

Line 800: ITG_Debug.msg('PRD', 'close PO called...');

796: l_closed_code := get_closed_code(
797: l_lltab(i), l_lltab(i).quantity_received);
798: ITG_Debug.msg('PRD', 'closed_code', l_closed_code);
799: IF l_closed_code IS NOT NULL THEN
800: ITG_Debug.msg('PRD', 'close PO called...');
801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);
802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);
803: ITG_Debug.msg('PRD', 'line ID', l_rec.po_line_id);
804: ITG_Debug.msg('PRD', 'ship ID', l_lltab(i).line_location_id);

Line 801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);

797: l_lltab(i), l_lltab(i).quantity_received);
798: ITG_Debug.msg('PRD', 'closed_code', l_closed_code);
799: IF l_closed_code IS NOT NULL THEN
800: ITG_Debug.msg('PRD', 'close PO called...');
801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);
802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);
803: ITG_Debug.msg('PRD', 'line ID', l_rec.po_line_id);
804: ITG_Debug.msg('PRD', 'ship ID', l_lltab(i).line_location_id);
805:

Line 802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);

798: ITG_Debug.msg('PRD', 'closed_code', l_closed_code);
799: IF l_closed_code IS NOT NULL THEN
800: ITG_Debug.msg('PRD', 'close PO called...');
801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);
802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);
803: ITG_Debug.msg('PRD', 'line ID', l_rec.po_line_id);
804: ITG_Debug.msg('PRD', 'ship ID', l_lltab(i).line_location_id);
805:
806: /*Added following if and else part to fix bug :5258514 */

Line 803: ITG_Debug.msg('PRD', 'line ID', l_rec.po_line_id);

799: IF l_closed_code IS NOT NULL THEN
800: ITG_Debug.msg('PRD', 'close PO called...');
801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);
802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);
803: ITG_Debug.msg('PRD', 'line ID', l_rec.po_line_id);
804: ITG_Debug.msg('PRD', 'ship ID', l_lltab(i).line_location_id);
805:
806: /*Added following if and else part to fix bug :5258514 */
807: IF p_release_id IS NULL or p_release_id =0 THEN

Line 804: ITG_Debug.msg('PRD', 'ship ID', l_lltab(i).line_location_id);

800: ITG_Debug.msg('PRD', 'close PO called...');
801: ITG_Debug.msg('PRD', 'doc ID', g_po_id);
802: ITG_Debug.msg('PRD', 'doc type', l_doc_type);
803: ITG_Debug.msg('PRD', 'line ID', l_rec.po_line_id);
804: ITG_Debug.msg('PRD', 'ship ID', l_lltab(i).line_location_id);
805:
806: /*Added following if and else part to fix bug :5258514 */
807: IF p_release_id IS NULL or p_release_id =0 THEN
808:

Line 820: ITG_Debug.msg('PRD', 'Close PO failed...');

816: p_calling_mode => 'RCV',
817: p_return_code => l_return_code,
818: p_auto_close => 'Y'
819: ) THEN
820: ITG_Debug.msg('PRD', 'Close PO failed...');
821: ITG_Debug.msg('PRD', 'return code', l_return_code);
822: ITG_MSG.receipt_closepo_fail(l_return_code);
823: RAISE FND_API.G_EXC_ERROR;
824: ELSE

Line 821: ITG_Debug.msg('PRD', 'return code', l_return_code);

817: p_return_code => l_return_code,
818: p_auto_close => 'Y'
819: ) THEN
820: ITG_Debug.msg('PRD', 'Close PO failed...');
821: ITG_Debug.msg('PRD', 'return code', l_return_code);
822: ITG_MSG.receipt_closepo_fail(l_return_code);
823: RAISE FND_API.G_EXC_ERROR;
824: ELSE
825: ITG_Debug.msg('PRD', 'Close PO succeded');

Line 825: ITG_Debug.msg('PRD', 'Close PO succeded');

821: ITG_Debug.msg('PRD', 'return code', l_return_code);
822: ITG_MSG.receipt_closepo_fail(l_return_code);
823: RAISE FND_API.G_EXC_ERROR;
824: ELSE
825: ITG_Debug.msg('PRD', 'Close PO succeded');
826: ITG_Debug.msg('PRD', 'return code', l_return_code);
827: END IF;
828: ELSE
829: IF NOT PO_ACTIONS.close_po(

Line 826: ITG_Debug.msg('PRD', 'return code', l_return_code);

822: ITG_MSG.receipt_closepo_fail(l_return_code);
823: RAISE FND_API.G_EXC_ERROR;
824: ELSE
825: ITG_Debug.msg('PRD', 'Close PO succeded');
826: ITG_Debug.msg('PRD', 'return code', l_return_code);
827: END IF;
828: ELSE
829: IF NOT PO_ACTIONS.close_po(
830: p_docID => l_release_id,

Line 840: ITG_Debug.msg('PRD', 'Close Release failed...');

836: p_calling_mode => 'RCV',
837: p_return_code => l_return_code,
838: p_auto_close => 'Y'
839: ) THEN
840: ITG_Debug.msg('PRD', 'Close Release failed...');
841: ITG_Debug.msg('PRD', 'return code', l_return_code);
842: ITG_MSG.receipt_closerelease_fail(l_return_code);
843: RAISE FND_API.G_EXC_ERROR;
844: ELSE

Line 841: ITG_Debug.msg('PRD', 'return code', l_return_code);

837: p_return_code => l_return_code,
838: p_auto_close => 'Y'
839: ) THEN
840: ITG_Debug.msg('PRD', 'Close Release failed...');
841: ITG_Debug.msg('PRD', 'return code', l_return_code);
842: ITG_MSG.receipt_closerelease_fail(l_return_code);
843: RAISE FND_API.G_EXC_ERROR;
844: ELSE
845: ITG_Debug.msg('PRD', 'Close Release succeded');

Line 845: ITG_Debug.msg('PRD', 'Close Release succeded');

841: ITG_Debug.msg('PRD', 'return code', l_return_code);
842: ITG_MSG.receipt_closerelease_fail(l_return_code);
843: RAISE FND_API.G_EXC_ERROR;
844: ELSE
845: ITG_Debug.msg('PRD', 'Close Release succeded');
846: ITG_Debug.msg('PRD', 'return code', l_return_code);
847: END IF;
848: END IF; --END FOR P_RELAESE_ID BLOCK
849: END IF; --END FOR L_CLOSED_CODE BLOCK

Line 846: ITG_Debug.msg('PRD', 'return code', l_return_code);

842: ITG_MSG.receipt_closerelease_fail(l_return_code);
843: RAISE FND_API.G_EXC_ERROR;
844: ELSE
845: ITG_Debug.msg('PRD', 'Close Release succeded');
846: ITG_Debug.msg('PRD', 'return code', l_return_code);
847: END IF;
848: END IF; --END FOR P_RELAESE_ID BLOCK
849: END IF; --END FOR L_CLOSED_CODE BLOCK
850: END LOOP;

Line 860: ITG_Debug.msg('PID', 'Entering...');

856: i NUMBER;
857: l_lltab lloc_tab;
858: BEGIN
859: g_action := 'processing inspection information';
860: ITG_Debug.msg('PID', 'Entering...');
861: IF p_quantity > 0 THEN
862: /* processInspection */
863: IF aa_llocs(l_lltab) THEN
864: ITG_MSG.inspect_tol_exceeded;

Line 874: ITG_Debug.msg('PID', 'Update po_line_locations_all');

870: SET quantity_accepted = l_lltab(i).quantity_accepted,
871: last_update_date = SYSDATE,
872: last_updated_by = FND_GLOBAL.user_id
873: WHERE line_location_id = l_lltab(i).line_location_id;
874: ITG_Debug.msg('PID', 'Update po_line_locations_all');
875: ITG_Debug.msg('PID', 'quantity_accepted',
876: l_lltab(i).quantity_accepted);
877: ITG_Debug.msg('PID', 'line_location_id',
878: l_lltab(i).line_location_id);

Line 875: ITG_Debug.msg('PID', 'quantity_accepted',

871: last_update_date = SYSDATE,
872: last_updated_by = FND_GLOBAL.user_id
873: WHERE line_location_id = l_lltab(i).line_location_id;
874: ITG_Debug.msg('PID', 'Update po_line_locations_all');
875: ITG_Debug.msg('PID', 'quantity_accepted',
876: l_lltab(i).quantity_accepted);
877: ITG_Debug.msg('PID', 'line_location_id',
878: l_lltab(i).line_location_id);
879: END LOOP;

Line 877: ITG_Debug.msg('PID', 'line_location_id',

873: WHERE line_location_id = l_lltab(i).line_location_id;
874: ITG_Debug.msg('PID', 'Update po_line_locations_all');
875: ITG_Debug.msg('PID', 'quantity_accepted',
876: l_lltab(i).quantity_accepted);
877: ITG_Debug.msg('PID', 'line_location_id',
878: l_lltab(i).line_location_id);
879: END LOOP;
880: ELSIF p_quantity < 0 THEN
881: ITG_MSG.poline_negqty_ins;

Line 900: ITG_Debug.msg('PI', 'Entering...');

896: l_qty NUMBER;
897: l_lltab lloc_tab;
898: BEGIN
899: g_action := 'processing invoice information';
900: ITG_Debug.msg('PI', 'Entering...');
901: IF p_amount = 0 THEN
902: ITG_MSG.poline_zeroamt_inv;
903: RAISE FND_API.G_EXC_ERROR;
904: ELSIF SIGN(p_quantity) <> SIGN(p_amount) AND

Line 934: ITG_Debug.msg('PI', 'Update po_line_locations_all ...');

930: l_closed_code := get_closed_code(
931: l_lltab(i), l_lltab(i).quantity_billed);
932:
933: /* Update the table for the quantity billed */
934: ITG_Debug.msg('PI', 'Update po_line_locations_all ...');
935: ITG_Debug.msg('PI', 'quantity_billed', l_lltab(i).quantity_billed);
936: ITG_Debug.msg('PI', 'line_location_id', l_lltab(i).line_location_id);
937: UPDATE po_line_locations_all
938: SET quantity_billed = l_lltab(i).quantity_billed,

Line 935: ITG_Debug.msg('PI', 'quantity_billed', l_lltab(i).quantity_billed);

931: l_lltab(i), l_lltab(i).quantity_billed);
932:
933: /* Update the table for the quantity billed */
934: ITG_Debug.msg('PI', 'Update po_line_locations_all ...');
935: ITG_Debug.msg('PI', 'quantity_billed', l_lltab(i).quantity_billed);
936: ITG_Debug.msg('PI', 'line_location_id', l_lltab(i).line_location_id);
937: UPDATE po_line_locations_all
938: SET quantity_billed = l_lltab(i).quantity_billed,
939: last_update_date = SYSDATE,

Line 936: ITG_Debug.msg('PI', 'line_location_id', l_lltab(i).line_location_id);

932:
933: /* Update the table for the quantity billed */
934: ITG_Debug.msg('PI', 'Update po_line_locations_all ...');
935: ITG_Debug.msg('PI', 'quantity_billed', l_lltab(i).quantity_billed);
936: ITG_Debug.msg('PI', 'line_location_id', l_lltab(i).line_location_id);
937: UPDATE po_line_locations_all
938: SET quantity_billed = l_lltab(i).quantity_billed,
939: last_update_date = SYSDATE,
940: last_updated_by = FND_GLOBAL.user_id

Line 951: ITG_Debug.msg('PI', 'Close po called ...');

947: l_doc_type := 'RELEASE';
948: l_doc_subtype := 'BLANKET';
949: END IF;
950: IF l_closed_code IS NOT NULL THEN
951: ITG_Debug.msg('PI', 'Close po called ...');
952: ITG_Debug.msg('PI', 'po_id', g_po_id);
953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);
954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);
955: ITG_Debug.msg('PI', 'line_location_id',

Line 952: ITG_Debug.msg('PI', 'po_id', g_po_id);

948: l_doc_subtype := 'BLANKET';
949: END IF;
950: IF l_closed_code IS NOT NULL THEN
951: ITG_Debug.msg('PI', 'Close po called ...');
952: ITG_Debug.msg('PI', 'po_id', g_po_id);
953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);
954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);
955: ITG_Debug.msg('PI', 'line_location_id',
956: l_lltab(i).line_location_id);

Line 953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);

949: END IF;
950: IF l_closed_code IS NOT NULL THEN
951: ITG_Debug.msg('PI', 'Close po called ...');
952: ITG_Debug.msg('PI', 'po_id', g_po_id);
953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);
954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);
955: ITG_Debug.msg('PI', 'line_location_id',
956: l_lltab(i).line_location_id);
957: ITG_Debug.msg('PI', 'closed_code', l_closed_code);

Line 954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);

950: IF l_closed_code IS NOT NULL THEN
951: ITG_Debug.msg('PI', 'Close po called ...');
952: ITG_Debug.msg('PI', 'po_id', g_po_id);
953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);
954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);
955: ITG_Debug.msg('PI', 'line_location_id',
956: l_lltab(i).line_location_id);
957: ITG_Debug.msg('PI', 'closed_code', l_closed_code);
958:

Line 955: ITG_Debug.msg('PI', 'line_location_id',

951: ITG_Debug.msg('PI', 'Close po called ...');
952: ITG_Debug.msg('PI', 'po_id', g_po_id);
953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);
954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);
955: ITG_Debug.msg('PI', 'line_location_id',
956: l_lltab(i).line_location_id);
957: ITG_Debug.msg('PI', 'closed_code', l_closed_code);
958:
959: /*Added following if and else part to fix bug :5258514 */

Line 957: ITG_Debug.msg('PI', 'closed_code', l_closed_code);

953: ITG_Debug.msg('PI', 'doc_type', l_doc_type);
954: ITG_Debug.msg('PI', 'po_line_id', l_rec.po_line_id);
955: ITG_Debug.msg('PI', 'line_location_id',
956: l_lltab(i).line_location_id);
957: ITG_Debug.msg('PI', 'closed_code', l_closed_code);
958:
959: /*Added following if and else part to fix bug :5258514 */
960: IF p_release_id IS NULL or p_release_id =0 THEN
961:

Line 973: ITG_Debug.msg('PI', 'Close PO failed ...');

969: p_calling_mode => 'AP',
970: p_return_code => l_return_code,
971: p_auto_close => 'Y'
972: ) THEN
973: ITG_Debug.msg('PI', 'Close PO failed ...');
974: ITG_Debug.msg('PI', 'return_code', l_return_code);
975: ITG_MSG.invoice_closepo_fail(l_return_code);
976: RAISE FND_API.G_EXC_ERROR;
977: ELSE

Line 974: ITG_Debug.msg('PI', 'return_code', l_return_code);

970: p_return_code => l_return_code,
971: p_auto_close => 'Y'
972: ) THEN
973: ITG_Debug.msg('PI', 'Close PO failed ...');
974: ITG_Debug.msg('PI', 'return_code', l_return_code);
975: ITG_MSG.invoice_closepo_fail(l_return_code);
976: RAISE FND_API.G_EXC_ERROR;
977: ELSE
978: ITG_Debug.msg('PI', 'Close PO succeded');

Line 978: ITG_Debug.msg('PI', 'Close PO succeded');

974: ITG_Debug.msg('PI', 'return_code', l_return_code);
975: ITG_MSG.invoice_closepo_fail(l_return_code);
976: RAISE FND_API.G_EXC_ERROR;
977: ELSE
978: ITG_Debug.msg('PI', 'Close PO succeded');
979: ITG_Debug.msg('PI', 'return_code', l_return_code);
980: END IF;
981: ELSE
982: IF NOT PO_ACTIONS.close_po(

Line 979: ITG_Debug.msg('PI', 'return_code', l_return_code);

975: ITG_MSG.invoice_closepo_fail(l_return_code);
976: RAISE FND_API.G_EXC_ERROR;
977: ELSE
978: ITG_Debug.msg('PI', 'Close PO succeded');
979: ITG_Debug.msg('PI', 'return_code', l_return_code);
980: END IF;
981: ELSE
982: IF NOT PO_ACTIONS.close_po(
983: p_docID => l_release_id,

Line 993: ITG_Debug.msg('PI', 'Close Release failed ...');

989: p_calling_mode => 'AP',
990: p_return_code => l_return_code,
991: p_auto_close => 'Y'
992: ) THEN
993: ITG_Debug.msg('PI', 'Close Release failed ...');
994: ITG_Debug.msg('PI', 'return_code', l_return_code);
995: ITG_MSG.invoice_closerelease_fail(l_return_code);
996: RAISE FND_API.G_EXC_ERROR;
997: ELSE

Line 994: ITG_Debug.msg('PI', 'return_code', l_return_code);

990: p_return_code => l_return_code,
991: p_auto_close => 'Y'
992: ) THEN
993: ITG_Debug.msg('PI', 'Close Release failed ...');
994: ITG_Debug.msg('PI', 'return_code', l_return_code);
995: ITG_MSG.invoice_closerelease_fail(l_return_code);
996: RAISE FND_API.G_EXC_ERROR;
997: ELSE
998: ITG_Debug.msg('PI', 'Close Release succeded');

Line 998: ITG_Debug.msg('PI', 'Close Release succeded');

994: ITG_Debug.msg('PI', 'return_code', l_return_code);
995: ITG_MSG.invoice_closerelease_fail(l_return_code);
996: RAISE FND_API.G_EXC_ERROR;
997: ELSE
998: ITG_Debug.msg('PI', 'Close Release succeded');
999: ITG_Debug.msg('PI', 'return_code', l_return_code);
1000: END IF;
1001:
1002: END IF; --end p_release_id block

Line 999: ITG_Debug.msg('PI', 'return_code', l_return_code);

995: ITG_MSG.invoice_closerelease_fail(l_return_code);
996: RAISE FND_API.G_EXC_ERROR;
997: ELSE
998: ITG_Debug.msg('PI', 'Close Release succeded');
999: ITG_Debug.msg('PI', 'return_code', l_return_code);
1000: END IF;
1001:
1002: END IF; --end p_release_id block
1003:

Line 1026: ITG_Debug.setup(

1022: itg_msg.invalid_org(p_org_id);
1023: RAISE FND_API.G_EXC_ERROR;
1024: END;
1025:
1026: ITG_Debug.setup(
1027: p_reset => TRUE,
1028: p_pkg_name => G_PKG_NAME,
1029: p_proc_name => l_api_name);
1030:

Line 1033: ITG_Debug.msg('UPL', 'Top of procedure.');

1029: p_proc_name => l_api_name);
1030:
1031: --now in wrapper, FND_MSG_PUB.Initialize;
1032:
1033: ITG_Debug.msg('UPL', 'Top of procedure.');
1034:
1035: /* Setup header id: g_po_id */
1036: lookup_po_header(p_po_code, p_org_id,p_release_id,l_doc_typ);
1037:

Line 1042: itg_debug.msg('UPL','No po line found.');

1038: IF p_release_id = 0 THEN
1039: l_release_id := NULL;
1040: IF l_doc_typ = 'BLANKET' THEN
1041: -- Release no is a must for blanket PO
1042: itg_debug.msg('UPL','No po line found.');
1043: itg_msg.no_po_line(p_org_id,p_po_code || ':' ||p_release_id,p_line_num);
1044: RAISE FND_API.G_EXC_ERROR;
1045: END IF;
1046: ELSE

Line 1051: itg_debug.msg('UPL','No po line found.');

1047: OPEN po_relid_csr(g_po_id,p_org_id,p_release_id);
1048: FETCH po_relid_csr INTO l_release_id;
1049: l_notfound := po_relid_csr%NOTFOUND;
1050: IF l_notfound THEN
1051: itg_debug.msg('UPL','No po line found.');
1052: itg_msg.no_po_line(p_org_id,p_po_code || ':' ||p_release_id,p_line_num);
1053: RAISE FND_API.G_EXC_ERROR;
1054: END IF;
1055: END IF;

Line 1062: ITG_Debug.msg('UPL', 'No po line found.');

1058: FETCH po_line_csr INTO l_rec;
1059: l_notfound := po_line_csr%NOTFOUND;
1060: CLOSE po_line_csr;
1061: IF l_notfound THEN
1062: ITG_Debug.msg('UPL', 'No po line found.');
1063: itg_msg.no_po_line(p_org_id,p_po_code || ':' ||p_release_id,p_line_num);
1064: RAISE FND_API.G_EXC_ERROR;
1065: END IF;
1066:

Line 1067: ITG_Debug.msg('UPL', 'PO Code', p_po_code);

1063: itg_msg.no_po_line(p_org_id,p_po_code || ':' ||p_release_id,p_line_num);
1064: RAISE FND_API.G_EXC_ERROR;
1065: END IF;
1066:
1067: ITG_Debug.msg('UPL', 'PO Code', p_po_code);
1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);
1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);

Line 1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);

1064: RAISE FND_API.G_EXC_ERROR;
1065: END IF;
1066:
1067: ITG_Debug.msg('UPL', 'PO Code', p_po_code);
1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);
1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);

Line 1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);

1065: END IF;
1066:
1067: ITG_Debug.msg('UPL', 'PO Code', p_po_code);
1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);
1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);

Line 1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);

1066:
1067: ITG_Debug.msg('UPL', 'PO Code', p_po_code);
1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);
1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);

Line 1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);

1067: ITG_Debug.msg('UPL', 'PO Code', p_po_code);
1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);
1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);
1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);

Line 1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);

1068: ITG_Debug.msg('UPL', 'Org ID', p_org_id);
1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);
1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);
1076: ITG_Debug.msg('UPL', 'PO Line Amount', p_amount);

Line 1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);

1069: ITG_Debug.msg('UPL', 'PO ID', g_po_id);
1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);
1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);
1076: ITG_Debug.msg('UPL', 'PO Line Amount', p_amount);
1077:

Line 1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);

1070: ITG_Debug.msg('UPL', 'Release ID', l_release_id);
1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);
1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);
1076: ITG_Debug.msg('UPL', 'PO Line Amount', p_amount);
1077:
1078: IF l_rec.closed_code = 'FINALLY CLOSED' THEN

Line 1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);

1071: ITG_Debug.msg('UPL', 'PO Line Num', p_line_num);
1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);
1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);
1076: ITG_Debug.msg('UPL', 'PO Line Amount', p_amount);
1077:
1078: IF l_rec.closed_code = 'FINALLY CLOSED' THEN
1079: ITG_MSG.poline_closed_final;

Line 1076: ITG_Debug.msg('UPL', 'PO Line Amount', p_amount);

1072: ITG_Debug.msg('UPL', 'PO Line ID', l_rec.po_line_id);
1073: ITG_Debug.msg('UPL', 'Closed Code', l_rec.closed_code);
1074: ITG_Debug.msg('UPL', 'PO Line Doctype', p_doc_type);
1075: ITG_Debug.msg('UPL', 'PO Line Quantity', p_quantity);
1076: ITG_Debug.msg('UPL', 'PO Line Amount', p_amount);
1077:
1078: IF l_rec.closed_code = 'FINALLY CLOSED' THEN
1079: ITG_MSG.poline_closed_final;
1080: RAISE FND_API.G_EXC_ERROR;

Line 1095: ITG_Debug.msg('UPL', 'Done.');

1091: RAISE FND_API.G_EXC_ERROR;
1092: END IF;
1093:
1094: COMMIT WORK;
1095: ITG_Debug.msg('UPL', 'Done.');
1096:
1097: EXCEPTION
1098: WHEN FND_API.G_EXC_ERROR THEN
1099: ROLLBACK TO Update_PoLine_PVT;

Line 1107: itg_debug.msg('Unexpected error (PO sync) - ' || substr(SQLERRM,1,255),true);

1103:
1104: WHEN OTHERS THEN
1105: ROLLBACK TO Update_PoLine_PVT;
1106: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1107: itg_debug.msg('Unexpected error (PO sync) - ' || substr(SQLERRM,1,255),true);
1108: ITG_msg.unexpected_error(g_action);
1109: END;
1110:
1111: -- Removed FND_MSG_PUB.Count_And_Get