DBA Data[Home] [Help]

APPS.CSTPPWAC dependencies on CSTPPINV

Line 2308: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN

2304: BEGIN
2305: l_index := -1;
2306:
2307: -- Check if the item-cost_element_id-level_type combination exists
2308: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN
2309: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2310: LOOP
2311: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2312: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND

Line 2309: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))

2305: l_index := -1;
2306:
2307: -- Check if the item-cost_element_id-level_type combination exists
2308: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN
2309: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2310: LOOP
2311: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2312: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2313: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN

Line 2311: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND

2307: -- Check if the item-cost_element_id-level_type combination exists
2308: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN
2309: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2310: LOOP
2311: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2312: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2313: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
2314: l_index := l_count;
2315: END IF;

Line 2312: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND

2308: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN
2309: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2310: LOOP
2311: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2312: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2313: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
2314: l_index := l_count;
2315: END IF;
2316: END LOOP;

Line 2313: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN

2309: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2310: LOOP
2311: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2312: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2313: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
2314: l_index := l_count;
2315: END IF;
2316: END LOOP;
2317: ELSE

Line 2318: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;

2314: l_index := l_count;
2315: END IF;
2316: END LOOP;
2317: ELSE
2318: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2319: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2320: END IF;
2321: IF (l_index = -1) THEN
2322: -- Combination not found: Insert intp PL/SQL table

Line 2319: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;

2315: END IF;
2316: END LOOP;
2317: ELSE
2318: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2319: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2320: END IF;
2321: IF (l_index = -1) THEN
2322: -- Combination not found: Insert intp PL/SQL table
2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;

Line 2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;

2319: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2320: END IF;
2321: IF (l_index = -1) THEN
2322: -- Combination not found: Insert intp PL/SQL table
2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;

Line 2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;

2320: END IF;
2321: IF (l_index = -1) THEN
2322: -- Combination not found: Insert intp PL/SQL table
2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;

Line 2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;

2321: IF (l_index = -1) THEN
2322: -- Combination not found: Insert intp PL/SQL table
2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;

Line 2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;

2322: -- Combination not found: Insert intp PL/SQL table
2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:

Line 2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;

2323: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:
2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;

Line 2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;

2324: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:
2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;

Line 2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;

2325: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2326: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:
2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2333: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;

Line 2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;

2327: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:
2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2333: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2334:
2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;

Line 2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;

2328: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:
2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2333: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2334:
2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2336: ELSE

Line 2333: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;

2329: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2330:
2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2333: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2334:
2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2336: ELSE
2337: -- Combination found: Update balance in PL/SQL table.

Line 2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;

2331: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2332: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2333: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2334:
2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2336: ELSE
2337: -- Combination found: Update balance in PL/SQL table.
2338: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2339: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);

Line 2338: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);

2334:
2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2336: ELSE
2337: -- Combination found: Update balance in PL/SQL table.
2338: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2339: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);
2340: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);
2341: END IF;
2342: END;

Line 2339: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);

2335: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2336: ELSE
2337: -- Combination found: Update balance in PL/SQL table.
2338: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2339: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);
2340: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);
2341: END IF;
2342: END;
2343: END LOOP;

Line 2340: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);

2336: ELSE
2337: -- Combination found: Update balance in PL/SQL table.
2338: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2339: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);
2340: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);
2341: END IF;
2342: END;
2343: END LOOP;
2344:

Line 2346: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN

2342: END;
2343: END LOOP;
2344:
2345: -- Insert/Update quantities in PL/SQL tables
2346: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN
2347: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);
2348: ELSE
2349: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2350: END IF;

Line 2347: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);

2343: END LOOP;
2344:
2345: -- Insert/Update quantities in PL/SQL tables
2346: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN
2347: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);
2348: ELSE
2349: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2350: END IF;
2351:

Line 2349: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;

2345: -- Insert/Update quantities in PL/SQL tables
2346: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN
2347: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);
2348: ELSE
2349: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2350: END IF;
2351:
2352: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2353: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);

Line 2352: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN

2348: ELSE
2349: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2350: END IF;
2351:
2352: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2353: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);
2354: ELSE
2355: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2356: END IF;

Line 2353: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);

2349: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2350: END IF;
2351:
2352: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2353: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);
2354: ELSE
2355: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2356: END IF;
2357:

Line 2355: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;

2351:
2352: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2353: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);
2354: ELSE
2355: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2356: END IF;
2357:
2358: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2359: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);

Line 2358: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN

2354: ELSE
2355: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2356: END IF;
2357:
2358: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2359: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);
2360: ELSE
2361: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2362: END IF;

Line 2359: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);

2355: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2356: END IF;
2357:
2358: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2359: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);
2360: ELSE
2361: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2362: END IF;
2363:

Line 2361: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;

2357:
2358: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2359: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);
2360: ELSE
2361: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2362: END IF;
2363:
2364: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2365: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);

Line 2364: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN

2360: ELSE
2361: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2362: END IF;
2363:
2364: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2365: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);
2366: ELSE
2367: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;
2368: END IF;

Line 2365: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);

2361: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2362: END IF;
2363:
2364: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2365: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);
2366: ELSE
2367: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;
2368: END IF;
2369: end if;

Line 2367: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;

2363:
2364: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2365: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);
2366: ELSE
2367: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;
2368: END IF;
2369: end if;
2370:
2371: /* --- start of auto log --- */

Line 2586: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */

2582: l_index NUMBER;
2583: l_count NUMBER;
2584: BEGIN
2585: l_index := -1;
2586: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
2587: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2588: LOOP
2589: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2590: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND

Line 2587: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))

2583: l_count NUMBER;
2584: BEGIN
2585: l_index := -1;
2586: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
2587: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2588: LOOP
2589: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2590: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2591: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN

Line 2589: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND

2585: l_index := -1;
2586: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
2587: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2588: LOOP
2589: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2590: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2591: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
2592: l_index := l_count;
2593: END IF;

Line 2590: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND

2586: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
2587: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2588: LOOP
2589: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2590: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2591: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
2592: l_index := l_count;
2593: END IF;
2594: END LOOP;

Line 2591: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN

2587: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
2588: LOOP
2589: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
2590: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
2591: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
2592: l_index := l_count;
2593: END IF;
2594: END LOOP;
2595: ELSE /* new item */

Line 2596: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;

2592: l_index := l_count;
2593: END IF;
2594: END LOOP;
2595: ELSE /* new item */
2596: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2597: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2598: END IF;
2599: IF (l_index = -1) THEN
2600:

