DBA Data[Home] [Help]

APPS.OPI_EDW_IDS_CALC dependencies on STANDARD

Line 928: -- Fix for bug . Added procedures to fix the inv value for period start/end rows after standard cost update

924:
925: END LOOP; /* loop for periods */
926: END LOOP; /* loop for key combs */
927:
928: -- Fix for bug . Added procedures to fix the inv value for period start/end rows after standard cost update
929:
930: cost_update_inventory (p_from_date, p_to_date, p_organization_id,x_status);
931:
932:

Line 952: -- the CST_STANDARD_COSTS table. This stores the latest

948: cost_date IN DATE)
949: RETURN NUMBER
950: IS
951: -- Cursor for cost query. This returns the newest cost from
952: -- the CST_STANDARD_COSTS table. This stores the latest
953: -- cost, except for new items.
954: CURSOR cost_on_date_csr (org_id NUMBER, item_id NUMBER,
955: cost_date DATE)
956: IS

Line 957: SELECT csc.standard_cost unit_cost -- Standard cost method logic.

953: -- cost, except for new items.
954: CURSOR cost_on_date_csr (org_id NUMBER, item_id NUMBER,
955: cost_date DATE)
956: IS
957: SELECT csc.standard_cost unit_cost -- Standard cost method logic.
958: FROM CST_STANDARD_COSTS csc
959: WHERE csc.ORGANIZATION_ID = org_id
960: AND csc.INVENTORY_ITEM_ID = item_id
961: AND csc.STANDARD_COST_REVISION_DATE =

Line 958: FROM CST_STANDARD_COSTS csc

954: CURSOR cost_on_date_csr (org_id NUMBER, item_id NUMBER,
955: cost_date DATE)
956: IS
957: SELECT csc.standard_cost unit_cost -- Standard cost method logic.
958: FROM CST_STANDARD_COSTS csc
959: WHERE csc.ORGANIZATION_ID = org_id
960: AND csc.INVENTORY_ITEM_ID = item_id
961: AND csc.STANDARD_COST_REVISION_DATE =
962: (SELECT max(csc2.STANDARD_COST_REVISION_DATE)

Line 961: AND csc.STANDARD_COST_REVISION_DATE =

957: SELECT csc.standard_cost unit_cost -- Standard cost method logic.
958: FROM CST_STANDARD_COSTS csc
959: WHERE csc.ORGANIZATION_ID = org_id
960: AND csc.INVENTORY_ITEM_ID = item_id
961: AND csc.STANDARD_COST_REVISION_DATE =
962: (SELECT max(csc2.STANDARD_COST_REVISION_DATE)
963: FROM CST_STANDARD_COSTS csc2
964: WHERE csc2.ORGANIZATION_ID = org_id
965: AND csc2.INVENTORY_ITEM_ID = item_id

Line 962: (SELECT max(csc2.STANDARD_COST_REVISION_DATE)

958: FROM CST_STANDARD_COSTS csc
959: WHERE csc.ORGANIZATION_ID = org_id
960: AND csc.INVENTORY_ITEM_ID = item_id
961: AND csc.STANDARD_COST_REVISION_DATE =
962: (SELECT max(csc2.STANDARD_COST_REVISION_DATE)
963: FROM CST_STANDARD_COSTS csc2
964: WHERE csc2.ORGANIZATION_ID = org_id
965: AND csc2.INVENTORY_ITEM_ID = item_id
966: AND csc2.STANDARD_COST_REVISION_DATE <

Line 963: FROM CST_STANDARD_COSTS csc2

959: WHERE csc.ORGANIZATION_ID = org_id
960: AND csc.INVENTORY_ITEM_ID = item_id
961: AND csc.STANDARD_COST_REVISION_DATE =
962: (SELECT max(csc2.STANDARD_COST_REVISION_DATE)
963: FROM CST_STANDARD_COSTS csc2
964: WHERE csc2.ORGANIZATION_ID = org_id
965: AND csc2.INVENTORY_ITEM_ID = item_id
966: AND csc2.STANDARD_COST_REVISION_DATE <
967: trunc(cost_date) + 1 );

Line 966: AND csc2.STANDARD_COST_REVISION_DATE <

962: (SELECT max(csc2.STANDARD_COST_REVISION_DATE)
963: FROM CST_STANDARD_COSTS csc2
964: WHERE csc2.ORGANIZATION_ID = org_id
965: AND csc2.INVENTORY_ITEM_ID = item_id
966: AND csc2.STANDARD_COST_REVISION_DATE <
967: trunc(cost_date) + 1 );
968:
969: -- cursor for getting the cost of a new item, when there is
970: -- no cost in the CST_STANDARD_COST table.

Line 970: -- no cost in the CST_STANDARD_COST table.

966: AND csc2.STANDARD_COST_REVISION_DATE <
967: trunc(cost_date) + 1 );
968:
969: -- cursor for getting the cost of a new item, when there is
970: -- no cost in the CST_STANDARD_COST table.
971: CURSOR new_item_cost_csr (org_id NUMBER, item_id NUMBER,p_cost_date DATE)
972: IS
973: select actual_cost
974: from mtl_material_transactions

Line 1114: -- standard cost update transaction type IDs in mtl_material_transaction

1110: IS
1111:
1112: -- cost update transactions are stored in the mtl_material_transaction
1113: -- table
1114: -- standard cost update transaction type IDs in mtl_material_transaction
1115: -- table is 24
1116: COST_UPDATE_TRX_ID CONSTANT NUMBER := 24;
1117:
1118: -- period_flag = 1 for end of period entries in the opi_ids_push_log

Line 1127: -- primary cost method for standard cost update is 1

1123:
1124: -- push_flag = 1 for transactions just pushed into the opi_ids_push_log
1125: JUST_PUSHED_FLAG_VAL CONSTANT NUMBER:= 1;
1126:
1127: -- primary cost method for standard cost update is 1
1128: PRIMARY_COST_METHOD_UPDATE CONSTANT NUMBER := 1;
1129:
1130:
1131: -- cursor for all the distinct item-org combinations that have a

Line 1150: AND mmt.organization_id = mp.organization_id -- standard costing org

1146: mtl_system_items_b msi
1147: WHERE mmt.transaction_type_id = 24
1148: AND mmt.transaction_date BETWEEN p_from_date AND p_to_date
1149: AND mmt.organization_id = p_organization_id
1150: AND mmt.organization_id = mp.organization_id -- standard costing org
1151: AND msi.organization_id = mmt.organization_id
1152: AND msi.inventory_item_id = mmt.inventory_item_id
1153: AND msi.inventory_asset_flag = 'Y' -- don't pick expense items
1154: AND mp.primary_cost_method = 1