DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on CST_LAYER_COST_DETAILS

Line 910: cst_layer_cost_details clcd

906: )
907: )
908: FROM mtl_cst_txn_cost_details ctcd,
909: cst_quantity_layers cql,
910: cst_layer_cost_details clcd
911: WHERE ctcd.transaction_id = i_txn_id
912: AND ctcd.organization_id = i_org_id
913: AND cql.layer_id = i_layer_id
914: AND cql.inventory_item_id = ctcd.inventory_item_id

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

931: raise neg_cost_error;
932: end if; */ -- removed for bug #4005770
933:
934: /********************************************************************
935: ** Delete from cst_layer_cost_details and insert the new rows **
936: ** from mtl_cst_actual_cost_details. **
937: ********************************************************************/
938: l_stmt_num := 30;
939:

Line 940: Delete from cst_layer_cost_details

936: ** from mtl_cst_actual_cost_details. **
937: ********************************************************************/
938: l_stmt_num := 30;
939:
940: Delete from cst_layer_cost_details
941: where layer_id = i_layer_id;
942:
943: l_stmt_num := 40;
944: Insert into cst_layer_cost_details (

Line 944: Insert into cst_layer_cost_details (

940: Delete from cst_layer_cost_details
941: where layer_id = i_layer_id;
942:
943: l_stmt_num := 40;
944: Insert into cst_layer_cost_details (
945: layer_id,
946: cost_element_id,
947: level_type,
948: last_update_date,

Line 979: Insert into cst_layer_cost_details (

975: and cacd.insertion_flag = 'Y'
976: and cacd.new_cost <> 0;
977:
978: if sql%rowcount = 0 then
979: Insert into cst_layer_cost_details (
980: layer_id,
981: cost_element_id,
982: level_type,
983: last_update_date,

Line 1082: from CST_LAYER_COST_DETAILS clcd

1078: SUM(DECODE(LEVEL_TYPE, 1, ITEM_COST, 0)),
1079: SUM(ITEM_COST),
1080: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 2, ITEM_COST, 0), ITEM_COST)),
1081: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 1, ITEM_COST, 0), 0))
1082: from CST_LAYER_COST_DETAILS clcd
1083: where clcd.layer_id = i_layer_id)
1084: where cql.layer_id = i_layer_id
1085: and exists
1086: (select 'there is detail cost'

Line 1087: from cst_layer_cost_details clcd

1083: where clcd.layer_id = i_layer_id)
1084: where cql.layer_id = i_layer_id
1085: and exists
1086: (select 'there is detail cost'
1087: from cst_layer_cost_details clcd
1088: where clcd.layer_id = i_layer_id);
1089:
1090: l_stmt_num := 60;
1091: /********************************************************************

Line 1749: from cst_layer_cost_details clcd

1745: clcd.item_cost,
1746: 'N',
1747: 0,
1748: 'N'
1749: from cst_layer_cost_details clcd
1750: where layer_id = l_from_layer;
1751:
1752: -- bug 925262, need to update the layer quantity of the payback side
1753:

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

2503:
2504: l_ret_val := 0;
2505: /********************************************************************
2506: ** Create detail rows in MTL_CST_ACTUAL_COST_DETAILS based on **
2507: ** records in CST_LAYER_COST_DETAILS. Since we are using current **
2508: ** average the actual cost, prior cost and new cost are all the **
2509: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **
2510: ** we will insert a TL material 0 cost layer. **
2511: ********************************************************************/

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

2505: /********************************************************************
2506: ** Create detail rows in MTL_CST_ACTUAL_COST_DETAILS based on **
2507: ** records in CST_LAYER_COST_DETAILS. Since we are using current **
2508: ** average the actual cost, prior cost and new cost are all the **
2509: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **
2510: ** we will insert a TL material 0 cost layer. **
2511: ********************************************************************/
2512: if (g_debug = 'Y') then
2513: fnd_file.put_line(fnd_file.log,'>>>No Txn details in MCTCD');

Line 2520: from cst_layer_cost_details

2516: l_stmt_num := 30;
2517:
2518: select count(*)
2519: into l_cost_details
2520: from cst_layer_cost_details
2521: where layer_id = i_layer_id;
2522:
2523: if ((l_cost_details > 0) and (i_txn_action_id <> 30)) then
2524:

Line 2596: from cst_layer_cost_details clcd

2592: clcd.item_cost,
2593: 'N',
2594: 0,
2595: 'N'
2596: from cst_layer_cost_details clcd
2597: where layer_id = i_layer_id;
2598: else
2599: l_stmt_num := 50;
2600: if (g_debug = 'Y') then

Line 2995: from cst_layer_cost_details

2991:
2992: l_stmt_num := 40;
2993: select count(*)
2994: into l_mat_ovhds
2995: from cst_layer_cost_details
2996: where layer_id = i_layer_id
2997: and cost_element_id = 2
2998: and level_type = 1;
2999:

Line 3080: from cst_layer_cost_details clcd