Line 2597: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;

2593: END IF;
2594: END LOOP;
2595: ELSE /* new item */
2596: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2597: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
2598: END IF;
2599: IF (l_index = -1) THEN
2600:
2601: /*********************************************************************

Line 2607: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;

2603: PL/SQL table. Quantity is maintained for each item, whereas all
2604: other tables are maintained for each item-cost_element-level_type
2605: **********************************************************************/
2606:
2607: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;

Line 2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;

2604: other tables are maintained for each item-cost_element-level_type
2605: **********************************************************************/
2606:
2607: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;

Line 2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;

2605: **********************************************************************/
2606:
2607: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;

Line 2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;

2606:
2607: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:

Line 2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;

2607: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:
2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;

Line 2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;

2608: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:
2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;

Line 2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;

2609: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
2610: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:
2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2617: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;

Line 2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;

2611: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:
2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2617: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2618:
2619: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;

Line 2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;

2612: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:
2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2617: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2618:
2619: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2620: ELSE

Line 2617: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;

2613: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
2614:
2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2617: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2618:
2619: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2620: ELSE
2621:

Line 2619: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;

2615: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost * i_txn_qty;
2616: CSTPPINV.l_make_balance_tbl(l_index) := x.actual_cost * i_make_qty;
2617: CSTPPINV.l_buy_balance_tbl(l_index) := x.actual_cost * i_buy_qty;
2618:
2619: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
2620: ELSE
2621:
2622: /*************************************************************************
2623: Update/Insert total quantity, make quantity, buy quantity for each item

Line 2626: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);

2622: /*************************************************************************
2623: Update/Insert total quantity, make quantity, buy quantity for each item
2624: **************************************************************************/
2625:
2626: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2627: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);
2628: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);
2629: END IF;
2630: END;

Line 2627: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);

2623: Update/Insert total quantity, make quantity, buy quantity for each item
2624: **************************************************************************/
2625:
2626: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2627: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);
2628: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);
2629: END IF;
2630: END;
2631: END LOOP;

Line 2628: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);

2624: **************************************************************************/
2625:
2626: CSTPPINV.l_item_balance_tbl(l_index) := (x.actual_cost * i_txn_qty) + CSTPPINV.l_item_balance_tbl(l_index);
2627: CSTPPINV.l_make_balance_tbl(l_index) := (x.actual_cost * i_make_qty) + CSTPPINV.l_make_balance_tbl(l_index);
2628: CSTPPINV.l_buy_balance_tbl(l_index) := (x.actual_cost * i_buy_qty) + CSTPPINV.l_buy_balance_tbl(l_index);
2629: END IF;
2630: END;
2631: END LOOP;
2632:

Line 2633: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN

2629: END IF;
2630: END;
2631: END LOOP;
2632:
2633: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN
2634: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);
2635: ELSE
2636: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2637: END IF;

Line 2634: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);

2630: END;
2631: END LOOP;
2632:
2633: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN
2634: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);
2635: ELSE
2636: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2637: END IF;
2638:

Line 2636: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;

2632:
2633: IF CSTPPINV.l_item_quantity_tbl.EXISTS (i_item_id) THEN
2634: CSTPPINV.l_item_quantity_tbl(i_item_id) := i_txn_qty + CSTPPINV.l_item_quantity_tbl(i_item_id);
2635: ELSE
2636: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2637: END IF;
2638:
2639: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2640: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);

Line 2639: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN

2635: ELSE
2636: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2637: END IF;
2638:
2639: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2640: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);
2641: ELSE
2642: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2643: END IF;

Line 2640: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);

2636: CSTPPINV.l_item_quantity_tbl(i_item_id):= i_txn_qty;
2637: END IF;
2638:
2639: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2640: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);
2641: ELSE
2642: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2643: END IF;
2644:

Line 2642: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;

2638:
2639: IF CSTPPINV.l_make_quantity_tbl.EXISTS (i_item_id) THEN
2640: CSTPPINV.l_make_quantity_tbl(i_item_id) := i_make_qty + CSTPPINV.l_make_quantity_tbl(i_item_id);
2641: ELSE
2642: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2643: END IF;
2644:
2645: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2646: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);

Line 2645: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN

2641: ELSE
2642: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2643: END IF;
2644:
2645: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2646: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);
2647: ELSE
2648: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2649: END IF;

Line 2646: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);

2642: CSTPPINV.l_make_quantity_tbl(i_item_id):= i_make_qty;
2643: END IF;
2644:
2645: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2646: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);
2647: ELSE
2648: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2649: END IF;
2650:

Line 2648: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;

2644:
2645: IF CSTPPINV.l_issue_quantity_tbl.EXISTS (i_item_id) THEN
2646: CSTPPINV.l_issue_quantity_tbl (i_item_id):= i_issue_qty + CSTPPINV.l_issue_quantity_tbl(i_item_id);
2647: ELSE
2648: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2649: END IF;
2650:
2651: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2652: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);

Line 2651: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN

2647: ELSE
2648: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2649: END IF;
2650:
2651: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2652: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);
2653: ELSE
2654: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;
2655: END IF;

Line 2652: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);

2648: CSTPPINV.l_issue_quantity_tbl(i_item_id):= i_issue_qty;
2649: END IF;
2650:
2651: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2652: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);
2653: ELSE
2654: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;
2655: END IF;
2656:

Line 2654: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;

2650:
2651: IF CSTPPINV.l_buy_quantity_tbl.EXISTS (i_item_id) THEN
2652: CSTPPINV.l_buy_quantity_tbl (i_item_id):= i_buy_qty + CSTPPINV.l_buy_quantity_tbl(i_item_id);
2653: ELSE
2654: CSTPPINV.l_buy_quantity_tbl(i_item_id):= i_buy_qty;
2655: END IF;
2656:
2657: /* --- start of auto log --- */
2658: <>

Line 3217: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */

3213: l_count NUMBER;
3214: BEGIN
3215: l_stmt_num := 100;
3216: l_index := -1;
3217: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
3218: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
3219: LOOP
3220: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
3221: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND

Line 3218: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))

3214: BEGIN
3215: l_stmt_num := 100;
3216: l_index := -1;
3217: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
3218: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
3219: LOOP
3220: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
3221: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
3222: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN

Line 3220: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND

3216: l_index := -1;
3217: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
3218: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
3219: LOOP
3220: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
3221: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
3222: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
3223: l_index := l_count;
3224: END IF;

Line 3221: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND

3217: IF (CSTPPINV.l_item_start_index_tbl.EXISTS (i_item_id)) THEN /* item already exists */
3218: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
3219: LOOP
3220: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
3221: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
3222: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
3223: l_index := l_count;
3224: END IF;
3225: END LOOP;

Line 3222: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN

3218: FOR l_count IN (CSTPPINV.l_item_start_index_tbl(i_item_id))..(CSTPPINV.l_item_end_index_tbl(i_item_id))
3219: LOOP
3220: IF (CSTPPINV.l_item_id_tbl(l_count) = i_item_id AND
3221: CSTPPINV.l_cost_element_id_tbl(l_count) = x.cost_element_id AND
3222: CSTPPINV.l_level_type_tbl(l_count) = x.level_type) THEN
3223: l_index := l_count;
3224: END IF;
3225: END LOOP;
3226: ELSE /* new item */

Line 3227: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;

3223: l_index := l_count;
3224: END IF;
3225: END LOOP;
3226: ELSE /* new item */
3227: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
3228: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
3229: END IF;
3230: l_stmt_num := 110;
3231: IF (l_index = -1) THEN /* item-cost_element-level_type combination not found: Insert*/

Line 3228: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;

3224: END IF;
3225: END LOOP;
3226: ELSE /* new item */
3227: CSTPPINV.l_item_start_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
3228: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
3229: END IF;
3230: l_stmt_num := 110;
3231: IF (l_index = -1) THEN /* item-cost_element-level_type combination not found: Insert*/
3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;

Line 3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;

3228: CSTPPINV.l_item_end_index_tbl (i_item_id) := CSTPPINV.l_item_id_tbl.COUNT + 1;
3229: END IF;
3230: l_stmt_num := 110;
3231: IF (l_index = -1) THEN /* item-cost_element-level_type combination not found: Insert*/
3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;

Line 3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;

3229: END IF;
3230: l_stmt_num := 110;
3231: IF (l_index = -1) THEN /* item-cost_element-level_type combination not found: Insert*/
3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;

Line 3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;

3230: l_stmt_num := 110;
3231: IF (l_index = -1) THEN /* item-cost_element-level_type combination not found: Insert*/
3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;

Line 3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;

3231: IF (l_index = -1) THEN /* item-cost_element-level_type combination not found: Insert*/
3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:

Line 3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;

3232: l_index := CSTPPINV.l_item_id_tbl.COUNT + 1;
3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:
3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;

Line 3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;

3233: CSTPPINV.l_item_id_tbl(l_index) := i_item_id;
3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:
3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;
3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;

Line 3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;

3234: CSTPPINV.l_cost_layer_id_tbl(l_index) := i_cost_layer_id;
3235: CSTPPINV.l_qty_layer_id_tbl(l_index) := i_qty_layer_id;
3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:
3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;
3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;
3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;

Line 3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;

3236: CSTPPINV.l_cost_element_id_tbl(l_index) := x.cost_element_id;
3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:
3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;
3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;
3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;
3243:
3244: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;

Line 3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;

3237: CSTPPINV.l_level_type_tbl(l_index) := x.level_type;
3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:
3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;
3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;
3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;
3243:
3244: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
3245: ELSE /* item-cost_element-level_type combination found: Update*/

Line 3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;

3238: CSTPPINV.l_txn_category_tbl (l_index) := i_txn_category;
3239:
3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;
3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;
3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;
3243:
3244: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
3245: ELSE /* item-cost_element-level_type combination found: Update*/
3246: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost + CSTPPINV.l_item_balance_tbl(l_index);

Line 3244: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;

3240: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost;
3241: CSTPPINV.l_make_balance_tbl(l_index) := 0;
3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;
3243:
3244: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
3245: ELSE /* item-cost_element-level_type combination found: Update*/
3246: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost + CSTPPINV.l_item_balance_tbl(l_index);
3247: END IF;
3248: END;

Line 3246: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost + CSTPPINV.l_item_balance_tbl(l_index);

3242: CSTPPINV.l_buy_balance_tbl(l_index) := 0;
3243:
3244: CSTPPINV.l_item_end_index_tbl (i_item_id) := l_index;
3245: ELSE /* item-cost_element-level_type combination found: Update*/
3246: CSTPPINV.l_item_balance_tbl(l_index) := x.actual_cost + CSTPPINV.l_item_balance_tbl(l_index);
3247: END IF;
3248: END;
3249: END LOOP;
3250:

Line 3558: l_new_qty_tbl CSTPPINV.t_item_quantity_tbl;

3554: o_err_code OUT NOCOPY VARCHAR2,
3555: o_err_msg OUT NOCOPY VARCHAR2)
3556: IS
3557: l_stmt_num NUMBER;
3558: l_new_qty_tbl CSTPPINV.t_item_quantity_tbl;
3559: l_new_buy_qty_tbl CSTPPINV.t_item_quantity_tbl;
3560: l_new_make_qty_tbl CSTPPINV.t_item_quantity_tbl;
3561: l_new_issue_qty_tbl CSTPPINV.t_item_quantity_tbl;
3562: l_category_qty_tbl CSTPPINV.t_item_quantity_tbl;

Line 3559: l_new_buy_qty_tbl CSTPPINV.t_item_quantity_tbl;

3555: o_err_msg OUT NOCOPY VARCHAR2)
3556: IS
3557: l_stmt_num NUMBER;
3558: l_new_qty_tbl CSTPPINV.t_item_quantity_tbl;
3559: l_new_buy_qty_tbl CSTPPINV.t_item_quantity_tbl;
3560: l_new_make_qty_tbl CSTPPINV.t_item_quantity_tbl;
3561: l_new_issue_qty_tbl CSTPPINV.t_item_quantity_tbl;
3562: l_category_qty_tbl CSTPPINV.t_item_quantity_tbl;
3563:

Line 3560: l_new_make_qty_tbl CSTPPINV.t_item_quantity_tbl;

3556: IS
3557: l_stmt_num NUMBER;
3558: l_new_qty_tbl CSTPPINV.t_item_quantity_tbl;
3559: l_new_buy_qty_tbl CSTPPINV.t_item_quantity_tbl;
3560: l_new_make_qty_tbl CSTPPINV.t_item_quantity_tbl;
3561: l_new_issue_qty_tbl CSTPPINV.t_item_quantity_tbl;
3562: l_category_qty_tbl CSTPPINV.t_item_quantity_tbl;
3563:
3564: /* --- start of auto log --- */

Line 3561: l_new_issue_qty_tbl CSTPPINV.t_item_quantity_tbl;

3557: l_stmt_num NUMBER;
3558: l_new_qty_tbl CSTPPINV.t_item_quantity_tbl;
3559: l_new_buy_qty_tbl CSTPPINV.t_item_quantity_tbl;
3560: l_new_make_qty_tbl CSTPPINV.t_item_quantity_tbl;
3561: l_new_issue_qty_tbl CSTPPINV.t_item_quantity_tbl;
3562: l_category_qty_tbl CSTPPINV.t_item_quantity_tbl;
3563:
3564: /* --- start of auto log --- */
3565: l_module CONSTANT VARCHAR2(90) := 'cst.plsql.CSTPPWAC.insert_into_cppb';

Line 3562: l_category_qty_tbl CSTPPINV.t_item_quantity_tbl;

3558: l_new_qty_tbl CSTPPINV.t_item_quantity_tbl;
3559: l_new_buy_qty_tbl CSTPPINV.t_item_quantity_tbl;
3560: l_new_make_qty_tbl CSTPPINV.t_item_quantity_tbl;
3561: l_new_issue_qty_tbl CSTPPINV.t_item_quantity_tbl;
3562: l_category_qty_tbl CSTPPINV.t_item_quantity_tbl;
3563:
3564: /* --- start of auto log --- */
3565: l_module CONSTANT VARCHAR2(90) := 'cst.plsql.CSTPPWAC.insert_into_cppb';
3566: l_log_level CONSTANT NUMBER := fnd_log.G_CURRENT_RUNTIME_LEVEL;

Line 3595: IF (CSTPPINV.l_item_id_tbl.COUNT > 0) THEN

3591: END IF;
3592: /* --- end of auto log --- */
3593:
3594: l_stmt_num := 10;
3595: IF (CSTPPINV.l_item_id_tbl.COUNT > 0) THEN
3596: FOR l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3597: LOOP
3598: IF (i_txn_category = 5 OR i_txn_category = 8.5 OR
3599: i_txn_category = 2.5) THEN

Line 3596: FOR l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

3592: /* --- end of auto log --- */
3593:
3594: l_stmt_num := 10;
3595: IF (CSTPPINV.l_item_id_tbl.COUNT > 0) THEN
3596: FOR l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3597: LOOP
3598: IF (i_txn_category = 5 OR i_txn_category = 8.5 OR
3599: i_txn_category = 2.5) THEN
3600: -- Periodic Cost Update value change

Line 3612: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);

3608: l_new_make_qty_tbl (l_index),
3609: l_new_issue_qty_tbl (l_index),
3610: l_category_qty_tbl (l_index)
3611: FROM cst_pac_item_costs cpic
3612: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3613: ELSE
3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),

Line 3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),

3610: l_category_qty_tbl (l_index)
3611: FROM cst_pac_item_costs cpic
3612: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3613: ELSE
3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3617: cpic.issue_quantity + CSTPPINV.l_issue_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3618: CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index))

Line 3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),

3611: FROM cst_pac_item_costs cpic
3612: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3613: ELSE
3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3617: cpic.issue_quantity + CSTPPINV.l_issue_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3618: CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index))
3619: INTO l_new_qty_tbl (l_index),

Line 3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),

3612: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3613: ELSE
3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3617: cpic.issue_quantity + CSTPPINV.l_issue_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3618: CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index))
3619: INTO l_new_qty_tbl (l_index),
3620: l_new_buy_qty_tbl (l_index),

Line 3617: cpic.issue_quantity + CSTPPINV.l_issue_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),

3613: ELSE
3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3617: cpic.issue_quantity + CSTPPINV.l_issue_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3618: CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index))
3619: INTO l_new_qty_tbl (l_index),
3620: l_new_buy_qty_tbl (l_index),
3621: l_new_make_qty_tbl (l_index),

Line 3618: CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index))

3614: SELECT cpic.total_layer_quantity + CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3615: cpic.buy_quantity + CSTPPINV.l_buy_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3616: cpic.make_quantity + CSTPPINV.l_make_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3617: cpic.issue_quantity + CSTPPINV.l_issue_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index)),
3618: CSTPPINV.l_item_quantity_tbl (CSTPPINV.l_item_id_tbl(l_index))
3619: INTO l_new_qty_tbl (l_index),
3620: l_new_buy_qty_tbl (l_index),
3621: l_new_make_qty_tbl (l_index),
3622: l_new_issue_qty_tbl (l_index),

Line 3625: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);

3621: l_new_make_qty_tbl (l_index),
3622: l_new_issue_qty_tbl (l_index),
3623: l_category_qty_tbl (l_index)
3624: FROM cst_pac_item_costs cpic
3625: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3626: END IF;
3627: END LOOP;
3628: END IF;
3629:

Line 3631: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

