DBA Data[Home] [Help]

APPS.CS_COST_DETAILS_PVT dependencies on CS_COST_DETAILS

Line 1: PACKAGE BODY CS_Cost_Details_PVT AS

1: PACKAGE BODY CS_Cost_Details_PVT AS
2: /* $Header: csxvcstb.pls 120.22.12010000.1 2008/07/24 18:46:41 appldev ship $ */
3:
4: L_RECALC_COST VARCHAR2(1):='N';
5: l_item_changed VARCHAR2(1):='N';

Line 31: PROCEDURE TO_NULL(p_cost_rec_in IN cs_cost_details_pub.Cost_Rec_Type,

27: )RETURN VARCHAR2;
28:
29: PROCEDURE RECORD_IS_LOCKED_MSG(P_TOKEN_AN IN VARCHAR2);
30:
31: PROCEDURE TO_NULL(p_cost_rec_in IN cs_cost_details_pub.Cost_Rec_Type,
32: p_cost_rec_out OUT NOCOPY cs_cost_details_pub.Cost_Rec_Type
33: );
34:
35: PROCEDURE VALIDATE_COST_DETAILS

Line 32: p_cost_rec_out OUT NOCOPY cs_cost_details_pub.Cost_Rec_Type

28:
29: PROCEDURE RECORD_IS_LOCKED_MSG(P_TOKEN_AN IN VARCHAR2);
30:
31: PROCEDURE TO_NULL(p_cost_rec_in IN cs_cost_details_pub.Cost_Rec_Type,
32: p_cost_rec_out OUT NOCOPY cs_cost_details_pub.Cost_Rec_Type
33: );
34:
35: PROCEDURE VALIDATE_COST_DETAILS
36: (

Line 38: pv_cost_rec IN CS_COST_DETAILS_PUB.COST_REC_TYPE,

34:
35: PROCEDURE VALIDATE_COST_DETAILS
36: (
37: p_api_name IN VARCHAR2,
38: pv_cost_rec IN CS_COST_DETAILS_PUB.COST_REC_TYPE,
39: p_validation_mode IN VARCHAR2,
40: p_user_id IN NUMBER,
41: p_login_id IN NUMBER,
42: x_cost_rec OUT NOCOPY CS_COST_DETAILS_PUB.COST_REC_TYPE,

Line 42: x_cost_rec OUT NOCOPY CS_COST_DETAILS_PUB.COST_REC_TYPE,

38: pv_cost_rec IN CS_COST_DETAILS_PUB.COST_REC_TYPE,
39: p_validation_mode IN VARCHAR2,
40: p_user_id IN NUMBER,
41: p_login_id IN NUMBER,
42: x_cost_rec OUT NOCOPY CS_COST_DETAILS_PUB.COST_REC_TYPE,
43: x_msg_data OUT NOCOPY VARCHAR2,
44: x_msg_count OUT NOCOPY NUMBER,
45: x_return_status OUT NOCOPY VARCHAR2
46: );

Line 748: FROM cs_cost_details

744: x_return_status OUT NOCOPY VARCHAR2 ) RETURN VARCHAR2 IS
745:
746: CURSOR c_cost_id IS
747: SELECT 1
748: FROM cs_cost_details
749: WHERE cost_id = p_cost_id;
750:
751: lv_exists_flag VARCHAR2(1) := 'N';
752: l_prog_name CONSTANT VARCHAR2(61) := G_PKG_NAME||'.'||'is_cost_id_valid';

Line 977: x_cost_detail_rec OUT NOCOPY CS_COST_DETAILS%ROWTYPE ,

973: --===============================
974:
975: PROCEDURE GET_COST_DETAIL_REC(p_api_name IN VARCHAR2,
976: p_cost_id IN NUMBER,
977: x_cost_detail_rec OUT NOCOPY CS_COST_DETAILS%ROWTYPE ,
978: x_msg_data OUT NOCOPY VARCHAR2,
979: x_msg_count OUT NOCOPY NUMBER,
980: x_return_status OUT NOCOPY VARCHAR2) IS
981: BEGIN

Line 987: FROM CS_COST_DETAILS

983: x_return_status := FND_API.G_RET_STS_SUCCESS ;
984:
985: SELECT *
986: INTO x_cost_detail_rec
987: FROM CS_COST_DETAILS
988: WHERE COST_ID = p_cost_id
989: FOR UPDATE OF COST_ID NOWAIT ;
990:
991: EXCEPTION

Line 995: CS_COST_DETAILS_PVT.Add_Invalid_Argument_Msg(

991: EXCEPTION
992:
993: WHEN NO_DATA_FOUND THEN
994: x_return_status := FND_API.G_RET_STS_ERROR;
995: CS_COST_DETAILS_PVT.Add_Invalid_Argument_Msg(
996: p_token_an => p_api_name,
997: p_token_v => to_char(p_cost_id) ,
998: p_token_p => 'p_cost_id') ;
999: fnd_msg_pub.count_and_get(

Line 1005: CS_cost_Details_PVT.Record_Is_Locked_Msg(

1001: ,p_data => x_msg_data);
1002:
1003: WHEN RECORD_LOCK_EXCEPTION THEN
1004: x_return_status := FND_API.G_RET_STS_ERROR ;
1005: CS_cost_Details_PVT.Record_Is_Locked_Msg(
1006: p_token_an => p_api_name);
1007:
1008: WHEN OTHERS THEN
1009: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1153: CS_cost_Details_PVT.Record_Is_Locked_Msg(

1149: RAISE FND_API.G_EXC_ERROR;
1150:
1151: WHEN RECORD_LOCK_EXCEPTION THEN
1152: x_return_status := FND_API.G_RET_STS_ERROR ;
1153: CS_cost_Details_PVT.Record_Is_Locked_Msg(
1154: p_token_an => p_api_name);
1155: RAISE FND_API.G_EXC_ERROR;
1156:
1157: WHEN OTHERS THEN

Line 1207: --This Function checks if a record exist in cs_cost_details for the passed cost_id

1203:
1204: --===============================
1205: ---Do_Cost_Line_Exist
1206: --===============================
1207: --This Function checks if a record exist in cs_cost_details for the passed cost_id
1208:
1209: FUNCTION Do_cost_line_Exist(p_api_name IN VARCHAR2,
1210: p_cost_id IN NUMBER ,
1211: x_return_status OUT NOCOPY VARCHAR2) RETURN VARCHAR2 IS

Line 1223: FROM CS_cost_details

1219: x_return_status := FND_API.G_RET_STS_SUCCESS;
1220:
1221: SELECT cost_id
1222: INTO l_exist_cost_id
1223: FROM CS_cost_details
1224: WHERE cost_id =p_cost_id
1225: FOR UPDATE OF COST_ID NOWAIT ;
1226:
1227: if l_exist_cost_id is not null then

Line 1237: CS_cost_Details_PVT.Record_Is_Locked_Msg(

1233:
1234: WHEN RECORD_LOCK_EXCEPTION THEN
1235:
1236: x_return_status := FND_API.G_RET_STS_ERROR ;
1237: CS_cost_Details_PVT.Record_Is_Locked_Msg(
1238: p_token_an => p_api_name);
1239: RAISE FND_API.G_EXC_ERROR;
1240:
1241: WHEN OTHERS THEN

Line 1250: --This Function checks if a record exist in cs_cost_details for the passed cost_id

1246:
1247: --===============================
1248: ---Do_charge_line_Exist
1249: --===============================
1250: --This Function checks if a record exist in cs_cost_details for the passed cost_id
1251:
1252: FUNCTION Do_charge_line_Exist(p_api_name IN VARCHAR2,
1253: p_cost_id IN NUMBER ,
1254: x_return_status OUT NOCOPY VARCHAR2) RETURN VARCHAR2 IS

Line 1266: FROM CS_cost_details csd,cs_estimate_details ced

1262: x_return_status := FND_API.G_RET_STS_SUCCESS;
1263:
1264: SELECT ced.estimate_detail_id
1265: INTO l_charge_exist
1266: FROM CS_cost_details csd,cs_estimate_details ced
1267: WHERE csd.cost_id =p_cost_id
1268: AND ced.estimate_Detail_id = csd.estimate_Detail_id
1269: FOR UPDATE OF COST_ID NOWAIT ;
1270:

Line 1350: == Comments : API to create cost details in cs_cost_details

1346:
1347: /*======================================================================+
1348: ==
1349: == Procedure name : Create_cost_details
1350: == Comments : API to create cost details in cs_cost_details
1351: == Modification History:
1352: ==
1353: == Date Name Desc
1354: == ---------- --------- ---------------------------------------------

Line 1374: p_cost_rec IN CS_Cost_Details_PUB.Cost_Rec_Type,

1370: p_resp_id IN NUMBER := FND_GLOBAL.RESP_ID,
1371: p_user_id IN NUMBER := FND_GLOBAL.USER_ID,
1372: p_login_id IN NUMBER := FND_GLOBAL.LOGIN_ID,
1373: p_transaction_control IN VARCHAR2 := FND_API.G_TRUE,
1374: p_cost_rec IN CS_Cost_Details_PUB.Cost_Rec_Type,
1375: p_cost_creation_override IN VARCHAR2:='N'
1376: ) IS
1377:
1378:

Line 1385: l_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;

1381: l_api_name_full CONSTANT VARCHAR2(100) := G_PKG_NAME || '.' || l_api_name ;
1382: l_prog_name CONSTANT VARCHAR2(100) := G_PKG_NAME||'.'||'create_cost_details';
1383: l_log_module CONSTANT VARCHAR2(255) := 'csxvcsts.pls.' || l_api_name_full || '.';
1384:
1385: l_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
1386: lx_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
1387:
1388: l_valid_check VARCHAR2(1);
1389: l_return_status VARCHAR2(1) ;

Line 1386: lx_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;

1382: l_prog_name CONSTANT VARCHAR2(100) := G_PKG_NAME||'.'||'create_cost_details';
1383: l_log_module CONSTANT VARCHAR2(255) := 'csxvcsts.pls.' || l_api_name_full || '.';
1384:
1385: l_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
1386: lx_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
1387:
1388: l_valid_check VARCHAR2(1);
1389: l_return_status VARCHAR2(1) ;
1390: l_msg_data VARCHAR2(2000);

Line 1417: FROM cs_cost_details

1413: l_line_order_category_code VARCHAR2(10);
1414:
1415: CURSOR c_check_cost_exst is
1416: SELECT cost_id
1417: FROM cs_cost_details
1418: WHERE estimate_Detail_id = p_estimate_detail_id;
1419:
1420:
1421: BEGIN

Line 1503: CS_COST_DETAILS_PUB.Log_Cost_Rec_Parameters

1499: );
1500: -- --------------------------------------------------------------------------
1501: -- This procedure Logs the charges record paramters.
1502: -- --------------------------------------------------------------------------
1503: CS_COST_DETAILS_PUB.Log_Cost_Rec_Parameters
1504: ( p_cost_Rec_in => p_cost_rec
1505: );
1506:
1507: END IF;

Line 1854: The Inventory_org_id in CS_COST_DETAILS should be the org from which the Item

1850: then Use the Value set in the profile "Service :Inventory Validation
1851: Org" to retrieve the Item's Unit Cost
1852: 2. If Cost Creation is attempted for an SAC with Create_Charge Flag UnChecked
1853: then Use the Service Request Inventory Org to fetch the Item's Unit Cost.
1854: The Inventory_org_id in CS_COST_DETAILS should be the org from which the Item
1855: Cost is fetched.
1856: The same logic holds good for getting the ORG_ID(operating Unit) in
1857: CS_COST_DETAILS
1858: 1.IF Cost Creation is attempted for an exising Charge Line then store the

Line 1857: CS_COST_DETAILS

1853: then Use the Service Request Inventory Org to fetch the Item's Unit Cost.
1854: The Inventory_org_id in CS_COST_DETAILS should be the org from which the Item
1855: Cost is fetched.
1856: The same logic holds good for getting the ORG_ID(operating Unit) in
1857: CS_COST_DETAILS
1858: 1.IF Cost Creation is attempted for an exising Charge Line then store the
1859: Charge Line's Operating unit in CS_COST_DETAILS.org_id column
1860: 2.If Cost Creation is attempted for the SR, then store the SR's Operating
1861: Unit in the Org Id column of the Cost table

Line 1859: Charge Line's Operating unit in CS_COST_DETAILS.org_id column

1855: Cost is fetched.
1856: The same logic holds good for getting the ORG_ID(operating Unit) in
1857: CS_COST_DETAILS
1858: 1.IF Cost Creation is attempted for an exising Charge Line then store the
1859: Charge Line's Operating unit in CS_COST_DETAILS.org_id column
1860: 2.If Cost Creation is attempted for the SR, then store the SR's Operating
1861: Unit in the Org Id column of the Cost table
1862: */
1863:

Line 1937: --This prcoedure will insert data into cs_cost_details table

1933: 'Before calling the Insert_Row procedure'
1934: );
1935: END IF;
1936:
1937: --This prcoedure will insert data into cs_cost_details table
1938:
1939: CS_COST_DETAILS_PKG.Insert_Row
1940: (
1941: x_cost_id =>l_cost_id ,

Line 1939: CS_COST_DETAILS_PKG.Insert_Row

1935: END IF;
1936:
1937: --This prcoedure will insert data into cs_cost_details table
1938:
1939: CS_COST_DETAILS_PKG.Insert_Row
1940: (
1941: x_cost_id =>l_cost_id ,
1942: p_incident_id =>lx_cost_rec.incident_id ,
1943: p_estimate_detail_id =>lx_cost_rec.estimate_detail_id ,

Line 2046: == Comments : API to Update cost details in cs_cost_details

2042:
2043: /*======================================================================+
2044: ==
2045: == Procedure name : Create_cost_details
2046: == Comments : API to Update cost details in cs_cost_details
2047: == Modification History:
2048: ==
2049: == Date Name Desc
2050: == ---------- --------- ---------------------------------------------

Line 2069: p_Cost_Rec IN CS_Cost_Details_PUB.Cost_Rec_Type

2065: p_resp_id IN NUMBER := FND_GLOBAL.RESP_ID,
2066: p_user_id IN NUMBER := FND_GLOBAL.USER_ID,
2067: p_login_id IN NUMBER :=FND_GLOBAL.LOGIN_ID,
2068: p_transaction_control IN VARCHAR2 := FND_API.G_TRUE,
2069: p_Cost_Rec IN CS_Cost_Details_PUB.Cost_Rec_Type
2070:
2071: ) IS
2072:
2073: l_api_version NUMBER := 1.0 ;

Line 2080: l_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;

2076: l_log_module CONSTANT VARCHAR2(255) := 'csxvcstb.pls.' || l_api_name_full || '.';
2077: l_return_status VARCHAR2(1) ;
2078: l_org_id NUMBER ;
2079: l_prog_name CONSTANT VARCHAR2(61) := G_PKG_NAME||'.'||'update_cost_details';
2080: l_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
2081: lx_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
2082: l_valid_check VARCHAR2(1);
2083:
2084: l_msg_data VARCHAR2(2000);

Line 2081: lx_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;

2077: l_return_status VARCHAR2(1) ;
2078: l_org_id NUMBER ;
2079: l_prog_name CONSTANT VARCHAR2(61) := G_PKG_NAME||'.'||'update_cost_details';
2080: l_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
2081: lx_cost_rec CS_Cost_Details_PUB.Cost_Rec_Type;
2082: l_valid_check VARCHAR2(1);
2083:
2084: l_msg_data VARCHAR2(2000);
2085: l_msg_count NUMBER;

Line 2120: FROM cs_cost_details

2116: CURSOR get_flag IS
2117: SELECT unit_cost,
2118: extended_cost,
2119: override_ext_cost_flag
2120: FROM cs_cost_details
2121: WHERE cost_id = p_cost_id;
2122:
2123: CURSOR c_check_cost_exst IS
2124: SELECT cost_id

Line 2125: FROM cs_cost_details

2121: WHERE cost_id = p_cost_id;
2122:
2123: CURSOR c_check_cost_exst IS
2124: SELECT cost_id
2125: FROM cs_cost_details
2126: WHERE estimate_Detail_id = p_estimate_detail_id;
2127:
2128: BEGIN
2129: -- Standard start of API savepoint

Line 2191: CS_COST_DETAILS_PUB.Log_Cost_Rec_Parameters

2187: );
2188: -- --------------------------------------------------------------------------
2189: -- This procedure Logs the charges record paramters.
2190: -- --------------------------------------------------------------------------
2191: CS_COST_DETAILS_PUB.Log_Cost_Rec_Parameters
2192: ( p_cost_Rec_in => p_cost_rec
2193: );
2194:
2195: END IF;

Line 2231: from cs_cost_details csd

2227: begin
2228:
2229: select estimate_detail_id
2230: into v_estimate_detail_id
2231: from cs_cost_details csd
2232: where cost_id =p_cost_rec.cost_id;
2233:
2234: if v_estimate_detail_id is not null then
2235: lt_estimate_detail_id:=v_estimate_detail_id;

Line 2556: CS_COST_DETAILS_PKG.Update_Row

2552: );
2553: END IF;
2554:
2555:
2556: CS_COST_DETAILS_PKG.Update_Row
2557: (
2558: p_cost_id =>lx_cost_rec.cost_id ,
2559: p_incident_id =>lx_cost_rec.incident_id ,
2560: p_estimate_detail_id =>lx_cost_rec.estimate_detail_id ,

Line 2663: == Comments : API to Update cost details in cs_cost_details

2659:
2660: /*======================================================================+
2661: ==
2662: == Procedure name : delete_cost_details
2663: == Comments : API to Update cost details in cs_cost_details
2664: == Modification History:
2665: ==
2666: == Date Name Desc
2667: == ---------- --------- ---------------------------------------------

Line 2815: delete from cs_cost_details where

2811: RAISE G_WARNING;
2812: end if;
2813:
2814:
2815: delete from cs_cost_details where
2816: cost_id = p_cost_id;
2817:
2818: --End of API Body
2819: --Standard Check of p_commit

Line 2877: == Comments : API to Update cost details in cs_cost_details

2873:
2874: /*======================================================================+
2875: ==
2876: == Procedure name : Validate_cost_details
2877: == Comments : API to Update cost details in cs_cost_details
2878: == Modification History:
2879: ==
2880: == Date Name Desc
2881: == ---------- --------- ---------------------------------------------

Line 2888: pv_cost_rec IN CS_COST_DETAILS_PUB.COST_REC_TYPE,

2884:
2885: PROCEDURE VALIDATE_COST_DETAILS
2886: (
2887: p_api_name IN VARCHAR2,
2888: pv_cost_rec IN CS_COST_DETAILS_PUB.COST_REC_TYPE,
2889: p_validation_mode IN VARCHAR2,
2890: p_user_id IN NUMBER,
2891: p_login_id IN NUMBER,
2892: x_cost_rec OUT NOCOPY CS_COST_DETAILS_PUB.COST_REC_TYPE,

Line 2892: x_cost_rec OUT NOCOPY CS_COST_DETAILS_PUB.COST_REC_TYPE,

2888: pv_cost_rec IN CS_COST_DETAILS_PUB.COST_REC_TYPE,
2889: p_validation_mode IN VARCHAR2,
2890: p_user_id IN NUMBER,
2891: p_login_id IN NUMBER,
2892: x_cost_rec OUT NOCOPY CS_COST_DETAILS_PUB.COST_REC_TYPE,
2893: x_msg_data OUT NOCOPY VARCHAR2,
2894: x_msg_count OUT NOCOPY NUMBER,
2895: x_return_status OUT NOCOPY VARCHAR2
2896: ) IS

Line 2906: l_db_det_rec CS_COST_DETAILS%ROWTYPE;

2902: l_api_version NUMBER := 1.0 ;
2903: l_api_name CONSTANT VARCHAR2(100) := 'Validate_Cost_Details Private API' ;
2904: l_api_name_full CONSTANT VARCHAR2(61) := G_PKG_NAME || '.' || l_api_name ;
2905: l_log_module CONSTANT VARCHAR2(255) := 'csxvcstb.pls' || l_api_name_full || '.';
2906: l_db_det_rec CS_COST_DETAILS%ROWTYPE;
2907: l_source_id NUMBER;
2908: l_org_id NUMBER;
2909: l_profile VARCHAR2(200);
2910: l_primary_uom VARCHAR2(10);

Line 4268: PROCEDURE TO_NULL(p_cost_rec_in IN cs_cost_details_pub.Cost_Rec_Type,

4264: /**************************************************
4265: Private Procedure Body TO_NULL
4266: **************************************************/
4267:
4268: PROCEDURE TO_NULL(p_cost_rec_in IN cs_cost_details_pub.Cost_Rec_Type,
4269: p_cost_rec_out OUT NOCOPY cs_cost_details_pub.Cost_Rec_Type) IS
4270: BEGIN
4271: p_cost_rec_out.cost_id := Check_For_Miss(p_cost_rec_in.cost_id) ;
4272: p_cost_rec_out.incident_id := Check_For_Miss(p_cost_rec_in.incident_id) ;

Line 4269: p_cost_rec_out OUT NOCOPY cs_cost_details_pub.Cost_Rec_Type) IS

4265: Private Procedure Body TO_NULL
4266: **************************************************/
4267:
4268: PROCEDURE TO_NULL(p_cost_rec_in IN cs_cost_details_pub.Cost_Rec_Type,
4269: p_cost_rec_out OUT NOCOPY cs_cost_details_pub.Cost_Rec_Type) IS
4270: BEGIN
4271: p_cost_rec_out.cost_id := Check_For_Miss(p_cost_rec_in.cost_id) ;
4272: p_cost_rec_out.incident_id := Check_For_Miss(p_cost_rec_in.incident_id) ;
4273: p_cost_rec_out.estimate_Detail_id := Check_For_Miss(p_cost_rec_in.estimate_Detail_id) ;

Line 4515: DELETE /*+ index(e) */ cs_cost_details e

4511:
4512: -- Delete all the estimate lines that correspond to the
4513: -- SRs that are available for purge after validations.
4514:
4515: DELETE /*+ index(e) */ cs_cost_details e
4516: WHERE
4517: incident_id IN
4518: (
4519: SELECT /*+ no_unnest no_semijoin cardinality(10) */

Line 4654: END CS_Cost_Details_PVT;

4650: x_value:=p_value;
4651: END get_currency_converted_value;
4652:
4653:
4654: END CS_Cost_Details_PVT;