DBA Data[Home] [Help]

APPS.RCV_ROI_TRANSACTION dependencies on PO_DISTRIBUTIONS

Line 2839: FROM po_distributions pod,

2835: pll.ship_to_location_id,
2836: NVL(pll.enforce_ship_to_location_code, 'NONE') enforce_ship_to_location_code,
2837: TO_NUMBER(NULL) shipment_line_id, -- shipment_line_id
2838: pl.item_id
2839: FROM po_distributions pod,
2840: po_line_locations pll,
2841: po_lines pl,
2842: po_headers ph
2843: WHERE ph.po_header_id = header_id

Line 2866: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL

2862: ORDER BY NVL(pll.promised_date, pll.need_by_date);
2863:
2864: /***** Bug # 1553154
2865: ***** There was a performance issue since the cursor DISTRIBUTIONS
2866: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL
2867: ***** Modified the Select statement so that it will drive through
2868: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by
2869: ***** PO_LINE_LOCATIONS_ALL which in turn is followed by
2870: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in

Line 2870: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in

2866: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL
2867: ***** Modified the Select statement so that it will drive through
2868: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by
2869: ***** PO_LINE_LOCATIONS_ALL which in turn is followed by
2870: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in
2871: ***** Performance
2872: *****/
2873: CURSOR count_distributions(
2874: header_id NUMBER,

Line 2885: FROM po_distributions pod,

2881: v_ship_to_location_id NUMBER,
2882: v_vendor_product_num VARCHAR2
2883: ) IS
2884: SELECT COUNT(*)
2885: FROM po_distributions pod,
2886: po_line_locations pll,
2887: po_lines pl,
2888: po_headers ph
2889: WHERE ph.po_header_id = header_id

Line 3099: FROM po_distributions

3095: AND temp_cascaded_table(current_n).po_distribution_id IS NOT NULL THEN --{
3096: BEGIN
3097: SELECT distribution_num
3098: INTO temp_cascaded_table(current_n).document_distribution_num
3099: FROM po_distributions
3100: WHERE po_distribution_id = temp_cascaded_table(current_n).po_distribution_id;
3101: EXCEPTION
3102: WHEN OTHERS THEN
3103: IF (g_asn_debug = 'Y') THEN

Line 3408: asn_debug.put_line('Count of PO distributions');

3404:
3405: FETCH count_asn_distributions INTO x_record_count;
3406: ELSE --}{
3407: IF (g_asn_debug = 'Y') THEN
3408: asn_debug.put_line('Count of PO distributions');
3409: END IF;
3410:
3411: FETCH count_distributions INTO x_record_count;
3412: END IF; --}

Line 3711: -- Bug 2551443 Removed po_distributions from the FROM clause