3627: END LOOP;
3628: END IF;
3629:
3630: l_stmt_num := 20;
3631: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3632: MERGE INTO CST_PAC_PERIOD_BALANCES cppb
3633: USING (SELECT i_pac_period_id pac_period_id,
3634: i_cost_group_id cost_group_id,
3635: CSTPPINV.l_item_id_tbl(l_index) item_id,

Line 3635: CSTPPINV.l_item_id_tbl(l_index) item_id,

3631: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3632: MERGE INTO CST_PAC_PERIOD_BALANCES cppb
3633: USING (SELECT i_pac_period_id pac_period_id,
3634: i_cost_group_id cost_group_id,
3635: CSTPPINV.l_item_id_tbl(l_index) item_id,
3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,
3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,
3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,

Line 3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,

3632: MERGE INTO CST_PAC_PERIOD_BALANCES cppb
3633: USING (SELECT i_pac_period_id pac_period_id,
3634: i_cost_group_id cost_group_id,
3635: CSTPPINV.l_item_id_tbl(l_index) item_id,
3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,
3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,
3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,
3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,

Line 3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,

3633: USING (SELECT i_pac_period_id pac_period_id,
3634: i_cost_group_id cost_group_id,
3635: CSTPPINV.l_item_id_tbl(l_index) item_id,
3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,
3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,
3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,
3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,
3641: l_category_qty_tbl (l_index) category_quantity,

Line 3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,

3634: i_cost_group_id cost_group_id,
3635: CSTPPINV.l_item_id_tbl(l_index) item_id,
3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,
3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,
3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,
3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,
3641: l_category_qty_tbl (l_index) category_quantity,
3642: CSTPPINV.l_item_balance_tbl(l_index) category_balance

Line 3639: CSTPPINV.l_level_type_tbl(l_index) level_type,

3635: CSTPPINV.l_item_id_tbl(l_index) item_id,
3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,
3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,
3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,
3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,
3641: l_category_qty_tbl (l_index) category_quantity,
3642: CSTPPINV.l_item_balance_tbl(l_index) category_balance
3643: FROM dual) temp

Line 3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,

3636: CSTPPINV.l_cost_layer_id_tbl(l_index) cost_layer_id,
3637: CSTPPINV.l_qty_layer_id_tbl(l_index) qty_layer_id,
3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,
3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,
3641: l_category_qty_tbl (l_index) category_quantity,
3642: CSTPPINV.l_item_balance_tbl(l_index) category_balance
3643: FROM dual) temp
3644: ON ( cppb.pac_period_id = temp.pac_period_id

Line 3642: CSTPPINV.l_item_balance_tbl(l_index) category_balance

3638: CSTPPINV.l_cost_element_id_tbl(l_index) cost_element_id,
3639: CSTPPINV.l_level_type_tbl(l_index) level_type,
3640: CSTPPINV.l_txn_category_tbl(l_index) txn_category,
3641: l_category_qty_tbl (l_index) category_quantity,
3642: CSTPPINV.l_item_balance_tbl(l_index) category_balance
3643: FROM dual) temp
3644: ON ( cppb.pac_period_id = temp.pac_period_id
3645: AND cppb.cost_layer_id = temp.cost_layer_id
3646: AND cppb.cost_element_id = temp.cost_element_id

Line 3702: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

3698: program_update_date = sysdate;
3699:
3700: l_stmt_num := 30;
3701: -- Update balance of existing rows in CPICD
3702: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3703: UPDATE CST_PAC_ITEM_COST_DETAILS cpicd
3704: SET item_balance = nvl(item_balance, 0) + CSTPPINV.l_item_balance_tbl (l_index),
3705: /* 11834257: The total item cost and make cost needs to be updated for non-rework
3706: completions as calculate_periodic_cost is not called for this category */

Line 3704: SET item_balance = nvl(item_balance, 0) + CSTPPINV.l_item_balance_tbl (l_index),

3700: l_stmt_num := 30;
3701: -- Update balance of existing rows in CPICD
3702: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3703: UPDATE CST_PAC_ITEM_COST_DETAILS cpicd
3704: SET item_balance = nvl(item_balance, 0) + CSTPPINV.l_item_balance_tbl (l_index),
3705: /* 11834257: The total item cost and make cost needs to be updated for non-rework
3706: completions as calculate_periodic_cost is not called for this category */
3707: item_cost = decode(i_txn_category, 4,
3708: decode(sign(Nvl(l_new_qty_tbl (l_index),0)),

Line 3710: (-1 * sign(Nvl(item_balance, 0) + Nvl(CSTPPINV.l_item_balance_tbl (l_index),0))), 0,

3706: completions as calculate_periodic_cost is not called for this category */
3707: item_cost = decode(i_txn_category, 4,
3708: decode(sign(Nvl(l_new_qty_tbl (l_index),0)),
3709: 0, cpicd.item_cost,
3710: (-1 * sign(Nvl(item_balance, 0) + Nvl(CSTPPINV.l_item_balance_tbl (l_index),0))), 0,
3711: (Nvl(item_balance, 0) + Nvl(CSTPPINV.l_item_balance_tbl (l_index),0)) / l_new_qty_tbl (l_index)),
3712: item_cost),
3713: item_make_cost = decode(i_txn_category, 4,
3714: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),

Line 3711: (Nvl(item_balance, 0) + Nvl(CSTPPINV.l_item_balance_tbl (l_index),0)) / l_new_qty_tbl (l_index)),

3707: item_cost = decode(i_txn_category, 4,
3708: decode(sign(Nvl(l_new_qty_tbl (l_index),0)),
3709: 0, cpicd.item_cost,
3710: (-1 * sign(Nvl(item_balance, 0) + Nvl(CSTPPINV.l_item_balance_tbl (l_index),0))), 0,
3711: (Nvl(item_balance, 0) + Nvl(CSTPPINV.l_item_balance_tbl (l_index),0)) / l_new_qty_tbl (l_index)),
3712: item_cost),
3713: item_make_cost = decode(i_txn_category, 4,
3714: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),
3715: 0, cpicd.item_make_cost,

Line 3716: (-1 * sign(Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,

3712: item_cost),
3713: item_make_cost = decode(i_txn_category, 4,
3714: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),
3715: 0, cpicd.item_make_cost,
3716: (-1 * sign(Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3717: (Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3718: item_make_cost),
3719: make_balance = nvl(make_balance, 0) + CSTPPINV.l_make_balance_tbl (l_index),
3720: buy_balance = nvl(buy_balance, 0) + CSTPPINV.l_buy_balance_tbl (l_index),

Line 3717: (Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),

3713: item_make_cost = decode(i_txn_category, 4,
3714: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),
3715: 0, cpicd.item_make_cost,
3716: (-1 * sign(Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3717: (Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3718: item_make_cost),
3719: make_balance = nvl(make_balance, 0) + CSTPPINV.l_make_balance_tbl (l_index),
3720: buy_balance = nvl(buy_balance, 0) + CSTPPINV.l_buy_balance_tbl (l_index),
3721: last_update_date = sysdate,

Line 3719: make_balance = nvl(make_balance, 0) + CSTPPINV.l_make_balance_tbl (l_index),

3715: 0, cpicd.item_make_cost,
3716: (-1 * sign(Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3717: (Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3718: item_make_cost),
3719: make_balance = nvl(make_balance, 0) + CSTPPINV.l_make_balance_tbl (l_index),
3720: buy_balance = nvl(buy_balance, 0) + CSTPPINV.l_buy_balance_tbl (l_index),
3721: last_update_date = sysdate,
3722: last_updated_by = i_user_id,
3723: last_update_login = i_login_id,

Line 3720: buy_balance = nvl(buy_balance, 0) + CSTPPINV.l_buy_balance_tbl (l_index),

3716: (-1 * sign(Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3717: (Nvl(make_balance, 0) + Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3718: item_make_cost),
3719: make_balance = nvl(make_balance, 0) + CSTPPINV.l_make_balance_tbl (l_index),
3720: buy_balance = nvl(buy_balance, 0) + CSTPPINV.l_buy_balance_tbl (l_index),
3721: last_update_date = sysdate,
3722: last_updated_by = i_user_id,
3723: last_update_login = i_login_id,
3724: request_id = i_request_id,

Line 3728: WHERE cpicd.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)

3724: request_id = i_request_id,
3725: program_application_id = i_prog_appl_id,
3726: program_id = i_prog_id,
3727: program_update_date = sysdate
3728: WHERE cpicd.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)
3729: AND cpicd.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)
3730: AND cpicd.level_type = CSTPPINV.l_level_type_tbl (l_index);
3731:
3732: l_stmt_num := 40;

Line 3729: AND cpicd.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)

3725: program_application_id = i_prog_appl_id,
3726: program_id = i_prog_id,
3727: program_update_date = sysdate
3728: WHERE cpicd.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)
3729: AND cpicd.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)
3730: AND cpicd.level_type = CSTPPINV.l_level_type_tbl (l_index);
3731:
3732: l_stmt_num := 40;
3733: -- Insert missing cost elements into CPICD

Line 3730: AND cpicd.level_type = CSTPPINV.l_level_type_tbl (l_index);

3726: program_id = i_prog_id,
3727: program_update_date = sysdate
3728: WHERE cpicd.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)
3729: AND cpicd.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)
3730: AND cpicd.level_type = CSTPPINV.l_level_type_tbl (l_index);
3731:
3732: l_stmt_num := 40;
3733: -- Insert missing cost elements into CPICD
3734: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

Line 3734: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

3730: AND cpicd.level_type = CSTPPINV.l_level_type_tbl (l_index);
3731:
3732: l_stmt_num := 40;
3733: -- Insert missing cost elements into CPICD
3734: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3735: INSERT INTO CST_PAC_ITEM_COST_DETAILS cpicd
3736: (cost_layer_id,
3737: cost_element_id,
3738: level_type,

Line 3754: (SELECT CSTPPINV.l_cost_layer_id_tbl (l_index),

3750: item_make_cost,
3751: item_balance,
3752: make_balance,
3753: buy_balance)
3754: (SELECT CSTPPINV.l_cost_layer_id_tbl (l_index),
3755: CSTPPINV.l_cost_element_id_tbl (l_index),
3756: CSTPPINV.l_level_type_tbl (l_index),
3757: sysdate,
3758: i_user_id,

Line 3755: CSTPPINV.l_cost_element_id_tbl (l_index),

3751: item_balance,
3752: make_balance,
3753: buy_balance)
3754: (SELECT CSTPPINV.l_cost_layer_id_tbl (l_index),
3755: CSTPPINV.l_cost_element_id_tbl (l_index),
3756: CSTPPINV.l_level_type_tbl (l_index),
3757: sysdate,
3758: i_user_id,
3759: sysdate,

Line 3756: CSTPPINV.l_level_type_tbl (l_index),

3752: make_balance,
3753: buy_balance)
3754: (SELECT CSTPPINV.l_cost_layer_id_tbl (l_index),
3755: CSTPPINV.l_cost_element_id_tbl (l_index),
3756: CSTPPINV.l_level_type_tbl (l_index),
3757: sysdate,
3758: i_user_id,
3759: sysdate,
3760: i_user_id,

Line 3771: (-1 * sign(Nvl(CSTPPINV.l_item_balance_tbl (l_index),0))), 0,

3767: completions as calculate_periodic_cost is not called for this category */
3768: decode(i_txn_category, 4,
3769: decode(sign(Nvl(l_new_qty_tbl (l_index),0)),
3770: 0, 0,
3771: (-1 * sign(Nvl(CSTPPINV.l_item_balance_tbl (l_index),0))), 0,
3772: Nvl(CSTPPINV.l_item_balance_tbl (l_index),0) / l_new_qty_tbl (l_index)),
3773: 0),
3774: decode(i_txn_category, 4,
3775: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),

Line 3772: Nvl(CSTPPINV.l_item_balance_tbl (l_index),0) / l_new_qty_tbl (l_index)),

3768: decode(i_txn_category, 4,
3769: decode(sign(Nvl(l_new_qty_tbl (l_index),0)),
3770: 0, 0,
3771: (-1 * sign(Nvl(CSTPPINV.l_item_balance_tbl (l_index),0))), 0,
3772: Nvl(CSTPPINV.l_item_balance_tbl (l_index),0) / l_new_qty_tbl (l_index)),
3773: 0),
3774: decode(i_txn_category, 4,
3775: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),
3776: 0, 0,

Line 3777: (-1 * sign(Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,

3773: 0),
3774: decode(i_txn_category, 4,
3775: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),
3776: 0, 0,
3777: (-1 * sign(Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3778: (Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3779: 0),
3780: 0,
3781: CSTPPINV.l_item_balance_tbl (l_index),

Line 3778: (Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),

3774: decode(i_txn_category, 4,
3775: decode(sign(Nvl(l_new_make_qty_tbl (l_index),0)),
3776: 0, 0,
3777: (-1 * sign(Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3778: (Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3779: 0),
3780: 0,
3781: CSTPPINV.l_item_balance_tbl (l_index),
3782: CSTPPINV.l_make_balance_tbl (l_index),

Line 3781: CSTPPINV.l_item_balance_tbl (l_index),

3777: (-1 * sign(Nvl(CSTPPINV.l_make_balance_tbl (l_index),0))), 0,
3778: (Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3779: 0),
3780: 0,
3781: CSTPPINV.l_item_balance_tbl (l_index),
3782: CSTPPINV.l_make_balance_tbl (l_index),
3783: CSTPPINV.l_buy_balance_tbl (l_index)
3784: FROM dual
3785: WHERE NOT EXISTS (SELECT 1

Line 3782: CSTPPINV.l_make_balance_tbl (l_index),

3778: (Nvl(CSTPPINV.l_make_balance_tbl (l_index),0)) / l_new_make_qty_tbl (l_index)),
3779: 0),
3780: 0,
3781: CSTPPINV.l_item_balance_tbl (l_index),
3782: CSTPPINV.l_make_balance_tbl (l_index),
3783: CSTPPINV.l_buy_balance_tbl (l_index)
3784: FROM dual
3785: WHERE NOT EXISTS (SELECT 1
3786: FROM cst_pac_item_cost_details cpicd1

Line 3783: CSTPPINV.l_buy_balance_tbl (l_index)

3779: 0),
3780: 0,
3781: CSTPPINV.l_item_balance_tbl (l_index),
3782: CSTPPINV.l_make_balance_tbl (l_index),
3783: CSTPPINV.l_buy_balance_tbl (l_index)
3784: FROM dual
3785: WHERE NOT EXISTS (SELECT 1
3786: FROM cst_pac_item_cost_details cpicd1
3787: WHERE cpicd1.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)

Line 3787: WHERE cpicd1.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)

3783: CSTPPINV.l_buy_balance_tbl (l_index)
3784: FROM dual
3785: WHERE NOT EXISTS (SELECT 1
3786: FROM cst_pac_item_cost_details cpicd1
3787: WHERE cpicd1.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)
3788: AND cpicd1.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)
3789: AND cpicd1.level_type = CSTPPINV.l_level_type_tbl (l_index)));
3790:
3791: l_stmt_num := 50;

Line 3788: AND cpicd1.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)

3784: FROM dual
3785: WHERE NOT EXISTS (SELECT 1
3786: FROM cst_pac_item_cost_details cpicd1
3787: WHERE cpicd1.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)
3788: AND cpicd1.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)
3789: AND cpicd1.level_type = CSTPPINV.l_level_type_tbl (l_index)));
3790:
3791: l_stmt_num := 50;
3792: /* Changing the query as per Bug5045692. Performance Fix */

Line 3789: AND cpicd1.level_type = CSTPPINV.l_level_type_tbl (l_index)));

3785: WHERE NOT EXISTS (SELECT 1
3786: FROM cst_pac_item_cost_details cpicd1
3787: WHERE cpicd1.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index)
3788: AND cpicd1.cost_element_id = CSTPPINV.l_cost_element_id_tbl (l_index)
3789: AND cpicd1.level_type = CSTPPINV.l_level_type_tbl (l_index)));
3790:
3791: l_stmt_num := 50;
3792: /* Changing the query as per Bug5045692. Performance Fix */
3793: /* update quantities and balance in CPIC */

Line 3794: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

3790:
3791: l_stmt_num := 50;
3792: /* Changing the query as per Bug5045692. Performance Fix */
3793: /* update quantities and balance in CPIC */
3794: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3795: UPDATE cst_pac_item_costs cpic
3796: SET total_layer_quantity = l_new_qty_tbl (l_index),
3797: issue_quantity = l_new_issue_qty_tbl (l_index),
3798: buy_quantity = l_new_buy_qty_tbl(l_index),

Line 3807: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);

3803: program_application_id = i_prog_appl_id,
3804: program_id = i_prog_id,
3805: program_update_date = sysdate,
3806: last_update_login = i_login_id
3807: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3808:
3809: l_stmt_num := 60;
3810: /* Update CPQL quantity */
3811: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

Line 3811: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST

3807: WHERE cpic.cost_layer_id = CSTPPINV.l_cost_layer_id_tbl (l_index);
3808:
3809: l_stmt_num := 60;
3810: /* Update CPQL quantity */
3811: FORALL l_index IN CSTPPINV.l_item_id_tbl.FIRST..CSTPPINV.l_item_id_tbl.LAST
3812: UPDATE CST_PAC_QUANTITY_LAYERS cpql
3813: SET (last_updated_by,
3814: last_update_date,
3815: last_update_login,

Line 3830: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index)

3826: i_prog_id,
3827: sysdate,
3828: l_new_qty_tbl (l_index)
3829: FROM sys.dual)
3830: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index)
3831: AND EXISTS
3832: (SELECT 'there is a layer'
3833: FROM cst_pac_quantity_layers cpql
3834: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index));

Line 3834: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index));

3830: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index)
3831: AND EXISTS
3832: (SELECT 'there is a layer'
3833: FROM cst_pac_quantity_layers cpql
3834: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index));
3835:
3836: l_stmt_num := 70;
3837: /* Clear All PL/SQL tables */
3838: CSTPPINV.l_item_id_tbl.DELETE;

Line 3838: CSTPPINV.l_item_id_tbl.DELETE;

3834: WHERE cpql.quantity_layer_id = CSTPPINV.l_qty_layer_id_tbl (l_index));
3835:
3836: l_stmt_num := 70;
3837: /* Clear All PL/SQL tables */
3838: CSTPPINV.l_item_id_tbl.DELETE;
3839: CSTPPINV.l_cost_layer_id_tbl.DELETE;
3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;
3841:
3842: CSTPPINV.l_cost_element_id_tbl.DELETE;

Line 3839: CSTPPINV.l_cost_layer_id_tbl.DELETE;

3835:
3836: l_stmt_num := 70;
3837: /* Clear All PL/SQL tables */
3838: CSTPPINV.l_item_id_tbl.DELETE;
3839: CSTPPINV.l_cost_layer_id_tbl.DELETE;
3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;
3841:
3842: CSTPPINV.l_cost_element_id_tbl.DELETE;
3843: CSTPPINV.l_level_type_tbl.DELETE;

Line 3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;

3836: l_stmt_num := 70;
3837: /* Clear All PL/SQL tables */
3838: CSTPPINV.l_item_id_tbl.DELETE;
3839: CSTPPINV.l_cost_layer_id_tbl.DELETE;
3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;
3841:
3842: CSTPPINV.l_cost_element_id_tbl.DELETE;
3843: CSTPPINV.l_level_type_tbl.DELETE;
3844: CSTPPINV.l_txn_category_tbl.DELETE;

Line 3842: CSTPPINV.l_cost_element_id_tbl.DELETE;

3838: CSTPPINV.l_item_id_tbl.DELETE;
3839: CSTPPINV.l_cost_layer_id_tbl.DELETE;
3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;
3841:
3842: CSTPPINV.l_cost_element_id_tbl.DELETE;
3843: CSTPPINV.l_level_type_tbl.DELETE;
3844: CSTPPINV.l_txn_category_tbl.DELETE;
3845:
3846: CSTPPINV.l_item_balance_tbl.DELETE;

Line 3843: CSTPPINV.l_level_type_tbl.DELETE;

3839: CSTPPINV.l_cost_layer_id_tbl.DELETE;
3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;
3841:
3842: CSTPPINV.l_cost_element_id_tbl.DELETE;
3843: CSTPPINV.l_level_type_tbl.DELETE;
3844: CSTPPINV.l_txn_category_tbl.DELETE;
3845:
3846: CSTPPINV.l_item_balance_tbl.DELETE;
3847: CSTPPINV.l_make_balance_tbl.DELETE;

Line 3844: CSTPPINV.l_txn_category_tbl.DELETE;

3840: CSTPPINV.l_qty_layer_id_tbl.DELETE;
3841:
3842: CSTPPINV.l_cost_element_id_tbl.DELETE;
3843: CSTPPINV.l_level_type_tbl.DELETE;
3844: CSTPPINV.l_txn_category_tbl.DELETE;
3845:
3846: CSTPPINV.l_item_balance_tbl.DELETE;
3847: CSTPPINV.l_make_balance_tbl.DELETE;
3848: CSTPPINV.l_buy_balance_tbl.DELETE;

