DBA Data[Home] [Help]

APPS.CSTPUMEC dependencies on CST_ITEM_COST_DETAILS

Line 132: -- delete any cost information from CST_ITEM_COST_DETAILS

128: AND CIC.cost_type_id = I_FROM_COST_TYPE
129: AND CIC.organization_id = I_ORGANIZATION_ID;
130:
131: --
132: -- delete any cost information from CST_ITEM_COST_DETAILS
133: -- for items specified in the current edit list
134: --
135: l_location := 3;
136:

Line 137: DELETE FROM cst_item_cost_details CICD

133: -- for items specified in the current edit list
134: --
135: l_location := 3;
136:
137: DELETE FROM cst_item_cost_details CICD
138: WHERE CICD.organization_id = I_ORGANIZATION_ID
139: AND CICD.cost_type_id = I_COST_TYPE_ID
140: AND CICD.inventory_item_id in
141: (SELECT C2.inventory_item_id

Line 157: INSERT INTO cst_item_cost_details

153: --
154: l_location := 4;
155:
156:
157: INSERT INTO cst_item_cost_details
158: ( inventory_item_id
159: , organization_id
160: , cost_type_id
161: , last_update_date

Line 256: , cst_item_cost_details CICD

252: , CICD.attribute13
253: , CICD.attribute14
254: , CICD.attribute15
255: FROM cst_lists CL
256: , cst_item_cost_details CICD
257: WHERE CL.list_id = I_LIST_ID
258: AND CICD.cost_type_id = I_FROM_COST_TYPE
259: AND CICD.organization_id = I_ORGANIZATION_ID
260: AND CICD.inventory_item_id = CL.entity_id;

Line 400: INSERT INTO cst_item_cost_details

396: from bom_resources for the edited sub element
397: */
398: l_location := 2;
399:
400: INSERT INTO cst_item_cost_details
401: ( inventory_item_id
402: , organization_id
403: , cost_type_id
404: , last_update_date

Line 490: FROM cst_item_cost_details

486: AND CIC.inventory_item_id = L.entity_id
487: AND CIC.inventory_asset_flag = 1
488: AND L.entity_id not in (
489: SELECT inventory_item_id
490: FROM cst_item_cost_details
491: WHERE organization_id = I_ORGANIZATION_ID
492: AND cost_type_id = I_COST_TYPE_ID
493: -- Commented out lines to fix bug # 1962252 , mass edit adds new
494: -- sub-elements on unit cost of items.The changes were introduced due to fix made

Line 539: AND EXISTS (SELECT /*+ no_unnest index( cicd CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147

535: Cursor UPD_ITEM_ID is
536: SELECT entity_id
537: FROM cst_lists cl
538: WHERE CL.list_id= I_LIST_ID
539: AND EXISTS (SELECT /*+ no_unnest index( cicd CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147
540: NULL FROM
541: CST_ITEM_COST_DETAILS CICD
542: WHERE CICD.organization_id = I_ORGANIZATION_ID
543: AND CICD.cost_type_id = I_COST_TYPE_ID

Line 541: CST_ITEM_COST_DETAILS CICD

537: FROM cst_lists cl
538: WHERE CL.list_id= I_LIST_ID
539: AND EXISTS (SELECT /*+ no_unnest index( cicd CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147
540: NULL FROM
541: CST_ITEM_COST_DETAILS CICD
542: WHERE CICD.organization_id = I_ORGANIZATION_ID
543: AND CICD.cost_type_id = I_COST_TYPE_ID
544: AND CICD.level_type = 1
545: AND CICD.cost_element_id = 2

Line 554: AND EXISTS (SELECT /*+ no_unnest index( cicd CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147

550: /* Modified the cursor for Bug 5150357 */
551: Cursor C_ITEM_ID is
552: select entity_id from cst_lists cl
553: where list_id = I_LIST_ID
554: AND EXISTS (SELECT /*+ no_unnest index( cicd CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147
555: NULL FROM
556: CST_ITEM_COST_DETAILS CICD
557: WHERE CICD.organization_id = I_ORGANIZATION_ID
558: AND CICD.cost_type_id = I_COST_TYPE_ID

Line 556: CST_ITEM_COST_DETAILS CICD

552: select entity_id from cst_lists cl
553: where list_id = I_LIST_ID
554: AND EXISTS (SELECT /*+ no_unnest index( cicd CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147
555: NULL FROM
556: CST_ITEM_COST_DETAILS CICD
557: WHERE CICD.organization_id = I_ORGANIZATION_ID
558: AND CICD.cost_type_id = I_COST_TYPE_ID
559: AND CL.entity_id = CICD.inventory_item_id);
560:

Line 583: FROM cst_item_cost_details CICD

579: /* added for bug 2592136 */
580: BEGIN
581: SELECT SUM(NVL(CICD.item_cost,0))
582: into l_basis_factor
583: FROM cst_item_cost_details CICD
584: WHERE CICD.inventory_item_id = ITEMS.entity_id
585: AND CICD.organization_id = I_ORGANIZATION_ID
586: AND CICD.cost_type_id = I_COST_TYPE_ID
587: AND NOT (CICD.cost_element_id = 2 AND CICD.level_type = 1);

Line 596: UPDATE cst_item_cost_details CICD

592:
593:
594: if (l_basis_factor >= 0) THEN
595: /* added for bug 1970016 */
596: UPDATE cst_item_cost_details CICD
597: SET last_update_date = SYSDATE,
598: last_updated_by = I_USER_ID,
599: basis_factor = l_basis_factor,
600: item_cost = ROUND((CICD.usage_rate_or_amount*l_basis_factor), l_ext_prec),

Line 653: SELECT /*+ index(CICD CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147

649: program_application_id,
650: program_id,
651: program_update_date) =
652: (
653: SELECT /*+ index(CICD CST_ITEM_COST_DETAILS_N1) */ -- Added for bug 6908147
654: SYSDATE
655: , I_USER_ID
656: , SUM(DECODE(level_type,2,DECODE(cost_element_id,1,item_cost,0),0))
657: , SUM(DECODE(level_type,2,DECODE(cost_element_id,2,item_cost,0),0))

Line 681: FROM cst_item_cost_details CICD

677: , SUM(DECODE(cost_element_id,
678: 2, DECODE(level_type,1,item_cost,0),
679: 0))
680: , I_REQ_ID, I_PRGM_APPL_ID, I_PRGM_ID, SYSDATE
681: FROM cst_item_cost_details CICD
682: WHERE organization_id = I_ORGANIZATION_ID
683: AND cost_type_id = I_COST_TYPE_ID
684: AND inventory_item_id = c_item_id_tbl(i)
685: )

Line 997: UPDATE cst_item_cost_details cicd

993: -- Only rows where basis_type = 2 (lot) and level_type = 1 (this level) should be touched
994: -- Adjust usage rate: new usage rate = old usage rate * (old basis factor / new basis factor)
995: -- Adjust basis factor: new basis factor = 1 / new lot size
996: l_stmt_num := 40;
997: UPDATE cst_item_cost_details cicd
998: SET (cicd.basis_factor,
999: cicd.usage_rate_or_amount,
1000: last_update_date,
1001: last_updated_by,

Line 1044: fnd_file.put_line(fnd_file.log,'Updated '||to_char(l_num_CICD_rows)||' rows in cst_item_cost_details for lotsize.');

1040: AND cicd.basis_type = 2
1041: AND cicd.level_type = 1;
1042:
1043: l_num_CICD_rows := SQL%ROWCOUNT;
1044: fnd_file.put_line(fnd_file.log,'Updated '||to_char(l_num_CICD_rows)||' rows in cst_item_cost_details for lotsize.');
1045:
1046: end if; -- end of lot size change affecting CICD
1047:
1048: if (i_bor_flag = 2 OR i_bor_flag = 3) then

Line 1117: UPDATE cst_item_cost_details

1113:
1114: -- Now update the usage_rate_or_amount and the net_yield_or_shrinkage_factor in CICD
1115: l_stmt_num := 60;
1116: FORALL i in l_items.FIRST..l_items.LAST
1117: UPDATE cst_item_cost_details
1118: SET usage_rate_or_amount = (usage_rate_or_amount * net_yield_or_shrinkage_factor),
1119: net_yield_or_shrinkage_factor = 1,
1120: last_update_date = sysdate,
1121: last_updated_by = l_user_id,

Line 1131: fnd_file.put_line(fnd_file.log,'Updated '||to_char(SQL%ROWCOUNT)||' rows in cst_item_cost_details related to the shrinkage rate.');

1127: WHERE cost_type_id = i_cost_type
1128: AND organization_id = i_org_id
1129: AND inventory_item_id = l_items(i);
1130:
1131: fnd_file.put_line(fnd_file.log,'Updated '||to_char(SQL%ROWCOUNT)||' rows in cst_item_cost_details related to the shrinkage rate.');
1132:
1133: l_err_msg := 'Forcing shrinkage rate to 0';
1134: CONC_STATUS := FND_CONCURRENT.SET_COMPLETION_STATUS('WARNING',l_err_msg);
1135: end if;

Line 1172: FROM cst_item_cost_details cicd

1168: AND mic.category_id = mc.category_id
1169: AND mc.concatenated_segments BETWEEN i_category_from AND i_category_to)))
1170: AND cic.defaulted_flag = 1
1171: AND (EXISTS (SELECT 'X'
1172: FROM cst_item_cost_details cicd
1173: WHERE cicd.organization_id = cic.organization_id
1174: AND cicd.cost_type_id = cic.cost_type_id
1175: AND cicd.inventory_item_id = cic.inventory_item_id
1176: AND cicd.rollup_source_type = 1) -- user defined

Line 1231: UPDATE cst_item_cost_details cicd

1227: l_stmt_num := 80;
1228:
1229: IF (i_range =1) THEN
1230:
1231: UPDATE cst_item_cost_details cicd
1232: SET cicd.rollup_source_type = 1
1233: WHERE cicd.rollup_source_type = 2
1234: AND cicd.cost_type_id = i_cost_type
1235: AND cicd.organization_id = i_org_id

Line 1246: UPDATE cst_item_cost_details cicd

1242: );
1243:
1244: ELSIF (i_range =2) THEN
1245:
1246: UPDATE cst_item_cost_details cicd
1247: SET cicd.rollup_source_type = 1
1248: WHERE cicd.rollup_source_type = 2
1249: AND cicd.cost_type_id = i_cost_type
1250: AND cicd.organization_id = i_org_id

Line 1262: UPDATE cst_item_cost_details cicd

1258: );
1259:
1260: ELSIF (i_range =3) THEN
1261:
1262: UPDATE cst_item_cost_details cicd
1263: SET cicd.rollup_source_type = 1
1264: WHERE cicd.rollup_source_type = 2
1265: AND cicd.cost_type_id = i_cost_type
1266: AND cicd.organization_id = i_org_id

Line 1279: UPDATE cst_item_cost_details cicd

1275:
1276:
1277: ELSIF (i_range =5) THEN
1278:
1279: UPDATE cst_item_cost_details cicd
1280: SET cicd.rollup_source_type = 1
1281: WHERE cicd.rollup_source_type = 2
1282: AND cicd.cost_type_id = i_cost_type
1283: AND cicd.organization_id = i_org_id

Line 1300: fnd_file.put_line(fnd_file.log,'Updated '||to_char(SQL%ROWCOUNT)||' rows in cst_item_cost_details making them user-defined.');

1296: /* Change this select for bug 4881571 */
1297:
1298: END IF;
1299:
1300: fnd_file.put_line(fnd_file.log,'Updated '||to_char(SQL%ROWCOUNT)||' rows in cst_item_cost_details making them user-defined.');
1301: end if;
1302:
1303:
1304: commit;