3707: no shipments exists for receiving for the given PO.
3708: */
3709: IF ( x_cascaded_table(n).transaction_type <> 'DELIVER'
3710: AND NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') <> 'DELIVER') THEN --{
3711: -- Bug 2551443 Removed po_distributions from the FROM clause
3712: IF (g_asn_debug = 'Y') THEN
3713: asn_debug.put_line('This is receive');
3714: END IF;
3715:

Line 3793: FROM po_distributions pod,

3789:
3790: IF (x_is_asn = FALSE) THEN --{
3791: SELECT COUNT(*)
3792: INTO x_temp_count
3793: FROM po_distributions pod,
3794: po_line_locations pll,
3795: po_lines pl,
3796: po_headers ph
3797: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id

Line 3838: FROM po_distributions pod,

3834: x_shipment_type,
3835: x_ship_to_organization_id,
3836: x_ship_to_location_id,
3837: x_vendor_product_num
3838: FROM po_distributions pod,
3839: po_line_locations pll,
3840: po_lines pl,
3841: po_headers ph
3842: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id

Line 4920: FROM po_distributions

4916: BEGIN
4917:
4918: SELECT count(po_distribution_id),max(rate),max(rate_date)
4919: INTO l_dist_count,x_rate,l_rate_date
4920: FROM po_distributions
4921: WHERE line_location_id = x_ShipmentDistributionRec.line_location_id
4922: HAVING count(po_distribution_id) = 1;
4923:
4924: EXCEPTION

Line 4931: ':: Rate and Rate_date in po distributions' || x_rate ||

4927: END;
4928:
4929: IF (g_asn_debug = 'Y') THEN
4930: asn_debug.put_line('No of Distributions:' || l_dist_count ||
4931: ':: Rate and Rate_date in po distributions' || x_rate ||
4932: '::' || l_rate_date);
4933: END IF;
4934:
4935: IF (x_ShipmentDistributionRec.match_option = 'P') THEN --{

Line 5028: /* Bug 2392074 - If the deliver_to_person mentioned in the po_distributions is

5024: IF (NVL(temp_cascaded_table(current_n).deliver_to_location_id, 0) = 0) THEN
5025: temp_cascaded_table(current_n).deliver_to_location_id := x_shipmentdistributionrec.deliver_to_location_id;
5026: END IF;
5027:
5028: /* Bug 2392074 - If the deliver_to_person mentioned in the po_distributions is
5029: invalid or inactive at the time of Receipt we need to clear the deliver to person,
5030: as this is an optional field. */
5031: IF (NVL(temp_cascaded_table(current_n).deliver_to_person_id, 0) = 0) THEN --{
5032: temp_cascaded_table(current_n).deliver_to_person_id := x_shipmentdistributionrec.deliver_to_person_id;

Line 5358: FROM po_distributions pod,

5354: pod.ussgl_transaction_code,
5355: pll.ship_to_location_id,
5356: NVL(pll.enforce_ship_to_location_code, 'NONE') enforce_ship_to_location_code,
5357: pl.item_id
5358: FROM po_distributions pod,
5359: po_line_locations pll,
5360: po_lines pl,
5361: po_headers ph
5362: WHERE pl.po_line_id = v_po_line_id

Line 5385: FROM po_distributions pod,

5381: v_po_distribution_id NUMBER,
5382: v_po_release_id NUMBER
5383: ) IS
5384: SELECT COUNT(*)
5385: FROM po_distributions pod,
5386: po_line_locations pll,
5387: po_lines pl,
5388: po_headers ph
5389: WHERE pl.po_line_id = v_po_line_id

Line 5617: FROM po_distributions

5613: AND temp_cascaded_table(current_n).po_distribution_id IS NOT NULL THEN --{
5614: BEGIN
5615: SELECT distribution_num
5616: INTO temp_cascaded_table(current_n).document_distribution_num
5617: FROM po_distributions
5618: WHERE po_distribution_id = temp_cascaded_table(current_n).po_distribution_id;
5619: EXCEPTION
5620: WHEN OTHERS THEN
5621: IF (g_asn_debug = 'Y') THEN

Line 5939: -- Bug 2551443 Removed po_distributions from the FROM clause

5935: no shipments exists for receiving for the given PO.
5936: */
5937: IF ( x_cascaded_table(n).transaction_type <> 'DELIVER'
5938: AND NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') <> 'DELIVER') THEN --{
5939: -- Bug 2551443 Removed po_distributions from the FROM clause
5940: SELECT COUNT(*)
5941: INTO x_temp_count
5942: FROM DUAL
5943: WHERE EXISTS(SELECT 1

Line 5982: FROM po_distributions pod,

5978: ELSIF( x_cascaded_table(n).transaction_type = 'DELIVER'
5979: OR NVL(x_cascaded_table(n).auto_transact_code, 'RECEIVE') = 'DELIVER') THEN --{
5980: SELECT COUNT(*)
5981: INTO x_temp_count
5982: FROM po_distributions pod,
5983: po_line_locations pll,
5984: po_lines pl,
5985: po_headers ph
5986: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id

Line 6011: FROM po_distributions pod,

6007: x_approved_flag,
6008: x_cancel_flag,
6009: x_closed_code,
6010: x_shipment_type
6011: FROM po_distributions pod,
6012: po_line_locations pll,
6013: po_lines pl,
6014: po_headers ph
6015: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id

Line 6545: /* Bug 2392074 - If the deliver_to_person mentioned in the po_distributions is

6541: IF (NVL(temp_cascaded_table(current_n).deliver_to_location_id, 0) = 0) THEN
6542: temp_cascaded_table(current_n).deliver_to_location_id := x_shipmentdistributionrec.deliver_to_location_id;
6543: END IF;
6544:
6545: /* Bug 2392074 - If the deliver_to_person mentioned in the po_distributions is
6546: invalid or inactive at the time of Receipt we need to clear the deliver to person,
6547: as this is an optional field. */
6548: IF (NVL(temp_cascaded_table(current_n).deliver_to_person_id, 0) = 0) THEN --{
6549: temp_cascaded_table(current_n).deliver_to_person_id := x_shipmentdistributionrec.deliver_to_person_id;

Line 9483: the join to po_distributions table. For transfers of

9479:
9480: /* Bug 3292329.
9481: We used to use the same cursor for single deliver and
9482: Transfers, inspections etc. Because of this we had the
9483: the join to po_distributions table. For transfers of
9484: a received shipment line against a PO shipment with multiple
9485: distribution, this results in multiple rows which is incorrect.
9486: So declared a new cursor for single deliver which is the same
9487: as that of tranfer cursor but with distribution info.

Line 9533: po_distributions pod

9529: rcv_transactions rt,
9530: rcv_shipment_lines rsl,
9531: po_headers poh,
9532: po_lines pol,
9533: po_distributions pod
9534: WHERE rt.transaction_id = v_parent_trx_id
9535: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)
9536: AND rsup.supply_type_code = 'RECEIVING'
9537: AND poh.po_header_id = rsup.po_header_id

Line 9596: po_distributions pod

9592: pod.ussgl_transaction_code,
9593: rti.quantity qty,
9594: rti.interface_available_qty
9595: FROM rcv_transactions_interface rti,
9596: po_distributions pod
9597: WHERE interface_transaction_id = v_parent_inter_trx_id
9598: AND pod.line_location_id = rti.po_line_location_id --Bug:5354379
9599: AND pod.po_header_id = rti.po_header_id
9600: AND ( pod.po_line_id IS NOT NULL

Line 9648: po_distributions pod

9644: rcv_transactions rt,
9645: rcv_shipment_lines rsl,
9646: po_headers poh,
9647: po_lines pol,
9648: po_distributions pod
9649: WHERE rt.transaction_id = v_parent_trx_id
9650: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)
9651: AND rsup.supply_type_code = 'RECEIVING'
9652: AND poh.po_header_id = rsup.po_header_id

Line 9704: po_distributions pod

9700: pod.ussgl_transaction_code,
9701: rti.quantity qty,
9702: rti.interface_available_qty
9703: FROM rcv_transactions_interface rti,
9704: po_distributions pod
9705: WHERE interface_transaction_id = v_parent_inter_trx_id
9706: AND pod.distribution_num = x_dist_num
9707: AND pod.po_header_id = rti.po_header_id
9708: AND pod.line_location_id = rti.po_line_location_id --Bug:5354379

Line 9756: po_distributions pod

9752: rcv_transactions rt,
9753: rcv_shipment_lines rsl,
9754: po_headers poh,
9755: po_lines pol,
9756: po_distributions pod
9757: WHERE rt.transaction_id = v_parent_trx_id
9758: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)
9759: AND rsup.supply_type_code = 'RECEIVING'
9760: AND poh.po_header_id = rsup.po_header_id

Line 9844: FROM po_distributions pod,

9840: WHERE transaction_id = x_cascaded_table(n).parent_transaction_id;
9841:
9842: SELECT COUNT(*)
9843: INTO l_num_of_distributions
9844: FROM po_distributions pod,
9845: rcv_supply rs
9846: WHERE pod.line_location_id = rs.po_line_location_id
9847: AND rs.rcv_transaction_id = x_cascaded_table(n).parent_transaction_id;
9848:

Line 9885: FROM po_distributions

9881: END IF;
9882:
9883: SELECT distribution_num
9884: INTO x_cascaded_table(n).document_distribution_num
9885: FROM po_distributions
9886: WHERE po_distribution_id = x_cascaded_table(n).po_distribution_id;
9887:
9888: IF (g_asn_debug = 'Y') THEN
9889: asn_debug.put_line('Derived Distribution Number:' || x_cascaded_table(n).document_distribution_num);

Line 9983: FROM po_distributions

9979: * correct value.
9980: */
9981: SELECT COUNT(*)
9982: INTO l_num_of_distributions
9983: FROM po_distributions
9984: WHERE line_location_id = (SELECT po_line_location_id
9985: FROM rcv_transactions_interface
9986: WHERE interface_transaction_id = x_cascaded_table(n).parent_interface_txn_id);
9987:

Line 10004: distribution number from po_distributions_all table */

10000: AND (l_num_of_distributions > 1)) THEN --}{
10001:
10002: /* Bug 5354379: {
10003: If the po_distribution_id is populated in RTI, then derive the
10004: distribution number from po_distributions_all table */
10005:
10006: IF ( x_cascaded_table(n).po_distribution_id IS NOT NULL
10007: AND (x_cascaded_table(n).document_distribution_num IS NULL)) THEN
10008:

Line 10016: FROM po_distributions

10012: END IF;
10013:
10014: SELECT distribution_num
10015: INTO x_cascaded_table(n).document_distribution_num
10016: FROM po_distributions
10017: WHERE po_distribution_id = x_cascaded_table(n).po_distribution_id;
10018:
10019: IF (g_asn_debug = 'Y') THEN
10020: asn_debug.put_line('Derived Distribution Number:' || x_cascaded_table(n).document_distribution_num);

Line 10358: from po_distributions_all

10354: where line_location_id = x_po_transferrec.po_line_location_id;
10355:
10356: select distribution_num
10357: into l_po_dist_num
10358: from po_distributions_all
10359: where po_distribution_id = x_po_transferrec.po_distribution_id;
10360:
10361: if x_cascaded_table(n).po_release_id is not null then --5439085
10362: select release_num

Line 10643: * equal to the qty in po_distributions.

10639: * line and if its parent is in rti, then x_converted_parent_trx_qty
10640: * will not be 0 and l_num_of_distributions will be > 1. In this
10641: * case we need to make sure that the transaction qty is less than
10642: * or equal to the available qty in rti and also less than or
10643: * equal to the qty in po_distributions.
10644: */
10645: IF ( (temp_cascaded_table(1).transaction_type = 'DELIVER')
10646: AND (l_num_of_distributions > 1)) THEN --{
10647: IF (g_asn_debug = 'Y') THEN

Line 10652: We should not compare the transaction quantity with the po_distributions_all.ordered_quantity,

10648: asn_debug.put_line('before getting available qty for standard multi distributions deliver ');
10649: END IF;
10650:
10651: /* Bug 5354379:
10652: We should not compare the transaction quantity with the po_distributions_all.ordered_quantity,
10653: because we won't be able to do DELIVER txn for the RECEIVE txns with overreceipt made.
10654: If the RECEIVE txn for that DELIVER txns lies in RT, we have to make use of mtl_supply
10655: to get the AVAILABLE quantity for DELIVER txn.
10656: If the RECEIVE txn for that DELIVER txns lies in RTI, there is no mtl_supply or rcv_supply.

Line 11070: /* Convert ordered_qty in po_distributions to

11066: END IF; ----}l_po_deliver_rti_cursor_opened = 1
11067: -- } bugfix 5354379
11068:
11069:
11070: /* Convert ordered_qty in po_distributions to
11071: * the parent's uom */
11072: l_converted_distribution_qty := convert_into_correct_qty(l_distribution_qty,
11073: l_ship_unit,
11074: temp_cascaded_table(current_n).item_id,

Line 11277: /* Bug 2392074 - If the deliver_to_person mentioned in the po_distributions is

11273: IF (g_asn_debug = 'Y') THEN
11274: asn_debug.put_line(' deliver_to_person_id ' || temp_cascaded_table(current_n).deliver_to_person_id);
11275: END IF;
11276:
11277: /* Bug 2392074 - If the deliver_to_person mentioned in the po_distributions is
11278: invalid or inactive at the time of Receipt we need to clear the deliver to person,
11279: as this is an optional field. */
11280: IF (NVL(temp_cascaded_table(current_n).deliver_to_person_id, 0) = 0) THEN --{
11281: temp_cascaded_table(current_n).deliver_to_person_id := x_po_transferrec.deliver_to_person_id;

Line 15628: from po_distributions_all

15624:
15625: BEGIN
15626: select deliver_to_person_id
15627: into l_deliver_to_person_id
15628: from po_distributions_all
15629: where po_distribution_id = x_cascaded_table(n).po_distribution_id;
15630:
15631: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
15632: IF (g_asn_debug = 'Y') THEN

Line 15649: from po_distributions_all

15645:
15646: BEGIN
15647: select count(po_distribution_id)
15648: into l_distribution_count
15649: from po_distributions_all
15650: where line_location_id = x_cascaded_table(n).po_line_location_id;
15651:
15652: IF (g_asn_debug = 'Y') THEN
15653: asn_debug.put_line('Inside poll not null..l_distribution_count:'||l_distribution_count);

Line 15659: from po_distributions_all

15655:
15656: IF l_distribution_count = 1 THEN
15657: select deliver_to_person_id
15658: into l_deliver_to_person_id
15659: from po_distributions_all
15660: where line_location_id = x_cascaded_table(n).po_line_location_id;
15661:
15662: x_cascaded_table(n).deliver_to_person_id := l_deliver_to_person_id;
15663: IF (g_asn_debug = 'Y') THEN