Line 3846: CSTPPINV.l_item_balance_tbl.DELETE;

3842: CSTPPINV.l_cost_element_id_tbl.DELETE;
3843: CSTPPINV.l_level_type_tbl.DELETE;
3844: CSTPPINV.l_txn_category_tbl.DELETE;
3845:
3846: CSTPPINV.l_item_balance_tbl.DELETE;
3847: CSTPPINV.l_make_balance_tbl.DELETE;
3848: CSTPPINV.l_buy_balance_tbl.DELETE;
3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;

Line 3847: CSTPPINV.l_make_balance_tbl.DELETE;

3843: CSTPPINV.l_level_type_tbl.DELETE;
3844: CSTPPINV.l_txn_category_tbl.DELETE;
3845:
3846: CSTPPINV.l_item_balance_tbl.DELETE;
3847: CSTPPINV.l_make_balance_tbl.DELETE;
3848: CSTPPINV.l_buy_balance_tbl.DELETE;
3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;
3851: CSTPPINV.l_make_quantity_tbl.DELETE;

Line 3848: CSTPPINV.l_buy_balance_tbl.DELETE;

3844: CSTPPINV.l_txn_category_tbl.DELETE;
3845:
3846: CSTPPINV.l_item_balance_tbl.DELETE;
3847: CSTPPINV.l_make_balance_tbl.DELETE;
3848: CSTPPINV.l_buy_balance_tbl.DELETE;
3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;
3851: CSTPPINV.l_make_quantity_tbl.DELETE;
3852: CSTPPINV.l_buy_quantity_tbl.DELETE;

Line 3850: CSTPPINV.l_item_quantity_tbl.DELETE;

3846: CSTPPINV.l_item_balance_tbl.DELETE;
3847: CSTPPINV.l_make_balance_tbl.DELETE;
3848: CSTPPINV.l_buy_balance_tbl.DELETE;
3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;
3851: CSTPPINV.l_make_quantity_tbl.DELETE;
3852: CSTPPINV.l_buy_quantity_tbl.DELETE;
3853: CSTPPINV.l_issue_quantity_tbl.DELETE;
3854:

Line 3851: CSTPPINV.l_make_quantity_tbl.DELETE;

3847: CSTPPINV.l_make_balance_tbl.DELETE;
3848: CSTPPINV.l_buy_balance_tbl.DELETE;
3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;
3851: CSTPPINV.l_make_quantity_tbl.DELETE;
3852: CSTPPINV.l_buy_quantity_tbl.DELETE;
3853: CSTPPINV.l_issue_quantity_tbl.DELETE;
3854:
3855: CSTPPINV.l_item_start_index_tbl.DELETE;

Line 3852: CSTPPINV.l_buy_quantity_tbl.DELETE;

3848: CSTPPINV.l_buy_balance_tbl.DELETE;
3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;
3851: CSTPPINV.l_make_quantity_tbl.DELETE;
3852: CSTPPINV.l_buy_quantity_tbl.DELETE;
3853: CSTPPINV.l_issue_quantity_tbl.DELETE;
3854:
3855: CSTPPINV.l_item_start_index_tbl.DELETE;
3856: CSTPPINV.l_item_end_index_tbl.DELETE;

Line 3853: CSTPPINV.l_issue_quantity_tbl.DELETE;

3849:
3850: CSTPPINV.l_item_quantity_tbl.DELETE;
3851: CSTPPINV.l_make_quantity_tbl.DELETE;
3852: CSTPPINV.l_buy_quantity_tbl.DELETE;
3853: CSTPPINV.l_issue_quantity_tbl.DELETE;
3854:
3855: CSTPPINV.l_item_start_index_tbl.DELETE;
3856: CSTPPINV.l_item_end_index_tbl.DELETE;
3857:

Line 3855: CSTPPINV.l_item_start_index_tbl.DELETE;

3851: CSTPPINV.l_make_quantity_tbl.DELETE;
3852: CSTPPINV.l_buy_quantity_tbl.DELETE;
3853: CSTPPINV.l_issue_quantity_tbl.DELETE;
3854:
3855: CSTPPINV.l_item_start_index_tbl.DELETE;
3856: CSTPPINV.l_item_end_index_tbl.DELETE;
3857:
3858: /* --- start of auto log --- */
3859: <>

Line 3856: CSTPPINV.l_item_end_index_tbl.DELETE;

3852: CSTPPINV.l_buy_quantity_tbl.DELETE;
3853: CSTPPINV.l_issue_quantity_tbl.DELETE;
3854:
3855: CSTPPINV.l_item_start_index_tbl.DELETE;
3856: CSTPPINV.l_item_end_index_tbl.DELETE;
3857:
3858: /* --- start of auto log --- */
3859: <>
3860:

Line 3917: l_cost_layer_id_tbl CSTPPINV.t_cost_layer_id_tbl;

3913: TYPE t_txn_category_tbl IS TABLE OF MTL_PAC_ACTUAL_COST_DETAILS.txn_category%TYPE
3914: INDEX BY BINARY_INTEGER;
3915: l_last_txn_id_tbl t_txn_id_tbl;
3916: l_txn_category_tbl t_txn_category_tbl;
3917: l_cost_layer_id_tbl CSTPPINV.t_cost_layer_id_tbl;
3918:
3919: /* --- start of auto log --- */
3920: l_module CONSTANT VARCHAR2(90) := 'cst.plsql.CSTPPWAC.calc_item_periodic_cost';
3921: l_log_level CONSTANT NUMBER := fnd_log.G_CURRENT_RUNTIME_LEVEL;

Line 4526: l_cost_layer_id_tbl CSTPPINV.t_cost_layer_id_tbl;

4522: TYPE t_txn_category_tbl IS TABLE OF MTL_PAC_ACTUAL_COST_DETAILS.txn_category%TYPE
4523: INDEX BY BINARY_INTEGER;
4524: l_last_txn_id_tbl t_txn_id_tbl;
4525: l_txn_category_tbl t_txn_category_tbl;
4526: l_cost_layer_id_tbl CSTPPINV.t_cost_layer_id_tbl;
4527:
4528: /* --- start of auto log --- */
4529: l_module CONSTANT VARCHAR2(90) := 'cst.plsql.CSTPPWAC.calc_periodic_cost';
4530: l_log_level CONSTANT NUMBER := fnd_log.G_CURRENT_RUNTIME_LEVEL;