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 6515: from po_distributions_all --

6511: l_api_name CONSTANT VARCHAR2(30) := 'create_distributions';
6512:
6513: cursor c_dist is
6514: select po_distribution_id
6515: from po_distributions_all --
6516: where line_location_id = x_line_location_id;
6517:
6518: --
6519: l_key NUMBER;

Line 6554: FROM po_distributions_all --

6550: */
6551: l_progress:='010';
6552: SELECT nvl(max(distribution_num), 0)
6553: INTO x_distribution_num
6554: FROM po_distributions_all --
6555: WHERE line_location_id = x_line_location_id;
6556:
6557: l_progress:='020';
6558: fnd_profile.get('PO_AUTOCREATE_DATE',x_gl_date_option);

Line 6891: INSERT INTO po_distributions_all --

6887: END IF;
6888:
6889: --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6890:
6891: INSERT INTO po_distributions_all --
6892: (po_distribution_id,
6893: last_update_date,
6894: last_updated_by,
6895: po_header_id,

Line 7195: -- PO_DISTRIBUTIONS_ALL.AMOUNT_ORDERED

7191: --Name: calibrate_last_dist_amount
7192: --Pre-reqs:
7193: -- None.
7194: --Modifies:
7195: -- PO_DISTRIBUTIONS_ALL.AMOUNT_ORDERED
7196: --Locks:
7197: -- None.
7198: --Function:
7199: -- This procedure is used to calibrate the amount of the last distribution

Line 7225: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;

7221: l_api_name VARCHAR2(30) := 'calibrate_last_dist_amount';
7222: l_log_head VARCHAR2(100) := g_log_head || l_api_name;
7223: l_progress VARCHAR2(3);
7224:
7225: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7226: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7227: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7228: l_shipment_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
7229:

Line 7226: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;

7222: l_log_head VARCHAR2(100) := g_log_head || l_api_name;
7223: l_progress VARCHAR2(3);
7224:
7225: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7226: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7227: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7228: l_shipment_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
7229:
7230: BEGIN

Line 7227: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;

7223: l_progress VARCHAR2(3);
7224:
7225: l_sum_dist_amounts PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7226: l_last_dist_amount PO_DISTRIBUTIONS_ALL.amount_ordered%TYPE;
7227: l_last_distribution_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7228: l_shipment_amount PO_LINE_LOCATIONS_ALL.amount%TYPE;
7229:
7230: BEGIN
7231:

Line 7244: FROM po_distributions_all

7240: SELECT sum(amount_ordered)
7241: , max(po_distribution_id)
7242: INTO l_sum_dist_amounts
7243: , l_last_distribution_id
7244: FROM po_distributions_all
7245: WHERE line_location_id = p_line_location_id;
7246:
7247: l_progress:='020'; PO_DEBUG.debug_var(l_log_head,l_progress,'l_sum_dist_amounts',l_sum_dist_amounts);
7248: l_progress:='030'; PO_DEBUG.debug_var(l_log_head,l_progress,'l_last_distribution_id',l_last_distribution_id);

Line 7266: UPDATE po_distributions_all

7262: --
7263: -- Set it to the shipment amount minus the sum of all distribution
7264: -- amounts (except the last distribution).
7265: --
7266: UPDATE po_distributions_all
7267: SET amount_ordered = l_shipment_amount - (l_sum_dist_amounts - amount_ordered)
7268: WHERE po_distribution_id = l_last_distribution_id
7269: RETURNING amount_ordered
7270: INTO l_last_dist_amount;

Line 7294: -- PO_DISTRIBUTIONS_ALL.QUANTITY_ORDERED

7290: --Name: calibrate_last_dist_quantity
7291: --Pre-reqs:
7292: -- None.
7293: --Modifies:
7294: -- PO_DISTRIBUTIONS_ALL.QUANTITY_ORDERED
7295: --Locks:
7296: -- None.
7297: --Function:
7298: -- This procedure is used to calibrate the quantity of the last distribution

Line 7323: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;

7319:
7320: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.calibrate_last_dist_quantity';
7321: d_progress NUMBER;
7322:
7323: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7324: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7325: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7326: l_shipment_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
7327:

Line 7324: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;

7320: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.calibrate_last_dist_quantity';
7321: d_progress NUMBER;
7322:
7323: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7324: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7325: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7326: l_shipment_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
7327:
7328: BEGIN

Line 7325: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;

7321: d_progress NUMBER;
7322:
7323: l_sum_dist_quantities PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7324: l_last_dist_id PO_DISTRIBUTIONS_ALL.po_distribution_id%TYPE;
7325: l_last_dist_qty PO_DISTRIBUTIONS_ALL.quantity_ordered%TYPE;
7326: l_shipment_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;
7327:
7328: BEGIN
7329:

Line 7341: FROM po_distributions_all pod

7337: d_progress := 10;
7338:
7339: SELECT sum(pod.quantity_ordered), max(pod.po_distribution_id)
7340: INTO l_sum_dist_quantities, l_last_dist_id
7341: FROM po_distributions_all pod
7342: WHERE pod.line_location_id = p_line_location_id;
7343:
7344: d_progress := 20;
7345:

Line 7357: UPDATE po_distributions_all pod

7353: WHERE poll.line_location_id = p_line_location_id;
7354:
7355: d_progress := 30;
7356:
7357: UPDATE po_distributions_all pod
7358: SET pod.quantity_ordered = l_shipment_quantity -
7359: (l_sum_dist_quantities - pod.quantity_ordered)
7360: WHERE pod.po_distribution_id = l_last_dist_id
7361: RETURNING pod.quantity_ordered INTO l_last_dist_qty;

Line 7906: l_destination_type_code PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE;

7902: l_destination_ou_id PO_HEADERS_ALL.org_id%TYPE;
7903:
7904: l_item_id PO_LINES_INTERFACE.item_id%TYPE;
7905: l_category_id PO_LINES_INTERFACE.category_id%TYPE;
7906: l_destination_type_code PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE;
7907: --l_ship_to_organization_id NUMBER;
7908: l_ship_to_location_id PO_DISTRIBUTIONS_INTERFACE.deliver_to_location_id%TYPE;
7909: l_deliver_to_person_id PO_DISTRIBUTIONS_INTERFACE.deliver_to_person_id%TYPE;
7910: l_line_type_id PO_LINES_INTERFACE.line_type_id%TYPE;

Line 7921: l_destination_subinventory PO_DISTRIBUTIONS_ALL.destination_subinventory%TYPE;

7917: l_wip_entity_id PO_DISTRIBUTIONS_INTERFACE.wip_entity_id%TYPE;
7918: l_wip_line_id PO_DISTRIBUTIONS_INTERFACE.wip_line_id%TYPE;
7919: l_wip_repetitive_schedule_id PO_DISTRIBUTIONS_INTERFACE.wip_repetitive_schedule_id%TYPE;
7920: l_gl_encumbered_date PO_DISTRIBUTIONS_INTERFACE.gl_encumbered_date%TYPE;
7921: l_destination_subinventory PO_DISTRIBUTIONS_ALL.destination_subinventory%TYPE;
7922: l_expenditure_type PO_DISTRIBUTIONS_ALL.expenditure_type%TYPE;
7923: l_expenditure_item_date PO_DISTRIBUTIONS_INTERFACE.expenditure_item_date%TYPE;
7924: l_wip_operation_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_operation_seq_num%TYPE;
7925: l_wip_resource_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_resource_seq_num%TYPE;

Line 7922: l_expenditure_type PO_DISTRIBUTIONS_ALL.expenditure_type%TYPE;

7918: l_wip_line_id PO_DISTRIBUTIONS_INTERFACE.wip_line_id%TYPE;
7919: l_wip_repetitive_schedule_id PO_DISTRIBUTIONS_INTERFACE.wip_repetitive_schedule_id%TYPE;
7920: l_gl_encumbered_date PO_DISTRIBUTIONS_INTERFACE.gl_encumbered_date%TYPE;
7921: l_destination_subinventory PO_DISTRIBUTIONS_ALL.destination_subinventory%TYPE;
7922: l_expenditure_type PO_DISTRIBUTIONS_ALL.expenditure_type%TYPE;
7923: l_expenditure_item_date PO_DISTRIBUTIONS_INTERFACE.expenditure_item_date%TYPE;
7924: l_wip_operation_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_operation_seq_num%TYPE;
7925: l_wip_resource_seq_num PO_DISTRIBUTIONS_INTERFACE.wip_resource_seq_num%TYPE;
7926:

Line 13719: -- po_distributions_all table

13715: IF (p_table_type = 'ALL') THEN
13716:
13717: --SQL WHAT: For distributions with award_id references, select
13718: -- the columns that Grants needs from the
13719: -- po_distributions_all table
13720: --SQL WHY : Needed to call GMS API to update award distribution
13721: -- lines table.
13722:
13723: SELECT pod.po_distribution_id,

Line 13736: FROM po_distributions_all pod

13732: l_gms_po_interface_obj.project_id,
13733: l_gms_po_interface_obj.task_id,
13734: l_gms_po_interface_obj.award_set_id_in,
13735: l_gms_po_interface_obj.award_set_id_out
13736: FROM po_distributions_all pod
13737: WHERE pod.po_line_id = p_po_line_id
13738: AND pod.award_id IS NOT NULL;
13739:
13740: ELSE

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

13790:
13791: --
13792: IF (p_table_type = 'ALL') THEN
13793:
13794: --SQL WHAT: Update po_distributions_all table with the new
13795: -- award_id's
13796: --SQL WHY : award_id's in PO tables need to be synchronized with
13797: -- award_id's in GMS tables.
13798:

Line 13800: UPDATE po_distributions_all

13796: --SQL WHY : award_id's in PO tables need to be synchronized with
13797: -- award_id's in GMS tables.
13798:
13799: FORALL i IN 1..l_gms_po_interface_obj.distribution_id.COUNT
13800: UPDATE po_distributions_all
13801: SET award_id =
13802: l_gms_po_interface_obj.award_set_id_out(i)
13803: WHERE po_distribution_id =
13804: l_gms_po_interface_obj.distribution_id(i);

Line 14702: -- PO_DISTRIBUTIONS_ALL

14698: --Name: create_payitem_dists
14699: --Pre-reqs:
14700: -- PO Payitems have all been created.
14701: --Modifies:
14702: -- PO_DISTRIBUTIONS_ALL
14703: --Locks:
14704: -- None.
14705: --Function:
14706: -- Create all distributions for all payitems for a PO Line.

Line 14755: FROM po_distributions_all pod,

14751: , poll.price_override
14752: , poll.payment_type
14753: , pod.distribution_type
14754: , pod.rate
14755: FROM po_distributions_all pod,
14756: po_line_locations_all poll
14757: WHERE poll.po_line_id = p_po_line_id
14758: AND pod.line_location_id = poll.line_location_id
14759: AND pod.req_distribution_id IS NULL;

Line 14871: INSERT INTO po_distributions_all(

14867:
14868: --SQL WHAT: Create payitem distributions from backing req. distributions
14869: --SQL WHY : Create all such payitem distributions in one place
14870:
14871: INSERT INTO po_distributions_all(
14872: po_distribution_id
14873: , last_update_date
14874: , last_updated_by
14875: , last_update_login

Line 15043: INSERT INTO po_distributions_all(

15039:
15040: --SQL WHAT: Create payitem distributions in the case of no backing req.
15041: --SQL WHY : Create all such payitem distributions in one place
15042:
15043: INSERT INTO po_distributions_all(
15044: po_distribution_id
15045: , last_update_date
15046: , last_updated_by
15047: , last_update_login

Line 15151: INSERT INTO po_distributions_all

15147:
15148: --SQL WHAT: Create payitem distributions for advance payitems
15149: --SQL WHY : Create all such payitem distributions in one place
15150:
15151: INSERT INTO po_distributions_all
15152: (
15153: po_distribution_id
15154: , last_update_date
15155: , last_updated_by

Line 15238: po_distributions_all pod

15234: , params.sob_id
15235: ,nvl2(g_calculate_tax_flag, 'CREATE', null) --
15236: FROM po_line_locations_all adv,
15237: po_line_locations_all deliv,
15238: po_distributions_all pod
15239: WHERE adv.po_line_id = p_po_line_id
15240: AND adv.payment_type = 'ADVANCE'
15241: AND deliv.line_location_id =
15242: ( SELECT poll.line_location_id

Line 15459: UPDATE po_distributions_all pod

15455: --SQL WHAT: Update account information for a po distribution
15456: --SQL WHY : PO Distributions that don't have a backing req need to
15457: -- have account defaulted from account generator.
15458:
15459: UPDATE po_distributions_all pod
15460: SET pod.code_combination_id = l_code_combination_id
15461: , pod.budget_account_id = DECODE(NVL(params.po_encumbrance_flag, 'N'),
15462: 'Y', l_budget_account_id,
15463: NULL)

Line 15475: DELETE FROM po_distributions_all pod

15471: IF (PO_LOG.d_stmt) THEN
15472: PO_LOG.stmt(d_module, d_progress, 'Deleting distribution - acct. gen failure');
15473: END IF;
15474:
15475: DELETE FROM po_distributions_all pod
15476: WHERE pod.po_distribution_id =
15477: payitem_acct_rec.po_distribution_id;
15478:
15479: END IF; -- if l_acct_api_success AND ...

Line 15498: FROM po_distributions_all pod

15494: d_progress := 310;
15495:
15496: SELECT pod.po_distribution_id
15497: BULK COLLECT INTO l_dist_id_tbl
15498: FROM po_distributions_all pod
15499: WHERE pod.po_line_id = p_po_line_id;
15500:
15501: d_progress := 320;
15502: