DBA Data[Home] [Help]

APPS.CSTPPCIC dependencies on CST_ITEM_COSTS

Line 55: | CST_ITEM_COSTS.defaulted_flag = 2 (Do not use default cost controls) |

51: | 5: Category Items |
52: | |
53: | This procedure defaults the following values: |
54: | |
55: | CST_ITEM_COSTS.defaulted_flag = 2 (Do not use default cost controls) |
56: | CST_ITEM_COSTS.cost_update_id = NULL |
57: | CST_ITEM_COSTS.based_on_rollup_flag = 1 |
58: | CST_ITEM_COST_DETAILS.basis_factor = 1 |
59: | CST_ITEM_COST_DETAILS.rollup_source_type = 1(User defined) |

Line 56: | CST_ITEM_COSTS.cost_update_id = NULL |

52: | |
53: | This procedure defaults the following values: |
54: | |
55: | CST_ITEM_COSTS.defaulted_flag = 2 (Do not use default cost controls) |
56: | CST_ITEM_COSTS.cost_update_id = NULL |
57: | CST_ITEM_COSTS.based_on_rollup_flag = 1 |
58: | CST_ITEM_COST_DETAILS.basis_factor = 1 |
59: | CST_ITEM_COST_DETAILS.rollup_source_type = 1(User defined) |
60: | |

Line 57: | CST_ITEM_COSTS.based_on_rollup_flag = 1 |

53: | This procedure defaults the following values: |
54: | |
55: | CST_ITEM_COSTS.defaulted_flag = 2 (Do not use default cost controls) |
56: | CST_ITEM_COSTS.cost_update_id = NULL |
57: | CST_ITEM_COSTS.based_on_rollup_flag = 1 |
58: | CST_ITEM_COST_DETAILS.basis_factor = 1 |
59: | CST_ITEM_COST_DETAILS.rollup_source_type = 1(User defined) |
60: | |
61: *----------------------------------------------------------------------------*/

Line 530: -- to cst_item_costs_interface

526: --------------------------------------------------------------------------
527: -- Merge and update existing costs
528: -- Logic:
529: -- * Copy the based_on_rollup_flag for the p_to_cost_type_id items in CIC
530: -- to cst_item_costs_interface
531: -- * Delete the p_to_cost_type_id items in CIC, CICD, only if they also
532: -- have p_from_cost_type_id.
533: -- * Items get their p_to_cost_type_id costs from p_from_cost_type_id.
534: -- The based_on_rollup_flag is copied from CICI

Line 592: INSERT INTO cst_item_costs_interface

