175: IF PG_DEBUG in ('Y', 'C') THEN
176: arp_util.debug( '>>>>>>>>>> The doc sequence does not exist for the current document');
177: END IF;
178:
179: FND_MESSAGE.Set_Name( 'AR','AR_BR_DOC_SEQ_NOT_EXIST_A');
180: app_exception.raise_exception;
181:
182: ELSIF (l_doc_seq_ret_stat = -2) THEN
183:
222: --in a value for the document sequence number in this case.
223: IF PG_DEBUG in ('Y', 'C') THEN
224: arp_util.debug( '>>>>>>>>>> The user is not supposed to pass in a value in this case');
225: END IF;
226: FND_MESSAGE.Set_Name('AR', 'AR_BR_DOC_SEQ_AUTOMATIC');
227: app_exception.raise_exception;
228: END IF;
229:
230: p_trx_rec.doc_sequence_value := l_doc_sequence_value;
258: THEN
259: IF PG_DEBUG in ('Y', 'C') THEN
260: arp_util.debug( '>>>>>>>>>> A - pg_profile_doc_seq : ' || pg_profile_doc_seq);
261: END IF;
262: FND_MESSAGE.Set_Name('AR', 'AR_BR_DOC_SEQ_VALUE_NULL_A');
263: FND_MESSAGE.Set_Token('SEQUENCE', l_doc_sequence_name);
264: app_exception.raise_exception;
265:
266: ELSIF (NVL(pg_profile_doc_seq,'N') = 'P')
259: IF PG_DEBUG in ('Y', 'C') THEN
260: arp_util.debug( '>>>>>>>>>> A - pg_profile_doc_seq : ' || pg_profile_doc_seq);
261: END IF;
262: FND_MESSAGE.Set_Name('AR', 'AR_BR_DOC_SEQ_VALUE_NULL_A');
263: FND_MESSAGE.Set_Token('SEQUENCE', l_doc_sequence_name);
264: app_exception.raise_exception;
265:
266: ELSIF (NVL(pg_profile_doc_seq,'N') = 'P')
267: THEN
268: --Warning
269: IF PG_DEBUG in ('Y', 'C') THEN
270: arp_util.debug( '>>>>>>>>>> P - pg_profile_doc_seq : ' || pg_profile_doc_seq);
271: END IF;
272: FND_MESSAGE.SET_NAME('AR','AR_BR_DOC_SEQ_VALUE_NULL_P');
273: app_exception.raise_exception;
274:
275: END IF;
276:
291: IF (pg_profile_doc_seq = 'A' ) THEN
292: IF PG_DEBUG in ('Y', 'C') THEN
293: arp_util.debug( '>>>>>>>>>> no_data_found raised - pg_profile_doc_seq = A');
294: END IF;
295: FND_MESSAGE.Set_Name( 'FND','UNIQUE-ALWAYS USED');
296: app_exception.raise_exception;
297: ELSE
298: IF PG_DEBUG in ('Y', 'C') THEN
299: arp_util.debug( '>>>>>>>>>> no_data_found raised - pg_profile_doc_seq : ' || pg_profile_doc_seq);
329: WHEN NO_DATA_FOUND THEN
330: IF PG_DEBUG in ('Y', 'C') THEN
331: arp_util.debug( '>>>>>>>>>> Bacth Source does not exist');
332: END IF;
333: FND_MESSAGE.Set_Name( 'AR','AR_BR_INVALID_BATCH_SOURCE');
334: app_exception.raise_exception;
335: WHEN OTHERS THEN
336: IF PG_DEBUG in ('Y', 'C') THEN
337: arp_util.debug( '>>>>>>>>>> Failed when fetching copy doc number flag');
393: BEGIN
394: arp_util.debug('AR_BILLS_MAINTAIN_LIB_PVT.Set_API_Error ()+');
395:
396: FND_MSG_PUB.Get (FND_MSG_PUB.G_FIRST, FND_API.G_TRUE, l_data, l_msg_index_out);
397: FND_MESSAGE.Set_Encoded (l_data);
398: app_exception.raise_exception;
399: arp_util.debug('AR_BILLS_MAINTAIN_LIB_PVT.Set_API_Error ()-');
400:
401: EXCEPTION
890: IF (l_msg_count > 0)
891: THEN
892: Set_Api_Error;
893: ELSE
894: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_CREATE_ADJ');
895: app_exception.raise_exception;
896: END IF;
897:
898: END IF;
1048: IF (l_msg_count > 0)
1049: THEN
1050: Set_Api_Error;
1051: ELSE
1052: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_APPROVE_ADJ');
1053: app_exception.raise_exception;
1054: END IF;
1055:
1056: END IF;
1152: IF (l_msg_count > 0)
1153: THEN
1154: Set_Api_Error;
1155: ELSE
1156: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_MODIFY_ADJ');
1157: app_exception.raise_exception;
1158: END IF;
1159:
1160: END IF;
1265: IF (l_msg_count > 0)
1266: THEN
1267: Set_Api_Error;
1268: ELSE
1269: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_REVERSE_ADJ');
1270: app_exception.raise_exception;
1271: END IF;
1272: ELSE -- Bug 8795268 Line Level for invoice is not maintained correctly.
1273: begin
1669: IF (l_msg_count > 0)
1670: THEN
1671: Set_Api_Error;
1672: ELSE
1673: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_REVERSE_REC');
1674: app_exception.raise_exception;
1675: END IF;
1676:
1677: END IF;
1783: IF (l_msg_count > 0)
1784: THEN
1785: Set_Api_Error;
1786: ELSE
1787: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_UNAPPLY_REC');
1788: app_exception.raise_exception;
1789: END IF;
1790:
1791: END IF;
1933: IF (l_msg_count > 0)
1934: THEN
1935: Set_Api_Error;
1936: ELSE
1937: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_APPLY_REC');
1938: app_exception.raise_exception;
1939: END IF;
1940:
1941: END IF;
2048: IF (l_msg_count > 0)
2049: THEN
2050: Set_Api_Error;
2051: ELSE
2052: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_UNAPPLY_REC');
2053: app_exception.raise_exception;
2054: END IF;
2055:
2056: END IF;
2235: ELSE
2236: IF PG_DEBUG in ('Y', 'C') THEN
2237: arp_util.debug( '>>>>>>>>>> Invalid Action - Case not implemented ');
2238: END IF;
2239: FND_MESSAGE.set_name ( 'AR', 'AR_BR_ACTION_FORBIDDEN' );
2240: FND_MESSAGE.Set_token ( 'ACTION', C_UNPAID);
2241: app_exception.raise_exception;
2242:
2243: END IF;
2236: IF PG_DEBUG in ('Y', 'C') THEN
2237: arp_util.debug( '>>>>>>>>>> Invalid Action - Case not implemented ');
2238: END IF;
2239: FND_MESSAGE.set_name ( 'AR', 'AR_BR_ACTION_FORBIDDEN' );
2240: FND_MESSAGE.Set_token ( 'ACTION', C_UNPAID);
2241: app_exception.raise_exception;
2242:
2243: END IF;
2244:
2401: IF (l_msg_count > 0)
2402: THEN
2403: Set_Api_Error;
2404: ELSE
2405: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_CREATE_REC');
2406: app_exception.raise_exception;
2407: END IF;
2408:
2409: END IF;
2577: IF (l_msg_count > 0)
2578: THEN
2579: Set_Api_Error;
2580: ELSE
2581: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_CREATE_APPLY_REC');
2582: app_exception.raise_exception;
2583: END IF;
2584:
2585: END IF;
2706: IF (l_msg_count > 0)
2707: THEN
2708: Set_Api_Error;
2709: ELSE
2710: FND_MESSAGE.SET_NAME ('AR', 'AR_BR_CANNOT_APPLY_REC');
2711: app_exception.raise_exception;
2712: END IF;
2713:
2714: END IF;