DBA Data[Home] [Help]

APPS.PO_INTERFACE_S dependencies on PO_DISTRIBUTIONS_ALL

Line 9: PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE

5: g_log_head CONSTANT VARCHAR2(30) := 'po.plsql.PO_INTERFACE_S.';
6:
7: --
8: g_dest_type_code_SHOP_FLOOR CONSTANT
9: PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE
10: := 'SHOP FLOOR'
11: ;
12:
13: --

Line 7093: from po_distributions_all --

7089: l_api_name CONSTANT VARCHAR2(30) := 'create_distributions';
7090:
7091: cursor c_dist is
7092: select po_distribution_id
7093: from po_distributions_all --
7094: where line_location_id = x_line_location_id;
7095:
7096: --
7097: l_key NUMBER;

Line 7132: FROM po_distributions_all --

7128: */
7129: l_progress:='010';
7130: SELECT nvl(max(distribution_num), 0)
7131: INTO x_distribution_num
7132: FROM po_distributions_all --
7133: WHERE line_location_id = x_line_location_id;
7134:
7135: l_progress:='020';
7136: fnd_profile.get('PO_AUTOCREATE_DATE',x_gl_date_option);

Line 7469: INSERT INTO po_distributions_all --

7465: END IF;
7466:
7467: --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7468:
7469: INSERT INTO po_distributions_all --
7470: (po_distribution_id,
7471: last_update_date,
7472: last_updated_by,
7473: po_header_id,

Line 7790: -- PO_DISTRIBUTIONS_ALL.AMOUNT_ORDERED

7786: --Name: calibrate_last_dist_amount
7787: --Pre-reqs:
7788: -- None.
7789: --Modifies:
7790: -- PO_DISTRIBUTIONS_ALL.AMOUNT_ORDERED
7791: --Locks:
7792: -- None.
7793: --Function:
7794: -- This procedure is used to calibrate the amount of the last distribution

Line 7820: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;

7816: l_api_name VARCHAR2(30) := 'calibrate_last_dist_amount';
7817: l_log_head VARCHAR2(100) := g_log_head || l_api_name;
7818: l_progress VARCHAR2(3);
7819:
7820: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7821: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7822: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7823: l_shipment_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
7824:

Line 7821: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;

7817: l_log_head VARCHAR2(100) := g_log_head || l_api_name;
7818: l_progress VARCHAR2(3);
7819:
7820: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7821: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7822: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7823: l_shipment_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
7824:
7825: BEGIN

Line 7822: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;

7818: l_progress VARCHAR2(3);
7819:
7820: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7821: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7822: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7823: l_shipment_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
7824:
7825: BEGIN
7826:

Line 7839: FROM po_distributions_all

7835: SELECT sum(amount_ordered)
7836: , max(po_distribution_id)
7837: INTO l_sum_dist_amounts
7838: , l_last_distribution_id
7839: FROM po_distributions_all
7840: WHERE line_location_id = p_line_location_id;
7841:
7842: l_progress:='020'; PO_DEBUG.debug_var(l_log_head,l_progress,'l_sum_dist_amounts',l_sum_dist_amounts);
7843: l_progress:='030'; PO_DEBUG.debug_var(l_log_head,l_progress,'l_last_distribution_id',l_last_distribution_id);

Line 7861: UPDATE po_distributions_all

7857: --
7858: -- Set it to the shipment amount minus the sum of all distribution
7859: -- amounts (except the last distribution).
7860: --
7861: UPDATE po_distributions_all
7862: SET amount_ordered = l_shipment_amount - (l_sum_dist_amounts - amount_ordered)
7863: WHERE po_distribution_id = l_last_distribution_id
7864: RETURNING amount_ordered
7865: INTO l_last_dist_amount;

Line 7889: -- PO_DISTRIBUTIONS_ALL.QUANTITY_ORDERED

7885: --Name: calibrate_last_dist_quantity
7886: --Pre-reqs:
7887: -- None.
7888: --Modifies:
7889: -- PO_DISTRIBUTIONS_ALL.QUANTITY_ORDERED
7890: --Locks:
7891: -- None.
7892: --Function:
7893: -- This procedure is used to calibrate the quantity of the last distribution

Line 7918: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;

7914:
7915: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.calibrate_last_dist_quantity';
7916: d_progress NUMBER;
7917:
7918: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7919: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7920: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7921: l_shipment_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
7922:

Line 7919: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;

7915: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.calibrate_last_dist_quantity';
7916: d_progress NUMBER;
7917:
7918: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7919: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7920: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7921: l_shipment_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
7922:
7923: BEGIN

Line 7920: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;

7916: d_progress NUMBER;
7917:
7918: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7919: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7920: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7921: l_shipment_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
7922:
7923: BEGIN
7924:

Line 7936: FROM po_distributions_all pod

7932: d_progress := 10;
7933:
7934: SELECT sum(pod.quantity_ordered), max(pod.po_distribution_id)
7935: INTO l_sum_dist_quantities, l_last_dist_id
7936: FROM po_distributions_all pod
7937: WHERE pod.line_location_id = p_line_location_id;
7938:
7939: d_progress := 20;
7940:

Line 7952: UPDATE po_distributions_all pod

7948: WHERE poll.line_location_id = p_line_location_id;
7949:
7950: d_progress := 30;
7951:
7952: UPDATE po_distributions_all pod
7953: SET pod.quantity_ordered = l_shipment_quantity -
7954: (l_sum_dist_quantities - pod.quantity_ordered)
7955: WHERE pod.po_distribution_id = l_last_dist_id
7956: RETURNING pod.quantity_ordered INTO l_last_dist_qty;

Line 8513: l_destination_type_code PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE;

8509: l_destination_ou_id PO_HEADERS_ALL.org_id%TYPE;
8510:
8511: l_item_id PO_LINES_INTERFACE.item_id%TYPE;
8512: l_category_id PO_LINES_INTERFACE.category_id%TYPE;
8513: l_destination_type_code PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE;
8514: --l_ship_to_organization_id NUMBER;
8515: l_ship_to_location_id PO_DISTRIBUTIONS_INTERFACE.deliver_to_location_id%TYPE;
8516: l_deliver_to_person_id PO_DISTRIBUTIONS_INTERFACE.deliver_to_person_id%TYPE;
8517: l_line_type_id PO_LINES_INTERFACE.line_type_id%TYPE;

Line 8528: l_destination_subinventory PO_DISTRIBUTIONS_ALL.destination_subinventory%TYPE;

8524: l_wip_entity_id PO_DISTRIBUTIONS_INTERFACE.wip_entity_id%TYPE;
8525: l_wip_line_id PO_DISTRIBUTIONS_INTERFACE.wip_line_id%TYPE;
8526: l_wip_repetitive_schedule_id PO_DISTRIBUTIONS_INTERFACE.wip_repetitive_schedule_id%TYPE;
8527: l_gl_encumbered_date PO_DISTRIBUTIONS_INTERFACE.gl_encumbered_date%TYPE;
8528: l_destination_subinventory PO_DISTRIBUTIONS_ALL.destination_subinventory%TYPE;
8529: l_expenditure_type PO_DISTRIBUTIONS_ALL.expenditure_type%TYPE;
8530: l_expenditure_item_date PO_DISTRIBUTIONS_INTERFACE.expenditure_item_date%TYPE;
8531: l_wip_operation_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_operation_seq_num%TYPE;
8532: l_wip_resource_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_resource_seq_num%TYPE;

Line 8529: l_expenditure_type PO_DISTRIBUTIONS_ALL.expenditure_type%TYPE;

8525: l_wip_line_id PO_DISTRIBUTIONS_INTERFACE.wip_line_id%TYPE;
8526: l_wip_repetitive_schedule_id PO_DISTRIBUTIONS_INTERFACE.wip_repetitive_schedule_id%TYPE;
8527: l_gl_encumbered_date PO_DISTRIBUTIONS_INTERFACE.gl_encumbered_date%TYPE;
8528: l_destination_subinventory PO_DISTRIBUTIONS_ALL.destination_subinventory%TYPE;
8529: l_expenditure_type PO_DISTRIBUTIONS_ALL.expenditure_type%TYPE;
8530: l_expenditure_item_date PO_DISTRIBUTIONS_INTERFACE.expenditure_item_date%TYPE;
8531: l_wip_operation_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_operation_seq_num%TYPE;
8532: l_wip_resource_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_resource_seq_num%TYPE;
8533:

Line 14625: -- po_distributions_all table

14621: IF (p_table_type = 'ALL') THEN
14622:
14623: --SQL WHAT: For distributions with award_id references, select
14624: -- the columns that Grants needs from the
14625: -- po_distributions_all table
14626: --SQL WHY : Needed to call GMS API to update award distribution
14627: -- lines table.
14628:
14629: SELECT pod.po_distribution_id,

Line 14642: FROM po_distributions_all pod

14638: l_gms_po_interface_obj.project_id,
14639: l_gms_po_interface_obj.task_id,
14640: l_gms_po_interface_obj.award_set_id_in,
14641: l_gms_po_interface_obj.award_set_id_out
14642: FROM po_distributions_all pod
14643: WHERE pod.po_line_id = p_po_line_id
14644: AND pod.award_id IS NOT NULL;
14645:
14646: ELSE

Line 14700: --SQL WHAT: Update po_distributions_all table with the new

14696:
14697: --
14698: IF (p_table_type = 'ALL') THEN
14699:
14700: --SQL WHAT: Update po_distributions_all table with the new
14701: -- award_id's
14702: --SQL WHY : award_id's in PO tables need to be synchronized with
14703: -- award_id's in GMS tables.
14704:

Line 14706: UPDATE po_distributions_all

14702: --SQL WHY : award_id's in PO tables need to be synchronized with
14703: -- award_id's in GMS tables.
14704:
14705: FORALL i IN 1..l_gms_po_interface_obj.distribution_id.COUNT
14706: UPDATE po_distributions_all
14707: SET award_id =
14708: l_gms_po_interface_obj.award_set_id_out(i)
14709: WHERE po_distribution_id =
14710: l_gms_po_interface_obj.distribution_id(i);

Line 15611: -- PO_DISTRIBUTIONS_ALL

15607: --Name: create_payitem_dists
15608: --Pre-reqs:
15609: -- PO Payitems have all been created.
15610: --Modifies:
15611: -- PO_DISTRIBUTIONS_ALL
15612: --Locks:
15613: -- None.
15614: --Function:
15615: -- Create all distributions for all payitems for a PO Line.

Line 15664: FROM po_distributions_all pod,

15660: , poll.price_override
15661: , poll.payment_type
15662: , pod.distribution_type
15663: , pod.rate
15664: FROM po_distributions_all pod,
15665: po_line_locations_all poll
15666: WHERE poll.po_line_id = p_po_line_id
15667: AND pod.line_location_id = poll.line_location_id
15668: AND pod.req_distribution_id IS NULL;

Line 15780: INSERT INTO po_distributions_all(

15776:
15777: --SQL WHAT: Create payitem distributions from backing req. distributions
15778: --SQL WHY : Create all such payitem distributions in one place
15779:
15780: INSERT INTO po_distributions_all(
15781: po_distribution_id
15782: , last_update_date
15783: , last_updated_by
15784: , last_update_login

Line 15952: INSERT INTO po_distributions_all(

15948:
15949: --SQL WHAT: Create payitem distributions in the case of no backing req.
15950: --SQL WHY : Create all such payitem distributions in one place
15951:
15952: INSERT INTO po_distributions_all(
15953: po_distribution_id
15954: , last_update_date
15955: , last_updated_by
15956: , last_update_login

Line 16060: INSERT INTO po_distributions_all

16056:
16057: --SQL WHAT: Create payitem distributions for advance payitems
16058: --SQL WHY : Create all such payitem distributions in one place
16059:
16060: INSERT INTO po_distributions_all
16061: (
16062: po_distribution_id
16063: , last_update_date
16064: , last_updated_by

Line 16147: po_distributions_all pod

16143: , params.sob_id
16144: ,nvl2(g_calculate_tax_flag, 'CREATE', null) --
16145: FROM po_line_locations_all adv,
16146: po_line_locations_all deliv,
16147: po_distributions_all pod
16148: WHERE adv.po_line_id = p_po_line_id
16149: AND adv.payment_type = 'ADVANCE'
16150: AND deliv.line_location_id =
16151: ( SELECT poll.line_location_id

Line 16368: UPDATE po_distributions_all pod

16364: --SQL WHAT: Update account information for a po distribution
16365: --SQL WHY : PO Distributions that don't have a backing req need to
16366: -- have account defaulted from account generator.
16367:
16368: UPDATE po_distributions_all pod
16369: SET pod.code_combination_id = l_code_combination_id
16370: , pod.budget_account_id = DECODE(NVL(params.po_encumbrance_flag, 'N'),
16371: 'Y', l_budget_account_id,
16372: NULL)

Line 16384: DELETE FROM po_distributions_all pod

16380: IF (PO_LOG.d_stmt) THEN
16381: PO_LOG.stmt(d_module, d_progress, 'Deleting distribution - acct. gen failure');
16382: END IF;
16383:
16384: DELETE FROM po_distributions_all pod
16385: WHERE pod.po_distribution_id =
16386: payitem_acct_rec.po_distribution_id;
16387:
16388: END IF; -- if l_acct_api_success AND ...

Line 16407: FROM po_distributions_all pod

16403: d_progress := 310;
16404:
16405: SELECT pod.po_distribution_id
16406: BULK COLLECT INTO l_dist_id_tbl
16407: FROM po_distributions_all pod
16408: WHERE pod.po_line_id = p_po_line_id;
16409:
16410: d_progress := 320;
16411: