43: x_return_msg OUT NOCOPY VARCHAR2) IS
44: l_proc_name VARCHAR2(30) := 'import_functions_intf';
45: BEGIN
46: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Entered into the procedure');
47: x_return_status := fnd_api.G_RET_STS_SUCCESS;
48: --Following commented statement is to initialize global message list, while testing/debugging this package standalone.
49: --ERROR_HANDLER.Initialize();
50: process_functions_conc_flow(p_set_process_id);
51: process_func_params_conc_flow(p_set_process_id);
57: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Exiting from the procedure');
58: EXCEPTION
59: WHEN OTHERS THEN
60: x_return_msg := G_PCK_NAME||'.'||l_proc_name||'->'||' Unexpected error occurred: '||SQLERRM;
61: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
62: END import_functions_intf;
63:
64: ---------------------------------------------------------------------------------------------
65: -- Procedure Name: delete_processed_functions --
79: x_return_msg OUT NOCOPY VARCHAR2) IS
80: l_proc_name VARCHAR2(30) := 'delete_processed_functions';
81: BEGIN
82: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Entered into the procedure');
83: x_return_status := fnd_api.G_RET_STS_SUCCESS;
84: DELETE FROM ego_functions_interface WHERE (p_set_process_id IS NULL OR set_process_id=p_set_process_id)
85: AND process_status=G_SUCCESS_RECORD;
86: DELETE FROM ego_func_params_interface WHERE (p_set_process_id IS NULL OR set_process_id=p_set_process_id)
87: AND process_status=G_SUCCESS_RECORD;
88: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Exiting from the procedure');
89: EXCEPTION
90: WHEN OTHERS THEN
91: x_return_msg := G_PCK_NAME||'.'||l_proc_name||'->'||' Unexpected error occurred: '||SQLERRM;
92: x_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
93: END delete_processed_functions;
94:
95: ---------------------------------------------------------------------------------------------
96: -- Procedure Name: construct_function --
117: ', '|| func_header_rec.internal_name || '): Invalid Transaction Type.');
118: ERROR_HANDLER.Add_Error_Message(
119: p_message_name => 'EGO_TRANS_TYPE'
120: ,p_application_id => 'EGO'
121: ,p_message_type => FND_API.G_RET_STS_ERROR
122: ,p_row_identifier => func_header_rec.transaction_id
123: ,p_entity_code => G_ENTITY_ICC_FN
124: ,p_table_name => G_FUNCTIONS_TAB
125: );
152: ', '|| func_header_rec.internal_name || '): Invalid Function ID.');
153: ERROR_HANDLER.Add_Error_Message(
154: p_message_name => 'EGO_EF_FUNC_ID_ERR'
155: ,p_application_id => 'EGO'
156: ,p_message_type => FND_API.G_RET_STS_ERROR
157: ,p_row_identifier => func_header_rec.transaction_id
158: ,p_entity_code => G_ENTITY_ICC_FN
159: ,p_table_name => G_FUNCTIONS_TAB
160: );
187: ', '|| func_header_rec.internal_name || '): Invalid Function Internal Name.');
188: ERROR_HANDLER.Add_Error_Message(
189: p_message_name => 'EGO_EF_FUNC_INT_NAME_INVL'
190: ,p_application_id => 'EGO'
191: ,p_message_type => FND_API.G_RET_STS_ERROR
192: ,p_row_identifier => func_header_rec.transaction_id
193: ,p_entity_code => G_ENTITY_ICC_FN
194: ,p_table_name => G_FUNCTIONS_TAB
195: );
207: ', '|| func_header_rec.internal_name || '): Either Function ID or Internal Name must be provided.');
208: ERROR_HANDLER.Add_Error_Message(
209: p_message_name => 'EGO_EF_FUNC_ID_INT_NAME_ERR'
210: ,p_application_id => 'EGO'
211: ,p_message_type => FND_API.G_RET_STS_ERROR
212: ,p_row_identifier => func_header_rec.transaction_id
213: ,p_entity_code => G_ENTITY_ICC_FN
214: ,p_table_name => G_FUNCTIONS_TAB
215: );
262: ', '|| func_header_rec.internal_name || '): Invalid Function Type.');
263: ERROR_HANDLER.Add_Error_Message(
264: p_message_name => 'EGO_EF_FUNC_TYPE_ERR'
265: ,p_application_id => 'EGO'
266: ,p_message_type => FND_API.G_RET_STS_ERROR
267: ,p_row_identifier => func_header_rec.transaction_id
268: ,p_entity_code => G_ENTITY_ICC_FN
269: ,p_table_name => G_FUNCTIONS_TAB
270: );
286: ', '|| func_header_rec.internal_name || '): One of the mandatory columns is missed.');
287: ERROR_HANDLER.Add_Error_Message(
288: p_message_name => 'EGO_EF_FUNC_REQ_COLS_ERR'
289: ,p_application_id => 'EGO'
290: ,p_message_type => FND_API.G_RET_STS_ERROR
291: ,p_row_identifier => func_header_rec.transaction_id
292: ,p_entity_code => G_ENTITY_ICC_FN
293: ,p_table_name => G_FUNCTIONS_TAB
294: );
313: ', '|| func_header_rec.internal_name || '): Duplicate Function Internal Name.');
314: ERROR_HANDLER.Add_Error_Message(
315: p_message_name => 'EGO_EF_FUNC_INT_NAME_ERR'
316: ,p_application_id => 'EGO'
317: ,p_message_type => FND_API.G_RET_STS_ERROR
318: ,p_row_identifier => func_header_rec.transaction_id
319: ,p_entity_code => G_ENTITY_ICC_FN
320: ,p_table_name => G_FUNCTIONS_TAB
321: );
350: ', '|| func_header_rec.internal_name || '): Function Type can not be modified.');
351: ERROR_HANDLER.Add_Error_Message(
352: p_message_name => 'EGO_EF_FUNC_TYPE_UPD'
353: ,p_application_id => 'EGO'
354: ,p_message_type => FND_API.G_RET_STS_ERROR
355: ,p_row_identifier => func_header_rec.transaction_id
356: ,p_entity_code => G_ENTITY_ICC_FN
357: ,p_table_name => G_FUNCTIONS_TAB
358: );
397: ', '|| func_header_rec.internal_name || '): One of the mandatory columns is missed.');
398: ERROR_HANDLER.Add_Error_Message(
399: p_message_name => 'EGO_EF_FUNC_REQ_COLS_ERR'
400: ,p_application_id => 'EGO'
401: ,p_message_type => FND_API.G_RET_STS_ERROR
402: ,p_row_identifier => func_header_rec.transaction_id
403: ,p_entity_code => G_ENTITY_ICC_FN
404: ,p_table_name => G_FUNCTIONS_TAB
405: );
444: ERROR_HANDLER.Add_Error_Message(
445: p_message_name => 'EGO_EF_FUNC_IN_USE'
446: ,p_application_id => 'EGO'
447: ,p_token_tbl => l_token_table
448: ,p_message_type => FND_API.G_RET_STS_ERROR
449: ,p_row_identifier => func_header_rec.transaction_id
450: ,p_entity_code => G_ENTITY_ICC_FN
451: ,p_table_name => G_FUNCTIONS_TAB
452: );
597: -- p_commit - Indicates whether to commit the work or not. This parameter --
598: -- has significance only in public API flow. --
599: ---------------------------------------------------------------------------------------------
600: PROCEDURE process_functions(ego_func_tbl_values IN OUT NOCOPY ego_metadata_pub.ego_function_tbl_type,
601: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE)
602: IS
603: l_proc_name VARCHAR2(30) := 'process_functions';
604: BEGIN
605: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Entered into the procedure');
617:
618: construct_function(ego_func_tbl_values(i));
619: validate_function(ego_func_tbl_values(i));
620: transact_function(ego_func_tbl_values(i));
621: IF (p_commit = FND_API.G_TRUE) THEN
622: COMMIT;
623: END IF;
624: END LOOP;
625:
749: message_name,
750: message_text,
751: G_BO_IDENTIFIER_ICC,
752: G_ENTITY_ICC_FN,
753: fnd_api.g_ret_sts_error,
754: SYSDATE,
755: G_USER_ID,
756: G_USER_ID,
757: SYSDATE,
802: message_name,
803: message_text,
804: G_BO_IDENTIFIER_ICC,
805: G_ENTITY_ICC_FN,
806: fnd_api.g_ret_sts_error,
807: SYSDATE,
808: G_USER_ID,
809: G_USER_ID,
810: SYSDATE,
862: message_name,
863: message_text,
864: G_BO_IDENTIFIER_ICC,
865: G_ENTITY_ICC_FN,
866: fnd_api.g_ret_sts_error,
867: SYSDATE,
868: G_USER_ID,
869: G_USER_ID,
870: SYSDATE,
937: message_name,
938: message_text,
939: G_BO_IDENTIFIER_ICC,
940: G_ENTITY_ICC_FN,
941: fnd_api.g_ret_sts_error,
942: SYSDATE,
943: G_USER_ID,
944: G_USER_ID,
945: SYSDATE,
995: ', '||func_param_rec.internal_name||'): Invalid Transaction Type.');
996: ERROR_HANDLER.Add_Error_Message(
997: p_message_name => 'EGO_TRANS_TYPE'
998: ,p_application_id => 'EGO'
999: ,p_message_type => FND_API.G_RET_STS_ERROR
1000: ,p_row_identifier => func_param_rec.transaction_id
1001: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1002: ,p_table_name => G_FUNC_PARAMS_TAB
1003: );
1025: ', '||func_param_rec.internal_name||'): Invalid Function ID.');
1026: ERROR_HANDLER.Add_Error_Message(
1027: p_message_name => 'EGO_EF_FUNC_ID_ERR'
1028: ,p_application_id => 'EGO'
1029: ,p_message_type => FND_API.G_RET_STS_ERROR
1030: ,p_row_identifier => func_param_rec.transaction_id
1031: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1032: ,p_table_name => G_FUNC_PARAMS_TAB
1033: );
1053: ', '||func_param_rec.internal_name||'): Invalid Function Internal Name.');
1054: ERROR_HANDLER.Add_Error_Message(
1055: p_message_name => 'EGO_EF_FUNC_INT_NAME_INVL'
1056: ,p_application_id => 'EGO'
1057: ,p_message_type => FND_API.G_RET_STS_ERROR
1058: ,p_row_identifier => func_param_rec.transaction_id
1059: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1060: ,p_table_name => G_FUNC_PARAMS_TAB
1061: );
1069: ', '||func_param_rec.internal_name||'): Either Function ID or Function Internal Name must be provided.');
1070: ERROR_HANDLER.Add_Error_Message(
1071: p_message_name => 'EGO_EF_FUNC_ID_INT_NAME_ERR'
1072: ,p_application_id => 'EGO'
1073: ,p_message_type => FND_API.G_RET_STS_ERROR
1074: ,p_row_identifier => func_param_rec.transaction_id
1075: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1076: ,p_table_name => G_FUNC_PARAMS_TAB
1077: );
1108: ', '||func_param_rec.internal_name||'): Invalid Parameter ID for the given Function ID or Function Internal Name.');
1109: ERROR_HANDLER.Add_Error_Message(
1110: p_message_name => 'EGO_EF_FP_ID_ERR'
1111: ,p_application_id => 'EGO'
1112: ,p_message_type => FND_API.G_RET_STS_ERROR
1113: ,p_row_identifier => func_param_rec.transaction_id
1114: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1115: ,p_table_name => G_FUNC_PARAMS_TAB
1116: );
1145: ', '||func_param_rec.internal_name||'): Invalid Parameter Internal Name for the given Function ID or Function Internal Name.');
1146: ERROR_HANDLER.Add_Error_Message(
1147: p_message_name => 'EGO_EF_FP_INT_NAME_INVL'
1148: ,p_application_id => 'EGO'
1149: ,p_message_type => FND_API.G_RET_STS_ERROR
1150: ,p_row_identifier => func_param_rec.transaction_id
1151: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1152: ,p_table_name => G_FUNC_PARAMS_TAB
1153: );
1166: ', '||func_param_rec.internal_name||'): Either Parameter ID or Parameter Internal Name must be provided.');
1167: ERROR_HANDLER.Add_Error_Message(
1168: p_message_name => 'EGO_EF_FP_ID_INT_NAME_ERR'
1169: ,p_application_id => 'EGO'
1170: ,p_message_type => FND_API.G_RET_STS_ERROR
1171: ,p_row_identifier => func_param_rec.transaction_id
1172: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1173: ,p_table_name => G_FUNC_PARAMS_TAB
1174: );
1237: ', '||func_param_rec.internal_name||'): Invalid Data Type.');
1238: ERROR_HANDLER.Add_Error_Message(
1239: p_message_name => 'EGO_PUB_INVALID_DATATYPE'
1240: ,p_application_id => 'EGO'
1241: ,p_message_type => FND_API.G_RET_STS_ERROR
1242: ,p_row_identifier => func_param_rec.transaction_id
1243: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1244: ,p_table_name => G_FUNC_PARAMS_TAB
1245: );
1279: ', '||func_param_rec.internal_name||'): Invalid Parameter Type.');
1280: ERROR_HANDLER.Add_Error_Message(
1281: p_message_name => 'EGO_EF_PARAM_TYPE_ERR'
1282: ,p_application_id => 'EGO'
1283: ,p_message_type => FND_API.G_RET_STS_ERROR
1284: ,p_row_identifier => func_param_rec.transaction_id
1285: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1286: ,p_table_name => G_FUNC_PARAMS_TAB
1287: );
1309: ', '||func_param_rec.internal_name||'): Duplicate Parameter Internal Name.');
1310: ERROR_HANDLER.Add_Error_Message(
1311: p_message_name => 'EGO_EF_FP_INT_NAME_ERR'
1312: ,p_application_id => 'EGO'
1313: ,p_message_type => FND_API.G_RET_STS_ERROR
1314: ,p_row_identifier => func_param_rec.transaction_id
1315: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1316: ,p_table_name => G_FUNC_PARAMS_TAB
1317: );
1338: ', '||func_param_rec.internal_name||'): Duplicate Sequence.');
1339: ERROR_HANDLER.Add_Error_Message(
1340: p_message_name => 'EGO_EF_FP_DUPLICATE_SEQ_ERR'
1341: ,p_application_id => 'EGO'
1342: ,p_message_type => FND_API.G_RET_STS_ERROR
1343: ,p_row_identifier => func_param_rec.transaction_id
1344: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1345: ,p_table_name => G_FUNC_PARAMS_TAB
1346: );
1360: ', '||func_param_rec.internal_name||'): Mandatory columns must be provided.');
1361: ERROR_HANDLER.Add_Error_Message(
1362: p_message_name => 'EGO_EF_FP_REQ_COLS_ERR'
1363: ,p_application_id => 'EGO'
1364: ,p_message_type => FND_API.G_RET_STS_ERROR
1365: ,p_row_identifier => func_param_rec.transaction_id
1366: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1367: ,p_table_name => G_FUNC_PARAMS_TAB
1368: );
1395: ', '||func_param_rec.internal_name||'): Data Type can not be modified.');
1396: ERROR_HANDLER.Add_Error_Message(
1397: p_message_name => 'EGO_EF_DATA_TYPE_UPD'
1398: ,p_application_id => 'EGO'
1399: ,p_message_type => FND_API.G_RET_STS_ERROR
1400: ,p_row_identifier => func_param_rec.transaction_id
1401: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1402: ,p_table_name => G_FUNC_PARAMS_TAB
1403: );
1417: ', '||func_param_rec.internal_name||'): Parameter Type can not be modified.');
1418: ERROR_HANDLER.Add_Error_Message(
1419: p_message_name => 'EGO_EF_PARAM_TYPE_UPD'
1420: ,p_application_id => 'EGO'
1421: ,p_message_type => FND_API.G_RET_STS_ERROR
1422: ,p_row_identifier => func_param_rec.transaction_id
1423: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1424: ,p_table_name => G_FUNC_PARAMS_TAB
1425: );
1456: ', '||func_param_rec.internal_name||'): Duplicate Sequence.');
1457: ERROR_HANDLER.Add_Error_Message(
1458: p_message_name => 'EGO_EF_FP_DUPLICATE_SEQ_ERR'
1459: ,p_application_id => 'EGO'
1460: ,p_message_type => FND_API.G_RET_STS_ERROR
1461: ,p_row_identifier => func_param_rec.transaction_id
1462: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1463: ,p_table_name => G_FUNC_PARAMS_TAB
1464: );
1479: ', '||func_param_rec.internal_name||'): Mandatory columns must be provided.');
1480: ERROR_HANDLER.Add_Error_Message(
1481: p_message_name => 'EGO_EF_FP_REQ_COLS_ERR'
1482: ,p_application_id => 'EGO'
1483: ,p_message_type => FND_API.G_RET_STS_ERROR
1484: ,p_row_identifier => func_param_rec.transaction_id
1485: ,p_entity_code => G_ENTITY_ICC_FN_PARAM
1486: ,p_table_name => G_FUNC_PARAMS_TAB
1487: );
1633: -- p_commit - Indicates whether to commit the work or not. This parameter --
1634: -- has significance only in public API flow. --
1635: ---------------------------------------------------------------------------------------------
1636: PROCEDURE process_func_params(ego_func_param_tbl_values IN OUT NOCOPY ego_metadata_pub.ego_func_param_tbl_type,
1637: p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE)
1638: IS
1639: l_proc_name VARCHAR2(30) := 'process_func_params';
1640: BEGIN
1641: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Entered into the procedure');
1654: construct_func_param(ego_func_param_tbl_values(i));
1655: validate_func_param(ego_func_param_tbl_values(i));
1656: transact_func_param(ego_func_param_tbl_values(i));
1657:
1658: IF (p_commit = FND_API.G_TRUE) THEN
1659: COMMIT;
1660: END IF;
1661: END LOOP;
1662: write_debug(G_PCK_NAME||'.'||l_proc_name||'->'||' Exiting from the procedure');
1784: message_name,
1785: message_text,
1786: g_bo_identifier_icc,
1787: G_ENTITY_ICC_FN_PARAM,
1788: fnd_api.g_ret_sts_error,
1789: SYSDATE,
1790: G_USER_ID,
1791: G_USER_ID,
1792: SYSDATE,
1837: message_name,
1838: message_text,
1839: g_bo_identifier_icc,
1840: G_ENTITY_ICC_FN_PARAM,
1841: fnd_api.g_ret_sts_error,
1842: SYSDATE,
1843: G_USER_ID,
1844: G_USER_ID,
1845: SYSDATE,
1896: message_name,
1897: message_text,
1898: g_bo_identifier_icc,
1899: G_ENTITY_ICC_FN_PARAM,
1900: fnd_api.g_ret_sts_error,
1901: SYSDATE,
1902: G_USER_ID,
1903: G_USER_ID,
1904: SYSDATE,
1957: message_name,
1958: message_text,
1959: g_bo_identifier_icc,
1960: G_ENTITY_ICC_FN_PARAM,
1961: fnd_api.g_ret_sts_error,
1962: SYSDATE,
1963: G_USER_ID,
1964: G_USER_ID,
1965: SYSDATE,
2011: message_name,
2012: message_text,
2013: g_bo_identifier_icc,
2014: G_ENTITY_ICC_FN_PARAM,
2015: fnd_api.g_ret_sts_error,
2016: SYSDATE,
2017: G_USER_ID,
2018: G_USER_ID,
2019: SYSDATE,
2089: message_name,
2090: message_text,
2091: g_bo_identifier_icc,
2092: G_ENTITY_ICC_FN_PARAM,
2093: fnd_api.g_ret_sts_error,
2094: SYSDATE,
2095: G_USER_ID,
2096: G_USER_ID,
2097: SYSDATE,
2184: message_name,
2185: message_text,
2186: g_bo_identifier_icc,
2187: G_ENTITY_ICC_FN_PARAM,
2188: fnd_api.g_ret_sts_error,
2189: SYSDATE,
2190: G_USER_ID,
2191: G_USER_ID,
2192: SYSDATE,