822: ---------------------------------
823: PROCEDURE validate_id(
824: x_return_status OUT NOCOPY VARCHAR2,
825: p_txsv_rec IN txsv_rec_type) IS
826: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
827: BEGIN
828:
829: IF (p_txsv_rec.id = OKL_API.G_MISS_NUM OR p_txsv_rec.id IS NULL)
830: THEN
827: BEGIN
828:
829: IF (p_txsv_rec.id = OKL_API.G_MISS_NUM OR p_txsv_rec.id IS NULL)
830: THEN
831: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'id');
832: l_return_status := OKL_API.G_RET_STS_ERROR;
833:
834: END IF;
835: x_return_status := l_return_status;
835: x_return_status := l_return_status;
836: EXCEPTION
837:
838: WHEN OTHERS THEN
839: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
840: ,p_msg_name => G_UNEXPECTED_ERROR
841: ,p_token1 => G_SQLCODE_TOKEN
842: ,p_token1_value => SQLCODE
843: ,p_token2 => G_SQLERRM_TOKEN
849: -------------------------------------
850: PROCEDURE validate_khr_id(
851: x_return_status OUT NOCOPY VARCHAR2,
852: p_txsv_rec IN txsv_rec_type) IS
853: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
854:
855: l_dummy_var VARCHAR2(1) := '?' ;
856:
857: CURSOR okl_txsv_khr_id_fk_csr (p_id IN NUMBER) IS
861: BEGIN
862:
863: IF (p_txsv_rec.khr_id <> OKL_API.G_MISS_NUM AND p_txsv_rec.khr_id IS NOT NULL)
864: THEN
865: --OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'khr_id');
866: --l_return_status := OKL_API.G_RET_STS_ERROR;
867: OPEN okl_txsv_khr_id_fk_csr(p_txsv_rec.khr_id) ;
868: FETCH okl_txsv_khr_id_fk_csr into l_dummy_var ;
869: CLOSE okl_txsv_khr_id_fk_csr ;
868: FETCH okl_txsv_khr_id_fk_csr into l_dummy_var ;
869: CLOSE okl_txsv_khr_id_fk_csr ;
870: -- still set to default means data was not found
871: IF ( l_dummy_var = '?' ) THEN
872: OKC_API.set_message(g_app_name,
873: g_no_parent_record,
874: g_col_name_token,
875: 'khr_id',
876: g_child_table_token ,
876: g_child_table_token ,
877: 'OKL_TAX_SOURCES_V',
878: g_parent_table_token ,
879: 'OKC_K_HEADERS_B');
880: l_return_status := OKC_API.G_RET_STS_ERROR;
881:
882: END IF;
883:
884: END IF;
885: x_return_status := l_return_status;
886: EXCEPTION
887:
888: WHEN OTHERS THEN
889: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
890: ,p_msg_name => G_UNEXPECTED_ERROR
891: ,p_token1 => G_SQLCODE_TOKEN
892: ,p_token1_value => SQLCODE
893: ,p_token2 => G_SQLERRM_TOKEN
899: -------------------------------------
900: PROCEDURE validate_kle_id(
901: x_return_status OUT NOCOPY VARCHAR2,
902: p_txsv_rec IN txsv_rec_type) IS
903: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
904:
905: l_dummy_var VARCHAR2(1) := '?' ;
906:
907: CURSOR okl_txsv_kle_id_fk_csr (p_id IN NUMBER) IS
911: BEGIN
912:
913: IF (p_txsv_rec.kle_id <> OKL_API.G_MISS_NUM AND p_txsv_rec.kle_id IS NOT NULL)
914: THEN
915: --OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'kle_id');
916: --l_return_status := OKL_API.G_RET_STS_ERROR;
917: OPEN okl_txsv_kle_id_fk_csr(p_txsv_rec.kle_id) ;
918: FETCH okl_txsv_kle_id_fk_csr into l_dummy_var ;
919: CLOSE okl_txsv_kle_id_fk_csr ;
918: FETCH okl_txsv_kle_id_fk_csr into l_dummy_var ;
919: CLOSE okl_txsv_kle_id_fk_csr ;
920: -- still set to default means data was not found
921: IF ( l_dummy_var = '?' ) THEN
922: OKC_API.set_message(g_app_name,
923: g_no_parent_record,
924: g_col_name_token,
925: 'kle_id',
926: g_child_table_token ,
926: g_child_table_token ,
927: 'OKL_TAX_SOURCES_V',
928: g_parent_table_token ,
929: 'OKC_K_LINES_B');
930: l_return_status := OKC_API.G_RET_STS_ERROR;
931:
932: END IF;
933:
934: END IF;
935: x_return_status := l_return_status;
936: EXCEPTION
937:
938: WHEN OTHERS THEN
939: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
940: ,p_msg_name => G_UNEXPECTED_ERROR
941: ,p_token1 => G_SQLCODE_TOKEN
942: ,p_token1_value => SQLCODE
943: ,p_token2 => G_SQLERRM_TOKEN
949: -------------------------------------
950: PROCEDURE validate_trx_id(
951: x_return_status OUT NOCOPY VARCHAR2,
952: p_txsv_rec IN txsv_rec_type) IS
953: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
954: BEGIN
955:
956: IF (p_txsv_rec.trx_id = OKL_API.G_MISS_NUM OR p_txsv_rec.trx_id IS NULL)
957: THEN
954: BEGIN
955:
956: IF (p_txsv_rec.trx_id = OKL_API.G_MISS_NUM OR p_txsv_rec.trx_id IS NULL)
957: THEN
958: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'trx_id');
959: l_return_status := OKL_API.G_RET_STS_ERROR;
960:
961: END IF;
962: x_return_status := l_return_status;
962: x_return_status := l_return_status;
963: EXCEPTION
964:
965: WHEN OTHERS THEN
966: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
967: ,p_msg_name => G_UNEXPECTED_ERROR
968: ,p_token1 => G_SQLCODE_TOKEN
969: ,p_token1_value => SQLCODE
970: ,p_token2 => G_SQLERRM_TOKEN
976: ------------------------------------------
977: PROCEDURE validate_trx_line_id(
978: x_return_status OUT NOCOPY VARCHAR2,
979: p_txsv_rec IN txsv_rec_type) IS
980: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
981: BEGIN
982:
983: IF (p_txsv_rec.trx_line_id = OKL_API.G_MISS_NUM OR p_txsv_rec.trx_line_id IS NULL)
984: THEN
981: BEGIN
982:
983: IF (p_txsv_rec.trx_line_id = OKL_API.G_MISS_NUM OR p_txsv_rec.trx_line_id IS NULL)
984: THEN
985: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'trx_line_id');
986: l_return_status := OKL_API.G_RET_STS_ERROR;
987:
988: END IF;
989: x_return_status := l_return_status;
989: x_return_status := l_return_status;
990: EXCEPTION
991:
992: WHEN OTHERS THEN
993: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
994: ,p_msg_name => G_UNEXPECTED_ERROR
995: ,p_token1 => G_SQLCODE_TOKEN
996: ,p_token1_value => SQLCODE
997: ,p_token2 => G_SQLERRM_TOKEN
1003: -------------------------------------------------
1004: PROCEDURE validate_tax_call_type_code(
1005: x_return_status OUT NOCOPY VARCHAR2,
1006: p_txsv_rec IN txsv_rec_type) IS
1007: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1008:
1009: l_dummy_var VARCHAR2(1) := '?' ;
1010:
1011: CURSOR okl_txsv_tctc_fk_csr (p_lookup_code IN VARCHAR2, p_lookup_type IN VARCHAR2) IS
1016: BEGIN
1017:
1018: IF (p_txsv_rec.tax_call_type_code <> OKL_API.G_MISS_CHAR AND p_txsv_rec.tax_call_type_code IS NOT NULL)
1019: THEN
1020: --OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'tax_call_type_code');
1021: --l_return_status := OKL_API.G_RET_STS_ERROR;
1022: -- enforce foreign key
1023: OPEN okl_txsv_tctc_fk_csr(p_txsv_rec.tax_call_type_code, 'OKL_TAX_CALL_TYPE') ;
1024: FETCH okl_txsv_tctc_fk_csr into l_dummy_var ;
1025: CLOSE okl_txsv_tctc_fk_csr ;
1026: -- still set to default means data was not found
1027: IF ( l_dummy_var = '?' ) THEN
1028:
1029: OKC_API.set_message(g_app_name,
1030: g_no_parent_record,
1031: g_col_name_token,
1032: 'tax_call_type_code',
1033: g_child_table_token ,
1033: g_child_table_token ,
1034: 'OKL_TAX_SOURCES_V',
1035: g_parent_table_token ,
1036: 'FND_LOOKUP_VALUES');
1037: l_return_status := OKC_API.G_RET_STS_ERROR;
1038:
1039: END IF;
1040:
1041: END IF;
1042: x_return_status := l_return_status;
1043: EXCEPTION
1044:
1045: WHEN OTHERS THEN
1046: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1047: ,p_msg_name => G_UNEXPECTED_ERROR
1048: ,p_token1 => G_SQLCODE_TOKEN
1049: ,p_token1_value => SQLCODE
1050: ,p_token2 => G_SQLERRM_TOKEN
1056: -------------------------------------
1057: PROCEDURE validate_sty_id(
1058: x_return_status OUT NOCOPY VARCHAR2,
1059: p_txsv_rec IN txsv_rec_type) IS
1060: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1061:
1062: l_dummy_var VARCHAR2(1) := '?' ;
1063:
1064: CURSOR okl_txsv_sty_id_fk_csr (p_id IN NUMBER) IS
1068: BEGIN
1069:
1070: IF (p_txsv_rec.sty_id <> OKL_API.G_MISS_NUM AND p_txsv_rec.sty_id IS NOT NULL)
1071: THEN
1072: --OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'sty_id');
1073: --l_return_status := OKL_API.G_RET_STS_ERROR;
1074: OPEN okl_txsv_sty_id_fk_csr(p_txsv_rec.sty_id) ;
1075: FETCH okl_txsv_sty_id_fk_csr into l_dummy_var ;
1076: CLOSE okl_txsv_sty_id_fk_csr ;
1075: FETCH okl_txsv_sty_id_fk_csr into l_dummy_var ;
1076: CLOSE okl_txsv_sty_id_fk_csr ;
1077: -- still set to default means data was not found
1078: IF ( l_dummy_var = '?' ) THEN
1079: OKC_API.set_message(g_app_name,
1080: g_no_parent_record,
1081: g_col_name_token,
1082: 'sty_id',
1083: g_child_table_token ,
1083: g_child_table_token ,
1084: 'OKL_TAX_SOURCES_V',
1085: g_parent_table_token ,
1086: 'okl_strm_type_b');
1087: l_return_status := OKC_API.G_RET_STS_ERROR;
1088:
1089: END IF;
1090: END IF;
1091: x_return_status := l_return_status;
1091: x_return_status := l_return_status;
1092: EXCEPTION
1093:
1094: WHEN OTHERS THEN
1095: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1096: ,p_msg_name => G_UNEXPECTED_ERROR
1097: ,p_token1 => G_SQLCODE_TOKEN
1098: ,p_token1_value => SQLCODE
1099: ,p_token2 => G_SQLERRM_TOKEN
1105: ----------------------------------------------------
1106: PROCEDURE validate_trx_business_category(
1107: x_return_status OUT NOCOPY VARCHAR2,
1108: p_txsv_rec IN txsv_rec_type) IS
1109: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1110:
1111: l_dummy_var VARCHAR2(1) := '?' ;
1112:
1113: -- modified by dcshanmu for eBTax project. Modification starts
1123: BEGIN
1124:
1125: IF (p_txsv_rec.trx_business_category <> OKL_API.G_MISS_CHAR AND p_txsv_rec.trx_business_category IS NOT NULL)
1126: THEN
1127: -- OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'trx_business_category');
1128: -- l_return_status := OKL_API.G_RET_STS_ERROR;
1129: --ELSE
1130: -- enforce foreign key
1131: OPEN okl_txsv_tbc_fk_csr(p_txsv_rec.trx_business_category, 'AR_TAX_TRX_BUSINESS_CATEGORY') ;
1133: CLOSE okl_txsv_tbc_fk_csr ;
1134: -- still set to default means data was not found
1135: IF ( l_dummy_var = '?' ) THEN
1136:
1137: OKC_API.set_message(g_app_name,
1138: g_no_parent_record,
1139: g_col_name_token,
1140: 'trx_business_category',
1141: g_child_table_token ,
1141: g_child_table_token ,
1142: 'OKL_TAX_SOURCES_V',
1143: g_parent_table_token ,
1144: 'ZX_FC_BUSINESS_CATEGORIES_V');
1145: l_return_status := OKC_API.G_RET_STS_ERROR;
1146:
1147: END IF;
1148: END IF;
1149: x_return_status := l_return_status;
1149: x_return_status := l_return_status;
1150: EXCEPTION
1151:
1152: WHEN OTHERS THEN
1153: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1154: ,p_msg_name => G_UNEXPECTED_ERROR
1155: ,p_token1 => G_SQLCODE_TOKEN
1156: ,p_token1_value => SQLCODE
1157: ,p_token2 => G_SQLERRM_TOKEN
1166: ---------------------------------------------------
1167: PROCEDURE validate_tax_line_status_code(
1168: x_return_status OUT NOCOPY VARCHAR2,
1169: p_txsv_rec IN txsv_rec_type) IS
1170: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1171:
1172: l_dummy_var VARCHAR2(1) := '?' ;
1173:
1174: CURSOR okl_txsv_tlsc_fk_csr (p_lookup_code IN VARCHAR2, p_lookup_type IN VARCHAR2) IS
1180: BEGIN
1181:
1182: IF (p_txsv_rec.tax_line_status_code <> OKL_API.G_MISS_CHAR AND p_txsv_rec.tax_line_status_code IS NOT NULL)
1183: THEN
1184: --OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'tax_line_status_code');
1185: --l_return_status := OKL_API.G_RET_STS_ERROR;
1186: -- enforce foreign key
1187: OPEN okl_txsv_tlsc_fk_csr(p_txsv_rec.tax_line_status_code, 'OKL_TAX_LINE_STATUS') ;
1188: FETCH okl_txsv_tlsc_fk_csr INTO l_dummy_var ;
1189: CLOSE okl_txsv_tlsc_fk_csr ;
1190: -- still set to default means data was not found
1191: IF ( l_dummy_var = '?' ) THEN
1192:
1193: OKC_API.set_message(g_app_name,
1194: g_no_parent_record,
1195: g_col_name_token,
1196: 'tax_line_status_code',
1197: g_child_table_token ,
1197: g_child_table_token ,
1198: 'OKL_TAX_SOURCES_V',
1199: g_parent_table_token ,
1200: 'FND_LOOKUP_VALUES');
1201: l_return_status := OKC_API.G_RET_STS_ERROR;
1202:
1203: END IF;
1204:
1205: END IF;
1206: x_return_status := l_return_status;
1207: EXCEPTION
1208:
1209: WHEN OTHERS THEN
1210: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1211: ,p_msg_name => G_UNEXPECTED_ERROR
1212: ,p_token1 => G_SQLCODE_TOKEN
1213: ,p_token1_value => SQLCODE
1214: ,p_token2 => G_SQLERRM_TOKEN
1220: -------------------------------------
1221: PROCEDURE validate_sel_id(
1222: x_return_status OUT NOCOPY VARCHAR2,
1223: p_txsv_rec IN txsv_rec_type) IS
1224: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1225:
1226: l_dummy_var VARCHAR2(1) := '?' ;
1227:
1228: CURSOR okl_txsv_sel_fk_csr (p_id IN NUMBER) IS
1232: BEGIN
1233:
1234: IF (p_txsv_rec.sel_id <> OKL_API.G_MISS_NUM AND p_txsv_rec.sel_id IS NOT NULL)
1235: THEN
1236: --OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'sel_id');
1237: --l_return_status := OKL_API.G_RET_STS_ERROR;
1238: OPEN okl_txsv_sel_fk_csr(p_txsv_rec.sel_id) ;
1239: FETCH okl_txsv_sel_fk_csr into l_dummy_var ;
1240: CLOSE okl_txsv_sel_fk_csr ;
1239: FETCH okl_txsv_sel_fk_csr into l_dummy_var ;
1240: CLOSE okl_txsv_sel_fk_csr ;
1241: -- still set to default means data was not found
1242: IF ( l_dummy_var = '?' ) THEN
1243: OKC_API.set_message(g_app_name,
1244: g_no_parent_record,
1245: g_col_name_token,
1246: 'sel_id',
1247: g_child_table_token ,
1247: g_child_table_token ,
1248: 'OKL_TAX_SOURCES_V',
1249: g_parent_table_token ,
1250: 'okl_strm_elements');
1251: l_return_status := OKC_API.G_RET_STS_ERROR;
1252:
1253: END IF;
1254:
1255: END IF;
1256: x_return_status := l_return_status;
1257: EXCEPTION
1258:
1259: WHEN OTHERS THEN
1260: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1261: ,p_msg_name => G_UNEXPECTED_ERROR
1262: ,p_token1 => G_SQLCODE_TOKEN
1263: ,p_token1_value => SQLCODE
1264: ,p_token2 => G_SQLERRM_TOKEN
1270: -------------------------------------
1271: PROCEDURE validate_application_id(
1272: x_return_status OUT NOCOPY VARCHAR2,
1273: p_txsv_rec IN txsv_rec_type) IS
1274: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1275:
1276: BEGIN
1277:
1278: IF (p_txsv_rec.application_id = OKL_API.G_MISS_NUM OR p_txsv_rec.application_id IS NULL)
1276: BEGIN
1277:
1278: IF (p_txsv_rec.application_id = OKL_API.G_MISS_NUM OR p_txsv_rec.application_id IS NULL)
1279: THEN
1280: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'application_id');
1281: l_return_status := OKL_API.G_RET_STS_ERROR;
1282: END IF;
1283:
1284: x_return_status := l_return_status;
1284: x_return_status := l_return_status;
1285: EXCEPTION
1286:
1287: WHEN OTHERS THEN
1288: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1289: ,p_msg_name => G_UNEXPECTED_ERROR
1290: ,p_token1 => G_SQLCODE_TOKEN
1291: ,p_token1_value => SQLCODE
1292: ,p_token2 => G_SQLERRM_TOKEN
1298: -------------------------------------
1299: PROCEDURE validate_def_txn_country(
1300: x_return_status OUT NOCOPY VARCHAR2,
1301: p_txsv_rec IN txsv_rec_type) IS
1302: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1303:
1304: l_dummy_var VARCHAR2(1) := '?' ;
1305:
1306: CURSOR okl_txsv_def_txn_cntry_fk_csr (p_id IN VARCHAR2) IS
1315: FETCH okl_txsv_def_txn_cntry_fk_csr into l_dummy_var ;
1316: CLOSE okl_txsv_def_txn_cntry_fk_csr ;
1317: -- still set to default means data was not found
1318: IF ( l_dummy_var = '?' ) THEN
1319: OKC_API.set_message(g_app_name,
1320: g_no_parent_record,
1321: g_col_name_token,
1322: 'default_taxation_country',
1323: g_child_table_token ,
1323: g_child_table_token ,
1324: 'OKL_TAX_SOURCES_V',
1325: g_parent_table_token ,
1326: 'fnd_territories_tl');
1327: l_return_status := OKC_API.G_RET_STS_ERROR;
1328:
1329: END IF;
1330:
1331: END IF;
1332: x_return_status := l_return_status;
1333: EXCEPTION
1334:
1335: WHEN OTHERS THEN
1336: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1337: ,p_msg_name => G_UNEXPECTED_ERROR
1338: ,p_token1 => G_SQLCODE_TOKEN
1339: ,p_token1_value => SQLCODE
1340: ,p_token2 => G_SQLERRM_TOKEN
1346: -------------------------------------
1347: PROCEDURE validate_product_category(
1348: x_return_status OUT NOCOPY VARCHAR2,
1349: p_txsv_rec IN txsv_rec_type) IS
1350: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1351:
1352: l_dummy_var VARCHAR2(1) := '?' ;
1353:
1354: CURSOR okl_txsv_prod_ctg_fk_csr (p_id IN VARCHAR2) IS
1363: FETCH okl_txsv_prod_ctg_fk_csr into l_dummy_var ;
1364: CLOSE okl_txsv_prod_ctg_fk_csr ;
1365: -- still set to default means data was not found
1366: IF ( l_dummy_var = '?' ) THEN
1367: OKC_API.set_message(g_app_name,
1368: g_no_parent_record,
1369: g_col_name_token,
1370: 'product_category',
1371: g_child_table_token ,
1371: g_child_table_token ,
1372: 'OKL_TAX_SOURCES_V',
1373: g_parent_table_token ,
1374: 'ZX_FC_PRODUCT_CATEGORIES_V');
1375: l_return_status := OKC_API.G_RET_STS_ERROR;
1376:
1377: END IF;
1378:
1379: END IF;
1380: x_return_status := l_return_status;
1381: EXCEPTION
1382:
1383: WHEN OTHERS THEN
1384: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1385: ,p_msg_name => G_UNEXPECTED_ERROR
1386: ,p_token1 => G_SQLCODE_TOKEN
1387: ,p_token1_value => SQLCODE
1388: ,p_token2 => G_SQLERRM_TOKEN
1394: -------------------------------------
1395: PROCEDURE validate_udfc(
1396: x_return_status OUT NOCOPY VARCHAR2,
1397: p_txsv_rec IN txsv_rec_type) IS
1398: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1399:
1400: l_dummy_var VARCHAR2(1) := '?' ;
1401:
1402: CURSOR okl_txsv_udfc_fk_csr (p_id IN VARCHAR2) IS
1411: FETCH okl_txsv_udfc_fk_csr into l_dummy_var ;
1412: CLOSE okl_txsv_udfc_fk_csr ;
1413: -- still set to default means data was not found
1414: IF ( l_dummy_var = '?' ) THEN
1415: OKC_API.set_message(g_app_name,
1416: g_no_parent_record,
1417: g_col_name_token,
1418: 'user_defined_fisc_class',
1419: g_child_table_token ,
1419: g_child_table_token ,
1420: 'OKL_TAX_SOURCES_V',
1421: g_parent_table_token ,
1422: 'ZX_FC_USER_DEFINED_V');
1423: l_return_status := OKC_API.G_RET_STS_ERROR;
1424:
1425: END IF;
1426:
1427: END IF;
1428: x_return_status := l_return_status;
1429: EXCEPTION
1430:
1431: WHEN OTHERS THEN
1432: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1433: ,p_msg_name => G_UNEXPECTED_ERROR
1434: ,p_token1 => G_SQLCODE_TOKEN
1435: ,p_token1_value => SQLCODE
1436: ,p_token2 => G_SQLERRM_TOKEN
1442: -------------------------------------
1443: PROCEDURE validate_line_int_use(
1444: x_return_status OUT NOCOPY VARCHAR2,
1445: p_txsv_rec IN txsv_rec_type) IS
1446: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1447:
1448: l_dummy_var VARCHAR2(1) := '?' ;
1449:
1450: CURSOR okl_txsv_line_int_use_fk_csr (p_id IN VARCHAR2) IS
1459: FETCH okl_txsv_line_int_use_fk_csr into l_dummy_var ;
1460: CLOSE okl_txsv_line_int_use_fk_csr ;
1461: -- still set to default means data was not found
1462: IF ( l_dummy_var = '?' ) THEN
1463: OKC_API.set_message(g_app_name,
1464: g_no_parent_record,
1465: g_col_name_token,
1466: 'line_intended_use',
1467: g_child_table_token ,
1467: g_child_table_token ,
1468: 'OKL_TAX_SOURCES_V',
1469: g_parent_table_token ,
1470: 'ZX_FC_INTENDED_USE_V');
1471: l_return_status := OKC_API.G_RET_STS_ERROR;
1472:
1473: END IF;
1474:
1475: END IF;
1476: x_return_status := l_return_status;
1477: EXCEPTION
1478:
1479: WHEN OTHERS THEN
1480: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1481: ,p_msg_name => G_UNEXPECTED_ERROR
1482: ,p_token1 => G_SQLCODE_TOKEN
1483: ,p_token1_value => SQLCODE
1484: ,p_token2 => G_SQLERRM_TOKEN
1490: -------------------------------------
1491: PROCEDURE validate_inventory_item_id(
1492: x_return_status OUT NOCOPY VARCHAR2,
1493: p_txsv_rec IN txsv_rec_type) IS
1494: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1495:
1496: l_dummy_var VARCHAR2(1) := '?' ;
1497:
1498: CURSOR okl_txsv_inv_item_id_fk_csr (p_id IN NUMBER) IS
1507: FETCH okl_txsv_inv_item_id_fk_csr into l_dummy_var ;
1508: CLOSE okl_txsv_inv_item_id_fk_csr ;
1509: -- still set to default means data was not found
1510: IF ( l_dummy_var = '?' ) THEN
1511: OKC_API.set_message(g_app_name,
1512: g_no_parent_record,
1513: g_col_name_token,
1514: 'inventory_item_id',
1515: g_child_table_token ,
1515: g_child_table_token ,
1516: 'OKL_TAX_SOURCES_V',
1517: g_parent_table_token ,
1518: 'mtl_system_items_b');
1519: l_return_status := OKC_API.G_RET_STS_ERROR;
1520:
1521: END IF;
1522:
1523: END IF;
1524: x_return_status := l_return_status;
1525: EXCEPTION
1526:
1527: WHEN OTHERS THEN
1528: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1529: ,p_msg_name => G_UNEXPECTED_ERROR
1530: ,p_token1 => G_SQLCODE_TOKEN
1531: ,p_token1_value => SQLCODE
1532: ,p_token2 => G_SQLERRM_TOKEN
1538: -------------------------------------
1539: PROCEDURE validate_bill_to_cust_acct_id(
1540: x_return_status OUT NOCOPY VARCHAR2,
1541: p_txsv_rec IN txsv_rec_type) IS
1542: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1543:
1544: l_dummy_var VARCHAR2(1) := '?' ;
1545:
1546: CURSOR okl_txsv_bill_cust_acct_fk_csr (p_id IN NUMBER) IS
1555: FETCH okl_txsv_bill_cust_acct_fk_csr into l_dummy_var ;
1556: CLOSE okl_txsv_bill_cust_acct_fk_csr ;
1557: -- still set to default means data was not found
1558: IF ( l_dummy_var = '?' ) THEN
1559: OKC_API.set_message(g_app_name,
1560: g_no_parent_record,
1561: g_col_name_token,
1562: 'bill_to_cust_acct_id',
1563: g_child_table_token ,
1563: g_child_table_token ,
1564: 'OKL_TAX_SOURCES_V',
1565: g_parent_table_token ,
1566: 'hz_cust_accounts');
1567: l_return_status := OKC_API.G_RET_STS_ERROR;
1568:
1569: END IF;
1570:
1571: END IF;
1572: x_return_status := l_return_status;
1573: EXCEPTION
1574:
1575: WHEN OTHERS THEN
1576: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1577: ,p_msg_name => G_UNEXPECTED_ERROR
1578: ,p_token1 => G_SQLCODE_TOKEN
1579: ,p_token1_value => SQLCODE
1580: ,p_token2 => G_SQLERRM_TOKEN
1586: -------------------------------------
1587: PROCEDURE validate_org_id(
1588: x_return_status OUT NOCOPY VARCHAR2,
1589: p_txsv_rec IN txsv_rec_type) IS
1590: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1591:
1592: l_dummy_var VARCHAR2(1) := '?' ;
1593:
1594: CURSOR okl_txsv_org_id_fk_csr (p_id IN NUMBER) IS
1603: FETCH okl_txsv_org_id_fk_csr into l_dummy_var ;
1604: CLOSE okl_txsv_org_id_fk_csr ;
1605: -- still set to default means data was not found
1606: IF ( l_dummy_var = '?' ) THEN
1607: OKC_API.set_message(g_app_name,
1608: g_no_parent_record,
1609: g_col_name_token,
1610: 'org_id',
1611: g_child_table_token ,
1611: g_child_table_token ,
1612: 'OKL_TAX_SOURCES_V',
1613: g_parent_table_token ,
1614: 'hr_all_organization_units');
1615: l_return_status := OKC_API.G_RET_STS_ERROR;
1616:
1617: END IF;
1618:
1619: END IF;
1620: x_return_status := l_return_status;
1621: EXCEPTION
1622:
1623: WHEN OTHERS THEN
1624: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1625: ,p_msg_name => G_UNEXPECTED_ERROR
1626: ,p_token1 => G_SQLCODE_TOKEN
1627: ,p_token1_value => SQLCODE
1628: ,p_token2 => G_SQLERRM_TOKEN
1634: -------------------------------------
1635: PROCEDURE validate_legal_entity_id(
1636: x_return_status OUT NOCOPY VARCHAR2,
1637: p_txsv_rec IN txsv_rec_type) IS
1638: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1639:
1640: l_dummy_var VARCHAR2(1) := '?' ;
1641:
1642: CURSOR okl_txsv_le_id_fk_csr (p_id IN NUMBER) IS
1654: FETCH okl_txsv_le_id_fk_csr into l_dummy_var ;
1655: CLOSE okl_txsv_le_id_fk_csr ;
1656: -- still set to default means data was not found
1657: IF ( l_dummy_var = '?' ) THEN
1658: OKC_API.set_message(g_app_name,
1659: g_no_parent_record,
1660: g_col_name_token,
1661: 'legal_entity_id',
1662: g_child_table_token ,
1662: g_child_table_token ,
1663: 'OKL_TAX_SOURCES_V',
1664: g_parent_table_token ,
1665: 'xle_entity_profiles');
1666: l_return_status := OKC_API.G_RET_STS_ERROR;
1667:
1668: END IF;
1669:
1670: END IF;
1671: x_return_status := l_return_status;
1672: EXCEPTION
1673:
1674: WHEN OTHERS THEN
1675: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1676: ,p_msg_name => G_UNEXPECTED_ERROR
1677: ,p_token1 => G_SQLCODE_TOKEN
1678: ,p_token1_value => SQLCODE
1679: ,p_token2 => G_SQLERRM_TOKEN
1685: -------------------------------------
1686: PROCEDURE validate_product_type(
1687: x_return_status OUT NOCOPY VARCHAR2,
1688: p_txsv_rec IN txsv_rec_type) IS
1689: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1690:
1691: l_dummy_var VARCHAR2(1) := '?' ;
1692:
1693: CURSOR okl_txsv_prod_type_fk_csr IS
1702: FETCH okl_txsv_prod_type_fk_csr into l_dummy_var ;
1703: CLOSE okl_txsv_prod_type_fk_csr ;
1704: -- still set to default means data was not found
1705: IF ( l_dummy_var = '?' ) THEN
1706: OKC_API.set_message(g_app_name,
1707: g_no_parent_record,
1708: g_col_name_token,
1709: 'product_type',
1710: g_child_table_token ,
1710: g_child_table_token ,
1711: 'OKL_TAX_SOURCES_V',
1712: g_parent_table_token ,
1713: 'fnd_lookups');
1714: l_return_status := OKC_API.G_RET_STS_ERROR;
1715:
1716: END IF;
1717:
1718: END IF;
1719: x_return_status := l_return_status;
1720: EXCEPTION
1721:
1722: WHEN OTHERS THEN
1723: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1724: ,p_msg_name => G_UNEXPECTED_ERROR
1725: ,p_token1 => G_SQLCODE_TOKEN
1726: ,p_token1_value => SQLCODE
1727: ,p_token2 => G_SQLERRM_TOKEN
1733: -------------------------------------
1734: PROCEDURE validate_prod_fisc_classfn(
1735: x_return_status OUT NOCOPY VARCHAR2,
1736: p_txsv_rec IN txsv_rec_type) IS
1737: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1738:
1739: l_dummy_var VARCHAR2(1) := '?' ;
1740:
1741: CURSOR okl_txsv_prd_fis_clasfn_fk_csr (p_id IN VARCHAR2) IS
1750: FETCH okl_txsv_prd_fis_clasfn_fk_csr into l_dummy_var ;
1751: CLOSE okl_txsv_prd_fis_clasfn_fk_csr ;
1752: -- still set to default means data was not found
1753: IF ( l_dummy_var = '?' ) THEN
1754: OKC_API.set_message(g_app_name,
1755: g_no_parent_record,
1756: g_col_name_token,
1757: 'product_fisc_classification',
1758: g_child_table_token ,
1758: g_child_table_token ,
1759: 'OKL_TAX_SOURCES_V',
1760: g_parent_table_token ,
1761: 'zx_fc_codes_b');
1762: l_return_status := OKC_API.G_RET_STS_ERROR;
1763:
1764: END IF;
1765:
1766: END IF;
1767: x_return_status := l_return_status;
1768: EXCEPTION
1769:
1770: WHEN OTHERS THEN
1771: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1772: ,p_msg_name => G_UNEXPECTED_ERROR
1773: ,p_token1 => G_SQLCODE_TOKEN
1774: ,p_token1_value => SQLCODE
1775: ,p_token2 => G_SQLERRM_TOKEN
1781: -------------------------------------
1782: PROCEDURE validate_provnl_tax_det_date(
1783: x_return_status OUT NOCOPY VARCHAR2,
1784: p_txsv_rec IN txsv_rec_type) IS
1785: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1786:
1787: BEGIN
1788:
1789: IF (p_txsv_rec.provnl_tax_determination_date = OKL_API.G_MISS_DATE AND p_txsv_rec.provnl_tax_determination_date IS NULL)
1787: BEGIN
1788:
1789: IF (p_txsv_rec.provnl_tax_determination_date = OKL_API.G_MISS_DATE AND p_txsv_rec.provnl_tax_determination_date IS NULL)
1790: THEN
1791: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'provnl_tax_determination_date');
1792: l_return_status := OKL_API.G_RET_STS_ERROR;
1793: END IF;
1794: x_return_status := l_return_status;
1795: EXCEPTION
1794: x_return_status := l_return_status;
1795: EXCEPTION
1796:
1797: WHEN OTHERS THEN
1798: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1799: ,p_msg_name => G_UNEXPECTED_ERROR
1800: ,p_token1 => G_SQLCODE_TOKEN
1801: ,p_token1_value => SQLCODE
1802: ,p_token2 => G_SQLERRM_TOKEN
1808: -------------------------------------
1809: PROCEDURE validate_trx_date(
1810: x_return_status OUT NOCOPY VARCHAR2,
1811: p_txsv_rec IN txsv_rec_type) IS
1812: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1813:
1814: BEGIN
1815:
1816: IF (p_txsv_rec.trx_Date = OKL_API.G_MISS_DATE AND p_txsv_rec.trx_Date IS NULL)
1814: BEGIN
1815:
1816: IF (p_txsv_rec.trx_Date = OKL_API.G_MISS_DATE AND p_txsv_rec.trx_Date IS NULL)
1817: THEN
1818: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'trx_Date');
1819: l_return_status := OKL_API.G_RET_STS_ERROR;
1820: END IF;
1821: x_return_status := l_return_status;
1822: EXCEPTION
1821: x_return_status := l_return_status;
1822: EXCEPTION
1823:
1824: WHEN OTHERS THEN
1825: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1826: ,p_msg_name => G_UNEXPECTED_ERROR
1827: ,p_token1 => G_SQLCODE_TOKEN
1828: ,p_token1_value => SQLCODE
1829: ,p_token2 => G_SQLERRM_TOKEN
1835: -------------------------------------
1836: PROCEDURE validate_try_id(
1837: x_return_status OUT NOCOPY VARCHAR2,
1838: p_txsv_rec IN txsv_rec_type) IS
1839: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1840:
1841: l_dummy_var VARCHAR2(1) := '?' ;
1842:
1843: CURSOR okl_txsv_try_id_fk_csr (p_id IN NUMBER) IS
1852: FETCH okl_txsv_try_id_fk_csr into l_dummy_var ;
1853: CLOSE okl_txsv_try_id_fk_csr ;
1854: -- still set to default means data was not found
1855: IF ( l_dummy_var = '?' ) THEN
1856: OKC_API.set_message(g_app_name,
1857: g_no_parent_record,
1858: g_col_name_token,
1859: 'try_id',
1860: g_child_table_token ,
1860: g_child_table_token ,
1861: 'OKL_TAX_SOURCES_V',
1862: g_parent_table_token ,
1863: 'okl_trx_types_b');
1864: l_return_status := OKC_API.G_RET_STS_ERROR;
1865:
1866: END IF;
1867:
1868: END IF;
1869: x_return_status := l_return_status;
1870: EXCEPTION
1871:
1872: WHEN OTHERS THEN
1873: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1874: ,p_msg_name => G_UNEXPECTED_ERROR
1875: ,p_token1 => G_SQLCODE_TOKEN
1876: ,p_token1_value => SQLCODE
1877: ,p_token2 => G_SQLERRM_TOKEN
1883: -------------------------------------
1884: PROCEDURE validate_ship_to_location_id(
1885: x_return_status OUT NOCOPY VARCHAR2,
1886: p_txsv_rec IN txsv_rec_type) IS
1887: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1888:
1889: l_dummy_var VARCHAR2(1) := '?' ;
1890:
1891: CURSOR okl_txsv_ship_to_locn_fk_csr (p_id IN NUMBER) IS
1902: -- still set to default means data was not found
1903:
1904: IF ( l_dummy_var = '?' ) THEN
1905:
1906: OKC_API.set_message(g_app_name,
1907: g_no_parent_record,
1908: g_col_name_token,
1909: 'ship_to_location_id',
1910: g_child_table_token ,
1910: g_child_table_token ,
1911: 'OKL_TAX_SOURCES_V',
1912: g_parent_table_token ,
1913: 'hz_party_sites');
1914: l_return_status := OKC_API.G_RET_STS_ERROR;
1915:
1916: END IF;
1917:
1918: END IF;
1919: x_return_status := l_return_status;
1920: EXCEPTION
1921:
1922: WHEN OTHERS THEN
1923: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1924: ,p_msg_name => G_UNEXPECTED_ERROR
1925: ,p_token1 => G_SQLCODE_TOKEN
1926: ,p_token1_value => SQLCODE
1927: ,p_token2 => G_SQLERRM_TOKEN
1933: -------------------------------------
1934: PROCEDURE validate_ship_to_party_site_id(
1935: x_return_status OUT NOCOPY VARCHAR2,
1936: p_txsv_rec IN txsv_rec_type) IS
1937: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1938:
1939: l_dummy_var VARCHAR2(1) := '?' ;
1940:
1941: CURSOR okl_txsv_ship_to_ps_fk_csr (p_id IN NUMBER) IS
1952: -- still set to default means data was not found
1953:
1954: IF ( l_dummy_var = '?' ) THEN
1955:
1956: OKC_API.set_message(g_app_name,
1957: g_no_parent_record,
1958: g_col_name_token,
1959: 'ship_to_party_site_id',
1960: g_child_table_token ,
1960: g_child_table_token ,
1961: 'OKL_TAX_SOURCES_V',
1962: g_parent_table_token ,
1963: 'hz_party_sites');
1964: l_return_status := OKC_API.G_RET_STS_ERROR;
1965:
1966: END IF;
1967:
1968: END IF;
1969: x_return_status := l_return_status;
1970: EXCEPTION
1971:
1972: WHEN OTHERS THEN
1973: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
1974: ,p_msg_name => G_UNEXPECTED_ERROR
1975: ,p_token1 => G_SQLCODE_TOKEN
1976: ,p_token1_value => SQLCODE
1977: ,p_token2 => G_SQLERRM_TOKEN
1983: -------------------------------------
1984: PROCEDURE validate_ship_to_party_id(
1985: x_return_status OUT NOCOPY VARCHAR2,
1986: p_txsv_rec IN txsv_rec_type) IS
1987: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
1988:
1989: l_dummy_var VARCHAR2(1) := '?' ;
1990:
1991: CURSOR okl_txsv_ship_to_pid_fk_csr (p_id IN NUMBER) IS
2002: -- still set to default means data was not found
2003:
2004: IF ( l_dummy_var = '?' ) THEN
2005:
2006: OKC_API.set_message(g_app_name,
2007: g_no_parent_record,
2008: g_col_name_token,
2009: 'ship_to_party_id',
2010: g_child_table_token ,
2010: g_child_table_token ,
2011: 'OKL_TAX_SOURCES_V',
2012: g_parent_table_token ,
2013: 'hz_party_sites');
2014: l_return_status := OKC_API.G_RET_STS_ERROR;
2015:
2016: END IF;
2017:
2018: END IF;
2019: x_return_status := l_return_status;
2020: EXCEPTION
2021:
2022: WHEN OTHERS THEN
2023: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2024: ,p_msg_name => G_UNEXPECTED_ERROR
2025: ,p_token1 => G_SQLCODE_TOKEN
2026: ,p_token1_value => SQLCODE
2027: ,p_token2 => G_SQLERRM_TOKEN
2034: -------------------------------------
2035: PROCEDURE validate_bill_to_party_site_id(
2036: x_return_status OUT NOCOPY VARCHAR2,
2037: p_txsv_rec IN txsv_rec_type) IS
2038: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2039:
2040: l_dummy_var VARCHAR2(1) := '?' ;
2041:
2042: CURSOR okl_txsv_bill_to_ps_fk_csr (p_id IN NUMBER) IS
2053: -- still set to default means data was not found
2054:
2055: IF ( l_dummy_var = '?' ) THEN
2056:
2057: OKC_API.set_message(g_app_name,
2058: g_no_parent_record,
2059: g_col_name_token,
2060: 'bill_to_party_site_id',
2061: g_child_table_token ,
2061: g_child_table_token ,
2062: 'OKL_TAX_SOURCES_V',
2063: g_parent_table_token ,
2064: 'hz_party_sites');
2065: l_return_status := OKC_API.G_RET_STS_ERROR;
2066:
2067: END IF;
2068:
2069: END IF;
2070: x_return_status := l_return_status;
2071: EXCEPTION
2072:
2073: WHEN OTHERS THEN
2074: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2075: ,p_msg_name => G_UNEXPECTED_ERROR
2076: ,p_token1 => G_SQLCODE_TOKEN
2077: ,p_token1_value => SQLCODE
2078: ,p_token2 => G_SQLERRM_TOKEN
2085: -------------------------------------
2086: PROCEDURE validate_bill_to_location_id(
2087: x_return_status OUT NOCOPY VARCHAR2,
2088: p_txsv_rec IN txsv_rec_type) IS
2089: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2090:
2091: l_dummy_var VARCHAR2(1) := '?' ;
2092:
2093: CURSOR okl_txsv_bill_to_loc_fk_csr (p_id IN NUMBER) IS
2104: -- still set to default means data was not found
2105:
2106: IF ( l_dummy_var = '?' ) THEN
2107:
2108: OKC_API.set_message(g_app_name,
2109: g_no_parent_record,
2110: g_col_name_token,
2111: 'bill_to_location_id',
2112: g_child_table_token ,
2112: g_child_table_token ,
2113: 'OKL_TAX_SOURCES_V',
2114: g_parent_table_token ,
2115: 'hz_party_sites');
2116: l_return_status := OKC_API.G_RET_STS_ERROR;
2117:
2118: END IF;
2119:
2120: END IF;
2121: x_return_status := l_return_status;
2122: EXCEPTION
2123:
2124: WHEN OTHERS THEN
2125: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2126: ,p_msg_name => G_UNEXPECTED_ERROR
2127: ,p_token1 => G_SQLCODE_TOKEN
2128: ,p_token1_value => SQLCODE
2129: ,p_token2 => G_SQLERRM_TOKEN
2136: -------------------------------------
2137: PROCEDURE validate_bill_to_party_id(
2138: x_return_status OUT NOCOPY VARCHAR2,
2139: p_txsv_rec IN txsv_rec_type) IS
2140: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2141:
2142: l_dummy_var VARCHAR2(1) := '?' ;
2143:
2144: CURSOR okl_txsv_bill_to_pid_fk_csr (p_id IN NUMBER) IS
2155: -- still set to default means data was not found
2156:
2157: IF ( l_dummy_var = '?' ) THEN
2158:
2159: OKC_API.set_message(g_app_name,
2160: g_no_parent_record,
2161: g_col_name_token,
2162: 'bill_to_party_id',
2163: g_child_table_token ,
2163: g_child_table_token ,
2164: 'OKL_TAX_SOURCES_V',
2165: g_parent_table_token ,
2166: 'hz_party_sites');
2167: l_return_status := OKC_API.G_RET_STS_ERROR;
2168:
2169: END IF;
2170:
2171: END IF;
2172: x_return_status := l_return_status;
2173: EXCEPTION
2174:
2175: WHEN OTHERS THEN
2176: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2177: ,p_msg_name => G_UNEXPECTED_ERROR
2178: ,p_token1 => G_SQLCODE_TOKEN
2179: ,p_token1_value => SQLCODE
2180: ,p_token2 => G_SQLERRM_TOKEN
2186: -------------------------------------
2187: PROCEDURE validate_shiptocasuid(
2188: x_return_status OUT NOCOPY VARCHAR2,
2189: p_txsv_rec IN txsv_rec_type) IS
2190: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2191:
2192: l_dummy_var VARCHAR2(1) := '?' ;
2193:
2194: CURSOR okl_txsv_ship_to_cs_fk_csr (p_id IN NUMBER) IS
2205: -- still set to default means data was not found
2206:
2207: IF ( l_dummy_var = '?' ) THEN
2208:
2209: OKC_API.set_message(g_app_name,
2210: g_no_parent_record,
2211: g_col_name_token,
2212: 'ship_to_cust_acct_site_use_id',
2213: g_child_table_token ,
2213: g_child_table_token ,
2214: 'OKL_TAX_SOURCES_V',
2215: g_parent_table_token ,
2216: 'hz_cust_site_uses_all');
2217: l_return_status := OKC_API.G_RET_STS_ERROR;
2218:
2219: END IF;
2220:
2221: END IF;
2222: x_return_status := l_return_status;
2223: EXCEPTION
2224:
2225: WHEN OTHERS THEN
2226: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2227: ,p_msg_name => G_UNEXPECTED_ERROR
2228: ,p_token1 => G_SQLCODE_TOKEN
2229: ,p_token1_value => SQLCODE
2230: ,p_token2 => G_SQLERRM_TOKEN
2237: -------------------------------------
2238: PROCEDURE validate_billtocasuid(
2239: x_return_status OUT NOCOPY VARCHAR2,
2240: p_txsv_rec IN txsv_rec_type) IS
2241: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2242:
2243: l_dummy_var VARCHAR2(1) := '?' ;
2244:
2245: CURSOR okl_txsv_bill_to_cs_fk_csr (p_id IN NUMBER) IS
2256: -- still set to default means data was not found
2257:
2258: IF ( l_dummy_var = '?' ) THEN
2259:
2260: OKC_API.set_message(g_app_name,
2261: g_no_parent_record,
2262: g_col_name_token,
2263: 'ship_to_cust_acct_site_use_id',
2264: g_child_table_token ,
2264: g_child_table_token ,
2265: 'OKL_TAX_SOURCES_V',
2266: g_parent_table_token ,
2267: 'hz_cust_site_uses_all');
2268: l_return_status := OKC_API.G_RET_STS_ERROR;
2269:
2270: END IF;
2271:
2272: END IF;
2273: x_return_status := l_return_status;
2274: EXCEPTION
2275:
2276: WHEN OTHERS THEN
2277: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2278: ,p_msg_name => G_UNEXPECTED_ERROR
2279: ,p_token1 => G_SQLCODE_TOKEN
2280: ,p_token1_value => SQLCODE
2281: ,p_token2 => G_SQLERRM_TOKEN
2287: -------------------------------------
2288: PROCEDURE validate_trx_currency_code(
2289: x_return_status OUT NOCOPY VARCHAR2,
2290: p_txsv_rec IN txsv_rec_type) IS
2291: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2292:
2293: BEGIN
2294:
2295: IF (p_txsv_rec.trx_currency_code = OKL_API.G_MISS_CHAR OR p_txsv_rec.trx_currency_code IS NULL)
2293: BEGIN
2294:
2295: IF (p_txsv_rec.trx_currency_code = OKL_API.G_MISS_CHAR OR p_txsv_rec.trx_currency_code IS NULL)
2296: THEN
2297: OKC_API.set_message(G_APP_NAME, G_REQUIRED_VALUE, G_COL_NAME_TOKEN, 'trx_currency_code');
2298: l_return_status := OKL_API.G_RET_STS_ERROR;
2299: END IF;
2300: x_return_status := l_return_status;
2301: EXCEPTION
2300: x_return_status := l_return_status;
2301: EXCEPTION
2302:
2303: WHEN OTHERS THEN
2304: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2305: ,p_msg_name => G_UNEXPECTED_ERROR
2306: ,p_token1 => G_SQLCODE_TOKEN
2307: ,p_token1_value => SQLCODE
2308: ,p_token2 => G_SQLERRM_TOKEN
2329: -- ***
2330: -- id
2331: -- ***
2332: validate_id(l_return_status, p_txsv_rec);
2333: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2334: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2335: x_return_status := l_return_status;
2336: RAISE G_EXCEPTION_HALT_VALIDATION;
2337: ELSE
2330: -- id
2331: -- ***
2332: validate_id(l_return_status, p_txsv_rec);
2333: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2334: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2335: x_return_status := l_return_status;
2336: RAISE G_EXCEPTION_HALT_VALIDATION;
2337: ELSE
2338: x_return_status := l_return_status;
2343: -- ***
2344: -- khr_id
2345: -- ***
2346: validate_khr_id(l_return_status, p_txsv_rec);
2347: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2348: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2349: x_return_status := l_return_status;
2350: RAISE G_EXCEPTION_HALT_VALIDATION;
2351: ELSE
2344: -- khr_id
2345: -- ***
2346: validate_khr_id(l_return_status, p_txsv_rec);
2347: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2348: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2349: x_return_status := l_return_status;
2350: RAISE G_EXCEPTION_HALT_VALIDATION;
2351: ELSE
2352: x_return_status := l_return_status;
2357: -- ***
2358: -- kle_id
2359: -- ***
2360: validate_kle_id(l_return_status, p_txsv_rec);
2361: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2362: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2363: x_return_status := l_return_status;
2364: RAISE G_EXCEPTION_HALT_VALIDATION;
2365: ELSE
2358: -- kle_id
2359: -- ***
2360: validate_kle_id(l_return_status, p_txsv_rec);
2361: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2362: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2363: x_return_status := l_return_status;
2364: RAISE G_EXCEPTION_HALT_VALIDATION;
2365: ELSE
2366: x_return_status := l_return_status;
2371: -- ***
2372: -- trx_id
2373: -- ***
2374: validate_trx_id(l_return_status, p_txsv_rec);
2375: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2376: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2377: x_return_status := l_return_status;
2378: RAISE G_EXCEPTION_HALT_VALIDATION;
2379: ELSE
2372: -- trx_id
2373: -- ***
2374: validate_trx_id(l_return_status, p_txsv_rec);
2375: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2376: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2377: x_return_status := l_return_status;
2378: RAISE G_EXCEPTION_HALT_VALIDATION;
2379: ELSE
2380: x_return_status := l_return_status;
2385: -- ***
2386: -- trx_line_id
2387: -- ***
2388: validate_trx_line_id(l_return_status, p_txsv_rec);
2389: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2390: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2391: x_return_status := l_return_status;
2392: RAISE G_EXCEPTION_HALT_VALIDATION;
2393: ELSE
2386: -- trx_line_id
2387: -- ***
2388: validate_trx_line_id(l_return_status, p_txsv_rec);
2389: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2390: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2391: x_return_status := l_return_status;
2392: RAISE G_EXCEPTION_HALT_VALIDATION;
2393: ELSE
2394: x_return_status := l_return_status;
2399: -- ***
2400: -- tax_call_type_code
2401: -- ***
2402: validate_tax_call_type_code(l_return_status, p_txsv_rec);
2403: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2404: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2405: x_return_status := l_return_status;
2406: RAISE G_EXCEPTION_HALT_VALIDATION;
2407: ELSE
2400: -- tax_call_type_code
2401: -- ***
2402: validate_tax_call_type_code(l_return_status, p_txsv_rec);
2403: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2404: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2405: x_return_status := l_return_status;
2406: RAISE G_EXCEPTION_HALT_VALIDATION;
2407: ELSE
2408: x_return_status := l_return_status;
2413: -- ***
2414: -- sty_id
2415: -- ***
2416: validate_sty_id(l_return_status, p_txsv_rec);
2417: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2418: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2419: x_return_status := l_return_status;
2420: RAISE G_EXCEPTION_HALT_VALIDATION;
2421: ELSE
2414: -- sty_id
2415: -- ***
2416: validate_sty_id(l_return_status, p_txsv_rec);
2417: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2418: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2419: x_return_status := l_return_status;
2420: RAISE G_EXCEPTION_HALT_VALIDATION;
2421: ELSE
2422: x_return_status := l_return_status;
2427: -- ***
2428: -- trx_business_category
2429: -- ***
2430: validate_trx_business_category(l_return_status, p_txsv_rec);
2431: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2432: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2433: x_return_status := l_return_status;
2434: RAISE G_EXCEPTION_HALT_VALIDATION;
2435: ELSE
2428: -- trx_business_category
2429: -- ***
2430: validate_trx_business_category(l_return_status, p_txsv_rec);
2431: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2432: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2433: x_return_status := l_return_status;
2434: RAISE G_EXCEPTION_HALT_VALIDATION;
2435: ELSE
2436: x_return_status := l_return_status;
2443: -- ***
2444: -- tax_line_status_code
2445: -- ***
2446: validate_tax_line_status_code(l_return_status, p_txsv_rec);
2447: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2448: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2449: x_return_status := l_return_status;
2450: RAISE G_EXCEPTION_HALT_VALIDATION;
2451: ELSE
2444: -- tax_line_status_code
2445: -- ***
2446: validate_tax_line_status_code(l_return_status, p_txsv_rec);
2447: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2448: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2449: x_return_status := l_return_status;
2450: RAISE G_EXCEPTION_HALT_VALIDATION;
2451: ELSE
2452: x_return_status := l_return_status;
2457: -- ***
2458: -- sel_id
2459: -- ***
2460: validate_sel_id(l_return_status, p_txsv_rec);
2461: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2462: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2463: x_return_status := l_return_status;
2464: RAISE G_EXCEPTION_HALT_VALIDATION;
2465: ELSE
2458: -- sel_id
2459: -- ***
2460: validate_sel_id(l_return_status, p_txsv_rec);
2461: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2462: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2463: x_return_status := l_return_status;
2464: RAISE G_EXCEPTION_HALT_VALIDATION;
2465: ELSE
2466: x_return_status := l_return_status;
2470: -- ***
2471: -- application_id
2472: -- ***
2473: validate_application_id(l_return_status, p_txsv_rec);
2474: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2475: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2476: x_return_status := l_return_status;
2477: RAISE G_EXCEPTION_HALT_VALIDATION;
2478: ELSE
2471: -- application_id
2472: -- ***
2473: validate_application_id(l_return_status, p_txsv_rec);
2474: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2475: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2476: x_return_status := l_return_status;
2477: RAISE G_EXCEPTION_HALT_VALIDATION;
2478: ELSE
2479: x_return_status := l_return_status;
2483: -- ***
2484: -- default_taxation_country
2485: -- ***
2486: validate_def_txn_country(l_return_status, p_txsv_rec);
2487: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2488: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2489: x_return_status := l_return_status;
2490: RAISE G_EXCEPTION_HALT_VALIDATION;
2491: ELSE
2484: -- default_taxation_country
2485: -- ***
2486: validate_def_txn_country(l_return_status, p_txsv_rec);
2487: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2488: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2489: x_return_status := l_return_status;
2490: RAISE G_EXCEPTION_HALT_VALIDATION;
2491: ELSE
2492: x_return_status := l_return_status;
2496: -- ***
2497: -- product_category
2498: -- ***
2499: validate_product_category(l_return_status, p_txsv_rec);
2500: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2501: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2502: x_return_status := l_return_status;
2503: RAISE G_EXCEPTION_HALT_VALIDATION;
2504: ELSE
2497: -- product_category
2498: -- ***
2499: validate_product_category(l_return_status, p_txsv_rec);
2500: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2501: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2502: x_return_status := l_return_status;
2503: RAISE G_EXCEPTION_HALT_VALIDATION;
2504: ELSE
2505: x_return_status := l_return_status;
2509: -- ***
2510: -- user_defined_fisc_class
2511: -- ***
2512: validate_udfc(l_return_status, p_txsv_rec);
2513: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2514: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2515: x_return_status := l_return_status;
2516: RAISE G_EXCEPTION_HALT_VALIDATION;
2517: ELSE
2510: -- user_defined_fisc_class
2511: -- ***
2512: validate_udfc(l_return_status, p_txsv_rec);
2513: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2514: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2515: x_return_status := l_return_status;
2516: RAISE G_EXCEPTION_HALT_VALIDATION;
2517: ELSE
2518: x_return_status := l_return_status;
2522: -- ***
2523: -- line_intended_use
2524: -- ***
2525: validate_line_int_use(l_return_status, p_txsv_rec);
2526: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2527: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2528: x_return_status := l_return_status;
2529: RAISE G_EXCEPTION_HALT_VALIDATION;
2530: ELSE
2523: -- line_intended_use
2524: -- ***
2525: validate_line_int_use(l_return_status, p_txsv_rec);
2526: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2527: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2528: x_return_status := l_return_status;
2529: RAISE G_EXCEPTION_HALT_VALIDATION;
2530: ELSE
2531: x_return_status := l_return_status;
2535: -- ***
2536: -- inventory_item_id
2537: -- ***
2538: validate_inventory_item_id(l_return_status, p_txsv_rec);
2539: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2540: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2541: x_return_status := l_return_status;
2542: RAISE G_EXCEPTION_HALT_VALIDATION;
2543: ELSE
2536: -- inventory_item_id
2537: -- ***
2538: validate_inventory_item_id(l_return_status, p_txsv_rec);
2539: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2540: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2541: x_return_status := l_return_status;
2542: RAISE G_EXCEPTION_HALT_VALIDATION;
2543: ELSE
2544: x_return_status := l_return_status;
2548: -- ***
2549: -- bill_to_cust_acct_id
2550: -- ***
2551: validate_bill_to_cust_acct_id(l_return_status, p_txsv_rec);
2552: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2553: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2554: x_return_status := l_return_status;
2555: RAISE G_EXCEPTION_HALT_VALIDATION;
2556: ELSE
2549: -- bill_to_cust_acct_id
2550: -- ***
2551: validate_bill_to_cust_acct_id(l_return_status, p_txsv_rec);
2552: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2553: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2554: x_return_status := l_return_status;
2555: RAISE G_EXCEPTION_HALT_VALIDATION;
2556: ELSE
2557: x_return_status := l_return_status;
2561: -- ***
2562: -- org_id
2563: -- ***
2564: validate_org_id(l_return_status, p_txsv_rec);
2565: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2566: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2567: x_return_status := l_return_status;
2568: RAISE G_EXCEPTION_HALT_VALIDATION;
2569: ELSE
2562: -- org_id
2563: -- ***
2564: validate_org_id(l_return_status, p_txsv_rec);
2565: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2566: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2567: x_return_status := l_return_status;
2568: RAISE G_EXCEPTION_HALT_VALIDATION;
2569: ELSE
2570: x_return_status := l_return_status;
2574: -- ***
2575: -- legal_entity_id
2576: -- ***
2577: validate_legal_entity_id(l_return_status, p_txsv_rec);
2578: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2579: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2580: x_return_status := l_return_status;
2581: RAISE G_EXCEPTION_HALT_VALIDATION;
2582: ELSE
2575: -- legal_entity_id
2576: -- ***
2577: validate_legal_entity_id(l_return_status, p_txsv_rec);
2578: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2579: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2580: x_return_status := l_return_status;
2581: RAISE G_EXCEPTION_HALT_VALIDATION;
2582: ELSE
2583: x_return_status := l_return_status;
2587: -- ***
2588: -- product_type
2589: -- ***
2590: validate_product_type(l_return_status, p_txsv_rec);
2591: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2592: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2593: x_return_status := l_return_status;
2594: RAISE G_EXCEPTION_HALT_VALIDATION;
2595: ELSE
2588: -- product_type
2589: -- ***
2590: validate_product_type(l_return_status, p_txsv_rec);
2591: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2592: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2593: x_return_status := l_return_status;
2594: RAISE G_EXCEPTION_HALT_VALIDATION;
2595: ELSE
2596: x_return_status := l_return_status;
2600: -- ***
2601: -- product_fisc_classification
2602: -- ***
2603: validate_prod_fisc_classfn(l_return_status, p_txsv_rec);
2604: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2605: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2606: x_return_status := l_return_status;
2607: RAISE G_EXCEPTION_HALT_VALIDATION;
2608: ELSE
2601: -- product_fisc_classification
2602: -- ***
2603: validate_prod_fisc_classfn(l_return_status, p_txsv_rec);
2604: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2605: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2606: x_return_status := l_return_status;
2607: RAISE G_EXCEPTION_HALT_VALIDATION;
2608: ELSE
2609: x_return_status := l_return_status;
2613: -- ***
2614: -- provnl_tax_determination_date
2615: -- ***
2616: validate_provnl_tax_det_date(l_return_status, p_txsv_rec);
2617: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2618: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2619: x_return_status := l_return_status;
2620: RAISE G_EXCEPTION_HALT_VALIDATION;
2621: ELSE
2614: -- provnl_tax_determination_date
2615: -- ***
2616: validate_provnl_tax_det_date(l_return_status, p_txsv_rec);
2617: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2618: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2619: x_return_status := l_return_status;
2620: RAISE G_EXCEPTION_HALT_VALIDATION;
2621: ELSE
2622: x_return_status := l_return_status;
2625: -- ***
2626: -- trx_date
2627: -- ***
2628: validate_trx_date(l_return_status, p_txsv_rec);
2629: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2630: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2631: x_return_status := l_return_status;
2632: RAISE G_EXCEPTION_HALT_VALIDATION;
2633: ELSE
2626: -- trx_date
2627: -- ***
2628: validate_trx_date(l_return_status, p_txsv_rec);
2629: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2630: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2631: x_return_status := l_return_status;
2632: RAISE G_EXCEPTION_HALT_VALIDATION;
2633: ELSE
2634: x_return_status := l_return_status;
2638: -- ***
2639: -- try_id
2640: -- ***
2641: validate_try_id(l_return_status, p_txsv_rec);
2642: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2643: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2644: x_return_status := l_return_status;
2645: RAISE G_EXCEPTION_HALT_VALIDATION;
2646: ELSE
2639: -- try_id
2640: -- ***
2641: validate_try_id(l_return_status, p_txsv_rec);
2642: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2643: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2644: x_return_status := l_return_status;
2645: RAISE G_EXCEPTION_HALT_VALIDATION;
2646: ELSE
2647: x_return_status := l_return_status;
2651: -- ***
2652: -- ship_to_location_id
2653: -- ***
2654: validate_ship_to_location_id(l_return_status, p_txsv_rec);
2655: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2656: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2657: x_return_status := l_return_status;
2658: RAISE G_EXCEPTION_HALT_VALIDATION;
2659: ELSE
2652: -- ship_to_location_id
2653: -- ***
2654: validate_ship_to_location_id(l_return_status, p_txsv_rec);
2655: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2656: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2657: x_return_status := l_return_status;
2658: RAISE G_EXCEPTION_HALT_VALIDATION;
2659: ELSE
2660: x_return_status := l_return_status;
2664: -- ***
2665: -- ship_to_party_site_id
2666: -- ***
2667: validate_ship_to_party_site_id(l_return_status, p_txsv_rec);
2668: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2669: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2670: x_return_status := l_return_status;
2671: RAISE G_EXCEPTION_HALT_VALIDATION;
2672: ELSE
2665: -- ship_to_party_site_id
2666: -- ***
2667: validate_ship_to_party_site_id(l_return_status, p_txsv_rec);
2668: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2669: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2670: x_return_status := l_return_status;
2671: RAISE G_EXCEPTION_HALT_VALIDATION;
2672: ELSE
2673: x_return_status := l_return_status;
2677: -- ***
2678: -- ship_to_party_id
2679: -- ***
2680: validate_ship_to_party_id(l_return_status, p_txsv_rec);
2681: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2682: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2683: x_return_status := l_return_status;
2684: RAISE G_EXCEPTION_HALT_VALIDATION;
2685: ELSE
2678: -- ship_to_party_id
2679: -- ***
2680: validate_ship_to_party_id(l_return_status, p_txsv_rec);
2681: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2682: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2683: x_return_status := l_return_status;
2684: RAISE G_EXCEPTION_HALT_VALIDATION;
2685: ELSE
2686: x_return_status := l_return_status;
2689: -- ***
2690: -- bill_to_party_site_id
2691: -- ***
2692: validate_bill_to_party_site_id(l_return_status, p_txsv_rec);
2693: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2694: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2695: x_return_status := l_return_status;
2696: RAISE G_EXCEPTION_HALT_VALIDATION;
2697: ELSE
2690: -- bill_to_party_site_id
2691: -- ***
2692: validate_bill_to_party_site_id(l_return_status, p_txsv_rec);
2693: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2694: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2695: x_return_status := l_return_status;
2696: RAISE G_EXCEPTION_HALT_VALIDATION;
2697: ELSE
2698: x_return_status := l_return_status;
2702: -- ***
2703: -- bill_to_location_id
2704: -- ***
2705: validate_bill_to_location_id(l_return_status, p_txsv_rec);
2706: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2707: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2708: x_return_status := l_return_status;
2709: RAISE G_EXCEPTION_HALT_VALIDATION;
2710: ELSE
2703: -- bill_to_location_id
2704: -- ***
2705: validate_bill_to_location_id(l_return_status, p_txsv_rec);
2706: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2707: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2708: x_return_status := l_return_status;
2709: RAISE G_EXCEPTION_HALT_VALIDATION;
2710: ELSE
2711: x_return_status := l_return_status;
2715: -- ***
2716: -- bill_to_party_id
2717: -- ***
2718: validate_bill_to_party_id(l_return_status, p_txsv_rec);
2719: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2720: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2721: x_return_status := l_return_status;
2722: RAISE G_EXCEPTION_HALT_VALIDATION;
2723: ELSE
2716: -- bill_to_party_id
2717: -- ***
2718: validate_bill_to_party_id(l_return_status, p_txsv_rec);
2719: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2720: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2721: x_return_status := l_return_status;
2722: RAISE G_EXCEPTION_HALT_VALIDATION;
2723: ELSE
2724: x_return_status := l_return_status;
2728: -- ***
2729: -- ship_to_cust_acct_site_use_id
2730: -- ***
2731: validate_shiptocasuid(l_return_status, p_txsv_rec);
2732: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2733: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2734: x_return_status := l_return_status;
2735: RAISE G_EXCEPTION_HALT_VALIDATION;
2736: ELSE
2729: -- ship_to_cust_acct_site_use_id
2730: -- ***
2731: validate_shiptocasuid(l_return_status, p_txsv_rec);
2732: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2733: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2734: x_return_status := l_return_status;
2735: RAISE G_EXCEPTION_HALT_VALIDATION;
2736: ELSE
2737: x_return_status := l_return_status;
2741: -- ***
2742: -- bill_to_cust_acct_site_use_id
2743: -- ***
2744: validate_billtocasuid(l_return_status, p_txsv_rec);
2745: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2746: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2747: x_return_status := l_return_status;
2748: RAISE G_EXCEPTION_HALT_VALIDATION;
2749: ELSE
2742: -- bill_to_cust_acct_site_use_id
2743: -- ***
2744: validate_billtocasuid(l_return_status, p_txsv_rec);
2745: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2746: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2747: x_return_status := l_return_status;
2748: RAISE G_EXCEPTION_HALT_VALIDATION;
2749: ELSE
2750: x_return_status := l_return_status;
2753: -- ***
2754: -- trx_currency_code
2755: -- ***
2756: validate_trx_currency_code(l_return_status, p_txsv_rec);
2757: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2758: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2759: x_return_status := l_return_status;
2760: RAISE G_EXCEPTION_HALT_VALIDATION;
2761: ELSE
2754: -- trx_currency_code
2755: -- ***
2756: validate_trx_currency_code(l_return_status, p_txsv_rec);
2757: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
2758: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2759: x_return_status := l_return_status;
2760: RAISE G_EXCEPTION_HALT_VALIDATION;
2761: ELSE
2762: x_return_status := l_return_status;
2768: EXCEPTION
2769: WHEN G_EXCEPTION_HALT_VALIDATION THEN
2770: RETURN(x_return_status);
2771: WHEN OTHERS THEN
2772: OKC_API.SET_MESSAGE( p_app_name => G_APP_NAME
2773: ,p_msg_name => G_UNEXPECTED_ERROR
2774: ,p_token1 => G_SQLCODE_TOKEN
2775: ,p_token1_value => SQLCODE
2776: ,p_token2 => G_SQLERRM_TOKEN