3076: i_prg_id,
3077: sysdate,
3078: clcd.item_cost,
3079: 'N'
3080: from cst_layer_cost_details clcd
3081: where layer_id = i_layer_id
3082: and cost_element_id = 2
3083: and level_type = 1;
3084: end if;

Line 3351: From cst_layer_cost_details clcd

3347: Update mtl_cst_actual_cost_details cacd
3348: Set (prior_cost, insertion_flag) =
3349: (Select clcd.item_cost,
3350: 'N'
3351: From cst_layer_cost_details clcd
3352: Where clcd.layer_id = i_layer_id
3353: and clcd.cost_element_id = cacd.cost_element_id
3354: and clcd.level_type = cacd.level_type)
3355: Where cacd.transaction_id = i_txn_id

Line 3361: from cst_layer_cost_details clcd

3357: and cacd.layer_id = i_layer_id
3358: and cacd.transaction_action_id = i_txn_action_id
3359: and exists
3360: (select 'there is details in clcd'
3361: from cst_layer_cost_details clcd
3362: where clcd.layer_id = i_layer_id
3363: and clcd.cost_element_id = cacd.cost_element_id
3364: and clcd.level_type = cacd.level_type);
3365:

Line 3411: from cst_layer_cost_details clcd

3407: NULL,
3408: 'N',
3409: 0,
3410: 'N'
3411: from cst_layer_cost_details clcd
3412: where layer_id = i_layer_id
3413: and not exists
3414: (select 'this detail is not in cacd already'
3415: from mtl_cst_actual_cost_details cacd

Line 3479: Update cst_layer_cost_details clcd

3475: and cacd.transaction_action_id = i_txn_action_id;
3476:
3477: l_stmt_num := 40;
3478:
3479: Update cst_layer_cost_details clcd
3480: set last_update_date = sysdate,
3481: last_updated_by = i_user_id,
3482: last_update_login = i_login_id,
3483: request_id = i_req_id,

Line 3499: Insert into cst_layer_cost_details(

3495: where clcd.layer_id = i_layer_id;
3496:
3497: l_stmt_num := 50;
3498:
3499: Insert into cst_layer_cost_details(
3500: layer_id,
3501: cost_element_id,
3502: level_type,
3503: last_update_date,

Line 3641: from CST_LAYER_COST_DETAILS clcd

3637: SUM(DECODE(LEVEL_TYPE, 1, ITEM_COST, 0)),
3638: SUM(ITEM_COST),
3639: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 2, ITEM_COST, 0), ITEM_COST)),
3640: SUM(DECODE(COST_ELEMENT_ID, 2, DECODE(LEVEL_TYPE, 1, ITEM_COST, 0), 0))
3641: from CST_LAYER_COST_DETAILS clcd
3642: where clcd.layer_id = i_layer_id)
3643: where cql.layer_id = i_layer_id
3644: and exists
3645: (select 'there is detail cost'

Line 3646: from cst_layer_cost_details clcd

3642: where clcd.layer_id = i_layer_id)
3643: where cql.layer_id = i_layer_id
3644: and exists
3645: (select 'there is detail cost'
3646: from cst_layer_cost_details clcd
3647: where clcd.layer_id = i_layer_id);
3648:
3649: /********************************************************************
3650: ** Update Item Cost and Item Cost Details **

Line 4255: from cst_layer_cost_details clcd,

4251: i_prg_appl_id,
4252: i_prg_id,
4253: sysdate,
4254: decode(clcd.cost_element_id,2,l_default_MOH_subelement,NULL) --------------Bug 3959770
4255: from cst_layer_cost_details clcd,
4256: cst_quantity_layers cql
4257: where cql.organization_id = i_org_id
4258: and cql.inventory_item_id = i_item_id
4259: and cql.layer_id = clcd.layer_id

Line 6303: from cst_layer_cost_details clcd

6299: clcd.item_cost*i_conv_rate/i_um_rate,
6300: 0,
6301: 0,
6302: 0
6303: from cst_layer_cost_details clcd
6304: where clcd.layer_id = i_from_layer_id;
6305: ELSE
6306: IF g_debug = 'Y' THEN
6307: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');

Line 9143: from cst_layer_cost_details clcd

9139: clcd.item_cost,
9140: 'N',
9141: 0,
9142: 'N'
9143: from cst_layer_cost_details clcd
9144: where layer_id = i_layer_id;
9145: */
9146:
9147: END IF;

Line 9599: FROM CST_LAYER_COST_DETAILS CLCD

9595: WHERE MCACD.transaction_id = i_txn_id
9596: AND MCACD.organization_id = i_org_id
9597: AND MCACD.layer_id = i_layer_id
9598: AND EXISTS (SELECT 'X'
9599: FROM CST_LAYER_COST_DETAILS CLCD
9600: WHERE MCACD.layer_id = CLCD.layer_id
9601: AND MCACD.cost_element_id = CLCD.cost_element_id
9602: AND MCACD.level_type = CLCD.level_type)
9603: GROUP BY MCACD.layer_id;