7: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;
8: G_MSG_MEDIUM CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM;
9: G_MSG_LOW CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW;
10:
11: G_caching_done varchar2(1) := FND_API.G_FALSE;
12: G_cache_date date := NULL ;
13: G_receivables_name ar_receivables_trx.name%type := NULL;
14:
15: TYPE Context_Rec_Type IS RECORD
169: | Set unexpected error message and status |
170: +-----------------------------------------------*/
171: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'aapi_message');
172:
173: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
174:
175: END aapi_message;
176:
177: /*===========================================================================+
235: g_context_rec.override_activity_option :=
236: rtrim(FND_PROFILE.VALUE( 'AR_OVERRIDE_ADJUSTMENT_ACTIVITY_ACCOUNT'));
237:
238:
239: p_return_status := FND_API.G_RET_STS_SUCCESS;
240:
241: IF PG_DEBUG in ('Y', 'C') THEN
242: arp_util.debug('Init_Context_Rec()-' , G_MSG_HIGH);
243: END IF;
251: FND_MSG_PUB.Add_Exc_Msg (
252: G_PKG_NAME,
253: 'Init_Context_Rec'
254: );
255: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
256: RETURN;
257:
258: END Init_Context_Rec;
259:
306: IF PG_DEBUG in ('Y', 'C') THEN
307: arp_util.debug('Cache_Gl_Periods()+' , G_MSG_HIGH);
308: END IF;
309:
310: p_return_status := FND_API.G_RET_STS_SUCCESS;
311:
312: SELECT set_of_books_id
313: INTO l_set_of_books_id
314: FROM ar_system_parameters ;
343: p_message_name => 'AR_AAPI_NO_OPEN_FUTURE_PERIOD',
344: p_token1_name => 'SET_OF_BOOKS_ID',
345: p_token1_value => to_char(arp_global.set_of_books_id)
346: ) ;
347: p_return_status := FND_API.G_RET_STS_ERROR;
348: RETURN;
349: WHEN OTHERS THEN
350: IF PG_DEBUG in ('Y', 'C') THEN
351: arp_util.debug('EXCEPTION: Cache_Gl_Periods()', G_MSG_UERROR);
353: /*-----------------------------------------------+
354: | Set unexpected error message and status |
355: +-----------------------------------------------*/
356: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Gl_Periods');
357: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
358: RETURN;
359:
360: END Cache_Gl_Periods;
361:
402: IF PG_DEBUG in ('Y', 'C') THEN
403: arp_util.debug('Cache_Approval_Type()+' , G_MSG_HIGH);
404: END IF;
405:
406: p_return_status := FND_API.G_RET_STS_SUCCESS;
407:
408: FOR l_temp_rec IN l_lookup_csr LOOP
409: l_index := l_index + 1;
410: G_APPROVAL_TBL(l_index) := l_temp_rec;
428: aapi_message(
429: p_application_name =>'AR',
430: p_message_name => 'AR_AAPI_NO_APPROVAL_CODES'
431: ) ;
432: p_return_status := FND_API.G_RET_STS_ERROR ;
433: RETURN;
434:
435: WHEN OTHERS THEN
436: IF PG_DEBUG in ('Y', 'C') THEN
439: /*-----------------------------------------------+
440: | Set unexpected error message and status |
441: +-----------------------------------------------*/
442: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Approval_Type');
443: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
444: RETURN;
445:
446: END Cache_Approval_Type;
447:
488: IF PG_DEBUG in ('Y', 'C') THEN
489: arp_util.debug('Cache_Adjustment_Type()+' , G_MSG_HIGH);
490: END IF;
491:
492: p_return_status := FND_API.G_RET_STS_SUCCESS;
493:
494: FOR l_temp_rec IN l_lookup_csr LOOP
495: l_index := l_index + 1;
496: G_ADJTYPE_TBL(l_index) := l_temp_rec;
514: aapi_message(
515: p_application_name =>'AR',
516: p_message_name => 'AR_AAPI_NO_TYPE_CODES'
517: ) ;
518: p_return_status := FND_API.G_RET_STS_ERROR ;
519: RETURN;
520:
521: WHEN OTHERS THEN
522: IF PG_DEBUG in ('Y', 'C') THEN
525: /*-----------------------------------------------+
526: | Set unexpected error message and status |
527: +-----------------------------------------------*/
528: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Adjustment_Type');
529: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
530: RETURN;
531:
532: END Cache_Adjustment_Type;
533:
574: IF PG_DEBUG in ('Y', 'C') THEN
575: arp_util.debug('Cache_Adjustment_Reason()+' , G_MSG_HIGH);
576: END IF;
577:
578: p_return_status := FND_API.G_RET_STS_SUCCESS;
579:
580: FOR l_temp_rec IN l_lookup_csr LOOP
581: l_index := l_index + 1;
582: G_REASON_TBL(l_index) := l_temp_rec;
600: aapi_message(
601: p_application_name =>'AR',
602: p_message_name => 'AR_AAPI_NO_REASON_CODES'
603: ) ;
604: p_return_status := FND_API.G_RET_STS_ERROR ;
605: RETURN;
606:
607: WHEN OTHERS THEN
608: IF PG_DEBUG in ('Y', 'C') THEN
611: /*-----------------------------------------------+
612: | Set unexpected error message and status |
613: +-----------------------------------------------*/
614: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Adjustment_Reason');
615: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
616: RETURN;
617:
618: END Cache_Adjustment_Reason;
619:
665: IF PG_DEBUG in ('Y', 'C') THEN
666: arp_util.debug('Cache_Receivables_Trx()+' , G_MSG_HIGH);
667: END IF;
668:
669: p_return_status := FND_API.G_RET_STS_SUCCESS;
670:
671: FOR l_temp_rec IN l_receivables_csr LOOP
672: l_index := l_index + 1;
673: G_RCVTRX_TBL(l_index) := l_temp_rec;
691: aapi_message(
692: p_application_name =>'AR',
693: p_message_name => 'AR_AAPI_NO_RECEIVABLES_TRX'
694: ) ;
695: p_return_status := FND_API.G_RET_STS_ERROR ;
696: RETURN;
697:
698: WHEN OTHERS THEN
699: IF PG_DEBUG in ('Y', 'C') THEN
702: /*-----------------------------------------------+
703: | Set unexpected error message and status |
704: +-----------------------------------------------*/
705: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Receivables_Trx');
706: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
707: RETURN;
708:
709: END Cache_Receivables_Trx;
710:
751: IF PG_DEBUG in ('Y', 'C') THEN
752: arp_util.debug('Cache_Ussgl_Code()+' , G_MSG_HIGH);
753: END IF;
754:
755: p_return_status := FND_API.G_RET_STS_SUCCESS;
756:
757: /*-----------------------------------------------+
758: | Load the USSGL based on profile option |
759: +-----------------------------------------------*/
786: aapi_message(
787: p_application_name =>'AR',
788: p_message_name => 'AR_AAPI_NO_USSGL_CODES'
789: ) ;
790: p_return_status := FND_API.G_RET_STS_SUCCESS ;
791: RETURN;
792:
793: WHEN OTHERS THEN
794: IF PG_DEBUG in ('Y', 'C') THEN
797: /*-----------------------------------------------+
798: | Set unexpected error message and status |
799: +-----------------------------------------------*/
800: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Ussgl_Code');
801: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
802: RETURN;
803:
804: END Cache_Ussgl_code;
805:
853: IF PG_DEBUG in ('Y', 'C') THEN
854: arp_util.debug('Cache_Code_Combination()+' , G_MSG_HIGH);
855: END IF;
856:
857: p_return_status := FND_API.G_RET_STS_SUCCESS;
858:
859: FOR l_ccid_rec IN l_ccid_csr LOOP
860: l_index := l_index + 1 ;
861: IF ( l_index > G_CCID_CACHE_SIZE )
861: IF ( l_index > G_CCID_CACHE_SIZE )
862: THEN
863: EXIT;
864: END IF;
865: G_CCID_TBL(l_ccid_rec.code_combination_id).dummy := FND_API.G_TRUE;
866: END LOOP;
867:
868: IF PG_DEBUG in ('Y', 'C') THEN
869: arp_util.debug ('Cache_Code_Combination: ' || 'G_CCID_TBL count = '|| to_char(G_CCID_TBL.count), G_MSG_HIGH);
883: aapi_message(
884: p_application_name =>'AR',
885: p_message_name => 'AR_AAPI_NO_CCID'
886: ) ;
887: p_return_status := FND_API.G_RET_STS_ERROR ;
888: RETURN;
889:
890: WHEN OTHERS THEN
891: IF PG_DEBUG in ('Y', 'C') THEN
894: /*-----------------------------------------------+
895: | Set unexpected error message and status |
896: +-----------------------------------------------*/
897: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Code_Combination');
898: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
899: RETURN;
900:
901: END Cache_Code_Combination;
902:
960: | Check if caching is needed. Caching is needed if|
961: | g_caching_done is FALSE or sysdate > cache_date |
962: +--------------------------------------------------*/
963:
964: l_tobe_cached_flag := FND_API.G_FALSE ;
965:
966: IF PG_DEBUG in ('Y', 'C') THEN
967: arp_util.debug ('Cache_Details: ' || 'G_Caching done = ' || G_caching_done, G_MSG_HIGH);
968: arp_util.debug ('Cache_Details: ' || 'G_Cache_date = ' || to_char(G_cache_date,'DD-MON-YY'),
969: G_MSG_HIGH);
970: arp_util.debug ('Cache_Details: ' || 'Sysdate = ' || to_char(sysdate,'DD-MON-YY'),G_MSG_HIGH);
971: END IF;
972:
973: IF ( G_caching_done = FND_API.G_FALSE )
974: THEN
975: l_tobe_cached_flag := FND_API.G_TRUE ;
976: G_cache_date := trunc(sysdate) ;
977: ELSE
971: END IF;
972:
973: IF ( G_caching_done = FND_API.G_FALSE )
974: THEN
975: l_tobe_cached_flag := FND_API.G_TRUE ;
976: G_cache_date := trunc(sysdate) ;
977: ELSE
978: IF ( G_cache_date < trunc(sysdate) )
979: THEN
976: G_cache_date := trunc(sysdate) ;
977: ELSE
978: IF ( G_cache_date < trunc(sysdate) )
979: THEN
980: l_tobe_cached_flag := FND_API.G_TRUE ;
981: G_cache_date := trunc(sysdate) ;
982: END IF;
983: END IF;
984:
981: G_cache_date := trunc(sysdate) ;
982: END IF;
983: END IF;
984:
985: l_tobe_cached_flag := FND_API.G_TRUE;
986: IF PG_DEBUG in ('Y', 'C') THEN
987: arp_util.debug ('Cache_Details: ' || 'Caching Flag : '|| l_tobe_cached_flag,G_MSG_HIGH);
988: END IF;
989:
986: IF PG_DEBUG in ('Y', 'C') THEN
987: arp_util.debug ('Cache_Details: ' || 'Caching Flag : '|| l_tobe_cached_flag,G_MSG_HIGH);
988: END IF;
989:
990: IF ( l_tobe_cached_flag = FND_API.G_FALSE )
991: THEN
992: p_return_status := FND_API.G_RET_STS_SUCCESS;
993: RETURN ;
994: ELSE
988: END IF;
989:
990: IF ( l_tobe_cached_flag = FND_API.G_FALSE )
991: THEN
992: p_return_status := FND_API.G_RET_STS_SUCCESS;
993: RETURN ;
994: ELSE
995: /*-------------------------------------------------+
996: | Initialise the PL/SQL cache tables |
1010: +-------------------------------------------------*/
1011:
1012: ar_adjvalidate_pub.cache_approval_type (p_return_status);
1013:
1014: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1015: THEN
1016: RETURN ;
1017: END IF;
1018: /*-------------------------------------------------+
1020: | for validation of adjustment reason codes |
1021: +-------------------------------------------------*/
1022:
1023: ar_adjvalidate_pub.cache_adjustment_reason (p_return_status);
1024: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1025: THEN
1026: RETURN ;
1027: END IF;
1028:
1031: | To be used for validation of type |
1032: +-------------------------------------------------*/
1033:
1034: ar_adjvalidate_pub.cache_adjustment_type (p_return_status);
1035: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1036: THEN
1037: RETURN ;
1038: END IF;
1039:
1043: +-------------------------------------------------*/
1044:
1045: ar_adjvalidate_pub.cache_receivables_trx (p_return_status) ;
1046:
1047: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1048: THEN
1049: RETURN ;
1050: END IF;
1051:
1054: | for validation of USSGL transaction code |
1055: +-------------------------------------------------*/
1056:
1057: ar_adjvalidate_pub.cache_ussgl_code (p_return_status);
1058: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1059: THEN
1060: RETURN ;
1061: END IF;
1062:
1065: | dates lie within open or future enterable period|
1066: +--------------------------------------------------*/
1067:
1068: ar_adjvalidate_pub.cache_gl_periods(p_return_status);
1069: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1070: THEN
1071: RETURN ;
1072: END IF;
1073:
1076: | validate input provided by user |
1077: +--------------------------------------------------*/
1078:
1079: ar_adjvalidate_pub.cache_code_combination (p_return_status);
1080: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1081: THEN
1082: RETURN ;
1083: END IF;
1084:
1081: THEN
1082: RETURN ;
1083: END IF;
1084:
1085: G_caching_done := FND_API.G_TRUE ;
1086:
1087: IF PG_DEBUG in ('Y', 'C') THEN
1088: arp_util.debug('Cache_Details ()-' , G_MSG_HIGH);
1089: END IF;
1094: arp_util.debug('EXCEPTION: Cache_Details() ', G_MSG_UERROR);
1095: END IF;
1096:
1097: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Cache_Details');
1098: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1099: RETURN;
1100:
1101: END Cache_Details;
1102:
1113: | |
1114: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1115: | arp_util.disable_debug |
1116: | arp_util.enable_debug |
1117: | fnd_api.g_exc_unexpected_error |
1118: | fnd_api.g_ret_sts_error |
1119: | fnd_api.g_ret_sts_error |
1120: | fnd_api.g_ret_sts_success |
1121: | fnd_api.to_boolean |
1114: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1115: | arp_util.disable_debug |
1116: | arp_util.enable_debug |
1117: | fnd_api.g_exc_unexpected_error |
1118: | fnd_api.g_ret_sts_error |
1119: | fnd_api.g_ret_sts_error |
1120: | fnd_api.g_ret_sts_success |
1121: | fnd_api.to_boolean |
1122: | |
1115: | arp_util.disable_debug |
1116: | arp_util.enable_debug |
1117: | fnd_api.g_exc_unexpected_error |
1118: | fnd_api.g_ret_sts_error |
1119: | fnd_api.g_ret_sts_error |
1120: | fnd_api.g_ret_sts_success |
1121: | fnd_api.to_boolean |
1122: | |
1123: | ARGUMENTS : IN: |
1116: | arp_util.enable_debug |
1117: | fnd_api.g_exc_unexpected_error |
1118: | fnd_api.g_ret_sts_error |
1119: | fnd_api.g_ret_sts_error |
1120: | fnd_api.g_ret_sts_success |
1121: | fnd_api.to_boolean |
1122: | |
1123: | ARGUMENTS : IN: |
1124: | p_adj_rec |
1117: | fnd_api.g_exc_unexpected_error |
1118: | fnd_api.g_ret_sts_error |
1119: | fnd_api.g_ret_sts_error |
1120: | fnd_api.g_ret_sts_success |
1121: | fnd_api.to_boolean |
1122: | |
1123: | ARGUMENTS : IN: |
1124: | p_adj_rec |
1125: | p_inv_curr_code |
1158: /*------------------------------------------+
1159: | Initialize the return status to SUCCESS |
1160: +------------------------------------------*/
1161:
1162: p_return_status := FND_API.G_RET_STS_SUCCESS;
1163:
1164: p_approved_flag := FND_API.G_TRUE ;
1165:
1166: /*------------------------------------------+
1160: +------------------------------------------*/
1161:
1162: p_return_status := FND_API.G_RET_STS_SUCCESS;
1163:
1164: p_approved_flag := FND_API.G_TRUE ;
1165:
1166: /*------------------------------------------+
1167: | Get the user Id |
1168: +------------------------------------------*/
1192: p_message_name => 'AR_VAL_USER_LIMIT',
1193: p_token1_name => 'CURRENCY',
1194: p_token1_value => p_inv_curr_code
1195: ) ;
1196: p_approved_flag := FND_API.G_FALSE;
1197:
1198: WHEN OTHERS THEN
1199:
1200: IF PG_DEBUG in ('Y', 'C') THEN
1204: /*-------------------------------------------------+
1205: | Set unexpected error message, status and return |
1206: +-------------------------------------------------*/
1207: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Within_approval_limits');
1208: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1209: RETURN;
1210: END;
1211:
1212: /*-----------------------------------------------+
1212: /*-----------------------------------------------+
1213: | Ensure that approval data has been selected |
1214: +-----------------------------------------------*/
1215:
1216: IF ( p_approved_flag = FND_API.G_TRUE )
1217: THEN
1218:
1219: /*--------------------------------------------+
1220: | Perform actual check of approval limits. |
1237: aapi_message(
1238: p_application_name =>'AR',
1239: p_message_name => 'AR_VAL_AMT_APPROVAL_LIMIT'
1240: ) ;
1241: p_approved_flag := FND_API.G_FALSE;
1242:
1243: END IF;
1244:
1245: END IF;
1259: | Set unexpected error message and status |
1260: +-----------------------------------------------*/
1261: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Within_approval_limits'
1262: );
1263: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1264: RETURN;
1265:
1266: END Within_approval_limits;
1267:
1278: | |
1279: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1280: | arp_util.disable_debug |
1281: | arp_util.enable_debug |
1282: | fnd_api.g_exc_unexpected_error |
1283: | fnd_api.g_ret_sts_error |
1284: | fnd_api.g_ret_sts_error |
1285: | fnd_api.g_ret_sts_success |
1286: | fnd_api.to_boolean |
1279: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1280: | arp_util.disable_debug |
1281: | arp_util.enable_debug |
1282: | fnd_api.g_exc_unexpected_error |
1283: | fnd_api.g_ret_sts_error |
1284: | fnd_api.g_ret_sts_error |
1285: | fnd_api.g_ret_sts_success |
1286: | fnd_api.to_boolean |
1287: | |
1280: | arp_util.disable_debug |
1281: | arp_util.enable_debug |
1282: | fnd_api.g_exc_unexpected_error |
1283: | fnd_api.g_ret_sts_error |
1284: | fnd_api.g_ret_sts_error |
1285: | fnd_api.g_ret_sts_success |
1286: | fnd_api.to_boolean |
1287: | |
1288: | ARGUMENTS : IN: |
1281: | arp_util.enable_debug |
1282: | fnd_api.g_exc_unexpected_error |
1283: | fnd_api.g_ret_sts_error |
1284: | fnd_api.g_ret_sts_error |
1285: | fnd_api.g_ret_sts_success |
1286: | fnd_api.to_boolean |
1287: | |
1288: | ARGUMENTS : IN: |
1289: | p_adj_rec |
1282: | fnd_api.g_exc_unexpected_error |
1283: | fnd_api.g_ret_sts_error |
1284: | fnd_api.g_ret_sts_error |
1285: | fnd_api.g_ret_sts_success |
1286: | fnd_api.to_boolean |
1287: | |
1288: | ARGUMENTS : IN: |
1289: | p_adj_rec |
1290: | |
1318: /*------------------------------------------+
1319: | Initialize the return status to ERROR |
1320: +------------------------------------------*/
1321:
1322: p_return_status := FND_API.G_RET_STS_ERROR;
1323:
1324: FOR l_index IN 1..G_ADJTYPE_TBL.COUNT LOOP
1325:
1326: IF (p_adj_rec.type = G_ADJTYPE_TBL(l_index).lookup_code)
1324: FOR l_index IN 1..G_ADJTYPE_TBL.COUNT LOOP
1325:
1326: IF (p_adj_rec.type = G_ADJTYPE_TBL(l_index).lookup_code)
1327: THEN
1328: p_return_status := FND_API.G_RET_STS_SUCCESS;
1329: EXIT ;
1330: END IF;
1331:
1332: END LOOP;
1330: END IF;
1331:
1332: END LOOP;
1333:
1334: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
1335: THEN
1336: /*-----------------------------------------------+
1337: | Set the message |
1338: +-----------------------------------------------*/
1364: | Set unexpected error message and status |
1365: +-----------------------------------------------*/
1366: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_Type' );
1367:
1368: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1369:
1370: RETURN;
1371:
1372: END Validate_Type;
1384: | |
1385: | SCOPE - PUBLIC |
1386: | |
1387: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1388: | fnd_api.g_exc_unexpected_error |
1389: | fnd_api.g_ret_sts_error |
1390: | fnd_api.g_ret_sts_success |
1391: | |
1392: | ARGUMENTS : IN: |
1385: | SCOPE - PUBLIC |
1386: | |
1387: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1388: | fnd_api.g_exc_unexpected_error |
1389: | fnd_api.g_ret_sts_error |
1390: | fnd_api.g_ret_sts_success |
1391: | |
1392: | ARGUMENTS : IN: |
1393: | |
1386: | |
1387: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1388: | fnd_api.g_exc_unexpected_error |
1389: | fnd_api.g_ret_sts_error |
1390: | fnd_api.g_ret_sts_success |
1391: | |
1392: | ARGUMENTS : IN: |
1393: | |
1394: | OUT: |
1428: /*------------------------------------------+
1429: | Initialize the return status to SUCCESS |
1430: +------------------------------------------*/
1431:
1432: p_return_status := FND_API.G_RET_STS_SUCCESS;
1433:
1434: /*-----------------------------------------------+
1435: | Check if the payment schedule Id is 0 or null |
1436: | If so return with failure |
1448: p_message_name => 'AR_AAPI_INVALID_PAYSCHD',
1449: p_token1_name => 'PAYMENT_SCHEDULE_ID',
1450: p_token1_value => to_char(p_adj_rec.payment_schedule_id)
1451: ) ;
1452: p_return_status := FND_API.G_RET_STS_ERROR;
1453: RETURN;
1454:
1455: END IF ;
1456:
1478: p_message_name => 'AR_AAPI_INVALID_PAYSCHD',
1479: p_token1_name => 'PAYMENT_SCHEDULE_ID',
1480: p_token1_value => to_char(p_adj_rec.payment_schedule_id)
1481: ) ;
1482: p_return_status := FND_API.G_RET_STS_ERROR;
1483: RETURN ;
1484: END ;
1485:
1486: /*-----------------------------------------------+
1496: p_message_name => 'AR_AAPI_INVALID_TRX_CLASS',
1497: p_token1_name => 'CLASS',
1498: p_token1_value => p_ps_rec.class
1499: ) ;
1500: p_return_status := FND_API.G_RET_STS_ERROR;
1501: RETURN;
1502: END IF;
1503:
1504: /*-----------------------------------------------+
1517: p_message_name => 'AR_AAPI_NO_CUSTOMER_TRX_ID',
1518: p_token1_name => 'PAYMENT_SCHEDULE_ID',
1519: p_token1_value => to_char(p_adj_rec.payment_schedule_id)
1520: ) ;
1521: p_return_status := FND_API.G_RET_STS_ERROR;
1522: RETURN ;
1523:
1524: END IF;
1525:
1539: p_message_name => 'AR_AAPI_NO_CUSTOMER_ID',
1540: p_token1_name => 'PAYMENT_SCHEDULE_ID',
1541: p_token1_value => to_char(p_adj_rec.payment_schedule_id)
1542: ) ;
1543: p_return_status := FND_API.G_RET_STS_ERROR;
1544: RETURN ;
1545:
1546: END IF;
1547:
1579: /*-----------------------------------------------+
1580: | Set unexpected error message and status |
1581: +-----------------------------------------------*/
1582: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Validate_Payschd');
1583: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1584: RETURN;
1585: END ;
1586:
1587: IF ( l_count <> 1 ) THEN
1595: p_token1_value => to_char(p_adj_rec.customer_trx_line_id),
1596: p_token2_name => 'CUSTOMER_TRX_ID',
1597: p_token2_value => to_char(p_adj_rec.customer_trx_id)
1598: ) ;
1599: p_return_status := FND_API.G_RET_STS_ERROR;
1600: RETURN ;
1601:
1602: END IF ;
1603:
1618: p_token1_value => to_char(p_adj_rec.customer_trx_line_id),
1619: p_token2_name => 'TYPE',
1620: p_token2_value => p_ps_rec.class
1621: ) ;
1622: p_return_status := FND_API.G_RET_STS_ERROR;
1623: RETURN ;
1624: END IF;
1625:
1626: END IF;
1644: /*-----------------------------------------------+
1645: | Set unexpected error message and status |
1646: +-----------------------------------------------*/
1647: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME, 'Validate_Payschd' );
1648: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1649: RETURN;
1650:
1651: END Validate_Payschd;
1652:
1665: | |
1666: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1667: | arp_util.disable_debug |
1668: | arp_util.enable_debug |
1669: | fnd_api.g_exc_unexpected_error |
1670: | fnd_api.g_ret_sts_error |
1671: | fnd_api.g_ret_sts_error |
1672: | fnd_api.g_ret_sts_success |
1673: | fnd_api.to_boolean |
1666: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1667: | arp_util.disable_debug |
1668: | arp_util.enable_debug |
1669: | fnd_api.g_exc_unexpected_error |
1670: | fnd_api.g_ret_sts_error |
1671: | fnd_api.g_ret_sts_error |
1672: | fnd_api.g_ret_sts_success |
1673: | fnd_api.to_boolean |
1674: | |
1667: | arp_util.disable_debug |
1668: | arp_util.enable_debug |
1669: | fnd_api.g_exc_unexpected_error |
1670: | fnd_api.g_ret_sts_error |
1671: | fnd_api.g_ret_sts_error |
1672: | fnd_api.g_ret_sts_success |
1673: | fnd_api.to_boolean |
1674: | |
1675: | ARGUMENTS : IN: |
1668: | arp_util.enable_debug |
1669: | fnd_api.g_exc_unexpected_error |
1670: | fnd_api.g_ret_sts_error |
1671: | fnd_api.g_ret_sts_error |
1672: | fnd_api.g_ret_sts_success |
1673: | fnd_api.to_boolean |
1674: | |
1675: | ARGUMENTS : IN: |
1676: | p_ps_rec |
1669: | fnd_api.g_exc_unexpected_error |
1670: | fnd_api.g_ret_sts_error |
1671: | fnd_api.g_ret_sts_error |
1672: | fnd_api.g_ret_sts_success |
1673: | fnd_api.to_boolean |
1674: | |
1675: | ARGUMENTS : IN: |
1676: | p_ps_rec |
1677: | OUT: |
1709: /*------------------------------------------+
1710: | Initialize the return status to SUCCESS |
1711: +------------------------------------------*/
1712:
1713: p_return_status := FND_API.G_RET_STS_SUCCESS;
1714:
1715: /*-----------------------------------------------+
1716: | If the type is INVOICE then the amount must |
1717: | close the invoice |
1735: aapi_message(
1736: p_application_name =>'AR',
1737: p_message_name => 'AR_AAPI_ADR_ZERO_INV'
1738: ) ;
1739: p_return_status := FND_API.G_RET_STS_ERROR ;
1740: RETURN ;
1741: END IF;
1742: p_adj_rec.amount := - p_ps_rec.amount_due_remaining ;
1743: ELSE
1746: aapi_message(
1747: p_application_name =>'AR',
1748: p_message_name => 'AR_TW_VAL_AMT_ADJ_INV'
1749: ) ;
1750: p_return_status := FND_API.G_RET_STS_ERROR;
1751: RETURN;
1752: END IF;
1753: END IF;
1754: END IF;
1765: aapi_message(
1766: p_application_name =>'AR',
1767: p_message_name => 'AR_AAPI_ADJ_AMOUNT_ZERO'
1768: ) ;
1769: p_return_status := FND_API.G_RET_STS_ERROR;
1770: RETURN;
1771: END IF;
1772:
1773: /*------------------------------------------------+
1783: p_adj_rec.created_from LIKE 'SPLIT_MERGE%' OR
1784: p_adj_rec.created_from LIKE 'DMS_INTERFACE%' OR
1785: p_adj_rec.created_from LIKE 'ENHANCED_CASH%' )
1786: THEN
1787: l_approved_flag := FND_API.G_TRUE ;
1788: ELSE
1789: ar_adjvalidate_pub.Within_approval_limits (
1790: p_adj_rec.amount,
1791: p_ps_rec.invoice_currency_code,
1791: p_ps_rec.invoice_currency_code,
1792: l_approved_flag,
1793: l_return_status
1794: ) ;
1795: IF ( l_return_status <> FND_API.G_RET_STS_SUCCESS )
1796: THEN
1797: p_return_status := l_return_status ;
1798: RETURN;
1799: END IF ;
1805: +--------------------------------------------------*/
1806:
1807: IF ( p_adj_rec.status IS NULL or p_adj_rec.status = ' ' )
1808: THEN
1809: IF ( l_approved_flag = FND_API.G_TRUE )
1810: THEN
1811: p_adj_rec.status := 'A' ;
1812: ELSE
1813: p_adj_rec.status := 'W' ;
1825: p_message_name => 'AR_AAPI_INVALID_CREATE_STATUS',
1826: p_token1_name => 'STATUS',
1827: p_token1_value => p_adj_rec.status
1828: ) ;
1829: p_return_status := FND_API.G_RET_STS_ERROR ;
1830: RETURN ;
1831: END IF;
1832:
1833: /*-----------------------------------------------------+
1834: | Handle the case for setting status to W if outside |
1835: | approval limits during creation of Adjustments |
1836: +-----------------------------------------------------*/
1837:
1838: IF ( l_approved_flag = FND_API.G_FALSE AND p_adj_rec.status = 'A' )
1839: THEN
1840: p_adj_rec.status := 'W' ;
1841: END IF;
1842:
1858: /*-----------------------------------------------+
1859: | Set unexpected error message and status |
1860: +-----------------------------------------------*/
1861: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Validate_Amount');
1862: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1863: RETURN;
1864:
1865: END Validate_Amount;
1866:
1878: | |
1879: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1880: | arp_util.disable_debug |
1881: | arp_util.enable_debug |
1882: | fnd_api.g_exc_unexpected_error |
1883: | fnd_api.g_ret_sts_error |
1884: | fnd_api.g_ret_sts_error |
1885: | fnd_api.g_ret_sts_success |
1886: | fnd_api.to_boolean |
1879: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
1880: | arp_util.disable_debug |
1881: | arp_util.enable_debug |
1882: | fnd_api.g_exc_unexpected_error |
1883: | fnd_api.g_ret_sts_error |
1884: | fnd_api.g_ret_sts_error |
1885: | fnd_api.g_ret_sts_success |
1886: | fnd_api.to_boolean |
1887: | |
1880: | arp_util.disable_debug |
1881: | arp_util.enable_debug |
1882: | fnd_api.g_exc_unexpected_error |
1883: | fnd_api.g_ret_sts_error |
1884: | fnd_api.g_ret_sts_error |
1885: | fnd_api.g_ret_sts_success |
1886: | fnd_api.to_boolean |
1887: | |
1888: | ARGUMENTS : IN: |
1881: | arp_util.enable_debug |
1882: | fnd_api.g_exc_unexpected_error |
1883: | fnd_api.g_ret_sts_error |
1884: | fnd_api.g_ret_sts_error |
1885: | fnd_api.g_ret_sts_success |
1886: | fnd_api.to_boolean |
1887: | |
1888: | ARGUMENTS : IN: |
1889: | |
1882: | fnd_api.g_exc_unexpected_error |
1883: | fnd_api.g_ret_sts_error |
1884: | fnd_api.g_ret_sts_error |
1885: | fnd_api.g_ret_sts_success |
1886: | fnd_api.to_boolean |
1887: | |
1888: | ARGUMENTS : IN: |
1889: | |
1890: | OUT: |
1921: /*------------------------------------------+
1922: | Initialize the return status to ERROR |
1923: +------------------------------------------*/
1924:
1925: p_return_status := FND_API.G_RET_STS_ERROR;
1926:
1927: l_found := FALSE ;
1928:
1929: FOR l_index IN 1..G_RCVTRX_TBL.COUNT LOOP
2024: /*---------------------------------------------+
2025: |Set unexpected error message and status |
2026: +---------------------------------------------*/
2027: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Validate_Rcvtrxccid');
2028: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2029: RETURN;
2030: END ;
2031:
2032: IF ( l_count <> 1 )
2071: +-----------------------------------------------*/
2072:
2073: p_adj_rec.set_of_books_id := arp_global.set_of_books_id ;
2074:
2075: p_return_status := FND_API.G_RET_STS_SUCCESS ;
2076:
2077: IF PG_DEBUG in ('Y', 'C') THEN
2078: arp_util.debug('Validate_Rcvtrxccid()-', G_MSG_MEDIUM);
2079: END IF;
2089: /*-----------------------------------------------+
2090: | Set unexpected error message and status |
2091: +-----------------------------------------------*/
2092: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Validate_Rcvtrxccid');
2093: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2094:
2095: RETURN;
2096:
2097: END Validate_Rcvtrxccid;
2143: /*------------------------------------------+
2144: | Initialize the return status to ERROR |
2145: +------------------------------------------*/
2146:
2147: p_return_status := FND_API.G_RET_STS_ERROR;
2148:
2149: /*------------------------------------------+
2150: | The dates should not be null |
2151: +-----------------------------------------*/
2295: ) ;
2296: RETURN;
2297: END IF;
2298: ------------------------------------------------------------ */
2299: p_return_status := FND_API.G_RET_STS_SUCCESS;
2300:
2301: IF PG_DEBUG in ('Y', 'C') THEN
2302: arp_util.debug('Validate_dates()-', G_MSG_MEDIUM);
2303: END IF;
2313: /*-----------------------------------------------+
2314: | Set unexpected error message and status |
2315: +-----------------------------------------------*/
2316: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_dates' );
2317: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2318:
2319: RETURN;
2320:
2321: END Validate_dates;
2334: | |
2335: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2336: | arp_util.disable_debug |
2337: | arp_util.enable_debug |
2338: | fnd_api.g_exc_unexpected_error |
2339: | fnd_api.g_ret_sts_error |
2340: | fnd_api.g_ret_sts_error |
2341: | fnd_api.g_ret_sts_success |
2342: | fnd_api.to_boolean |
2335: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2336: | arp_util.disable_debug |
2337: | arp_util.enable_debug |
2338: | fnd_api.g_exc_unexpected_error |
2339: | fnd_api.g_ret_sts_error |
2340: | fnd_api.g_ret_sts_error |
2341: | fnd_api.g_ret_sts_success |
2342: | fnd_api.to_boolean |
2343: | |
2336: | arp_util.disable_debug |
2337: | arp_util.enable_debug |
2338: | fnd_api.g_exc_unexpected_error |
2339: | fnd_api.g_ret_sts_error |
2340: | fnd_api.g_ret_sts_error |
2341: | fnd_api.g_ret_sts_success |
2342: | fnd_api.to_boolean |
2343: | |
2344: | ARGUMENTS : IN: |
2337: | arp_util.enable_debug |
2338: | fnd_api.g_exc_unexpected_error |
2339: | fnd_api.g_ret_sts_error |
2340: | fnd_api.g_ret_sts_error |
2341: | fnd_api.g_ret_sts_success |
2342: | fnd_api.to_boolean |
2343: | |
2344: | ARGUMENTS : IN: |
2345: | OUT: |
2338: | fnd_api.g_exc_unexpected_error |
2339: | fnd_api.g_ret_sts_error |
2340: | fnd_api.g_ret_sts_error |
2341: | fnd_api.g_ret_sts_success |
2342: | fnd_api.to_boolean |
2343: | |
2344: | ARGUMENTS : IN: |
2345: | OUT: |
2346: | p_return_status |
2377: /*------------------------------------------+
2378: | Initialize the return status to SUCCESS |
2379: +------------------------------------------*/
2380:
2381: p_return_status := FND_API.G_RET_STS_SUCCESS;
2382:
2383: /*------------------------------------------------+
2384: | Document sequences are only applicable if the |
2385: | unique seq number option is not equal to N |
2395: p_message_name => 'AR_AAPI_DOC_SEQ_NOT_REQD',
2396: p_token1_name => 'DOCUMENT_SEQ',
2397: p_token1_value => to_char(p_adj_rec.doc_sequence_value)
2398: );
2399: p_return_status := FND_API.G_RET_STS_ERROR;
2400: END IF;
2401: RETURN ;
2402: END IF;
2403:
2434: p_message_name => 'AR_AAPI_DOC_SEQ_NOT_REQD',
2435: p_token1_name => 'DOCUMENT_SEQ',
2436: p_token1_value => to_char(p_adj_rec.doc_sequence_value)
2437: );
2438: p_return_status := FND_API.G_RET_STS_ERROR;
2439: RETURN ;
2440: END IF;
2441:
2442: /*-----------------------------------------+
2475: aapi_message(
2476: p_application_name =>'FND',
2477: p_message_name => 'UNIQUE-NO VALUE'
2478: );
2479: p_return_status := FND_API.G_RET_STS_ERROR;
2480: RETURN ;
2481: END IF;
2482:
2483: IF PG_DEBUG in ('Y', 'C') THEN
2499: aapi_message(
2500: p_application_name =>'FND',
2501: p_message_name => 'UNIQUE-ALWAYS USED'
2502: );
2503: p_return_status := FND_API.G_RET_STS_ERROR;
2504: ELSE
2505: p_adj_rec.doc_sequence_id := NULL;
2506: p_adj_rec.doc_sequence_value := NULL;
2507: END IF;
2515: /*-----------------------------------------------+
2516: | Set unexpected error message and status |
2517: +-----------------------------------------------*/
2518: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_doc_seq' );
2519: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2520: RETURN;
2521:
2522: END Validate_doc_seq;
2523:
2534: | |
2535: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2536: | arp_util.disable_debug |
2537: | arp_util.enable_debug |
2538: | fnd_api.g_exc_unexpected_error |
2539: | fnd_api.g_ret_sts_error |
2540: | fnd_api.g_ret_sts_error |
2541: | fnd_api.g_ret_sts_success |
2542: | fnd_api.to_boolean |
2535: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2536: | arp_util.disable_debug |
2537: | arp_util.enable_debug |
2538: | fnd_api.g_exc_unexpected_error |
2539: | fnd_api.g_ret_sts_error |
2540: | fnd_api.g_ret_sts_error |
2541: | fnd_api.g_ret_sts_success |
2542: | fnd_api.to_boolean |
2543: | |
2536: | arp_util.disable_debug |
2537: | arp_util.enable_debug |
2538: | fnd_api.g_exc_unexpected_error |
2539: | fnd_api.g_ret_sts_error |
2540: | fnd_api.g_ret_sts_error |
2541: | fnd_api.g_ret_sts_success |
2542: | fnd_api.to_boolean |
2543: | |
2544: | ARGUMENTS : IN: |
2537: | arp_util.enable_debug |
2538: | fnd_api.g_exc_unexpected_error |
2539: | fnd_api.g_ret_sts_error |
2540: | fnd_api.g_ret_sts_error |
2541: | fnd_api.g_ret_sts_success |
2542: | fnd_api.to_boolean |
2543: | |
2544: | ARGUMENTS : IN: |
2545: | |
2538: | fnd_api.g_exc_unexpected_error |
2539: | fnd_api.g_ret_sts_error |
2540: | fnd_api.g_ret_sts_error |
2541: | fnd_api.g_ret_sts_success |
2542: | fnd_api.to_boolean |
2543: | |
2544: | ARGUMENTS : IN: |
2545: | |
2546: | OUT: |
2575: /*------------------------------------------+
2576: | Initialize the return status to ERROR |
2577: +------------------------------------------*/
2578:
2579: p_return_status := FND_API.G_RET_STS_ERROR;
2580:
2581: /*------------------------------------------+
2582: | Validate only is value is provided |
2583: +------------------------------------------*/
2614: END IF;
2615:
2616: END IF ;
2617:
2618: p_return_status := FND_API.G_RET_STS_SUCCESS ;
2619:
2620: IF PG_DEBUG in ('Y', 'C') THEN
2621: arp_util.debug('Validate_Reason_Code()-', G_MSG_MEDIUM);
2622: END IF;
2632: /*-----------------------------------------------+
2633: | Set unexpected error message and status |
2634: +-----------------------------------------------*/
2635: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_Reason_code' );
2636: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2637:
2638: RETURN;
2639:
2640: END Validate_Reason_code;
2683: /*------------------------------------------+
2684: | Initialize the return status to SUCCESS |
2685: +------------------------------------------*/
2686:
2687: p_return_status := FND_API.G_RET_STS_SUCCESS;
2688:
2689: /*------------------------------------------+
2690: | Get the flexfield name |
2691: +------------------------------------------*/
2709: /*-----------------------------------------------+
2710: | Set unexpected error message and status |
2711: +-----------------------------------------------*/
2712: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_Desc_Flexfield' );
2713: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2714: RETURN;
2715: END ;
2716:
2717:
2738: fnd_flex_descval.set_column_value('ATTRIBUTE15', p_adj_rec.attribute15);
2739:
2740: IF ( NOT fnd_flex_descval.validate_desccols ('AR', l_flex_name) )
2741: THEN
2742: p_return_status := FND_API.G_RET_STS_ERROR;
2743: aapi_message(
2744: p_application_name =>'AR',
2745: p_message_name => 'AR_AAPI_INVALID_DESC_FLEX'
2746: ) ;
2759: /*-----------------------------------------------+
2760: | Set unexpected error message and status |
2761: +-----------------------------------------------*/
2762: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_Desc_Flexfield' );
2763: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2764:
2765: RETURN;
2766:
2767: END Validate_Desc_Flexfield;
2778: | |
2779: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2780: | arp_util.disable_debug |
2781: | arp_util.enable_debug |
2782: | fnd_api.g_exc_unexpected_error |
2783: | fnd_api.g_ret_sts_error |
2784: | fnd_api.g_ret_sts_error |
2785: | fnd_api.g_ret_sts_success |
2786: | fnd_api.to_boolean |
2779: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2780: | arp_util.disable_debug |
2781: | arp_util.enable_debug |
2782: | fnd_api.g_exc_unexpected_error |
2783: | fnd_api.g_ret_sts_error |
2784: | fnd_api.g_ret_sts_error |
2785: | fnd_api.g_ret_sts_success |
2786: | fnd_api.to_boolean |
2787: | |
2780: | arp_util.disable_debug |
2781: | arp_util.enable_debug |
2782: | fnd_api.g_exc_unexpected_error |
2783: | fnd_api.g_ret_sts_error |
2784: | fnd_api.g_ret_sts_error |
2785: | fnd_api.g_ret_sts_success |
2786: | fnd_api.to_boolean |
2787: | |
2788: | ARGUMENTS : IN: |
2781: | arp_util.enable_debug |
2782: | fnd_api.g_exc_unexpected_error |
2783: | fnd_api.g_ret_sts_error |
2784: | fnd_api.g_ret_sts_error |
2785: | fnd_api.g_ret_sts_success |
2786: | fnd_api.to_boolean |
2787: | |
2788: | ARGUMENTS : IN: |
2789: | p_adj_rec |
2782: | fnd_api.g_exc_unexpected_error |
2783: | fnd_api.g_ret_sts_error |
2784: | fnd_api.g_ret_sts_error |
2785: | fnd_api.g_ret_sts_success |
2786: | fnd_api.to_boolean |
2787: | |
2788: | ARGUMENTS : IN: |
2789: | p_adj_rec |
2790: | OUT: |
2815: /*------------------------------------------+
2816: | Initialize the return status to SUCCESS |
2817: +------------------------------------------*/
2818:
2819: p_return_status := FND_API.G_RET_STS_SUCCESS;
2820:
2821: IF ( p_adj_rec.created_from IS NULL OR
2822: p_adj_rec.created_from = ' ' )
2823: THEN
2827: aapi_message(
2828: p_application_name =>'AR',
2829: p_message_name => 'AR_AAPI_NO_CREATED_FROM'
2830: ) ;
2831: p_return_status := FND_API.G_RET_STS_ERROR;
2832: RETURN ;
2833: END IF;
2834:
2835:
2849: | Set unexpected error message and status |
2850: +-----------------------------------------------*/
2851: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Validate_Created_From'
2852: );
2853: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2854: RETURN;
2855:
2856: END Validate_Created_From;
2857:
2868: | |
2869: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2870: | arp_util.disable_debug |
2871: | arp_util.enable_debug |
2872: | fnd_api.g_exc_unexpected_error |
2873: | fnd_api.g_ret_sts_error |
2874: | fnd_api.g_ret_sts_error |
2875: | fnd_api.g_ret_sts_success |
2876: | fnd_api.to_boolean |
2869: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
2870: | arp_util.disable_debug |
2871: | arp_util.enable_debug |
2872: | fnd_api.g_exc_unexpected_error |
2873: | fnd_api.g_ret_sts_error |
2874: | fnd_api.g_ret_sts_error |
2875: | fnd_api.g_ret_sts_success |
2876: | fnd_api.to_boolean |
2877: | |
2870: | arp_util.disable_debug |
2871: | arp_util.enable_debug |
2872: | fnd_api.g_exc_unexpected_error |
2873: | fnd_api.g_ret_sts_error |
2874: | fnd_api.g_ret_sts_error |
2875: | fnd_api.g_ret_sts_success |
2876: | fnd_api.to_boolean |
2877: | |
2878: | ARGUMENTS : IN: |
2871: | arp_util.enable_debug |
2872: | fnd_api.g_exc_unexpected_error |
2873: | fnd_api.g_ret_sts_error |
2874: | fnd_api.g_ret_sts_error |
2875: | fnd_api.g_ret_sts_success |
2876: | fnd_api.to_boolean |
2877: | |
2878: | ARGUMENTS : IN: |
2879: | OUT: |
2872: | fnd_api.g_exc_unexpected_error |
2873: | fnd_api.g_ret_sts_error |
2874: | fnd_api.g_ret_sts_error |
2875: | fnd_api.g_ret_sts_success |
2876: | fnd_api.to_boolean |
2877: | |
2878: | ARGUMENTS : IN: |
2879: | OUT: |
2880: | p_return_status |
2907: /*------------------------------------------+
2908: | Initialize the return status to ERROR |
2909: +------------------------------------------*/
2910:
2911: p_return_status := FND_API.G_RET_STS_ERROR;
2912:
2913: /*------------------------------------------+
2914: | Validate based on option |
2915: +------------------------------------------*/
2925: G_USSGL_TBL(l_index).ussgl_code)
2926: THEN
2927: p_adj_rec.ussgl_transaction_code_context :=
2928: G_USSGL_TBL(l_index).ussgl_context;
2929: p_return_status := FND_API.G_RET_STS_SUCCESS;
2930: EXIT ;
2931: END IF;
2932:
2933: END LOOP;
2931: END IF;
2932:
2933: END LOOP;
2934:
2935: IF ( p_return_status <> FND_API.G_RET_STS_SUCCESS )
2936: THEN
2937: /*-----------------------------------------------+
2938: | Set the message |
2939: +-----------------------------------------------*/
2961: p_token1_value => p_adj_rec.ussgl_transaction_code
2962: ) ;
2963: RETURN;
2964: ELSE
2965: p_return_status := FND_API.G_RET_STS_SUCCESS;
2966: END IF ;
2967: END IF ;
2968:
2969: IF PG_DEBUG in ('Y', 'C') THEN
2981: /*-----------------------------------------------+
2982: | Set unexpected error message and status |
2983: +-----------------------------------------------*/
2984: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME, 'Validate_Ussgl_code' );
2985: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2986:
2987: RETURN;
2988:
2989: END Validate_Ussgl_code;
3000: | |
3001: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
3002: | arp_util.disable_debug |
3003: | arp_util.enable_debug |
3004: | fnd_api.g_exc_unexpected_error |
3005: | fnd_api.g_ret_sts_error |
3006: | fnd_api.g_ret_sts_error |
3007: | fnd_api.g_ret_sts_success |
3008: | fnd_api.to_boolean |
3001: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |
3002: | arp_util.disable_debug |
3003: | arp_util.enable_debug |
3004: | fnd_api.g_exc_unexpected_error |
3005: | fnd_api.g_ret_sts_error |
3006: | fnd_api.g_ret_sts_error |
3007: | fnd_api.g_ret_sts_success |
3008: | fnd_api.to_boolean |
3009: | |
3002: | arp_util.disable_debug |
3003: | arp_util.enable_debug |
3004: | fnd_api.g_exc_unexpected_error |
3005: | fnd_api.g_ret_sts_error |
3006: | fnd_api.g_ret_sts_error |
3007: | fnd_api.g_ret_sts_success |
3008: | fnd_api.to_boolean |
3009: | |
3010: | ARGUMENTS : IN: |
3003: | arp_util.enable_debug |
3004: | fnd_api.g_exc_unexpected_error |
3005: | fnd_api.g_ret_sts_error |
3006: | fnd_api.g_ret_sts_error |
3007: | fnd_api.g_ret_sts_success |
3008: | fnd_api.to_boolean |
3009: | |
3010: | ARGUMENTS : IN: |
3011: | p_adj_rec |
3004: | fnd_api.g_exc_unexpected_error |
3005: | fnd_api.g_ret_sts_error |
3006: | fnd_api.g_ret_sts_error |
3007: | fnd_api.g_ret_sts_success |
3008: | fnd_api.to_boolean |
3009: | |
3010: | ARGUMENTS : IN: |
3011: | p_adj_rec |
3012: | |
3041: /*------------------------------------------+
3042: | Initialize the return status to SUCCESS |
3043: +------------------------------------------*/
3044:
3045: p_return_status := FND_API.G_RET_STS_SUCCESS;
3046:
3047: IF ( p_adj_rec.associated_cash_receipt_id IS NOT NULL AND
3048: p_adj_rec.associated_cash_receipt_id <> 0 )
3049: THEN
3068: p_message_name => 'AR_AAPI_INVALID_RECEIPT_ID',
3069: p_token1_name =>'ASSOCIATED_CASH_RECEIPT_ID',
3070: p_token1_value =>to_char(p_adj_rec.associated_cash_receipt_id)
3071: ) ;
3072: p_return_status := FND_API.G_RET_STS_ERROR;
3073: RETURN;
3074: END IF;
3075:
3076: END IF ;
3092: /*-----------------------------------------------+
3093: | Set unexpected error message and status |
3094: +-----------------------------------------------*/
3095: FND_MSG_PUB.Add_Exc_Msg (G_PKG_NAME,'Validate_Associated_Receipt');
3096: p_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3097: RETURN;
3098:
3099: END Validate_Associated_Receipt;
3100: END ar_adjvalidate_pub;