DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on CST_LAYER_COST_DETAILS

Line 979: cst_layer_cost_details clcd

975: )
976: )
977: FROM mtl_cst_txn_cost_details ctcd,
978: cst_quantity_layers cql,
979: cst_layer_cost_details clcd
980: WHERE ctcd.transaction_id = i_txn_id
981: AND ctcd.organization_id = i_org_id
982: AND cql.layer_id = i_layer_id
983: AND cql.inventory_item_id = ctcd.inventory_item_id

Line 1066: from cst_layer_cost_details clcd

1062: clcd.item_cost,
1063: 'Y',
1064: 0,
1065: 'N'
1066: from cst_layer_cost_details clcd
1067: where layer_id = i_layer_id
1068: and not exists
1069: (select 'this detail is not in cacd already'
1070: from mtl_cst_actual_cost_details cacd

Line 1083: ** Delete from cst_layer_cost_details and insert the new rows **

1079:
1080:
1081:
1082: /********************************************************************
1083: ** Delete from cst_layer_cost_details and insert the new rows **
1084: ** from mtl_cst_actual_cost_details. **
1085: ********************************************************************/
1086: l_stmt_num := 30;
1087:

Line 1088: Delete from cst_layer_cost_details

1084: ** from mtl_cst_actual_cost_details. **
1085: ********************************************************************/
1086: l_stmt_num := 30;
1087:
1088: Delete from cst_layer_cost_details
1089: where layer_id = i_layer_id;
1090:
1091: l_stmt_num := 40;
1092: Insert into cst_layer_cost_details (

Line 1092: Insert into cst_layer_cost_details (

1088: Delete from cst_layer_cost_details
1089: where layer_id = i_layer_id;
1090:
1091: l_stmt_num := 40;
1092: Insert into cst_layer_cost_details (
1093: layer_id,
1094: cost_element_id,
1095: level_type,
1096: last_update_date,

Line 1127: Insert into cst_layer_cost_details (

1123: and cacd.insertion_flag = 'Y'
1124: and cacd.new_cost <> 0;
1125:
1126: if sql%rowcount = 0 then
1127: Insert into cst_layer_cost_details (
1128: layer_id,
1129: cost_element_id,
1130: level_type,
1131: last_update_date,

Line 1230: from CST_LAYER_COST_DETAILS clcd

1226: SUM(DECODE(LEVEL_TYPE, 1, ITEM_COST, 0)),
1227: SUM(ITEM_COST),
1228: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 2, ITEM_COST, 0), ITEM_COST)),
1229: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 1, ITEM_COST, 0), 0))
1230: from CST_LAYER_COST_DETAILS clcd
1231: where clcd.layer_id = i_layer_id)
1232: where cql.layer_id = i_layer_id
1233: and exists
1234: (select 'there is detail cost'

Line 1235: from cst_layer_cost_details clcd

1231: where clcd.layer_id = i_layer_id)
1232: where cql.layer_id = i_layer_id
1233: and exists
1234: (select 'there is detail cost'
1235: from cst_layer_cost_details clcd
1236: where clcd.layer_id = i_layer_id);
1237:
1238: l_stmt_num := 60;
1239: /********************************************************************

Line 1906: from cst_layer_cost_details clcd

1902: clcd.item_cost,
1903: 'N',
1904: 0,
1905: 'N'
1906: from cst_layer_cost_details clcd
1907: where layer_id = l_from_layer;
1908:
1909: -- bug 925262, need to update the layer quantity of the payback side
1910:

Line 2674: ** records in CST_LAYER_COST_DETAILS. Since we are using current **

2670:
2671: l_ret_val := 0;
2672: /********************************************************************
2673: ** Create detail rows in MTL_CST_ACTUAL_COST_DETAILS based on **
2674: ** records in CST_LAYER_COST_DETAILS. Since we are using current **
2675: ** average the actual cost, prior cost and new cost are all the **
2676: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **
2677: ** we will insert a TL material 0 cost layer. **
2678: ********************************************************************/

Line 2676: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **

2672: /********************************************************************
2673: ** Create detail rows in MTL_CST_ACTUAL_COST_DETAILS based on **
2674: ** records in CST_LAYER_COST_DETAILS. Since we are using current **
2675: ** average the actual cost, prior cost and new cost are all the **
2676: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **
2677: ** we will insert a TL material 0 cost layer. **
2678: ********************************************************************/
2679: if (g_debug = 'Y') then
2680: fnd_file.put_line(fnd_file.log,'>>>No Txn details in MCTCD');

Line 2687: from cst_layer_cost_details

2683: l_stmt_num := 30;
2684:
2685: select count(*)
2686: into l_cost_details
2687: from cst_layer_cost_details
2688: where layer_id = i_layer_id;
2689:
2690: if ((l_cost_details > 0) and (i_txn_action_id <> 30)) then
2691:

Line 2763: from cst_layer_cost_details clcd

2759: clcd.item_cost,
2760: 'N',
2761: 0,
2762: 'N'
2763: from cst_layer_cost_details clcd
2764: where layer_id = i_layer_id;
2765: else
2766: l_stmt_num := 50;
2767: if (g_debug = 'Y') then

Line 3164: from cst_layer_cost_details

3160:
3161: l_stmt_num := 40;
3162: select count(*)
3163: into l_mat_ovhds
3164: from cst_layer_cost_details
3165: where layer_id = i_layer_id
3166: and cost_element_id = 2
3167: and level_type = 1;
3168:

Line 3251: from cst_layer_cost_details clcd

3247: i_prg_id,
3248: sysdate,
3249: clcd.item_cost,
3250: 'N'
3251: from cst_layer_cost_details clcd
3252: where layer_id = i_layer_id
3253: and cost_element_id = 2
3254: and level_type = 1;
3255: end if;

Line 3522: From cst_layer_cost_details clcd

3518: Update mtl_cst_actual_cost_details cacd
3519: Set (prior_cost, insertion_flag) =
3520: (Select clcd.item_cost,
3521: 'N'
3522: From cst_layer_cost_details clcd
3523: Where clcd.layer_id = i_layer_id
3524: and clcd.cost_element_id = cacd.cost_element_id
3525: and clcd.level_type = cacd.level_type)
3526: Where cacd.transaction_id = i_txn_id

Line 3532: from cst_layer_cost_details clcd

3528: and cacd.layer_id = i_layer_id
3529: and cacd.transaction_action_id = i_txn_action_id
3530: and exists
3531: (select 'there is details in clcd'
3532: from cst_layer_cost_details clcd
3533: where clcd.layer_id = i_layer_id
3534: and clcd.cost_element_id = cacd.cost_element_id
3535: and clcd.level_type = cacd.level_type);
3536:

Line 3582: from cst_layer_cost_details clcd

3578: NULL,
3579: 'N',
3580: 0,
3581: 'N'
3582: from cst_layer_cost_details clcd
3583: where layer_id = i_layer_id
3584: and not exists
3585: (select 'this detail is not in cacd already'
3586: from mtl_cst_actual_cost_details cacd

Line 3650: Update cst_layer_cost_details clcd

3646: and cacd.transaction_action_id = i_txn_action_id;
3647:
3648: l_stmt_num := 40;
3649:
3650: Update cst_layer_cost_details clcd
3651: set last_update_date = sysdate,
3652: last_updated_by = i_user_id,
3653: last_update_login = i_login_id,
3654: request_id = i_req_id,

Line 3670: Insert into cst_layer_cost_details(

3666: where clcd.layer_id = i_layer_id;
3667:
3668: l_stmt_num := 50;
3669:
3670: Insert into cst_layer_cost_details(
3671: layer_id,
3672: cost_element_id,
3673: level_type,
3674: last_update_date,

Line 3812: from CST_LAYER_COST_DETAILS clcd

3808: SUM(DECODE(LEVEL_TYPE, 1, ITEM_COST, 0)),
3809: SUM(ITEM_COST),
3810: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 2, ITEM_COST, 0), ITEM_COST)),
3811: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 1, ITEM_COST, 0), 0))
3812: from CST_LAYER_COST_DETAILS clcd
3813: where clcd.layer_id = i_layer_id)
3814: where cql.layer_id = i_layer_id
3815: and exists
3816: (select 'there is detail cost'

Line 3817: from cst_layer_cost_details clcd

3813: where clcd.layer_id = i_layer_id)
3814: where cql.layer_id = i_layer_id
3815: and exists
3816: (select 'there is detail cost'
3817: from cst_layer_cost_details clcd
3818: where clcd.layer_id = i_layer_id);
3819:
3820: /********************************************************************
3821: ** Update Item Cost and Item Cost Details **

Line 4430: from cst_layer_cost_details clcd,

4426: sysdate,
4427: decode(clcd.cost_element_id,2,decode(clcd.level_type,1,l_default_MOH_subelement,
4428: NULL),
4429: NULL)
4430: from cst_layer_cost_details clcd,
4431: cst_quantity_layers cql
4432: where cql.organization_id = i_org_id
4433: and cql.inventory_item_id = i_item_id
4434: and cql.layer_id = clcd.layer_id

Line 6496: from cst_layer_cost_details clcd

6492: clcd.item_cost*i_conv_rate/i_um_rate,
6493: 0,
6494: 0,
6495: 0
6496: from cst_layer_cost_details clcd
6497: where clcd.layer_id = i_from_layer_id;
6498: ELSE
6499: IF g_debug = 'Y' THEN
6500: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');

Line 9340: from cst_layer_cost_details clcd

9336: clcd.item_cost,
9337: 'N',
9338: 0,
9339: 'N'
9340: from cst_layer_cost_details clcd
9341: where layer_id = i_layer_id;
9342: */
9343:
9344: END IF;

Line 9797: FROM CST_LAYER_COST_DETAILS CLCD

9793: AND MCACD.organization_id = i_org_id
9794: AND MCACD.layer_id = i_layer_id
9795: AND Nvl(MCACD.insertion_flag,'N')='Y'
9796: AND EXISTS (SELECT 'X'
9797: FROM CST_LAYER_COST_DETAILS CLCD
9798: WHERE MCACD.layer_id = CLCD.layer_id
9799: AND MCACD.cost_element_id = CLCD.cost_element_id
9800: AND MCACD.level_type = CLCD.level_type);
9801: