DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on CST_ITEM_COST_DETAILS

Line 3081: from cst_item_cost_details cicd

3077:
3078: l_stmt_num := 25;
3079: select count(*)
3080: into l_res_id
3081: from cst_item_cost_details cicd
3082: where inventory_item_id = i_item_id
3083: and organization_id = i_org_id
3084: and cost_type_id = i_mat_ct_Id
3085: and basis_type in (1,2,5,6)

Line 3092: update CST_ITEM_COST_DETAILS

3088: and level_type = decode(i_level,1,1,level_type);
3089:
3090: if (l_res_id > 0) then
3091: if (l_default_MOH_subelement IS NOT NULL) then
3092: update CST_ITEM_COST_DETAILS
3093: set resource_id = l_default_MOH_subelement
3094: where inventory_item_id = i_item_id
3095: and organization_id = i_org_id
3096: and cost_type_id = i_mat_ct_Id

Line 3146: from cst_item_cost_details cicd

3142: 2, cicd.usage_rate_or_amount/abs(i_txn_qty),
3143: 5, cicd.usage_rate_or_amount * l_item_cost,
3144: 6, cicd.usage_rate_or_amount * cicd.basis_factor,0),
3145: 'N'
3146: from cst_item_cost_details cicd
3147: where inventory_item_id = i_item_id
3148: and organization_id = i_org_id
3149: and cost_type_id = i_mat_ct_Id
3150: and basis_type in (1,2,5,6)

Line 3174: from cst_item_cost_details

3170: cost type */
3171: l_stmt_num := 50;
3172: select count(*)
3173: into l_res_id
3174: from cst_item_cost_details
3175: where cost_type_id = i_avg_rates_id
3176: and inventory_item_id = i_item_id
3177: and organization_id = i_org_id;
3178:

Line 3183: from cst_item_cost_details

3179: if (l_res_id > 0) then
3180: l_stmt_num := 60;
3181: select resource_id
3182: into l_res_id
3183: from cst_item_cost_details
3184: where cost_type_id = i_avg_rates_id
3185: and inventory_item_id = i_item_id
3186: and organization_id = i_org_id
3187: and cost_element_id = 2

Line 3200: update cst_item_cost_details

3196: elsif (l_res_id is NULL) then
3197: if (l_default_MOH_subelement IS NOT NULL) then
3198: l_res_id := l_default_MOH_subelement;
3199:
3200: update cst_item_cost_details
3201: set resource_id = l_default_MOH_subelement
3202: where cost_type_id = i_avg_rates_id
3203: and inventory_item_id = i_item_id
3204: and organization_id = i_org_id

Line 4371: Delete from cst_item_cost_details

4367: end if;
4368:
4369: l_stmt_num := 20;
4370:
4371: Delete from cst_item_cost_details
4372: where inventory_item_id = i_item_id
4373: and organization_id = i_org_id
4374: and cost_type_id = i_cost_type;
4375:

Line 4382: Insert into cst_item_cost_details (

4378: -- At this point, we left with case 1 and case 3.(look explanation above)
4379: -- For case 1, total qty > 0 means that sign(total_qty) = 1
4380: -- For case 3, total qty <= 0 means that sign(total_qty) = 0/-1
4381: -- Use the sign(total_qty) to differentiate those 2 cases.
4382: Insert into cst_item_cost_details (
4383: inventory_item_id,
4384: organization_id,
4385: cost_type_id,
4386: last_update_date,

Line 4495: from CST_ITEM_COST_DETAILS cicd

4491: SUM(DECODE(LEVEL_TYPE,1,ITEM_COST,0)),
4492: SUM(ITEM_COST),
4493: SUM(DECODE(COST_ELEMENT_ID, 2,DECODE(LEVEL_TYPE,2,ITEM_COST,0), ITEM_COST)),
4494: SUM(DECODE(COST_ELEMENT_ID, 2,DECODE(LEVEL_TYPE,1,ITEM_COST,0),0))
4495: from CST_ITEM_COST_DETAILS cicd
4496: where cicd.inventory_item_id = i_item_id
4497: and cicd.organization_id = i_org_id
4498: and cicd.cost_type_id = i_cost_type)
4499: where cic.inventory_item_id = i_item_id

Line 4504: from cst_item_cost_details cicd

4500: and cic.organization_id = i_org_id
4501: and cic.cost_type_id = i_cost_type
4502: and exists
4503: (select 'there is detail cost'
4504: from cst_item_cost_details cicd
4505: where cicd.inventory_item_id = i_item_id
4506: and cicd.organization_id = i_org_id
4507: and cicd.cost_type_id = i_cost_type);
4508:

Line 4917: from cst_item_cost_details

4913: l_count := 0;
4914:
4915: select count(*)
4916: into l_count
4917: from cst_item_cost_details
4918: where /* organization_id = l_std_org : bugfix 3048258 */
4919: organization_id = l_std_cost_org
4920: and cost_type_id = 1
4921: and inventory_item_id = i_item_id;

Line 4972: from cst_item_cost_details cicd

4968: NULL,
4969: 'N',
4970: 0,
4971: 'N'
4972: from cst_item_cost_details cicd
4973: where /* organization_id = l_std_org : bugfix 3048258 */
4974: organization_id = l_std_cost_org
4975: and cost_type_id = 1
4976: and inventory_item_id = i_item_id

Line 5095: from cst_item_cost_details cicd

5091: i_prg_id,
5092: sysdate,
5093: cicd.item_cost,
5094: 'N'
5095: from cst_item_cost_details cicd
5096: where inventory_item_id = i_item_id
5097: and /* organization_id = l_std_org : bugfix 3048258 */
5098: organization_id = l_std_cost_org
5099: and cost_type_id = 1

Line 6447: from cst_item_cost_details cicd

6443: sum(item_cost)*i_conv_rate/i_um_rate,
6444: 0,
6445: 0,
6446: 0
6447: from cst_item_cost_details cicd
6448: where cicd.cost_type_id = i_cost_type_id
6449: and cicd.inventory_item_id = i_item_id
6450: /* and cicd.organization_id = i_from_org : bugfix 3048258 */
6451: and cicd.organization_id = l_from_cost_org

Line 7391: from cst_item_cost_details

7387:
7388: l_stmt_num := 20;
7389: select count(*)
7390: into l_count
7391: from cst_item_cost_details
7392: where inventory_item_id = p_item_id
7393: and organization_id = p_org_id
7394: and cost_type_id = 1;
7395:

Line 7485: from cst_item_cost_details cicd

7481: nvl(sum(cicd.item_cost),0),
7482: 'N',
7483: 0,
7484: 'N'
7485: from cst_item_cost_details cicd
7486: where organization_id = p_org_id
7487: and inventory_item_id = p_item_id
7488: and cost_type_id = 1
7489: group by cost_element_id, level_type;

Line 7502: from cst_item_cost_details

7498: elsif (p_cost_method = 1 AND p_org_id <> p_cost_org_id) then
7499: l_stmt_num := 34;
7500: select count(*)
7501: into l_count
7502: from cst_item_cost_details
7503: where inventory_item_id = p_item_id
7504: and organization_id = p_cost_org_id
7505: and cost_type_id = 1;
7506:

Line 7596: from cst_item_cost_details cicd

7592: nvl(sum(cicd.item_cost),0),
7593: 'N',
7594: 0,
7595: 'N'
7596: from cst_item_cost_details cicd
7597: where organization_id = p_cost_org_id
7598: and inventory_item_id = p_item_id
7599: and cost_type_id = 1
7600: group by cost_element_id, level_type;