588:
589: SELECT CST_LISTS_S.NEXTVAL INTO l_grp_id
590: FROM dual;
591:
592: INSERT INTO cst_item_costs_interface
593: ( inventory_item_id
594: , cost_type_id
595: , based_on_rollup_flag
596: , group_id

Line 603: FROM cst_item_costs CIC

599: inventory_item_id
600: , p_to_cost_type_id
601: , based_on_rollup_flag
602: , l_grp_id
603: FROM cst_item_costs CIC
604: WHERE CIC.cost_type_id = p_to_cost_type_id
605: AND CIC.organization_id = p_to_org_id
606: AND (p_range = 1
607: OR

Line 635: DELETE cst_item_costs CIC

631:
632: l_stmt_num := 40;
633:
634:
635: DELETE cst_item_costs CIC
636: WHERE CIC.cost_type_id = p_to_cost_type_id
637: AND CIC.organization_id = p_to_org_id
638: AND (p_range = 1
639: OR

Line 668: -- and removing backed up rollup flags from cst_item_costs_interface

664:
665: --------------------------------------------------------------------------
666: -- step 3> Inserting costs from CPIC
667: -- to the costs for p_to_org_id, p_to_cost_type_id, item in CIC
668: -- and removing backed up rollup flags from cst_item_costs_interface
669: --------------------------------------------------------------------------
670:
671:
672: l_stmt_num := 50;

Line 675: INSERT INTO cst_item_costs

671:
672: l_stmt_num := 50;
673:
674:
675: INSERT INTO cst_item_costs
676: ( inventory_item_id
677: , organization_id
678: , cost_type_id
679: , last_update_date

Line 787: FROM cst_item_costs_interface

783: , SYSDATE
784: FROM cst_pac_item_costs CPIC,
785: mtl_system_items MSI,
786: (SELECT inventory_item_id, based_on_rollup_flag
787: FROM cst_item_costs_interface
788: WHERE group_id = l_grp_id) BORF, -- based_on_rollup_flag backed up from destination cost type
789: (SELECT cic.inventory_item_id, cic.based_on_rollup_flag
790: FROM cst_cost_types cct, cst_item_costs cic
791: WHERE cic.organization_id = p_to_org_id

Line 790: FROM cst_cost_types cct, cst_item_costs cic

786: (SELECT inventory_item_id, based_on_rollup_flag
787: FROM cst_item_costs_interface
788: WHERE group_id = l_grp_id) BORF, -- based_on_rollup_flag backed up from destination cost type
789: (SELECT cic.inventory_item_id, cic.based_on_rollup_flag
790: FROM cst_cost_types cct, cst_item_costs cic
791: WHERE cic.organization_id = p_to_org_id
792: AND cct.cost_type_id = p_to_cost_type_id
793: AND cic.cost_type_id = cct.default_cost_type_id) dBORF -- based_on_rollup_flag from default cost type
794: WHERE CPIC.pac_period_id = p_period_id

Line 822: DELETE cst_item_costs_interface

818: ||' Rows Inserted into CIC');
819:
820: l_stmt_num := 55;
821:
822: DELETE cst_item_costs_interface
823: WHERE group_id = l_grp_id;
824:
825: l_row_count := 0;
826: l_row_count := SQL%ROWCOUNT;

Line 952: INSERT INTO cst_item_costs

948:
949: l_stmt_num := 70;
950:
951:
952: INSERT INTO cst_item_costs
953: ( inventory_item_id
954: , organization_id
955: , cost_type_id
956: , last_update_date

Line 1065: FROM cst_cost_types cct, cst_item_costs cic

1061: , SYSDATE
1062: FROM cst_pac_item_costs CPIC,
1063: mtl_system_items MSI,
1064: (SELECT cic.inventory_item_id, based_on_rollup_flag
1065: FROM cst_cost_types cct, cst_item_costs cic
1066: WHERE cic.organization_id = p_to_org_id
1067: AND cct.cost_type_id = p_to_cost_type_id
1068: AND cic.cost_type_id = cct.default_cost_type_id) dBORF -- based_on_rollup_flag from default cost type
1069:

Line 1090: FROM cst_item_costs CIC

1086: AND p_range = 5)
1087: )
1088: AND NOT EXISTS
1089: (SELECT 'x'
1090: FROM cst_item_costs CIC
1091: WHERE CIC.cost_type_id = p_to_cost_type_id
1092: AND CIC.organization_id = p_to_org_id
1093: AND CIC.inventory_item_id = CPIC.inventory_item_id);
1094:

Line 1197: FROM cst_item_costs CIC

1193: -- Statment 70 already makes this check and then inserts to CIC, so this always fails.
1194: /*
1195: AND NOT EXISTS
1196: (SELECT 'x'
1197: FROM cst_item_costs CIC
1198: WHERE CIC.cost_type_id = p_to_cost_type_id
1199: AND CIC.organization_id = p_to_org_id
1200: AND CIC.inventory_item_id = CPIC.inventory_item_id)
1201: */

Line 1227: -- to cst_item_costs_interface

1223: --------------------------------------------------------------------------
1224: --Remove and replace all cost information
1225: -- Logic:
1226: -- * Copy the based_on_rollup_flag for the p_to_cost_type_id items in CIC
1227: -- to cst_item_costs_interface
1228: -- * Delete the p_to_cost_type_id items in CIC, CICD.
1229: -- * Items get their p_to_cost_type_id costs from p_from_cost_type_id.
1230: -- The based_on_rollup_flag is copied from CICI for items that had rows
1231: --------------------------------------------------------------------------

Line 1278: INSERT INTO cst_item_costs_interface

1274:
1275: SELECT CST_LISTS_S.NEXTVAL INTO l_grp_id
1276: FROM dual;
1277:
1278: INSERT INTO cst_item_costs_interface
1279: ( inventory_item_id
1280: , cost_type_id
1281: , based_on_rollup_flag
1282: , group_id

Line 1289: FROM cst_item_costs CIC

1285: inventory_item_id
1286: , p_to_cost_type_id
1287: , based_on_rollup_flag
1288: , l_grp_id
1289: FROM cst_item_costs CIC
1290: WHERE CIC.cost_type_id = p_to_cost_type_id
1291: AND CIC.organization_id = p_to_org_id
1292: AND (p_range = 1
1293: OR

Line 1322: DELETE cst_item_costs CIC

1318:
1319: l_stmt_num := 100;
1320:
1321:
1322: DELETE cst_item_costs CIC
1323: WHERE CIC.cost_type_id = p_to_cost_type_id
1324: AND CIC.organization_id = p_to_org_id
1325: AND (p_range = 1
1326: OR

Line 1349: -- and removing backed up rollup flags from cst_item_costs_interface

1345:
1346: --------------------------------------------------------------------------
1347: -- step 3> Inserting costs from CPIC
1348: -- to the costs for p_to_org_id, p_to_cost_type_id, item in CIC
1349: -- and removing backed up rollup flags from cst_item_costs_interface
1350: --------------------------------------------------------------------------
1351:
1352:
1353: l_stmt_num := 110;

Line 1356: INSERT INTO cst_item_costs

1352:
1353: l_stmt_num := 110;
1354:
1355:
1356: INSERT INTO cst_item_costs
1357: ( inventory_item_id
1358: , organization_id
1359: , cost_type_id
1360: , last_update_date

Line 1468: FROM cst_item_costs_interface

1464: , SYSDATE
1465: FROM cst_pac_item_costs CPIC,
1466: mtl_system_items MSI,
1467: (SELECT inventory_item_id, based_on_rollup_flag
1468: FROM cst_item_costs_interface
1469: WHERE group_id = l_grp_id) BORF, -- based_on_rollup_flag backed up from destination cost type
1470: (SELECT cic.inventory_item_id, cic.based_on_rollup_flag
1471: FROM cst_cost_types cct, cst_item_costs cic
1472: WHERE cic.organization_id = p_to_org_id

Line 1471: FROM cst_cost_types cct, cst_item_costs cic

1467: (SELECT inventory_item_id, based_on_rollup_flag
1468: FROM cst_item_costs_interface
1469: WHERE group_id = l_grp_id) BORF, -- based_on_rollup_flag backed up from destination cost type
1470: (SELECT cic.inventory_item_id, cic.based_on_rollup_flag
1471: FROM cst_cost_types cct, cst_item_costs cic
1472: WHERE cic.organization_id = p_to_org_id
1473: AND cct.cost_type_id = p_to_cost_type_id
1474: AND cic.cost_type_id = cct.default_cost_type_id) dBORF -- based_on_rollup_flag from default cost type
1475: WHERE CPIC.pac_period_id = p_period_id

Line 1503: DELETE cst_item_costs_interface

1499: ||' Rows Inserted into CIC');
1500:
1501: l_stmt_num := 115;
1502:
1503: DELETE cst_item_costs_interface
1504: WHERE group_id = l_grp_id;
1505:
1506: l_row_count := 0;
1507: l_row_count := SQL%ROWCOUNT;