DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on CST_ITEM_COST_DETAILS

Line 2914: from cst_item_cost_details cicd

2910:
2911: l_stmt_num := 25;
2912: select count(*)
2913: into l_res_id
2914: from cst_item_cost_details cicd
2915: where inventory_item_id = i_item_id
2916: and organization_id = i_org_id
2917: and cost_type_id = i_mat_ct_Id
2918: and basis_type in (1,2,5,6)

Line 2924: update CST_ITEM_COST_DETAILS

2920: and resource_id IS NULL;
2921:
2922: if (l_res_id > 0) then
2923: if (l_default_MOH_subelement IS NOT NULL) then
2924: update CST_ITEM_COST_DETAILS
2925: set resource_id = l_default_MOH_subelement
2926: where inventory_item_id = i_item_id
2927: and organization_id = i_org_id
2928: and cost_type_id = i_mat_ct_Id

Line 2977: from cst_item_cost_details cicd

2973: 2, cicd.usage_rate_or_amount/abs(i_txn_qty),
2974: 5, cicd.usage_rate_or_amount * l_item_cost,
2975: 6, cicd.usage_rate_or_amount * cicd.basis_factor,0),
2976: 'N'
2977: from cst_item_cost_details cicd
2978: where inventory_item_id = i_item_id
2979: and organization_id = i_org_id
2980: and cost_type_id = i_mat_ct_Id
2981: and basis_type in (1,2,5,6)

Line 3005: from cst_item_cost_details

3001: cost type */
3002: l_stmt_num := 50;
3003: select count(*)
3004: into l_res_id
3005: from cst_item_cost_details
3006: where cost_type_id = i_avg_rates_id
3007: and inventory_item_id = i_item_id
3008: and organization_id = i_org_id;
3009:

Line 3014: from cst_item_cost_details

3010: if (l_res_id > 0) then
3011: l_stmt_num := 60;
3012: select resource_id
3013: into l_res_id
3014: from cst_item_cost_details
3015: where cost_type_id = i_avg_rates_id
3016: and inventory_item_id = i_item_id
3017: and organization_id = i_org_id
3018: and cost_element_id = 2

Line 3030: update cst_item_cost_details

3026: elsif (l_res_id is NULL) then
3027: if (l_default_MOH_subelement IS NOT NULL) then
3028: l_res_id := l_default_MOH_subelement;
3029:
3030: update cst_item_cost_details
3031: set resource_id = l_default_MOH_subelement
3032: where cost_type_id = i_avg_rates_id
3033: and inventory_item_id = i_item_id
3034: and organization_id = i_org_id

Line 4198: Delete from cst_item_cost_details

4194: end if;
4195:
4196: l_stmt_num := 20;
4197:
4198: Delete from cst_item_cost_details
4199: where inventory_item_id = i_item_id
4200: and organization_id = i_org_id
4201: and cost_type_id = i_cost_type;
4202:

Line 4209: Insert into cst_item_cost_details (

4205: -- At this point, we left with case 1 and case 3.(look explanation above)
4206: -- For case 1, total qty > 0 means that sign(total_qty) = 1
4207: -- For case 3, total qty <= 0 means that sign(total_qty) = 0/-1
4208: -- Use the sign(total_qty) to differentiate those 2 cases.
4209: Insert into cst_item_cost_details (
4210: inventory_item_id,
4211: organization_id,
4212: cost_type_id,
4213: last_update_date,

Line 4320: from CST_ITEM_COST_DETAILS cicd

4316: SUM(DECODE(LEVEL_TYPE,1,ITEM_COST,0)),
4317: SUM(ITEM_COST),
4318: SUM(DECODE(COST_ELEMENT_ID, 2,DECODE(LEVEL_TYPE,2,ITEM_COST,0), ITEM_COST)),
4319: SUM(DECODE(COST_ELEMENT_ID, 2,DECODE(LEVEL_TYPE,1,ITEM_COST,0),0))
4320: from CST_ITEM_COST_DETAILS cicd
4321: where cicd.inventory_item_id = i_item_id
4322: and cicd.organization_id = i_org_id
4323: and cicd.cost_type_id = i_cost_type)
4324: where cic.inventory_item_id = i_item_id

Line 4329: from cst_item_cost_details cicd

4325: and cic.organization_id = i_org_id
4326: and cic.cost_type_id = i_cost_type
4327: and exists
4328: (select 'there is detail cost'
4329: from cst_item_cost_details cicd
4330: where cicd.inventory_item_id = i_item_id
4331: and cicd.organization_id = i_org_id
4332: and cicd.cost_type_id = i_cost_type);
4333:

Line 4742: from cst_item_cost_details

4738: l_count := 0;
4739:
4740: select count(*)
4741: into l_count
4742: from cst_item_cost_details
4743: where /* organization_id = l_std_org : bugfix 3048258 */
4744: organization_id = l_std_cost_org
4745: and cost_type_id = 1
4746: and inventory_item_id = i_item_id;

Line 4797: from cst_item_cost_details cicd

4793: NULL,
4794: 'N',
4795: 0,
4796: 'N'
4797: from cst_item_cost_details cicd
4798: where /* organization_id = l_std_org : bugfix 3048258 */
4799: organization_id = l_std_cost_org
4800: and cost_type_id = 1
4801: and inventory_item_id = i_item_id

Line 4920: from cst_item_cost_details cicd

4916: i_prg_id,
4917: sysdate,
4918: cicd.item_cost,
4919: 'N'
4920: from cst_item_cost_details cicd
4921: where inventory_item_id = i_item_id
4922: and /* organization_id = l_std_org : bugfix 3048258 */
4923: organization_id = l_std_cost_org
4924: and cost_type_id = 1

Line 6254: from cst_item_cost_details cicd

6250: sum(item_cost)*i_conv_rate/i_um_rate,
6251: 0,
6252: 0,
6253: 0
6254: from cst_item_cost_details cicd
6255: where cicd.cost_type_id = i_cost_type_id
6256: and cicd.inventory_item_id = i_item_id
6257: /* and cicd.organization_id = i_from_org : bugfix 3048258 */
6258: and cicd.organization_id = l_from_cost_org

Line 7196: from cst_item_cost_details

7192:
7193: l_stmt_num := 20;
7194: select count(*)
7195: into l_count
7196: from cst_item_cost_details
7197: where inventory_item_id = p_item_id
7198: and organization_id = p_org_id
7199: and cost_type_id = 1;
7200:

Line 7290: from cst_item_cost_details cicd

7286: nvl(sum(cicd.item_cost),0),
7287: 'N',
7288: 0,
7289: 'N'
7290: from cst_item_cost_details cicd
7291: where organization_id = p_org_id
7292: and inventory_item_id = p_item_id
7293: and cost_type_id = 1
7294: group by cost_element_id, level_type;

Line 7307: from cst_item_cost_details

7303: elsif (p_cost_method = 1 AND p_org_id <> p_cost_org_id) then
7304: l_stmt_num := 34;
7305: select count(*)
7306: into l_count
7307: from cst_item_cost_details
7308: where inventory_item_id = p_item_id
7309: and organization_id = p_cost_org_id
7310: and cost_type_id = 1;
7311:

Line 7401: from cst_item_cost_details cicd

7397: nvl(sum(cicd.item_cost),0),
7398: 'N',
7399: 0,
7400: 'N'
7401: from cst_item_cost_details cicd
7402: where organization_id = p_cost_org_id
7403: and inventory_item_id = p_item_id
7404: and cost_type_id = 1
7405: group by cost_element_id, level_type;