69: SAVEPOINT Get_TransactionAmount_PVT;
70:
71: l_stmt_num := 0;
72:
73: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
74: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin','Get_TransactionAmount <<');
75: END IF;
76:
77: /************************************************
70:
71: l_stmt_num := 0;
72:
73: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
74: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin','Get_TransactionAmount <<');
75: END IF;
76:
77: /************************************************
78: * Standard call to check for call compatibility *
123: FROM ap_invoice_distributions APID
124: WHERE APID.invoice_distribution_id = p_rcv_accttxn.inv_distribution_id;
125: END IF;
126:
127: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
128: l_api_message := 'Transaction Amount : '||l_transaction_amount;
129: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
130: END IF;
131:
125: END IF;
126:
127: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
128: l_api_message := 'Transaction Amount : '||l_transaction_amount;
129: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
130: END IF;
131:
132: /*****************************************************************
133: * For encumbrance reversal transactions , only reverse encumbrance *
155: INTO l_po_amount_ordered, l_po_amount_delivered
156: FROM po_distributions POD
157: WHERE po_distribution_id = p_rcv_accttxn.po_distribution_id;
158:
159: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
160: l_api_message := substr('l_rcv_txn_type : '||l_rcv_txn_type||
161: ' l_par_rcv_txn_type : '||l_par_rcv_txn_type||
162: ' l_po_amount_ordered : '||l_po_amount_ordered||
163: ' l_po_amount_delivered : '||l_po_amount_delivered, 1, 1000);
160: l_api_message := substr('l_rcv_txn_type : '||l_rcv_txn_type||
161: ' l_par_rcv_txn_type : '||l_par_rcv_txn_type||
162: ' l_po_amount_ordered : '||l_po_amount_ordered||
163: ' l_po_amount_delivered : '||l_po_amount_delivered, 1, 1000);
164: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
165: END IF;
166:
167: l_stmt_num := 70;
168: IF(l_rcv_txn_type = 'DELIVER' OR
195: END IF;
196:
197: x_transaction_amount := l_transaction_amount;
198:
199: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
200: l_api_message := 'x_transaction_amount : '||x_transaction_amount;
201: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
202: END IF;
203:
197: x_transaction_amount := l_transaction_amount;
198:
199: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
200: l_api_message := 'x_transaction_amount : '||x_transaction_amount;
201: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
202: END IF;
203:
204: /*****************************
205: * Standard check of p_commit *
212: * Standard Call to get message count and if count = 1, get message info *
213: ************************************************************************/
214: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,p_data => x_msg_data );
215:
216: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
217: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.end','Get_TransactionAmount >>');
218: END IF;
219: EXCEPTION
220: WHEN FND_API.g_exc_error THEN
213: ************************************************************************/
214: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,p_data => x_msg_data );
215:
216: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
217: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.end','Get_TransactionAmount >>');
218: END IF;
219: EXCEPTION
220: WHEN FND_API.g_exc_error THEN
221: ROLLBACK TO Get_TransactionAmount_PVT;
228: WHEN OTHERS THEN
229: ROLLBACK TO Get_TransactionAmount_PVT;
230: x_return_status := fnd_api.g_ret_sts_unexp_error ;
231:
232: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
233: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,'Get_TransactionAmount : '||l_stmt_num||' : '||substr(SQLERRM,1,200));
234: END IF;
235:
236: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
229: ROLLBACK TO Get_TransactionAmount_PVT;
230: x_return_status := fnd_api.g_ret_sts_unexp_error ;
231:
232: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
233: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,'Get_TransactionAmount : '||l_stmt_num||' : '||substr(SQLERRM,1,200));
234: END IF;
235:
236: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
237: FND_MSG_PUB.add_exc_msg( G_PKG_NAME,l_api_name || 'Statement -'||to_char(l_stmt_num));
295: SAVEPOINT Get_HookAccount_PVT;
296:
297: l_stmt_num := 0;
298:
299: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
300: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin','Get_HookAccount <<');
301: END IF;
302:
303: /************************************************
296:
297: l_stmt_num := 0;
298:
299: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
300: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin','Get_HookAccount <<');
301: END IF;
302:
303: /************************************************
304: * Standard call to check for call compatibility *
333: );
334:
335: IF l_return_status <> FND_API.g_ret_sts_success THEN
336: l_api_message := 'Error in Account Hook';
337: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
338: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,'Get_HookAccount : '||l_stmt_num||' : '||l_api_message);
339: END IF;
340: RAISE FND_API.g_exc_unexpected_error;
341: END IF;
334:
335: IF l_return_status <> FND_API.g_ret_sts_success THEN
336: l_api_message := 'Error in Account Hook';
337: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
338: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,'Get_HookAccount : '||l_stmt_num||' : '||l_api_message);
339: END IF;
340: RAISE FND_API.g_exc_unexpected_error;
341: END IF;
342:
351: AND GCC.code_combination_id = l_dist_acct_id;
352: IF (l_account_flag = 0) THEN
353: FND_MESSAGE.set_name('PO','PO_INVALID_ACCOUNT');
354: FND_MSG_pub.add;
355: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
356: FND_LOG.message(FND_LOG.LEVEL_ERROR,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,FALSE);
357: END IF;
358: RAISE FND_API.g_exc_error;
359: END IF;
352: IF (l_account_flag = 0) THEN
353: FND_MESSAGE.set_name('PO','PO_INVALID_ACCOUNT');
354: FND_MSG_pub.add;
355: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
356: FND_LOG.message(FND_LOG.LEVEL_ERROR,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,FALSE);
357: END IF;
358: RAISE FND_API.g_exc_error;
359: END IF;
360: END IF;
360: END IF;
361:
362: x_distribution_acct_id := l_dist_acct_id;
363:
364: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
365: l_api_message := 'x_distribution_acct_id : '||x_distribution_acct_id;
366: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
367: END IF;
368:
362: x_distribution_acct_id := l_dist_acct_id;
363:
364: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
365: l_api_message := 'x_distribution_acct_id : '||x_distribution_acct_id;
366: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
367: END IF;
368:
369: /*****************************
370: * Standard check of p_commit *
377: * Standard Call to get message count and if count = 1, get message info *
378: ************************************************************************/
379: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,p_data => x_msg_data );
380:
381: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
382: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.end','Get_HookAccount >>');
383: END IF;
384: EXCEPTION
385: WHEN FND_API.g_exc_error THEN
378: ************************************************************************/
379: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,p_data => x_msg_data );
380:
381: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
382: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.end','Get_HookAccount >>');
383: END IF;
384: EXCEPTION
385: WHEN FND_API.g_exc_error THEN
386: ROLLBACK TO Get_HookAccount_PVT;
392: FND_MSG_PUB.count_and_get( p_count => x_msg_count, p_data => x_msg_data);
393: WHEN OTHERS THEN
394: ROLLBACK TO Get_HookAccount_PVT;
395: x_return_status := fnd_api.g_ret_sts_unexp_error ;
396: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
397: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,'Get_HookAccount : '||l_stmt_num||' : '||substr(SQLERRM,1,200));
398: END IF;
399: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)THEN
400: FND_MSG_PUB.add_exc_msg( G_PKG_NAME,l_api_name || 'Statement -'||to_char(l_stmt_num));
393: WHEN OTHERS THEN
394: ROLLBACK TO Get_HookAccount_PVT;
395: x_return_status := fnd_api.g_ret_sts_unexp_error ;
396: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
397: FND_LOG.string(FND_LOG.LEVEL_UNEXPECTED,G_LOG_HEAD || '.'||l_api_name||l_stmt_num,'Get_HookAccount : '||l_stmt_num||' : '||substr(SQLERRM,1,200));
398: END IF;
399: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error)THEN
400: FND_MSG_PUB.add_exc_msg( G_PKG_NAME,l_api_name || 'Statement -'||to_char(l_stmt_num));
401: END IF;
462: SAVEPOINT get_quantity_pvt;
463: l_stmt_num := 0;
464:
465: IF g_debug = 'Y'
466: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
467: THEN
468: fnd_log.STRING (fnd_log.level_procedure,
469: g_log_head || '.' || l_api_name || '.begin',
470: 'Get_Quantity <<'
464:
465: IF g_debug = 'Y'
466: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
467: THEN
468: fnd_log.STRING (fnd_log.level_procedure,
469: g_log_head || '.' || l_api_name || '.begin',
470: 'Get_Quantity <<'
471: );
472: END IF;
572: FROM po_distributions pod
573: WHERE pod.po_distribution_id = p_rcv_accttxn.po_distribution_id;
574:
575: IF g_debug = 'Y'
576: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
577: THEN
578: l_api_message :=
579: SUBSTR ( 'l_rcv_txn_type : '
580: || l_rcv_txn_type
590: || l_po_quantity_delivered,
591: 1,
592: 1000
593: );
594: fnd_log.STRING (fnd_log.level_statement,
595: g_log_head || '.' || l_api_name || '.'
596: || l_stmt_num,
597: l_api_message
598: );
661:
662: x_source_doc_quantity := l_source_doc_quantity;
663:
664: IF g_debug = 'Y'
665: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
666: THEN
667: l_api_message := 'x_source_doc_quantity : ' || x_source_doc_quantity;
668: fnd_log.STRING (fnd_log.level_statement,
669: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
664: IF g_debug = 'Y'
665: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
666: THEN
667: l_api_message := 'x_source_doc_quantity : ' || x_source_doc_quantity;
668: fnd_log.STRING (fnd_log.level_statement,
669: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
670: l_api_message
671: );
672: END IF;
681: fnd_msg_pub.count_and_get (p_count => x_msg_count,
682: p_data => x_msg_data);
683:
684: IF g_debug = 'Y'
685: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
686: THEN
687: fnd_log.STRING (fnd_log.level_procedure,
688: g_log_head || '.' || l_api_name || '.end',
689: 'Get_Quantity >>'
683:
684: IF g_debug = 'Y'
685: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
686: THEN
687: fnd_log.STRING (fnd_log.level_procedure,
688: g_log_head || '.' || l_api_name || '.end',
689: 'Get_Quantity >>'
690: );
691: END IF;
709: ROLLBACK TO get_quantity_pvt;
710: x_return_status := fnd_api.g_ret_sts_unexp_error;
711:
712: IF g_debug = 'Y'
713: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
714: THEN
715: fnd_log.STRING (fnd_log.level_unexpected,
716: g_log_head || '.' || l_api_name || l_stmt_num,
717: 'Get_Quantity : '
711:
712: IF g_debug = 'Y'
713: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
714: THEN
715: fnd_log.STRING (fnd_log.level_unexpected,
716: g_log_head || '.' || l_api_name || l_stmt_num,
717: 'Get_Quantity : '
718: || l_stmt_num
719: || ' : '
810: SAVEPOINT get_unitprice_pvt;
811: l_stmt_num := 0;
812:
813: IF g_debug = 'Y'
814: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
815: THEN
816: fnd_log.STRING (fnd_log.level_procedure,
817: g_log_head || '.' || l_api_name || '.begin',
818: 'Get_UnitPrice <<'
812:
813: IF g_debug = 'Y'
814: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
815: THEN
816: fnd_log.STRING (fnd_log.level_procedure,
817: g_log_head || '.' || l_api_name || '.begin',
818: 'Get_UnitPrice <<'
819: );
820: END IF;
875: fnd_message.set_name ('PO', 'PO_INVALID_ITEM');
876: fnd_msg_pub.ADD;
877:
878: IF g_debug = 'Y'
879: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
880: THEN
881: fnd_log.MESSAGE (fnd_log.level_error,
882: g_log_head || '.' || l_api_name
883: || l_stmt_num,
877:
878: IF g_debug = 'Y'
879: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
880: THEN
881: fnd_log.MESSAGE (fnd_log.level_error,
882: g_log_head || '.' || l_api_name
883: || l_stmt_num,
884: FALSE
885: );
905: fnd_message.set_name ('PO', 'PO_INVALID_ITEM');
906: fnd_msg_pub.ADD;
907:
908: IF g_debug = 'Y'
909: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
910: THEN
911: fnd_log.MESSAGE (fnd_log.level_error,
912: g_log_head || '.' || l_api_name
913: || l_stmt_num,
907:
908: IF g_debug = 'Y'
909: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
910: THEN
911: fnd_log.MESSAGE (fnd_log.level_error,
912: g_log_head || '.' || l_api_name
913: || l_stmt_num,
914: FALSE
915: );
926: END IF;
927: END IF;
928:
929: IF g_debug = 'Y'
930: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
931: THEN
932: l_api_message := 'l_ic_pricing_option : ' || l_ic_pricing_option;
933: fnd_log.STRING (fnd_log.level_statement,
934: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
929: IF g_debug = 'Y'
930: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
931: THEN
932: l_api_message := 'l_ic_pricing_option : ' || l_ic_pricing_option;
933: fnd_log.STRING (fnd_log.level_statement,
934: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
935: l_api_message
936: );
937: END IF;
975: -- to create the intercompany invoices.
976: l_stmt_num := 60;
977:
978: IF g_debug = 'Y'
979: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
980: THEN
981: l_api_message :=
982: 'Calling get_transfer_price API : '
983: || ' l_from_org_id : '
989: || ' item_id : '
990: || p_rcv_accttxn.item_id
991: || ' p_transaction_id : '
992: || p_rcv_accttxn.rcv_transaction_id;
993: fnd_log.STRING (fnd_log.level_event,
994: g_log_head || '.' || l_api_name || '.'
995: || l_stmt_num,
996: l_api_message
997: );
1018:
1019: IF l_return_status <> fnd_api.g_ret_sts_success
1020: THEN
1021: IF g_debug = 'Y'
1022: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1023: THEN
1024: l_api_message := 'Error getting transfer price';
1025: fnd_log.STRING (fnd_log.level_unexpected,
1026: g_log_head || '.' || l_api_name || l_stmt_num,
1021: IF g_debug = 'Y'
1022: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1023: THEN
1024: l_api_message := 'Error getting transfer price';
1025: fnd_log.STRING (fnd_log.level_unexpected,
1026: g_log_head || '.' || l_api_name || l_stmt_num,
1027: l_api_message
1028: );
1029: END IF;
1031: RAISE fnd_api.g_exc_unexpected_error;
1032: END IF;
1033:
1034: IF g_debug = 'Y'
1035: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
1036: THEN
1037: l_api_message :=
1038: SUBSTR ( 'l_transfer_price : '
1039: || l_transfer_price
1044: || ' l_incr_currency_code : '
1045: || l_incr_currency_code,
1046: 1000
1047: );
1048: fnd_log.STRING (fnd_log.level_statement,
1049: g_log_head || '.' || l_api_name || l_stmt_num,
1050: 'Get_TransferPrice : '
1051: || l_stmt_num
1052: || ' : '
1082: x_unit_price := l_unit_price;
1083: x_currency_code := l_currency_code;
1084:
1085: IF g_debug = 'Y'
1086: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
1087: THEN
1088: l_api_message :=
1089: SUBSTR ( 'x_ic_pricing_option : '
1090: || x_intercompany_pricing_option
1098: || x_incr_transfer_price,
1099: 1,
1100: 1000
1101: );
1102: fnd_log.STRING (fnd_log.level_statement,
1103: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
1104: l_api_message
1105: );
1106: END IF;
1115: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1116: p_data => x_msg_data);
1117:
1118: IF g_debug = 'Y'
1119: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1120: THEN
1121: fnd_log.STRING (fnd_log.level_procedure,
1122: g_log_head || '.' || l_api_name || '.end',
1123: 'Get_UnitPrice >>'
1117:
1118: IF g_debug = 'Y'
1119: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1120: THEN
1121: fnd_log.STRING (fnd_log.level_procedure,
1122: g_log_head || '.' || l_api_name || '.end',
1123: 'Get_UnitPrice >>'
1124: );
1125: END IF;
1143: ROLLBACK TO get_unitprice_pvt;
1144: x_return_status := fnd_api.g_ret_sts_unexp_error;
1145:
1146: IF g_debug = 'Y'
1147: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1148: THEN
1149: fnd_log.STRING (fnd_log.level_unexpected,
1150: g_log_head || '.' || l_api_name || l_stmt_num,
1151: 'Get_UnitPrice : '
1145:
1146: IF g_debug = 'Y'
1147: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1148: THEN
1149: fnd_log.STRING (fnd_log.level_unexpected,
1150: g_log_head || '.' || l_api_name || l_stmt_num,
1151: 'Get_UnitPrice : '
1152: || l_stmt_num
1153: || ' : '
1234: SAVEPOINT get_unittax_pvt;
1235: l_stmt_num := 0;
1236:
1237: IF g_debug = 'Y'
1238: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1239: THEN
1240: fnd_log.STRING (fnd_log.level_procedure,
1241: g_log_head || '.' || l_api_name || '.begin',
1242: 'Get_UnitTax <<'
1236:
1237: IF g_debug = 'Y'
1238: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1239: THEN
1240: fnd_log.STRING (fnd_log.level_procedure,
1241: g_log_head || '.' || l_api_name || '.begin',
1242: 'Get_UnitTax <<'
1243: );
1244: END IF;
1294: THEN
1295: l_api_message := 'Error getting Tax';
1296:
1297: IF g_debug = 'Y'
1298: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1299: THEN
1300: fnd_log.STRING (fnd_log.level_unexpected,
1301: g_log_head || '.' || l_api_name || l_stmt_num,
1302: 'Get_UnitPrice : '
1296:
1297: IF g_debug = 'Y'
1298: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1299: THEN
1300: fnd_log.STRING (fnd_log.level_unexpected,
1301: g_log_head || '.' || l_api_name || l_stmt_num,
1302: 'Get_UnitPrice : '
1303: || l_stmt_num
1304: || ' : '
1309: RAISE fnd_api.g_exc_unexpected_error;
1310: END IF;
1311:
1312: IF g_debug = 'Y'
1313: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
1314: THEN
1315: l_api_message :=
1316: SUBSTR ( 'l_recoverable_tax : '
1317: || l_recoverable_tax
1323: || l_old_non_recoverable_tax,
1324: 1,
1325: 1000
1326: );
1327: fnd_log.STRING (fnd_log.level_statement,
1328: g_log_head || '.' || l_api_name || '.'
1329: || l_stmt_num,
1330: l_api_message
1331: );
1370: x_prior_nr_tax := NVL (l_prior_nr_tax, 0);
1371: x_prior_rec_tax := NVL (l_prior_rec_tax, 0);
1372:
1373: IF g_debug = 'Y'
1374: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
1375: THEN
1376: l_api_message :=
1377: SUBSTR ( 'x_unit_nr_tax : '
1378: || x_unit_nr_tax
1384: || x_prior_rec_tax,
1385: 1,
1386: 1000
1387: );
1388: fnd_log.STRING (fnd_log.level_statement,
1389: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
1390: l_api_message
1391: );
1392: END IF;
1401: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1402: p_data => x_msg_data);
1403:
1404: IF g_debug = 'Y'
1405: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1406: THEN
1407: fnd_log.STRING (fnd_log.level_procedure,
1408: g_log_head || '.' || l_api_name || '.end',
1409: 'Get_UnitTax >>'
1403:
1404: IF g_debug = 'Y'
1405: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1406: THEN
1407: fnd_log.STRING (fnd_log.level_procedure,
1408: g_log_head || '.' || l_api_name || '.end',
1409: 'Get_UnitTax >>'
1410: );
1411: END IF;
1429: ROLLBACK TO get_unittax_pvt;
1430: x_return_status := fnd_api.g_ret_sts_unexp_error;
1431:
1432: IF g_debug = 'Y'
1433: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1434: THEN
1435: fnd_log.STRING (fnd_log.level_unexpected,
1436: g_log_head || '.' || l_api_name || l_stmt_num,
1437: 'Get_UnitTax : '
1431:
1432: IF g_debug = 'Y'
1433: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1434: THEN
1435: fnd_log.STRING (fnd_log.level_unexpected,
1436: g_log_head || '.' || l_api_name || l_stmt_num,
1437: 'Get_UnitTax : '
1438: || l_stmt_num
1439: || ' : '
1528: fnd_msg_pub.initialize;
1529: END IF;
1530:
1531: IF g_debug = 'Y'
1532: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1533: THEN
1534: fnd_log.STRING (fnd_log.level_procedure,
1535: g_log_head || l_api_name || '.begin',
1536: 'Convert_UOM <<'
1530:
1531: IF g_debug = 'Y'
1532: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1533: THEN
1534: fnd_log.STRING (fnd_log.level_procedure,
1535: g_log_head || l_api_name || '.begin',
1536: 'Convert_UOM <<'
1537: );
1538: END IF;
1613: l_api_message :=
1614: 'inv_convert.inv_um_conversion() failed to get the UOM rate';
1615:
1616: IF g_debug = 'Y'
1617: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1618: THEN
1619: fnd_log.STRING (fnd_log.level_error,
1620: g_log_head || l_api_name || '.' || l_stmt_num,
1621: l_api_message
1615:
1616: IF g_debug = 'Y'
1617: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1618: THEN
1619: fnd_log.STRING (fnd_log.level_error,
1620: g_log_head || l_api_name || '.' || l_stmt_num,
1621: l_api_message
1622: );
1623: END IF;
1637: l_api_message :=
1638: 'inv_convert.inv_um_conversion() failed to get the UOM rate';
1639:
1640: IF g_debug = 'Y'
1641: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1642: THEN
1643: fnd_log.STRING (fnd_log.level_error,
1644: g_log_head || l_api_name || '.' || l_stmt_num,
1645: l_api_message
1639:
1640: IF g_debug = 'Y'
1641: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1642: THEN
1643: fnd_log.STRING (fnd_log.level_error,
1644: g_log_head || l_api_name || '.' || l_stmt_num,
1645: l_api_message
1646: );
1647: END IF;
1655: ROUND (l_trx_uom_rate * p_event_rec.source_doc_quantity, 6);
1656: x_trx_uom_code := l_trx_uom_code;
1657:
1658: IF g_debug = 'Y'
1659: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
1660: THEN
1661: l_api_message :=
1662: 'x_primary_uom : '
1663: || x_primary_uom
1666: || ' x_transaction_qty : '
1667: || x_transaction_qty
1668: || ' x_trx_uom_code : '
1669: || x_trx_uom_code;
1670: fnd_log.STRING (fnd_log.level_statement,
1671: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
1672: l_api_message
1673: );
1674: END IF;
1681: COMMIT WORK;
1682: END IF;
1683:
1684: IF g_debug = 'Y'
1685: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1686: THEN
1687: fnd_log.STRING (fnd_log.level_procedure,
1688: g_log_head || l_api_name || '.end',
1689: 'Convert_UOM >>'
1683:
1684: IF g_debug = 'Y'
1685: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
1686: THEN
1687: fnd_log.STRING (fnd_log.level_procedure,
1688: g_log_head || l_api_name || '.end',
1689: 'Convert_UOM >>'
1690: );
1691: END IF;
1712: ': Statement # ' || TO_CHAR (l_stmt_num)
1713: || ' - No UOM found.';
1714:
1715: IF g_debug = 'Y'
1716: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1717: THEN
1718: fnd_log.STRING (fnd_log.level_error,
1719: g_log_head || l_api_name || '.' || l_stmt_num,
1720: l_api_message
1714:
1715: IF g_debug = 'Y'
1716: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1717: THEN
1718: fnd_log.STRING (fnd_log.level_error,
1719: g_log_head || l_api_name || '.' || l_stmt_num,
1720: l_api_message
1721: );
1722: END IF;
1741: || '- '
1742: || SUBSTRB (SQLERRM, 1, 100);
1743:
1744: IF g_debug = 'Y'
1745: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1746: THEN
1747: fnd_log.STRING (fnd_log.level_unexpected,
1748: g_log_head || l_api_name || '.' || l_stmt_num,
1749: l_api_message
1743:
1744: IF g_debug = 'Y'
1745: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
1746: THEN
1747: fnd_log.STRING (fnd_log.level_unexpected,
1748: g_log_head || l_api_name || '.' || l_stmt_num,
1749: l_api_message
1750: );
1751: END IF;
1934: x_currency_conversion_date := NVL (l_currency_conversion_date, SYSDATE);
1935: x_currency_conversion_type := l_currency_conversion_type;
1936:
1937: IF g_debug = 'Y'
1938: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
1939: THEN
1940: l_api_message :=
1941: SUBSTR ( 'x_currency_code : '
1942: || x_currency_code
1948: || x_currency_conversion_type,
1949: 1,
1950: 1000
1951: );
1952: fnd_log.STRING (fnd_log.level_statement,
1953: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
1954: l_api_message
1955: );
1956: END IF;
1992: || '- '
1993: || SUBSTRB (SQLERRM, 1, 200);
1994:
1995: IF g_debug = 'Y'
1996: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1997: THEN
1998: fnd_log.STRING (fnd_log.level_error,
1999: g_log_head || l_api_name || '.' || l_stmt_num,
2000: l_api_message
1994:
1995: IF g_debug = 'Y'
1996: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
1997: THEN
1998: fnd_log.STRING (fnd_log.level_error,
1999: g_log_head || l_api_name || '.' || l_stmt_num,
2000: l_api_message
2001: );
2002: END IF;
2024: || '- '
2025: || SUBSTRB (SQLERRM, 1, 200);
2026:
2027: IF g_debug = 'Y'
2028: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
2029: THEN
2030: fnd_log.STRING (fnd_log.level_error,
2031: g_log_head || l_api_name || '.' || l_stmt_num,
2032: l_api_message
2026:
2027: IF g_debug = 'Y'
2028: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
2029: THEN
2030: fnd_log.STRING (fnd_log.level_error,
2031: g_log_head || l_api_name || '.' || l_stmt_num,
2032: l_api_message
2033: );
2034: END IF;
2126: SAVEPOINT get_accounts_pvt;
2127: l_stmt_num := 0;
2128:
2129: IF g_debug = 'Y'
2130: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2131: THEN
2132: fnd_log.STRING (fnd_log.level_procedure,
2133: g_log_head || '.' || l_api_name || '.begin',
2134: 'Get_Accounts <<'
2128:
2129: IF g_debug = 'Y'
2130: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2131: THEN
2132: fnd_log.STRING (fnd_log.level_procedure,
2133: g_log_head || '.' || l_api_name || '.begin',
2134: 'Get_Accounts <<'
2135: );
2136: END IF;
2178: WHERE pod.po_distribution_id = p_rcv_accttxn.po_distribution_id;
2179:
2180: l_stmt_num := 20;
2181:
2182: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
2183: fnd_log.STRING (
2184: fnd_log.level_procedure,
2185: g_log_head || '.' || l_api_name || 'stmt num 20',
2186: p_rcv_accttxn.organization_id
2179:
2180: l_stmt_num := 20;
2181:
2182: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
2183: fnd_log.STRING (
2184: fnd_log.level_procedure,
2185: g_log_head || '.' || l_api_name || 'stmt num 20',
2186: p_rcv_accttxn.organization_id
2187: );
2180: l_stmt_num := 20;
2181:
2182: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
2183: fnd_log.STRING (
2184: fnd_log.level_procedure,
2185: g_log_head || '.' || l_api_name || 'stmt num 20',
2186: p_rcv_accttxn.organization_id
2187: );
2188: END IF;
2193: l_retroprice_adj_acct_id
2194: FROM rcv_parameters
2195: WHERE organization_id = p_rcv_accttxn.organization_id;
2196:
2197: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
2198: fnd_log.STRING (
2199: fnd_log.level_procedure,
2200: g_log_head || '.' || l_api_name || 'stmt num 20-2',
2201: p_rcv_accttxn.organization_id
2194: FROM rcv_parameters
2195: WHERE organization_id = p_rcv_accttxn.organization_id;
2196:
2197: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
2198: fnd_log.STRING (
2199: fnd_log.level_procedure,
2200: g_log_head || '.' || l_api_name || 'stmt num 20-2',
2201: p_rcv_accttxn.organization_id
2202: );
2195: WHERE organization_id = p_rcv_accttxn.organization_id;
2196:
2197: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
2198: fnd_log.STRING (
2199: fnd_log.level_procedure,
2200: g_log_head || '.' || l_api_name || 'stmt num 20-2',
2201: p_rcv_accttxn.organization_id
2202: );
2203: END IF;
2310: THEN
2311: l_api_message := 'Error in Get_HookAccount';
2312:
2313: IF g_debug = 'Y'
2314: AND fnd_log.level_unexpected >=
2315: fnd_log.g_current_runtime_level
2316: THEN
2317: fnd_log.STRING (fnd_log.level_unexpected,
2318: g_log_head || '.' || l_api_name
2311: l_api_message := 'Error in Get_HookAccount';
2312:
2313: IF g_debug = 'Y'
2314: AND fnd_log.level_unexpected >=
2315: fnd_log.g_current_runtime_level
2316: THEN
2317: fnd_log.STRING (fnd_log.level_unexpected,
2318: g_log_head || '.' || l_api_name
2319: || l_stmt_num,
2313: IF g_debug = 'Y'
2314: AND fnd_log.level_unexpected >=
2315: fnd_log.g_current_runtime_level
2316: THEN
2317: fnd_log.STRING (fnd_log.level_unexpected,
2318: g_log_head || '.' || l_api_name
2319: || l_stmt_num,
2320: 'Get_Accounts : '
2321: || l_stmt_num
2411: THEN
2412: l_api_message := 'Error in Get_HookAccount';
2413:
2414: IF g_debug = 'Y'
2415: AND fnd_log.level_unexpected >=
2416: fnd_log.g_current_runtime_level
2417: THEN
2418: fnd_log.STRING (fnd_log.level_unexpected,
2419: g_log_head || '.' || l_api_name
2412: l_api_message := 'Error in Get_HookAccount';
2413:
2414: IF g_debug = 'Y'
2415: AND fnd_log.level_unexpected >=
2416: fnd_log.g_current_runtime_level
2417: THEN
2418: fnd_log.STRING (fnd_log.level_unexpected,
2419: g_log_head || '.' || l_api_name
2420: || l_stmt_num,
2414: IF g_debug = 'Y'
2415: AND fnd_log.level_unexpected >=
2416: fnd_log.g_current_runtime_level
2417: THEN
2418: fnd_log.STRING (fnd_log.level_unexpected,
2419: g_log_head || '.' || l_api_name
2420: || l_stmt_num,
2421: 'Get_Accounts : '
2422: || l_stmt_num
2487: THEN
2488: l_api_message := 'Error in Get_HookAccount';
2489:
2490: IF g_debug = 'Y'
2491: AND fnd_log.level_unexpected >=
2492: fnd_log.g_current_runtime_level
2493: THEN
2494: fnd_log.STRING (fnd_log.level_unexpected,
2495: g_log_head
2488: l_api_message := 'Error in Get_HookAccount';
2489:
2490: IF g_debug = 'Y'
2491: AND fnd_log.level_unexpected >=
2492: fnd_log.g_current_runtime_level
2493: THEN
2494: fnd_log.STRING (fnd_log.level_unexpected,
2495: g_log_head
2496: || '.'
2490: IF g_debug = 'Y'
2491: AND fnd_log.level_unexpected >=
2492: fnd_log.g_current_runtime_level
2493: THEN
2494: fnd_log.STRING (fnd_log.level_unexpected,
2495: g_log_head
2496: || '.'
2497: || l_api_name
2498: || l_stmt_num,
2548: THEN
2549: l_api_message := 'Error in Get_HookAccount';
2550:
2551: IF g_debug = 'Y'
2552: AND fnd_log.level_unexpected >=
2553: fnd_log.g_current_runtime_level
2554: THEN
2555: fnd_log.STRING (fnd_log.level_unexpected,
2556: g_log_head
2549: l_api_message := 'Error in Get_HookAccount';
2550:
2551: IF g_debug = 'Y'
2552: AND fnd_log.level_unexpected >=
2553: fnd_log.g_current_runtime_level
2554: THEN
2555: fnd_log.STRING (fnd_log.level_unexpected,
2556: g_log_head
2557: || '.'
2551: IF g_debug = 'Y'
2552: AND fnd_log.level_unexpected >=
2553: fnd_log.g_current_runtime_level
2554: THEN
2555: fnd_log.STRING (fnd_log.level_unexpected,
2556: g_log_head
2557: || '.'
2558: || l_api_name
2559: || l_stmt_num,
2627: x_ic_cogs_acct_id :=
2628: p_transaction_forward_flow_rec.intercompany_cogs_account_id;
2629:
2630: IF g_debug = 'Y'
2631: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
2632: THEN
2633: l_api_message :=
2634: 'x_debit_acct_id : '
2635: || x_debit_acct_id
2636: || ' x_credit_acct_id : '
2637: || x_credit_acct_id
2638: || ' x_ic_cogs_acct_id : '
2639: || x_ic_cogs_acct_id;
2640: fnd_log.STRING (fnd_log.level_statement,
2641: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
2642: l_api_message
2643: );
2644: END IF;
2652: )
2653: )
2654: THEN
2655: IF g_debug = 'Y'
2656: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
2657: THEN
2658: l_api_message :=
2659: 'Unable to find credit and/or debit account. Setup is incomplete. ';
2660: fnd_log.STRING (fnd_log.level_statement,
2656: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
2657: THEN
2658: l_api_message :=
2659: 'Unable to find credit and/or debit account. Setup is incomplete. ';
2660: fnd_log.STRING (fnd_log.level_statement,
2661: g_log_head || '.' || l_api_name || '.'
2662: || l_stmt_num,
2663: l_api_message
2664: );
2667: fnd_message.set_name ('PO', 'PO_INVALID_ACCOUNT');
2668: fnd_msg_pub.ADD;
2669:
2670: IF g_debug = 'Y'
2671: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
2672: THEN
2673: fnd_log.MESSAGE (fnd_log.level_error,
2674: g_log_head || '.' || l_api_name || l_stmt_num,
2675: FALSE
2669:
2670: IF g_debug = 'Y'
2671: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
2672: THEN
2673: fnd_log.MESSAGE (fnd_log.level_error,
2674: g_log_head || '.' || l_api_name || l_stmt_num,
2675: FALSE
2676: );
2677: END IF;
2689: fnd_msg_pub.count_and_get (p_count => x_msg_count,
2690: p_data => x_msg_data);
2691:
2692: IF g_debug = 'Y'
2693: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2694: THEN
2695: fnd_log.STRING (fnd_log.level_procedure,
2696: g_log_head || '.' || l_api_name || '.end',
2697: 'Get_Accounts >>'
2691:
2692: IF g_debug = 'Y'
2693: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2694: THEN
2695: fnd_log.STRING (fnd_log.level_procedure,
2696: g_log_head || '.' || l_api_name || '.end',
2697: 'Get_Accounts >>'
2698: );
2699: END IF;
2717: ROLLBACK TO get_accounts_pvt;
2718: x_return_status := fnd_api.g_ret_sts_unexp_error;
2719:
2720: IF g_debug = 'Y'
2721: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
2722: THEN
2723: fnd_log.STRING (fnd_log.level_unexpected,
2724: g_log_head || '.' || l_api_name || l_stmt_num,
2725: 'Get_Accounts : '
2719:
2720: IF g_debug = 'Y'
2721: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
2722: THEN
2723: fnd_log.STRING (fnd_log.level_unexpected,
2724: g_log_head || '.' || l_api_name || l_stmt_num,
2725: 'Get_Accounts : '
2726: || l_stmt_num
2727: || ' : '
2797: SAVEPOINT get_ussgltc_pvt;
2798: l_stmt_num := 0;
2799:
2800: IF g_debug = 'Y'
2801: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2802: THEN
2803: fnd_log.STRING (fnd_log.level_procedure,
2804: g_log_head || '.' || l_api_name || '.begin',
2805: 'Get_UssglTC <<'
2799:
2800: IF g_debug = 'Y'
2801: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2802: THEN
2803: fnd_log.STRING (fnd_log.level_procedure,
2804: g_log_head || '.' || l_api_name || '.begin',
2805: 'Get_UssglTC <<'
2806: );
2807: END IF;
2851:
2852: x_ussgl_tc := l_ussgl_tc;
2853:
2854: IF g_debug = 'Y'
2855: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
2856: THEN
2857: l_api_message := 'x_ussgl_tc : ' || x_ussgl_tc;
2858: fnd_log.STRING (fnd_log.level_statement,
2859: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
2854: IF g_debug = 'Y'
2855: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
2856: THEN
2857: l_api_message := 'x_ussgl_tc : ' || x_ussgl_tc;
2858: fnd_log.STRING (fnd_log.level_statement,
2859: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
2860: l_api_message
2861: );
2862: END IF;
2871: fnd_msg_pub.count_and_get (p_count => x_msg_count,
2872: p_data => x_msg_data);
2873:
2874: IF g_debug = 'Y'
2875: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2876: THEN
2877: fnd_log.STRING (fnd_log.level_procedure,
2878: g_log_head || '.' || l_api_name || '.end',
2879: 'Get_UssglTC >>'
2873:
2874: IF g_debug = 'Y'
2875: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2876: THEN
2877: fnd_log.STRING (fnd_log.level_procedure,
2878: g_log_head || '.' || l_api_name || '.end',
2879: 'Get_UssglTC >>'
2880: );
2881: END IF;
2899: ROLLBACK TO get_ussgltc_pvt;
2900: x_return_status := fnd_api.g_ret_sts_unexp_error;
2901:
2902: IF g_debug = 'Y'
2903: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
2904: THEN
2905: fnd_log.STRING (fnd_log.level_unexpected,
2906: g_log_head || '.' || l_api_name || l_stmt_num,
2907: 'Get_UssglTC : '
2901:
2902: IF g_debug = 'Y'
2903: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
2904: THEN
2905: fnd_log.STRING (fnd_log.level_unexpected,
2906: g_log_head || '.' || l_api_name || l_stmt_num,
2907: 'Get_UssglTC : '
2908: || l_stmt_num
2909: || ' : '
2983: SAVEPOINT check_encumbranceflag_pvt;
2984: l_stmt_num := 0;
2985:
2986: IF g_debug = 'Y'
2987: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2988: THEN
2989: fnd_log.STRING (fnd_log.level_procedure,
2990: g_log_head || '.' || l_api_name || '.begin',
2991: 'Check_EncumbranceFlag <<'
2985:
2986: IF g_debug = 'Y'
2987: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
2988: THEN
2989: fnd_log.STRING (fnd_log.level_procedure,
2990: g_log_head || '.' || l_api_name || '.begin',
2991: 'Check_EncumbranceFlag <<'
2992: );
2993: END IF;
3020: x_encumbrance_flag := l_encumbrance_flag;
3021: x_ussgl_option := NVL (fnd_profile.VALUE ('USSGL_OPTION'), 'N');
3022:
3023: IF g_debug = 'Y'
3024: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
3025: THEN
3026: l_api_message :=
3027: 'Encumbrance Flag : '
3028: || x_encumbrance_flag
3027: 'Encumbrance Flag : '
3028: || x_encumbrance_flag
3029: || ' Ussgl Option : '
3030: || x_ussgl_option;
3031: fnd_log.STRING (fnd_log.level_statement,
3032: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
3033: l_api_message
3034: );
3035: END IF;
3044: fnd_msg_pub.count_and_get (p_count => x_msg_count,
3045: p_data => x_msg_data);
3046:
3047: IF g_debug = 'Y'
3048: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3049: THEN
3050: fnd_log.STRING (fnd_log.level_procedure,
3051: g_log_head || '.' || l_api_name || '.end',
3052: 'Check_EncumbranceFlag >>'
3046:
3047: IF g_debug = 'Y'
3048: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3049: THEN
3050: fnd_log.STRING (fnd_log.level_procedure,
3051: g_log_head || '.' || l_api_name || '.end',
3052: 'Check_EncumbranceFlag >>'
3053: );
3054: END IF;
3072: ROLLBACK TO check_encumbranceflag_pvt;
3073: x_return_status := fnd_api.g_ret_sts_unexp_error;
3074:
3075: IF g_debug = 'Y'
3076: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
3077: THEN
3078: fnd_log.STRING (fnd_log.level_unexpected,
3079: g_log_head || '.' || l_api_name || l_stmt_num,
3080: 'Check_EncumbranceFlag : '
3074:
3075: IF g_debug = 'Y'
3076: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
3077: THEN
3078: fnd_log.STRING (fnd_log.level_unexpected,
3079: g_log_head || '.' || l_api_name || l_stmt_num,
3080: 'Check_EncumbranceFlag : '
3081: || l_stmt_num
3082: || ' : '
3177: -- Standard start of API savepoint
3178: SAVEPOINT create_mmtrecord_pvt;
3179:
3180: IF g_debug = 'Y'
3181: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3182: THEN
3183: fnd_log.STRING (fnd_log.level_procedure,
3184: g_log_head || '.' || l_api_name || '.begin',
3185: 'Create_MMTRecord <<'
3179:
3180: IF g_debug = 'Y'
3181: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3182: THEN
3183: fnd_log.STRING (fnd_log.level_procedure,
3184: g_log_head || '.' || l_api_name || '.begin',
3185: 'Create_MMTRecord <<'
3186: );
3187: END IF;
3425: fnd_msg_pub.count_and_get (p_count => x_msg_count,
3426: p_data => x_msg_data);
3427:
3428: IF g_debug = 'Y'
3429: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3430: THEN
3431: fnd_log.STRING (fnd_log.level_procedure,
3432: g_log_head || '.' || l_api_name || '.end',
3433: 'Create_MMTRecord >>'
3427:
3428: IF g_debug = 'Y'
3429: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3430: THEN
3431: fnd_log.STRING (fnd_log.level_procedure,
3432: g_log_head || '.' || l_api_name || '.end',
3433: 'Create_MMTRecord >>'
3434: );
3435: END IF;
3466: 'Unexpected transaction type passed in: '
3467: || TO_CHAR (p_txn_type_id);
3468:
3469: IF g_debug = 'Y'
3470: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
3471: THEN
3472: fnd_log.STRING (fnd_log.level_error,
3473: g_log_head || l_api_name || '.' || l_stmt_num,
3474: l_api_message
3468:
3469: IF g_debug = 'Y'
3470: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
3471: THEN
3472: fnd_log.STRING (fnd_log.level_error,
3473: g_log_head || l_api_name || '.' || l_stmt_num,
3474: l_api_message
3475: );
3476: END IF;
3490: ROLLBACK TO create_mmtrecord_pvt;
3491: x_return_status := fnd_api.g_ret_sts_error;
3492:
3493: IF g_debug = 'Y'
3494: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
3495: THEN
3496: fnd_log.STRING (fnd_log.level_error,
3497: g_log_head || '.' || l_api_name || '.'
3498: || l_stmt_num,
3492:
3493: IF g_debug = 'Y'
3494: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
3495: THEN
3496: fnd_log.STRING (fnd_log.level_error,
3497: g_log_head || '.' || l_api_name || '.'
3498: || l_stmt_num,
3499: l_api_message
3500: );
3516: TO_CHAR (SQLCODE) || '- '
3517: || SUBSTRB (SQLERRM, 1, 100);
3518:
3519: IF g_debug = 'Y'
3520: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
3521: THEN
3522: fnd_log.STRING (fnd_log.level_unexpected,
3523: g_log_head || '.' || l_api_name || '.'
3524: || l_stmt_num,
3518:
3519: IF g_debug = 'Y'
3520: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
3521: THEN
3522: fnd_log.STRING (fnd_log.level_unexpected,
3523: g_log_head || '.' || l_api_name || '.'
3524: || l_stmt_num,
3525: 'Create_MMTRecord : '
3526: || l_stmt_num
3608: SAVEPOINT insert_mmt_pvt;
3609: l_stmt_num := 0;
3610:
3611: IF g_debug = 'Y'
3612: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3613: THEN
3614: fnd_log.STRING (fnd_log.level_procedure,
3615: g_log_head || l_api_name || '.begin',
3616: 'Insert_MMT <<'
3610:
3611: IF g_debug = 'Y'
3612: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3613: THEN
3614: fnd_log.STRING (fnd_log.level_procedure,
3615: g_log_head || l_api_name || '.begin',
3616: 'Insert_MMT <<'
3617: );
3618: END IF;
4044: l_ctr := p_rcv_accttxn_tbl.NEXT (l_ctr);
4045: END LOOP;
4046:
4047: IF g_debug = 'Y'
4048: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4049: THEN
4050: fnd_log.STRING (fnd_log.level_event,
4051: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4052: 'Creating Logical Transactions in MMT'
4046:
4047: IF g_debug = 'Y'
4048: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4049: THEN
4050: fnd_log.STRING (fnd_log.level_event,
4051: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4052: 'Creating Logical Transactions in MMT'
4053: );
4054: END IF;
4080: COMMIT WORK;
4081: END IF;
4082:
4083: IF g_debug = 'Y'
4084: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
4085: THEN
4086: fnd_log.STRING (fnd_log.level_procedure,
4087: g_log_head || l_api_name || '.end',
4088: 'Insert_MMT >>'
4082:
4083: IF g_debug = 'Y'
4084: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
4085: THEN
4086: fnd_log.STRING (fnd_log.level_procedure,
4087: g_log_head || l_api_name || '.end',
4088: 'Insert_MMT >>'
4089: );
4090: END IF;
4098: || TO_CHAR (l_ctr)
4099: || ' of input parameter p_rcv_accttxn_tbl';
4100:
4101: IF g_debug = 'Y'
4102: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
4103: THEN
4104: fnd_log.STRING (fnd_log.level_error,
4105: g_log_head || l_api_name || '.' || l_stmt_num,
4106: l_api_message
4100:
4101: IF g_debug = 'Y'
4102: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
4103: THEN
4104: fnd_log.STRING (fnd_log.level_error,
4105: g_log_head || l_api_name || '.' || l_stmt_num,
4106: l_api_message
4107: );
4108: END IF;
4123: x_return_status := fnd_api.g_ret_sts_error;
4124: l_api_message := 'Call to procedure failed';
4125:
4126: IF g_debug = 'Y'
4127: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
4128: THEN
4129: fnd_log.STRING (fnd_log.level_error,
4130: g_log_head || l_api_name || '.' || l_stmt_num,
4131: l_api_message
4125:
4126: IF g_debug = 'Y'
4127: AND fnd_log.level_error >= fnd_log.g_current_runtime_level
4128: THEN
4129: fnd_log.STRING (fnd_log.level_error,
4130: g_log_head || l_api_name || '.' || l_stmt_num,
4131: l_api_message
4132: );
4133: END IF;
4142: l_api_message :=
4143: 'Wrong version #, expecting version ' || TO_CHAR (l_api_version);
4144:
4145: IF g_debug = 'Y'
4146: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4147: THEN
4148: fnd_log.STRING (fnd_log.level_unexpected,
4149: g_log_head || l_api_name || '.' || l_stmt_num,
4150: l_api_message
4144:
4145: IF g_debug = 'Y'
4146: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4147: THEN
4148: fnd_log.STRING (fnd_log.level_unexpected,
4149: g_log_head || l_api_name || '.' || l_stmt_num,
4150: l_api_message
4151: );
4152: END IF;
4166: || '- '
4167: || SUBSTRB (SQLERRM, 1, 100);
4168:
4169: IF g_debug = 'Y'
4170: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4171: THEN
4172: fnd_log.STRING (fnd_log.level_unexpected,
4173: g_log_head || l_api_name || '.' || l_stmt_num,
4174: l_api_message
4168:
4169: IF g_debug = 'Y'
4170: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4171: THEN
4172: fnd_log.STRING (fnd_log.level_unexpected,
4173: g_log_head || l_api_name || '.' || l_stmt_num,
4174: l_api_message
4175: );
4176: END IF;
4270: SAVEPOINT insert_txn_pvt;
4271: l_stmt_num := 0;
4272:
4273: IF g_debug = 'Y'
4274: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
4275: THEN
4276: fnd_log.STRING (fnd_log.level_procedure,
4277: g_log_head || '.' || l_api_name || '.begin',
4278: 'Insert_Txn <<'
4272:
4273: IF g_debug = 'Y'
4274: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
4275: THEN
4276: fnd_log.STRING (fnd_log.level_procedure,
4277: g_log_head || '.' || l_api_name || '.begin',
4278: 'Insert_Txn <<'
4279: );
4280: END IF;
4298: -- Initialize API return status to success
4299: x_return_status := fnd_api.g_ret_sts_success;
4300:
4301: IF g_debug = 'Y'
4302: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
4303: THEN
4304: l_api_message :=
4305: 'Insert_Txn : PARAMETERS 1:'
4306: || ' p_event_source : '
4318: || ' p_gl_group_id : '
4319: || p_gl_group_id
4320: || ' p_cross_ou_flag : '
4321: || p_cross_ou_flag;
4322: fnd_log.STRING (fnd_log.level_statement,
4323: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4324: l_api_message
4325: );
4326: l_api_message :=
4344: || ' p_unit_price : '
4345: || p_unit_price
4346: || ' p_prior_unit_price : '
4347: || p_prior_unit_price;
4348: fnd_log.STRING (fnd_log.level_statement,
4349: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4350: l_api_message
4351: );
4352: END IF;
4366: IF (p_event_source = 'INVOICEMATCH')
4367: THEN
4368: -- This source is only for period end accruals, one-time items
4369: IF g_debug = 'Y'
4370: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
4371: THEN
4372: fnd_log.STRING (fnd_log.level_statement,
4373: g_log_head || '.' || l_api_name || '.'
4374: || l_stmt_num,
4368: -- This source is only for period end accruals, one-time items
4369: IF g_debug = 'Y'
4370: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
4371: THEN
4372: fnd_log.STRING (fnd_log.level_statement,
4373: g_log_head || '.' || l_api_name || '.'
4374: || l_stmt_num,
4375: 'Getting PO information from Invoice'
4376: );
4410: ELSE
4411: l_stmt_num := 30;
4412:
4413: IF g_debug = 'Y'
4414: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4415: THEN
4416: fnd_log.STRING
4417: (fnd_log.level_event,
4418: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4412:
4413: IF g_debug = 'Y'
4414: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4415: THEN
4416: fnd_log.STRING
4417: (fnd_log.level_event,
4418: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4419: 'Getting PO information from Receiving Transaction'
4420: );
4413: IF g_debug = 'Y'
4414: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4415: THEN
4416: fnd_log.STRING
4417: (fnd_log.level_event,
4418: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4419: 'Getting PO information from Receiving Transaction'
4420: );
4421: END IF;
4499: THEN
4500: l_stmt_num := 70;
4501:
4502: IF g_debug = 'Y'
4503: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4504: THEN
4505: fnd_log.STRING (fnd_log.level_event,
4506: g_log_head
4507: || '.'
4501:
4502: IF g_debug = 'Y'
4503: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4504: THEN
4505: fnd_log.STRING (fnd_log.level_event,
4506: g_log_head
4507: || '.'
4508: || l_api_name
4509: || '.'
4525: THEN
4526: l_api_message := 'Error in checking for encumbrance flag ';
4527:
4528: IF g_debug = 'Y'
4529: AND fnd_log.level_unexpected >=
4530: fnd_log.g_current_runtime_level
4531: THEN
4532: fnd_log.STRING (fnd_log.level_unexpected,
4533: g_log_head || '.' || l_api_name
4526: l_api_message := 'Error in checking for encumbrance flag ';
4527:
4528: IF g_debug = 'Y'
4529: AND fnd_log.level_unexpected >=
4530: fnd_log.g_current_runtime_level
4531: THEN
4532: fnd_log.STRING (fnd_log.level_unexpected,
4533: g_log_head || '.' || l_api_name
4534: || l_stmt_num,
4528: IF g_debug = 'Y'
4529: AND fnd_log.level_unexpected >=
4530: fnd_log.g_current_runtime_level
4531: THEN
4532: fnd_log.STRING (fnd_log.level_unexpected,
4533: g_log_head || '.' || l_api_name
4534: || l_stmt_num,
4535: 'Insert_Txn : '
4536: || l_stmt_num
4568: THEN
4569: l_stmt_num := 100;
4570:
4571: IF g_debug = 'Y'
4572: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4573: THEN
4574: fnd_log.STRING (fnd_log.level_event,
4575: g_log_head || '.' || l_api_name || '.'
4576: || l_stmt_num,
4570:
4571: IF g_debug = 'Y'
4572: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4573: THEN
4574: fnd_log.STRING (fnd_log.level_event,
4575: g_log_head || '.' || l_api_name || '.'
4576: || l_stmt_num,
4577: 'Service line type : Getting Transaction Amount'
4578: );
4590: THEN
4591: l_api_message := 'Error getting transaction amount';
4592:
4593: IF g_debug = 'Y'
4594: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4595: THEN
4596: fnd_log.STRING (fnd_log.level_unexpected,
4597: g_log_head || '.' || l_api_name || l_stmt_num,
4598: 'Insert_Txn : '
4592:
4593: IF g_debug = 'Y'
4594: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4595: THEN
4596: fnd_log.STRING (fnd_log.level_unexpected,
4597: g_log_head || '.' || l_api_name || l_stmt_num,
4598: 'Insert_Txn : '
4599: || l_stmt_num
4600: || ' : '
4609: ELSE
4610: l_stmt_num := 110;
4611:
4612: IF g_debug = 'Y'
4613: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4614: THEN
4615: fnd_log.STRING (fnd_log.level_event,
4616: g_log_head || '.' || l_api_name || '.'
4617: || l_stmt_num,
4611:
4612: IF g_debug = 'Y'
4613: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4614: THEN
4615: fnd_log.STRING (fnd_log.level_event,
4616: g_log_head || '.' || l_api_name || '.'
4617: || l_stmt_num,
4618: 'Non Service Line Type : Getting Unit Price'
4619: );
4652: THEN
4653: l_api_message := 'Error getting unit price';
4654:
4655: IF g_debug = 'Y'
4656: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4657: THEN
4658: fnd_log.STRING (fnd_log.level_unexpected,
4659: g_log_head || '.' || l_api_name || l_stmt_num,
4660: 'Insert_Txn : '
4654:
4655: IF g_debug = 'Y'
4656: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4657: THEN
4658: fnd_log.STRING (fnd_log.level_unexpected,
4659: g_log_head || '.' || l_api_name || l_stmt_num,
4660: 'Insert_Txn : '
4661: || l_stmt_num
4662: || ' : '
4679: THEN
4680: l_stmt_num := 120;
4681:
4682: IF g_debug = 'Y'
4683: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4684: THEN
4685: fnd_log.STRING (fnd_log.level_event,
4686: g_log_head || '.' || l_api_name || '.'
4687: || l_stmt_num,
4681:
4682: IF g_debug = 'Y'
4683: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4684: THEN
4685: fnd_log.STRING (fnd_log.level_event,
4686: g_log_head || '.' || l_api_name || '.'
4687: || l_stmt_num,
4688: 'Non Service line type : Getting Quantity'
4689: );
4701: THEN
4702: l_api_message := 'Error getting quantity';
4703:
4704: IF g_debug = 'Y'
4705: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4706: THEN
4707: fnd_log.STRING (fnd_log.level_unexpected,
4708: g_log_head || '.' || l_api_name || l_stmt_num,
4709: 'Insert_Txn : '
4703:
4704: IF g_debug = 'Y'
4705: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4706: THEN
4707: fnd_log.STRING (fnd_log.level_unexpected,
4708: g_log_head || '.' || l_api_name || l_stmt_num,
4709: 'Insert_Txn : '
4710: || l_stmt_num
4711: || ' : '
4723: THEN
4724: x_return_status := 'W';
4725:
4726: IF g_debug = 'Y'
4727: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4728: THEN
4729: l_api_message :=
4730: 'Transaction Quantity is 0. Returning without seeding event.';
4731: fnd_log.STRING (fnd_log.level_unexpected,
4727: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4728: THEN
4729: l_api_message :=
4730: 'Transaction Quantity is 0. Returning without seeding event.';
4731: fnd_log.STRING (fnd_log.level_unexpected,
4732: g_log_head || '.' || l_api_name || l_stmt_num,
4733: 'Insert_Txnt : '
4734: || l_stmt_num
4735: || ' : '
4743:
4744: l_stmt_num := 130;
4745:
4746: IF g_debug = 'Y'
4747: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4748: THEN
4749: fnd_log.STRING (fnd_log.level_event,
4750: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4751: 'Getting Tax'
4745:
4746: IF g_debug = 'Y'
4747: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4748: THEN
4749: fnd_log.STRING (fnd_log.level_event,
4750: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4751: 'Getting Tax'
4752: );
4753: END IF;
4767: THEN
4768: l_api_message := 'Error getting tax';
4769:
4770: IF g_debug = 'Y'
4771: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4772: THEN
4773: fnd_log.STRING (fnd_log.level_unexpected,
4774: g_log_head || '.' || l_api_name || l_stmt_num,
4775: 'Insert_Txn : '
4769:
4770: IF g_debug = 'Y'
4771: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4772: THEN
4773: fnd_log.STRING (fnd_log.level_unexpected,
4774: g_log_head || '.' || l_api_name || l_stmt_num,
4775: 'Insert_Txn : '
4776: || l_stmt_num
4777: || ' : '
4790:
4791: IF l_rcv_accttxn.service_flag = 'N'
4792: THEN
4793: IF g_debug = 'Y'
4794: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4795: THEN
4796: fnd_log.STRING (fnd_log.level_event,
4797: g_log_head || '.' || l_api_name || '.'
4798: || l_stmt_num,
4792: THEN
4793: IF g_debug = 'Y'
4794: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4795: THEN
4796: fnd_log.STRING (fnd_log.level_event,
4797: g_log_head || '.' || l_api_name || '.'
4798: || l_stmt_num,
4799: 'Getting UOM'
4800: );
4815: THEN
4816: l_api_message := 'Error Converting UOM';
4817:
4818: IF g_debug = 'Y'
4819: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4820: THEN
4821: fnd_log.STRING (fnd_log.level_unexpected,
4822: g_log_head || '.' || l_api_name || l_stmt_num,
4823: 'Insert_Txn : '
4817:
4818: IF g_debug = 'Y'
4819: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4820: THEN
4821: fnd_log.STRING (fnd_log.level_unexpected,
4822: g_log_head || '.' || l_api_name || l_stmt_num,
4823: 'Insert_Txn : '
4824: || l_stmt_num
4825: || ' : '
4839: -- Initialize Currency Information
4840: l_stmt_num := 150;
4841:
4842: IF g_debug = 'Y'
4843: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4844: THEN
4845: fnd_log.STRING (fnd_log.level_event,
4846: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4847: 'Getting Currency Information'
4841:
4842: IF g_debug = 'Y'
4843: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4844: THEN
4845: fnd_log.STRING (fnd_log.level_event,
4846: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4847: 'Getting Currency Information'
4848: );
4849: END IF;
4863: THEN
4864: l_api_message := 'Error Getting Currency';
4865:
4866: IF g_debug = 'Y'
4867: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4868: THEN
4869: fnd_log.STRING (fnd_log.level_unexpected,
4870: g_log_head || '.' || l_api_name || l_stmt_num,
4871: 'Insert_Txn : '
4865:
4866: IF g_debug = 'Y'
4867: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4868: THEN
4869: fnd_log.STRING (fnd_log.level_unexpected,
4870: g_log_head || '.' || l_api_name || l_stmt_num,
4871: 'Insert_Txn : '
4872: || l_stmt_num
4873: || ' : '
4885: -- Get Debit and Credit Accounts
4886: l_stmt_num := 160;
4887:
4888: IF g_debug = 'Y'
4889: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4890: THEN
4891: fnd_log.STRING (fnd_log.level_event,
4892: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4893: 'Getting Debit and Credit Accounts'
4887:
4888: IF g_debug = 'Y'
4889: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4890: THEN
4891: fnd_log.STRING (fnd_log.level_event,
4892: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4893: 'Getting Debit and Credit Accounts'
4894: );
4895: END IF;
4911: THEN
4912: l_api_message := 'Error getting account information';
4913:
4914: IF g_debug = 'Y'
4915: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4916: THEN
4917: fnd_log.STRING (fnd_log.level_unexpected,
4918: g_log_head || '.' || l_api_name || l_stmt_num,
4919: 'Insert_Txn : '
4913:
4914: IF g_debug = 'Y'
4915: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4916: THEN
4917: fnd_log.STRING (fnd_log.level_unexpected,
4918: g_log_head || '.' || l_api_name || l_stmt_num,
4919: 'Insert_Txn : '
4920: || l_stmt_num
4921: || ' : '
4932: -- Initialize USSGL Transaction Codes
4933: l_stmt_num := 170;
4934:
4935: IF g_debug = 'Y'
4936: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4937: THEN
4938: fnd_log.STRING (fnd_log.level_event,
4939: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4940: 'Getting USSGL TC'
4934:
4935: IF g_debug = 'Y'
4936: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
4937: THEN
4938: fnd_log.STRING (fnd_log.level_event,
4939: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
4940: 'Getting USSGL TC'
4941: );
4942: END IF;
4953: THEN
4954: l_api_message := 'Error getting USSGL Transaction Code';
4955:
4956: IF g_debug = 'Y'
4957: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4958: THEN
4959: fnd_log.STRING (fnd_log.level_unexpected,
4960: g_log_head || '.' || l_api_name || l_stmt_num,
4961: 'Insert_Txn : '
4955:
4956: IF g_debug = 'Y'
4957: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
4958: THEN
4959: fnd_log.STRING (fnd_log.level_unexpected,
4960: g_log_head || '.' || l_api_name || l_stmt_num,
4961: 'Insert_Txn : '
4962: || l_stmt_num
4963: || ' : '
4981: fnd_msg_pub.count_and_get (p_count => x_msg_count,
4982: p_data => x_msg_data);
4983:
4984: IF g_debug = 'Y'
4985: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
4986: THEN
4987: fnd_log.STRING (fnd_log.level_procedure,
4988: g_log_head || '.' || l_api_name || '.end',
4989: 'Insert_Txn >>'
4983:
4984: IF g_debug = 'Y'
4985: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
4986: THEN
4987: fnd_log.STRING (fnd_log.level_procedure,
4988: g_log_head || '.' || l_api_name || '.end',
4989: 'Insert_Txn >>'
4990: );
4991: END IF;
5009: ROLLBACK TO insert_txn_pvt;
5010: x_return_status := fnd_api.g_ret_sts_unexp_error;
5011:
5012: IF g_debug = 'Y'
5013: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
5014: THEN
5015: fnd_log.STRING (fnd_log.level_unexpected,
5016: g_log_head || '.' || l_api_name || l_stmt_num,
5017: 'Insert_Txn '
5011:
5012: IF g_debug = 'Y'
5013: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
5014: THEN
5015: fnd_log.STRING (fnd_log.level_unexpected,
5016: g_log_head || '.' || l_api_name || l_stmt_num,
5017: 'Insert_Txn '
5018: || l_stmt_num
5019: || ' : '
5073: SAVEPOINT insert_txn2_pvt;
5074: l_stmt_num := 0;
5075:
5076: IF g_debug = 'Y'
5077: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
5078: THEN
5079: fnd_log.STRING (fnd_log.level_procedure,
5080: g_log_head || '.' || l_api_name || '.begin',
5081: 'Insert_Txn2 <<'
5075:
5076: IF g_debug = 'Y'
5077: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
5078: THEN
5079: fnd_log.STRING (fnd_log.level_procedure,
5080: g_log_head || '.' || l_api_name || '.begin',
5081: 'Insert_Txn2 <<'
5082: );
5083: END IF;
5101: -- Initialize API return status to success
5102: x_return_status := fnd_api.g_ret_sts_success;
5103:
5104: IF g_debug = 'Y'
5105: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
5106: THEN
5107: l_api_message :=
5108: 'Inserting '
5109: || p_rcv_accttxn_tbl.COUNT
5107: l_api_message :=
5108: 'Inserting '
5109: || p_rcv_accttxn_tbl.COUNT
5110: || ' transactions into GRAT';
5111: fnd_log.STRING (fnd_log.level_statement,
5112: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
5113: l_api_message
5114: );
5115: END IF;
5134: INTO l_accounting_txn_id
5135: FROM DUAL;
5136:
5137: IF g_debug = 'Y'
5138: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
5139: THEN
5140: l_api_message :=
5141: SUBSTR ( 'i : '
5142: || i
5158: || p_rcv_accttxn_tbl (i).unit_rec_tax,
5159: 1,
5160: 1000
5161: );
5162: fnd_log.STRING (fnd_log.level_statement,
5163: g_log_head || '.' || l_api_name || '.'
5164: || l_stmt_num,
5165: l_api_message
5166: );
5288: SYSDATE
5289: );
5290:
5291: IF g_debug = 'Y'
5292: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
5293: THEN
5294: l_api_message :=
5295: 'Inserted '
5296: || SQL%ROWCOUNT
5295: 'Inserted '
5296: || SQL%ROWCOUNT
5297: || 'rows in GRAT for org '
5298: || p_rcv_accttxn_tbl (i).org_id;
5299: fnd_log.STRING (fnd_log.level_statement,
5300: g_log_head || '.' || l_api_name || '.'
5301: || l_stmt_num,
5302: l_api_message
5303: );
5321: fnd_msg_pub.count_and_get (p_count => x_msg_count,
5322: p_data => x_msg_data);
5323:
5324: IF g_debug = 'Y'
5325: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
5326: THEN
5327: fnd_log.STRING (fnd_log.level_procedure,
5328: g_log_head || '.' || l_api_name || '.end',
5329: 'Insert_Txn2 >>'
5323:
5324: IF g_debug = 'Y'
5325: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
5326: THEN
5327: fnd_log.STRING (fnd_log.level_procedure,
5328: g_log_head || '.' || l_api_name || '.end',
5329: 'Insert_Txn2 >>'
5330: );
5331: END IF;
5349: ROLLBACK TO insert_txn2_pvt;
5350: x_return_status := fnd_api.g_ret_sts_unexp_error;
5351:
5352: IF g_debug = 'Y'
5353: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
5354: THEN
5355: fnd_log.STRING (fnd_log.level_unexpected,
5356: g_log_head || '.' || l_api_name || l_stmt_num,
5357: 'Insert_Txn2 : '
5351:
5352: IF g_debug = 'Y'
5353: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
5354: THEN
5355: fnd_log.STRING (fnd_log.level_unexpected,
5356: g_log_head || '.' || l_api_name || l_stmt_num,
5357: 'Insert_Txn2 : '
5358: || l_stmt_num
5359: || ' : '
5447: SAVEPOINT create_receiveevents_pvt;
5448: l_stmt_num := 0;
5449:
5450: IF g_debug = 'Y'
5451: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
5452: THEN
5453: fnd_log.STRING (fnd_log.level_procedure,
5454: g_log_head || '.' || l_api_name || '.begin',
5455: 'Create_ReceiveEvents <<'
5449:
5450: IF g_debug = 'Y'
5451: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
5452: THEN
5453: fnd_log.STRING (fnd_log.level_procedure,
5454: g_log_head || '.' || l_api_name || '.begin',
5455: 'Create_ReceiveEvents <<'
5456: );
5457: END IF;
5512:
5513: l_stmt_num := 40;
5514:
5515: IF g_debug = 'Y'
5516: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
5517: THEN
5518: l_api_message :=
5519: 'Creating Receive transactions : RCV Transaction ID : '
5520: || p_rcv_transaction_id
5543: || ', Category ID : '
5544: || l_category_id
5545: || ', Accrual Flag : '
5546: || l_accrual_flag;
5547: fnd_log.STRING (fnd_log.level_statement,
5548: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
5549: l_api_message
5550: );
5551: END IF;
5562: l_category_id;
5563: l_stmt_num := 50;
5564:
5565: IF g_debug = 'Y'
5566: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
5567: THEN
5568: l_api_message :=
5569: 'Getting Procurement Transaction Flow :'
5570: || 'l_po_org_id : '
5572: || ' l_rcv_org_id : '
5573: || l_rcv_org_id
5574: || ' l_rcv_organization_id : '
5575: || l_rcv_organization_id;
5576: fnd_log.STRING (fnd_log.level_statement,
5577: g_log_head || '.' || l_api_name || '.'
5578: || l_stmt_num,
5579: l_api_message
5580: );
5602: l_trx_flow_header_id :=
5603: l_transaction_flows_tbl (l_transaction_flows_tbl.FIRST).header_id;
5604:
5605: IF g_debug = 'Y'
5606: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5607: THEN
5608: fnd_log.STRING (fnd_log.level_event,
5609: g_log_head
5610: || '.'
5604:
5605: IF g_debug = 'Y'
5606: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5607: THEN
5608: fnd_log.STRING (fnd_log.level_event,
5609: g_log_head
5610: || '.'
5611: || l_api_name
5612: || '.'
5619: THEN
5620: l_trx_flow_exists_flag := 0;
5621:
5622: IF g_debug = 'Y'
5623: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5624: THEN
5625: fnd_log.STRING (fnd_log.level_event,
5626: g_log_head
5627: || '.'
5621:
5622: IF g_debug = 'Y'
5623: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5624: THEN
5625: fnd_log.STRING (fnd_log.level_event,
5626: g_log_head
5627: || '.'
5628: || l_api_name
5629: || '.'
5638: THEN
5639: l_api_message := 'Transaction Flow does not exist';
5640:
5641: IF g_debug = 'Y'
5642: AND fnd_log.level_unexpected >=
5643: fnd_log.g_current_runtime_level
5644: THEN
5645: fnd_log.STRING (fnd_log.level_unexpected,
5646: g_log_head || '.' || l_api_name
5639: l_api_message := 'Transaction Flow does not exist';
5640:
5641: IF g_debug = 'Y'
5642: AND fnd_log.level_unexpected >=
5643: fnd_log.g_current_runtime_level
5644: THEN
5645: fnd_log.STRING (fnd_log.level_unexpected,
5646: g_log_head || '.' || l_api_name
5647: || l_stmt_num,
5641: IF g_debug = 'Y'
5642: AND fnd_log.level_unexpected >=
5643: fnd_log.g_current_runtime_level
5644: THEN
5645: fnd_log.STRING (fnd_log.level_unexpected,
5646: g_log_head || '.' || l_api_name
5647: || l_stmt_num,
5648: 'Create_ReceiveEvents : '
5649: || l_stmt_num
5657: ELSE
5658: l_api_message := 'Error occurred in Transaction Flow API';
5659:
5660: IF g_debug = 'Y'
5661: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
5662: THEN
5663: fnd_log.STRING (fnd_log.level_unexpected,
5664: g_log_head || '.' || l_api_name || l_stmt_num,
5665: 'Create_ReceiveEvents : '
5659:
5660: IF g_debug = 'Y'
5661: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
5662: THEN
5663: fnd_log.STRING (fnd_log.level_unexpected,
5664: g_log_head || '.' || l_api_name || l_stmt_num,
5665: 'Create_ReceiveEvents : '
5666: || l_stmt_num
5667: || ' : '
5684: LOOP
5685: l_stmt_num := 60;
5686:
5687: IF g_debug = 'Y'
5688: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
5689: THEN
5690: l_api_message :=
5691: 'Creating Receive transactions : '
5692: || 'po_distribution_id : '
5694: || ' destination_type_code : '
5695: || rec_pod.destination_type_code
5696: || ' project_id : '
5697: || rec_pod.project_id;
5698: fnd_log.STRING (fnd_log.level_statement,
5699: g_log_head || '.' || l_api_name || '.'
5700: || l_stmt_num,
5701: l_api_message
5702: );
5720: FOR l_counter IN
5721: l_transaction_flows_tbl.FIRST .. l_transaction_flows_tbl.LAST
5722: LOOP
5723: IF g_debug = 'Y'
5724: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5725: THEN
5726: fnd_log.STRING (fnd_log.level_event,
5727: g_log_head
5728: || '.'
5722: LOOP
5723: IF g_debug = 'Y'
5724: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5725: THEN
5726: fnd_log.STRING (fnd_log.level_event,
5727: g_log_head
5728: || '.'
5729: || l_api_name
5730: || '.'
5791: THEN
5792: l_api_message := 'Error creating event';
5793:
5794: IF g_debug = 'Y'
5795: AND fnd_log.level_unexpected >=
5796: fnd_log.g_current_runtime_level
5797: THEN
5798: fnd_log.STRING (fnd_log.level_unexpected,
5799: g_log_head
5792: l_api_message := 'Error creating event';
5793:
5794: IF g_debug = 'Y'
5795: AND fnd_log.level_unexpected >=
5796: fnd_log.g_current_runtime_level
5797: THEN
5798: fnd_log.STRING (fnd_log.level_unexpected,
5799: g_log_head
5800: || '.'
5794: IF g_debug = 'Y'
5795: AND fnd_log.level_unexpected >=
5796: fnd_log.g_current_runtime_level
5797: THEN
5798: fnd_log.STRING (fnd_log.level_unexpected,
5799: g_log_head
5800: || '.'
5801: || l_api_name
5802: || l_stmt_num,
5821: THEN
5822: l_stmt_num := 90;
5823:
5824: IF g_debug = 'Y'
5825: AND fnd_log.level_event >=
5826: fnd_log.g_current_runtime_level
5827: THEN
5828: fnd_log.STRING (fnd_log.level_event,
5829: g_log_head
5822: l_stmt_num := 90;
5823:
5824: IF g_debug = 'Y'
5825: AND fnd_log.level_event >=
5826: fnd_log.g_current_runtime_level
5827: THEN
5828: fnd_log.STRING (fnd_log.level_event,
5829: g_log_head
5830: || '.'
5824: IF g_debug = 'Y'
5825: AND fnd_log.level_event >=
5826: fnd_log.g_current_runtime_level
5827: THEN
5828: fnd_log.STRING (fnd_log.level_event,
5829: g_log_head
5830: || '.'
5831: || l_api_name
5832: || '.'
5871: THEN
5872: l_api_message := 'Error creating event';
5873:
5874: IF g_debug = 'Y'
5875: AND fnd_log.level_unexpected >=
5876: fnd_log.g_current_runtime_level
5877: THEN
5878: fnd_log.STRING (fnd_log.level_unexpected,
5879: g_log_head
5872: l_api_message := 'Error creating event';
5873:
5874: IF g_debug = 'Y'
5875: AND fnd_log.level_unexpected >=
5876: fnd_log.g_current_runtime_level
5877: THEN
5878: fnd_log.STRING (fnd_log.level_unexpected,
5879: g_log_head
5880: || '.'
5874: IF g_debug = 'Y'
5875: AND fnd_log.level_unexpected >=
5876: fnd_log.g_current_runtime_level
5877: THEN
5878: fnd_log.STRING (fnd_log.level_unexpected,
5879: g_log_head
5880: || '.'
5881: || l_api_name
5882: || l_stmt_num,
5926: IF (l_drop_ship_flag IN (1, 2))
5927: THEN
5928: -- This is a pure (external) drop ship scenario. Seed a LOGICAL_RECEIVE event in the receiving org.
5929: IF g_debug = 'Y'
5930: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5931: THEN
5932: fnd_log.STRING (fnd_log.level_event,
5933: g_log_head
5934: || '.'
5928: -- This is a pure (external) drop ship scenario. Seed a LOGICAL_RECEIVE event in the receiving org.
5929: IF g_debug = 'Y'
5930: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
5931: THEN
5932: fnd_log.STRING (fnd_log.level_event,
5933: g_log_head
5934: || '.'
5935: || l_api_name
5936: || '.'
5972: THEN
5973: l_api_message := 'Error creating event';
5974:
5975: IF g_debug = 'Y'
5976: AND fnd_log.level_unexpected >=
5977: fnd_log.g_current_runtime_level
5978: THEN
5979: fnd_log.STRING (fnd_log.level_unexpected,
5980: g_log_head || '.' || l_api_name
5973: l_api_message := 'Error creating event';
5974:
5975: IF g_debug = 'Y'
5976: AND fnd_log.level_unexpected >=
5977: fnd_log.g_current_runtime_level
5978: THEN
5979: fnd_log.STRING (fnd_log.level_unexpected,
5980: g_log_head || '.' || l_api_name
5981: || l_stmt_num,
5975: IF g_debug = 'Y'
5976: AND fnd_log.level_unexpected >=
5977: fnd_log.g_current_runtime_level
5978: THEN
5979: fnd_log.STRING (fnd_log.level_unexpected,
5980: g_log_head || '.' || l_api_name
5981: || l_stmt_num,
5982: 'Create_ReceiveEvents : '
5983: || l_stmt_num
5998: FROM rcv_transactions rt
5999: WHERE transaction_id = p_rcv_transaction_id;
6000:
6001: IF g_debug = 'Y'
6002: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6003: THEN
6004: fnd_log.STRING (fnd_log.level_event,
6005: g_log_head
6006: || '.'
6000:
6001: IF g_debug = 'Y'
6002: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6003: THEN
6004: fnd_log.STRING (fnd_log.level_event,
6005: g_log_head
6006: || '.'
6007: || l_api_name
6008: || '.'
6044: THEN
6045: l_api_message := 'Error creating event';
6046:
6047: IF g_debug = 'Y'
6048: AND fnd_log.level_unexpected >=
6049: fnd_log.g_current_runtime_level
6050: THEN
6051: fnd_log.STRING (fnd_log.level_unexpected,
6052: g_log_head || '.' || l_api_name
6045: l_api_message := 'Error creating event';
6046:
6047: IF g_debug = 'Y'
6048: AND fnd_log.level_unexpected >=
6049: fnd_log.g_current_runtime_level
6050: THEN
6051: fnd_log.STRING (fnd_log.level_unexpected,
6052: g_log_head || '.' || l_api_name
6053: || l_stmt_num,
6047: IF g_debug = 'Y'
6048: AND fnd_log.level_unexpected >=
6049: fnd_log.g_current_runtime_level
6050: THEN
6051: fnd_log.STRING (fnd_log.level_unexpected,
6052: g_log_head || '.' || l_api_name
6053: || l_stmt_num,
6054: 'Create_ReceiveEvents : '
6055: || l_stmt_num
6067:
6068: l_stmt_num := 150;
6069:
6070: IF g_debug = 'Y'
6071: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6072: THEN
6073: fnd_log.STRING (fnd_log.level_event,
6074: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
6075: 'Inserting transactions into GRAT'
6069:
6070: IF g_debug = 'Y'
6071: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6072: THEN
6073: fnd_log.STRING (fnd_log.level_event,
6074: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
6075: 'Inserting transactions into GRAT'
6076: );
6077: END IF;
6086: THEN
6087: l_api_message := 'Error inserting transactions into GRAT';
6088:
6089: IF g_debug = 'Y'
6090: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6091: THEN
6092: fnd_log.STRING (fnd_log.level_unexpected,
6093: g_log_head || '.' || l_api_name || l_stmt_num,
6094: 'Create_ReceiveEvents : '
6088:
6089: IF g_debug = 'Y'
6090: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6091: THEN
6092: fnd_log.STRING (fnd_log.level_unexpected,
6093: g_log_head || '.' || l_api_name || l_stmt_num,
6094: 'Create_ReceiveEvents : '
6095: || l_stmt_num
6096: || ' : '
6105: THEN
6106: l_stmt_num := 160;
6107:
6108: IF g_debug = 'Y'
6109: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6110: THEN
6111: fnd_log.STRING (fnd_log.level_event,
6112: g_log_head || '.' || l_api_name || '.'
6113: || l_stmt_num,
6107:
6108: IF g_debug = 'Y'
6109: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6110: THEN
6111: fnd_log.STRING (fnd_log.level_event,
6112: g_log_head || '.' || l_api_name || '.'
6113: || l_stmt_num,
6114: 'Inserting transactions into MMT'
6115: );
6126: THEN
6127: l_api_message := 'Error inserting transactions into MMT';
6128:
6129: IF g_debug = 'Y'
6130: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6131: THEN
6132: fnd_log.STRING (fnd_log.level_unexpected,
6133: g_log_head || '.' || l_api_name || l_stmt_num,
6134: 'Create_ReceiveEvents : '
6128:
6129: IF g_debug = 'Y'
6130: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6131: THEN
6132: fnd_log.STRING (fnd_log.level_unexpected,
6133: g_log_head || '.' || l_api_name || l_stmt_num,
6134: 'Create_ReceiveEvents : '
6135: || l_stmt_num
6136: || ' : '
6152: fnd_msg_pub.count_and_get (p_count => x_msg_count,
6153: p_data => x_msg_data);
6154:
6155: IF g_debug = 'Y'
6156: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
6157: THEN
6158: fnd_log.STRING (fnd_log.level_procedure,
6159: g_log_head || '.' || l_api_name || '.end',
6160: 'Create_ReceiveEvents >>'
6154:
6155: IF g_debug = 'Y'
6156: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
6157: THEN
6158: fnd_log.STRING (fnd_log.level_procedure,
6159: g_log_head || '.' || l_api_name || '.end',
6160: 'Create_ReceiveEvents >>'
6161: );
6162: END IF;
6180: ROLLBACK TO create_receiveevents_pvt;
6181: x_return_status := fnd_api.g_ret_sts_unexp_error;
6182:
6183: IF g_debug = 'Y'
6184: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6185: THEN
6186: fnd_log.STRING (fnd_log.level_unexpected,
6187: g_log_head || '.' || l_api_name || l_stmt_num,
6188: 'Create_ReceiveEvents : '
6182:
6183: IF g_debug = 'Y'
6184: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6185: THEN
6186: fnd_log.STRING (fnd_log.level_unexpected,
6187: g_log_head || '.' || l_api_name || l_stmt_num,
6188: 'Create_ReceiveEvents : '
6189: || l_stmt_num
6190: || ' : '
6263: -- Standard start of API savepoint
6264: SAVEPOINT create_deliver_txns;
6265: l_stmt_num := 0;
6266:
6267: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
6268: THEN
6269: fnd_log.STRING (fnd_log.level_procedure, c_log_module, 'Begin...');
6270: END IF;
6271:
6265: l_stmt_num := 0;
6266:
6267: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
6268: THEN
6269: fnd_log.STRING (fnd_log.level_procedure, c_log_module, 'Begin...');
6270: END IF;
6271:
6272: -- Initialize API return status to success
6273: x_return_status := fnd_api.g_ret_sts_success;
6310: SELECT set_of_books_id
6311: INTO l_po_ledger_id
6312: FROM financials_system_parameters;
6313:
6314: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
6315: THEN
6316: l_api_message :=
6317: 'Creating Deliver transactions : RCV Transaction ID : '
6318: || p_rcv_transaction_id
6337: || ', Category ID : '
6338: || l_category_id
6339: || ', Accrual Flag : '
6340: || l_accrual_flag;
6341: fnd_log.STRING (fnd_log.level_statement,
6342: c_log_module || '.' || l_stmt_num,
6343: l_api_message
6344: );
6345: END IF;
6368: inv_transaction_flow_pub.g_qualifier_code;
6369: l_qualifier_value_tbl (l_qualifier_value_tbl.COUNT + 1) :=
6370: l_category_id;
6371:
6372: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
6373: THEN
6374: l_api_message :=
6375: 'Getting Procurement Transaction Flow :'
6376: || 'l_po_org_id : '
6378: || ' l_rcv_org_id : '
6379: || l_rcv_org_id
6380: || ' l_rcv_organization_id : '
6381: || l_rcv_organization_id;
6382: fnd_log.STRING (fnd_log.level_statement,
6383: c_log_module || '.' || l_stmt_num,
6384: l_api_message
6385: );
6386: END IF;
6416: ELSIF (l_return_status = 'W')
6417: THEN
6418: l_trx_flow_exists_flag := 0;
6419:
6420: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6421: THEN
6422: fnd_log.STRING (fnd_log.level_event,
6423: c_log_module || '.' || l_stmt_num,
6424: 'Transaction Flow does not exist'
6418: l_trx_flow_exists_flag := 0;
6419:
6420: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6421: THEN
6422: fnd_log.STRING (fnd_log.level_event,
6423: c_log_module || '.' || l_stmt_num,
6424: 'Transaction Flow does not exist'
6425: );
6426: END IF;
6430: IF (l_po_ledger_id <> l_rcv_ledger_id)
6431: THEN
6432: l_api_message := 'Transaction Flow does not exist';
6433:
6434: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6435: )
6436: THEN
6437: fnd_log.STRING (fnd_log.level_unexpected,
6438: c_log_module || '.' || l_stmt_num,
6433:
6434: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6435: )
6436: THEN
6437: fnd_log.STRING (fnd_log.level_unexpected,
6438: c_log_module || '.' || l_stmt_num,
6439: l_api_message
6440: );
6441: END IF;
6445: ELSE
6446: l_api_message := 'Error occurred in Transaction Flow API';
6447:
6448: IF g_debug = 'Y'
6449: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6450: THEN
6451: fnd_log.STRING (fnd_log.level_unexpected,
6452: g_log_head || '.' || l_api_name || l_stmt_num,
6453: 'Create_DeliverEvents : '
6447:
6448: IF g_debug = 'Y'
6449: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6450: THEN
6451: fnd_log.STRING (fnd_log.level_unexpected,
6452: g_log_head || '.' || l_api_name || l_stmt_num,
6453: 'Create_DeliverEvents : '
6454: || l_stmt_num
6455: || ' : '
6469: WHERE transaction_id = p_rcv_transaction_id;
6470:
6471: l_stmt_num := 60;
6472:
6473: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6474: THEN
6475: fnd_log.STRING (fnd_log.level_event,
6476: c_log_module || '.' || l_stmt_num,
6477: 'Seeding Deliver Txn'
6471: l_stmt_num := 60;
6472:
6473: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6474: THEN
6475: fnd_log.STRING (fnd_log.level_event,
6476: c_log_module || '.' || l_stmt_num,
6477: 'Seeding Deliver Txn'
6478: );
6479: END IF;
6509: IF l_return_status <> fnd_api.g_ret_sts_success
6510: THEN
6511: l_api_message := 'Error creating Txn';
6512:
6513: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)
6514: THEN
6515: fnd_log.STRING (fnd_log.level_unexpected,
6516: c_log_module || '.' || l_stmt_num,
6517: l_api_message
6511: l_api_message := 'Error creating Txn';
6512:
6513: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)
6514: THEN
6515: fnd_log.STRING (fnd_log.level_unexpected,
6516: c_log_module || '.' || l_stmt_num,
6517: l_api_message
6518: );
6519: END IF;
6527: IF l_trx_flow_exists_flag = 0
6528: THEN
6529: l_stmt_num := 70;
6530:
6531: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6532: THEN
6533: fnd_log.STRING (fnd_log.level_event,
6534: c_log_module || '.' || l_stmt_num,
6535: 'Checking if encumbrance txns need to be created'
6529: l_stmt_num := 70;
6530:
6531: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6532: THEN
6533: fnd_log.STRING (fnd_log.level_event,
6534: c_log_module || '.' || l_stmt_num,
6535: 'Checking if encumbrance txns need to be created'
6536: );
6537: END IF;
6549: IF l_return_status <> fnd_api.g_ret_sts_success
6550: THEN
6551: l_api_message := 'Error in checking for encumbrance flag ';
6552:
6553: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6554: )
6555: THEN
6556: fnd_log.STRING (fnd_log.level_unexpected,
6557: c_log_module || '.' || l_stmt_num,
6552:
6553: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6554: )
6555: THEN
6556: fnd_log.STRING (fnd_log.level_unexpected,
6557: c_log_module || '.' || l_stmt_num,
6558: l_api_message
6559: );
6560: END IF;
6561:
6562: RAISE fnd_api.g_exc_unexpected_error;
6563: END IF;
6564:
6565: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
6566: THEN
6567: l_api_message := 'Encumbrance Flag : ' || l_encumbrance_flag;
6568: fnd_log.STRING (fnd_log.level_statement,
6569: c_log_module || '.' || l_stmt_num,
6564:
6565: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
6566: THEN
6567: l_api_message := 'Encumbrance Flag : ' || l_encumbrance_flag;
6568: fnd_log.STRING (fnd_log.level_statement,
6569: c_log_module || '.' || l_stmt_num,
6570: l_api_message
6571: );
6572: END IF;
6574: IF (l_encumbrance_flag = 'Y')
6575: THEN
6576: l_stmt_num := 80;
6577:
6578: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6579: THEN
6580: fnd_log.STRING (fnd_log.level_event,
6581: c_log_module || '.' || l_stmt_num,
6582: 'Seeding Encumbrance Reversal Txn'
6576: l_stmt_num := 80;
6577:
6578: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6579: THEN
6580: fnd_log.STRING (fnd_log.level_event,
6581: c_log_module || '.' || l_stmt_num,
6582: 'Seeding Encumbrance Reversal Txn'
6583: );
6584: END IF;
6623: ELSIF l_return_status <> 'W'
6624: THEN
6625: l_api_message := 'Error in seeding encumbrance reversal event';
6626:
6627: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6628: )
6629: THEN
6630: fnd_log.STRING (fnd_log.level_unexpected,
6631: c_log_module || '.' || l_stmt_num,
6626:
6627: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
6628: )
6629: THEN
6630: fnd_log.STRING (fnd_log.level_unexpected,
6631: c_log_module || '.' || l_stmt_num,
6632: l_api_message
6633: );
6634: END IF;
6639: END IF; -- end if trx_flow_exists_flag = 0
6640:
6641: l_stmt_num := 90;
6642:
6643: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6644: THEN
6645: fnd_log.STRING (fnd_log.level_event,
6646: c_log_module || '.' || l_stmt_num,
6647: 'Inserting txns into GRAT'
6641: l_stmt_num := 90;
6642:
6643: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
6644: THEN
6645: fnd_log.STRING (fnd_log.level_event,
6646: c_log_module || '.' || l_stmt_num,
6647: 'Inserting txns into GRAT'
6648: );
6649: END IF;
6657: IF l_return_status <> fnd_api.g_ret_sts_success
6658: THEN
6659: l_api_message := 'Error inserting txns into GRAT';
6660:
6661: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)
6662: THEN
6663: fnd_log.STRING (fnd_log.level_unexpected,
6664: c_log_module || l_stmt_num,
6665: l_api_message
6659: l_api_message := 'Error inserting txns into GRAT';
6660:
6661: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)
6662: THEN
6663: fnd_log.STRING (fnd_log.level_unexpected,
6664: c_log_module || l_stmt_num,
6665: l_api_message
6666: );
6667: END IF;
6677: -- Standard Call to get message count and if count = 1, get message info
6678: fnd_msg_pub.count_and_get (p_count => x_msg_count,
6679: p_data => x_msg_data);
6680:
6681: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
6682: THEN
6683: fnd_log.STRING (fnd_log.level_procedure, c_log_module, '...End');
6684: END IF;
6685: EXCEPTION
6679: p_data => x_msg_data);
6680:
6681: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
6682: THEN
6683: fnd_log.STRING (fnd_log.level_procedure, c_log_module, '...End');
6684: END IF;
6685: EXCEPTION
6686: WHEN fnd_api.g_exc_error
6687: THEN
6701: THEN
6702: ROLLBACK TO create_deliver_txns;
6703: x_return_status := fnd_api.g_ret_sts_unexp_error;
6704:
6705: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)
6706: THEN
6707: fnd_log.STRING (fnd_log.level_unexpected,
6708: c_log_module || '.' || l_stmt_num,
6709: SUBSTR (SQLERRM, 1, 200)
6703: x_return_status := fnd_api.g_ret_sts_unexp_error;
6704:
6705: IF (fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)
6706: THEN
6707: fnd_log.STRING (fnd_log.level_unexpected,
6708: c_log_module || '.' || l_stmt_num,
6709: SUBSTR (SQLERRM, 1, 200)
6710: );
6711: END IF;
6781: SAVEPOINT create_rtrevents_pvt;
6782: l_stmt_num := 0;
6783:
6784: IF g_debug = 'Y'
6785: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
6786: THEN
6787: fnd_log.STRING (fnd_log.level_procedure,
6788: g_log_head || '.' || l_api_name || '.begin',
6789: 'Create_RTREvents <<'
6783:
6784: IF g_debug = 'Y'
6785: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
6786: THEN
6787: fnd_log.STRING (fnd_log.level_procedure,
6788: g_log_head || '.' || l_api_name || '.begin',
6789: 'Create_RTREvents <<'
6790: );
6791: END IF;
6848: INTO l_po_ledger_id
6849: FROM financials_system_parameters;
6850:
6851: IF g_debug = 'Y'
6852: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
6853: THEN
6854: l_api_message :=
6855: 'Creating RTR transactions : RCV Transaction ID : '
6856: || p_rcv_transaction_id
6879: || ', Category ID : '
6880: || l_category_id
6881: || ', Accrual Flag : '
6882: || l_accrual_flag;
6883: fnd_log.STRING (fnd_log.level_statement,
6884: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
6885: l_api_message
6886: );
6887: END IF;
6912: l_category_id;
6913: l_stmt_num := 40;
6914:
6915: IF g_debug = 'Y'
6916: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
6917: THEN
6918: l_api_message :=
6919: 'Getting Procurement Transaction Flow :'
6920: || 'l_po_org_id : '
6922: || ' l_rcv_org_id : '
6923: || l_rcv_org_id
6924: || ' l_rcv_organization_id : '
6925: || l_rcv_organization_id;
6926: fnd_log.STRING (fnd_log.level_statement,
6927: g_log_head || '.' || l_api_name || '.'
6928: || l_stmt_num,
6929: l_api_message
6930: );
6962: THEN
6963: l_trx_flow_exists_flag := 0;
6964:
6965: IF g_debug = 'Y'
6966: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6967: THEN
6968: fnd_log.STRING (fnd_log.level_event,
6969: g_log_head
6970: || '.'
6964:
6965: IF g_debug = 'Y'
6966: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
6967: THEN
6968: fnd_log.STRING (fnd_log.level_event,
6969: g_log_head
6970: || '.'
6971: || l_api_name
6972: || '.'
6981: THEN
6982: l_api_message := 'Transaction Flow does not exist';
6983:
6984: IF g_debug = 'Y'
6985: AND fnd_log.level_unexpected >=
6986: fnd_log.g_current_runtime_level
6987: THEN
6988: fnd_log.STRING (fnd_log.level_unexpected,
6989: g_log_head || '.' || l_api_name
6982: l_api_message := 'Transaction Flow does not exist';
6983:
6984: IF g_debug = 'Y'
6985: AND fnd_log.level_unexpected >=
6986: fnd_log.g_current_runtime_level
6987: THEN
6988: fnd_log.STRING (fnd_log.level_unexpected,
6989: g_log_head || '.' || l_api_name
6990: || l_stmt_num,
6984: IF g_debug = 'Y'
6985: AND fnd_log.level_unexpected >=
6986: fnd_log.g_current_runtime_level
6987: THEN
6988: fnd_log.STRING (fnd_log.level_unexpected,
6989: g_log_head || '.' || l_api_name
6990: || l_stmt_num,
6991: 'Create_RTREvents : '
6992: || l_stmt_num
7000: ELSE
7001: l_api_message := 'Error occurred in Transaction Flow API';
7002:
7003: IF g_debug = 'Y'
7004: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7005: THEN
7006: fnd_log.STRING (fnd_log.level_unexpected,
7007: g_log_head || '.' || l_api_name || l_stmt_num,
7008: 'Create_RTREvents : '
7002:
7003: IF g_debug = 'Y'
7004: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7005: THEN
7006: fnd_log.STRING (fnd_log.level_unexpected,
7007: g_log_head || '.' || l_api_name || l_stmt_num,
7008: 'Create_RTREvents : '
7009: || l_stmt_num
7010: || ' : '
7028:
7029: l_stmt_num := 60;
7030:
7031: IF g_debug = 'Y'
7032: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7033: THEN
7034: fnd_log.STRING (fnd_log.level_event,
7035: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7036: 'Seeding RTR Event'
7030:
7031: IF g_debug = 'Y'
7032: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7033: THEN
7034: fnd_log.STRING (fnd_log.level_event,
7035: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7036: 'Seeding RTR Event'
7037: );
7038: END IF;
7070: THEN
7071: l_api_message := 'Error creating event';
7072:
7073: IF g_debug = 'Y'
7074: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7075: THEN
7076: fnd_log.STRING (fnd_log.level_unexpected,
7077: g_log_head || '.' || l_api_name || l_stmt_num,
7078: 'Create_RTREvents : '
7072:
7073: IF g_debug = 'Y'
7074: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7075: THEN
7076: fnd_log.STRING (fnd_log.level_unexpected,
7077: g_log_head || '.' || l_api_name || l_stmt_num,
7078: 'Create_RTREvents : '
7079: || l_stmt_num
7080: || ' : '
7089: THEN
7090: l_stmt_num := 70;
7091:
7092: IF g_debug = 'Y'
7093: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7094: THEN
7095: fnd_log.STRING
7096: (fnd_log.level_event,
7097: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7091:
7092: IF g_debug = 'Y'
7093: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7094: THEN
7095: fnd_log.STRING
7096: (fnd_log.level_event,
7097: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7098: 'Checking if encumbrance transactions need to be seeded.'
7099: );
7092: IF g_debug = 'Y'
7093: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7094: THEN
7095: fnd_log.STRING
7096: (fnd_log.level_event,
7097: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7098: 'Checking if encumbrance transactions need to be seeded.'
7099: );
7100: END IF;
7112: THEN
7113: l_api_message := 'Error in checking for encumbrance flag ';
7114:
7115: IF g_debug = 'Y'
7116: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7117: THEN
7118: fnd_log.STRING (fnd_log.level_unexpected,
7119: g_log_head || '.' || l_api_name || l_stmt_num,
7120: 'Create_RTREvents : '
7114:
7115: IF g_debug = 'Y'
7116: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7117: THEN
7118: fnd_log.STRING (fnd_log.level_unexpected,
7119: g_log_head || '.' || l_api_name || l_stmt_num,
7120: 'Create_RTREvents : '
7121: || l_stmt_num
7122: || ' : '
7127: RAISE fnd_api.g_exc_unexpected_error;
7128: END IF;
7129:
7130: IF g_debug = 'Y'
7131: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
7132: THEN
7133: l_api_message := 'Encumbrance Flag : ' || l_encumbrance_flag;
7134: fnd_log.STRING (fnd_log.level_statement,
7135: g_log_head || '.' || l_api_name || '.'
7130: IF g_debug = 'Y'
7131: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
7132: THEN
7133: l_api_message := 'Encumbrance Flag : ' || l_encumbrance_flag;
7134: fnd_log.STRING (fnd_log.level_statement,
7135: g_log_head || '.' || l_api_name || '.'
7136: || l_stmt_num,
7137: l_api_message
7138: );
7142: THEN
7143: l_stmt_num := 80;
7144:
7145: IF g_debug = 'Y'
7146: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7147: THEN
7148: fnd_log.STRING (fnd_log.level_event,
7149: g_log_head
7150: || '.'
7144:
7145: IF g_debug = 'Y'
7146: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7147: THEN
7148: fnd_log.STRING (fnd_log.level_event,
7149: g_log_head
7150: || '.'
7151: || l_api_name
7152: || '.'
7193: THEN
7194: l_api_message := 'Error in seeding encumbrance reversal event';
7195:
7196: IF g_debug = 'Y'
7197: AND fnd_log.level_unexpected >=
7198: fnd_log.g_current_runtime_level
7199: THEN
7200: fnd_log.STRING (fnd_log.level_unexpected,
7201: g_log_head || '.' || l_api_name
7194: l_api_message := 'Error in seeding encumbrance reversal event';
7195:
7196: IF g_debug = 'Y'
7197: AND fnd_log.level_unexpected >=
7198: fnd_log.g_current_runtime_level
7199: THEN
7200: fnd_log.STRING (fnd_log.level_unexpected,
7201: g_log_head || '.' || l_api_name
7202: || l_stmt_num,
7196: IF g_debug = 'Y'
7197: AND fnd_log.level_unexpected >=
7198: fnd_log.g_current_runtime_level
7199: THEN
7200: fnd_log.STRING (fnd_log.level_unexpected,
7201: g_log_head || '.' || l_api_name
7202: || l_stmt_num,
7203: 'Create_RTREvents : '
7204: || l_stmt_num
7214:
7215: l_stmt_num := 90;
7216:
7217: IF g_debug = 'Y'
7218: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7219: THEN
7220: fnd_log.STRING (fnd_log.level_event,
7221: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7222: 'Inserting transactions into GRAT'
7216:
7217: IF g_debug = 'Y'
7218: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7219: THEN
7220: fnd_log.STRING (fnd_log.level_event,
7221: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7222: 'Inserting transactions into GRAT'
7223: );
7224: END IF;
7233: THEN
7234: l_api_message := 'Error inserting transactions into GRAT';
7235:
7236: IF g_debug = 'Y'
7237: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7238: THEN
7239: fnd_log.STRING (fnd_log.level_unexpected,
7240: g_log_head || '.' || l_api_name || l_stmt_num,
7241: 'Create_RTREvents : '
7235:
7236: IF g_debug = 'Y'
7237: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7238: THEN
7239: fnd_log.STRING (fnd_log.level_unexpected,
7240: g_log_head || '.' || l_api_name || l_stmt_num,
7241: 'Create_RTREvents : '
7242: || l_stmt_num
7243: || ' : '
7258: fnd_msg_pub.count_and_get (p_count => x_msg_count,
7259: p_data => x_msg_data);
7260:
7261: IF g_debug = 'Y'
7262: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
7263: THEN
7264: fnd_log.STRING (fnd_log.level_procedure,
7265: g_log_head || '.' || l_api_name || '.end',
7266: 'Create_RTREvents >>'
7260:
7261: IF g_debug = 'Y'
7262: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
7263: THEN
7264: fnd_log.STRING (fnd_log.level_procedure,
7265: g_log_head || '.' || l_api_name || '.end',
7266: 'Create_RTREvents >>'
7267: );
7268: END IF;
7286: ROLLBACK TO create_rtrevents_pvt;
7287: x_return_status := fnd_api.g_ret_sts_unexp_error;
7288:
7289: IF g_debug = 'Y'
7290: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7291: THEN
7292: fnd_log.STRING (fnd_log.level_unexpected,
7293: g_log_head || '.' || l_api_name || l_stmt_num,
7294: 'Create_RTREvents : '
7288:
7289: IF g_debug = 'Y'
7290: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7291: THEN
7292: fnd_log.STRING (fnd_log.level_unexpected,
7293: g_log_head || '.' || l_api_name || l_stmt_num,
7294: 'Create_RTREvents : '
7295: || l_stmt_num
7296: || ' : '
7411: SAVEPOINT create_rtvevents_pvt;
7412: l_stmt_num := 0;
7413:
7414: IF g_debug = 'Y'
7415: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
7416: THEN
7417: fnd_log.STRING (fnd_log.level_procedure,
7418: g_log_head || '.' || l_api_name || '.begin',
7419: 'Create_RTVEvents <<'
7413:
7414: IF g_debug = 'Y'
7415: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
7416: THEN
7417: fnd_log.STRING (fnd_log.level_procedure,
7418: g_log_head || '.' || l_api_name || '.begin',
7419: 'Create_RTVEvents <<'
7420: );
7421: END IF;
7476:
7477: l_stmt_num := 40;
7478:
7479: IF g_debug = 'Y'
7480: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
7481: THEN
7482: l_api_message :=
7483: 'Creating RTV transactions : RCV Transaction ID : '
7484: || p_rcv_transaction_id
7507: || ', Category ID : '
7508: || l_category_id
7509: || ', Accrual Flag : '
7510: || l_accrual_flag;
7511: fnd_log.STRING (fnd_log.level_statement,
7512: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7513: l_api_message
7514: );
7515: END IF;
7526: l_category_id;
7527: l_stmt_num := 50;
7528:
7529: IF g_debug = 'Y'
7530: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
7531: THEN
7532: l_api_message :=
7533: 'Getting Procurement Transaction Flow :'
7534: || 'l_po_org_id : '
7536: || ' l_rcv_org_id : '
7537: || l_rcv_org_id
7538: || ' l_rcv_organization_id : '
7539: || l_rcv_organization_id;
7540: fnd_log.STRING (fnd_log.level_statement,
7541: g_log_head || '.' || l_api_name || '.'
7542: || l_stmt_num,
7543: l_api_message
7544: );
7570: THEN
7571: l_trx_flow_exists_flag := 0;
7572:
7573: IF g_debug = 'Y'
7574: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7575: THEN
7576: fnd_log.STRING (fnd_log.level_event,
7577: g_log_head
7578: || '.'
7572:
7573: IF g_debug = 'Y'
7574: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7575: THEN
7576: fnd_log.STRING (fnd_log.level_event,
7577: g_log_head
7578: || '.'
7579: || l_api_name
7580: || '.'
7589: THEN
7590: l_api_message := 'Transaction Flow does not exist';
7591:
7592: IF g_debug = 'Y'
7593: AND fnd_log.level_unexpected >=
7594: fnd_log.g_current_runtime_level
7595: THEN
7596: fnd_log.STRING (fnd_log.level_unexpected,
7597: g_log_head || '.' || l_api_name
7590: l_api_message := 'Transaction Flow does not exist';
7591:
7592: IF g_debug = 'Y'
7593: AND fnd_log.level_unexpected >=
7594: fnd_log.g_current_runtime_level
7595: THEN
7596: fnd_log.STRING (fnd_log.level_unexpected,
7597: g_log_head || '.' || l_api_name
7598: || l_stmt_num,
7592: IF g_debug = 'Y'
7593: AND fnd_log.level_unexpected >=
7594: fnd_log.g_current_runtime_level
7595: THEN
7596: fnd_log.STRING (fnd_log.level_unexpected,
7597: g_log_head || '.' || l_api_name
7598: || l_stmt_num,
7599: 'Create_RTVEvents : '
7600: || l_stmt_num
7608: ELSE
7609: l_api_message := 'Error occurred in Transaction Flow API';
7610:
7611: IF g_debug = 'Y'
7612: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7613: THEN
7614: fnd_log.STRING (fnd_log.level_unexpected,
7615: g_log_head || '.' || l_api_name || l_stmt_num,
7616: 'Create_RTVEvents : '
7610:
7611: IF g_debug = 'Y'
7612: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7613: THEN
7614: fnd_log.STRING (fnd_log.level_unexpected,
7615: g_log_head || '.' || l_api_name || l_stmt_num,
7616: 'Create_RTVEvents : '
7617: || l_stmt_num
7618: || ' : '
7635: LOOP
7636: l_stmt_num := 50;
7637:
7638: IF g_debug = 'Y'
7639: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
7640: THEN
7641: l_api_message :=
7642: 'Creating transactions : '
7643: || 'po_distribution_id : '
7645: || ' destination_type_code : '
7646: || rec_pod.destination_type_code
7647: || ' project_id : '
7648: || rec_pod.project_id;
7649: fnd_log.STRING (fnd_log.level_statement,
7650: g_log_head || '.' || l_api_name || '.'
7651: || l_stmt_num,
7652: l_api_message
7653: );
7671: FOR l_counter IN
7672: l_transaction_flows_tbl.FIRST .. l_transaction_flows_tbl.LAST
7673: LOOP
7674: IF g_debug = 'Y'
7675: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7676: THEN
7677: fnd_log.STRING (fnd_log.level_event,
7678: g_log_head
7679: || '.'
7673: LOOP
7674: IF g_debug = 'Y'
7675: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7676: THEN
7677: fnd_log.STRING (fnd_log.level_event,
7678: g_log_head
7679: || '.'
7680: || l_api_name
7681: || '.'
7741: THEN
7742: l_api_message := 'Error creating event';
7743:
7744: IF g_debug = 'Y'
7745: AND fnd_log.level_unexpected >=
7746: fnd_log.g_current_runtime_level
7747: THEN
7748: fnd_log.STRING (fnd_log.level_unexpected,
7749: g_log_head
7742: l_api_message := 'Error creating event';
7743:
7744: IF g_debug = 'Y'
7745: AND fnd_log.level_unexpected >=
7746: fnd_log.g_current_runtime_level
7747: THEN
7748: fnd_log.STRING (fnd_log.level_unexpected,
7749: g_log_head
7750: || '.'
7744: IF g_debug = 'Y'
7745: AND fnd_log.level_unexpected >=
7746: fnd_log.g_current_runtime_level
7747: THEN
7748: fnd_log.STRING (fnd_log.level_unexpected,
7749: g_log_head
7750: || '.'
7751: || l_api_name
7752: || l_stmt_num,
7771: THEN
7772: l_stmt_num := 70;
7773:
7774: IF g_debug = 'Y'
7775: AND fnd_log.level_event >=
7776: fnd_log.g_current_runtime_level
7777: THEN
7778: fnd_log.STRING (fnd_log.level_event,
7779: g_log_head
7772: l_stmt_num := 70;
7773:
7774: IF g_debug = 'Y'
7775: AND fnd_log.level_event >=
7776: fnd_log.g_current_runtime_level
7777: THEN
7778: fnd_log.STRING (fnd_log.level_event,
7779: g_log_head
7780: || '.'
7774: IF g_debug = 'Y'
7775: AND fnd_log.level_event >=
7776: fnd_log.g_current_runtime_level
7777: THEN
7778: fnd_log.STRING (fnd_log.level_event,
7779: g_log_head
7780: || '.'
7781: || l_api_name
7782: || '.'
7820: THEN
7821: l_api_message := 'Error creating event';
7822:
7823: IF g_debug = 'Y'
7824: AND fnd_log.level_unexpected >=
7825: fnd_log.g_current_runtime_level
7826: THEN
7827: fnd_log.STRING (fnd_log.level_unexpected,
7828: g_log_head
7821: l_api_message := 'Error creating event';
7822:
7823: IF g_debug = 'Y'
7824: AND fnd_log.level_unexpected >=
7825: fnd_log.g_current_runtime_level
7826: THEN
7827: fnd_log.STRING (fnd_log.level_unexpected,
7828: g_log_head
7829: || '.'
7823: IF g_debug = 'Y'
7824: AND fnd_log.level_unexpected >=
7825: fnd_log.g_current_runtime_level
7826: THEN
7827: fnd_log.STRING (fnd_log.level_unexpected,
7828: g_log_head
7829: || '.'
7830: || l_api_name
7831: || l_stmt_num,
7880: FROM rcv_transactions rt
7881: WHERE transaction_id = p_rcv_transaction_id;
7882:
7883: IF g_debug = 'Y'
7884: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7885: THEN
7886: fnd_log.STRING (fnd_log.level_event,
7887: g_log_head || '.' || l_api_name || '.'
7888: || l_stmt_num,
7882:
7883: IF g_debug = 'Y'
7884: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7885: THEN
7886: fnd_log.STRING (fnd_log.level_event,
7887: g_log_head || '.' || l_api_name || '.'
7888: || l_stmt_num,
7889: 'Seeding RTV in GRAT'
7890: );
7922: THEN
7923: l_api_message := 'Error creating event';
7924:
7925: IF g_debug = 'Y'
7926: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7927: THEN
7928: fnd_log.STRING (fnd_log.level_unexpected,
7929: g_log_head || '.' || l_api_name || l_stmt_num,
7930: 'Create_RTVEvents : '
7924:
7925: IF g_debug = 'Y'
7926: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7927: THEN
7928: fnd_log.STRING (fnd_log.level_unexpected,
7929: g_log_head || '.' || l_api_name || l_stmt_num,
7930: 'Create_RTVEvents : '
7931: || l_stmt_num
7932: || ' : '
7942:
7943: l_stmt_num := 130;
7944:
7945: IF g_debug = 'Y'
7946: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7947: THEN
7948: fnd_log.STRING (fnd_log.level_event,
7949: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7950: 'Inserting transactions into GRAT'
7944:
7945: IF g_debug = 'Y'
7946: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7947: THEN
7948: fnd_log.STRING (fnd_log.level_event,
7949: g_log_head || '.' || l_api_name || '.' || l_stmt_num,
7950: 'Inserting transactions into GRAT'
7951: );
7952: END IF;
7961: THEN
7962: l_api_message := 'Error inserting transactions into GRAT';
7963:
7964: IF g_debug = 'Y'
7965: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7966: THEN
7967: fnd_log.STRING (fnd_log.level_unexpected,
7968: g_log_head || '.' || l_api_name || l_stmt_num,
7969: 'Create_RTVEvents : '
7963:
7964: IF g_debug = 'Y'
7965: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
7966: THEN
7967: fnd_log.STRING (fnd_log.level_unexpected,
7968: g_log_head || '.' || l_api_name || l_stmt_num,
7969: 'Create_RTVEvents : '
7970: || l_stmt_num
7971: || ' : '
7980: THEN
7981: l_stmt_num := 140;
7982:
7983: IF g_debug = 'Y'
7984: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7985: THEN
7986: fnd_log.STRING (fnd_log.level_event,
7987: g_log_head || '.' || l_api_name || '.'
7988: || l_stmt_num,
7982:
7983: IF g_debug = 'Y'
7984: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
7985: THEN
7986: fnd_log.STRING (fnd_log.level_event,
7987: g_log_head || '.' || l_api_name || '.'
7988: || l_stmt_num,
7989: 'Inserting transactions into MMT'
7990: );
8001: THEN
8002: l_api_message := 'Error inserting transactions into MMT';
8003:
8004: IF g_debug = 'Y'
8005: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8006: THEN
8007: fnd_log.STRING (fnd_log.level_unexpected,
8008: g_log_head || '.' || l_api_name || l_stmt_num,
8009: 'Create_RTVEvents : '
8003:
8004: IF g_debug = 'Y'
8005: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8006: THEN
8007: fnd_log.STRING (fnd_log.level_unexpected,
8008: g_log_head || '.' || l_api_name || l_stmt_num,
8009: 'Create_RTVEvents : '
8010: || l_stmt_num
8011: || ' : '
8027: fnd_msg_pub.count_and_get (p_count => x_msg_count,
8028: p_data => x_msg_data);
8029:
8030: IF g_debug = 'Y'
8031: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
8032: THEN
8033: fnd_log.STRING (fnd_log.level_procedure,
8034: g_log_head || '.' || l_api_name || '.end',
8035: 'Create_RTVEvents >>'
8029:
8030: IF g_debug = 'Y'
8031: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
8032: THEN
8033: fnd_log.STRING (fnd_log.level_procedure,
8034: g_log_head || '.' || l_api_name || '.end',
8035: 'Create_RTVEvents >>'
8036: );
8037: END IF;
8055: ROLLBACK TO create_rtvevents_pvt;
8056: x_return_status := fnd_api.g_ret_sts_unexp_error;
8057:
8058: IF g_debug = 'Y'
8059: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8060: THEN
8061: fnd_log.STRING (fnd_log.level_unexpected,
8062: g_log_head || '.' || l_api_name || l_stmt_num,
8063: 'Create_RTVEvents : '
8057:
8058: IF g_debug = 'Y'
8059: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8060: THEN
8061: fnd_log.STRING (fnd_log.level_unexpected,
8062: g_log_head || '.' || l_api_name || l_stmt_num,
8063: 'Create_RTVEvents : '
8064: || l_stmt_num
8065: || ' : '
8119:
8120: BEGIN
8121: SAVEPOINT s_create_accounting_txns;
8122:
8123: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
8124: THEN
8125: fnd_log.STRING (fnd_log.level_procedure, c_log_module, 'Begin...');
8126: END IF;
8127:
8121: SAVEPOINT s_create_accounting_txns;
8122:
8123: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
8124: THEN
8125: fnd_log.STRING (fnd_log.level_procedure, c_log_module, 'Begin...');
8126: END IF;
8127:
8128: -- Standard call to check for call compatibility
8129: IF NOT fnd_api.compatible_api_call (l_api_version,
8174: WHERE line_location_id = l_po_line_location_id;
8175:
8176: IF (l_shipment_type = 'PREPAYMENT')
8177: THEN
8178: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
8179: THEN
8180: fnd_log.STRING
8181: (fnd_log.level_statement,
8182: c_log_module,
8176: IF (l_shipment_type = 'PREPAYMENT')
8177: THEN
8178: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
8179: THEN
8180: fnd_log.STRING
8181: (fnd_log.level_statement,
8182: c_log_module,
8183: 'Shipment Type is Prepayment. No Receive accounting required'
8184: );
8177: THEN
8178: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)
8179: THEN
8180: fnd_log.STRING
8181: (fnd_log.level_statement,
8182: c_log_module,
8183: 'Shipment Type is Prepayment. No Receive accounting required'
8184: );
8185: END IF;
8236: THEN
8237: l_stmt_num := 80;
8238:
8239: IF g_debug = 'Y'
8240: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
8241: THEN
8242: fnd_log.STRING (fnd_log.level_event,
8243: c_log_module || '.' || l_stmt_num,
8244: 'Creating txns For RECEIVE transaction'
8238:
8239: IF g_debug = 'Y'
8240: AND fnd_log.level_event >= fnd_log.g_current_runtime_level
8241: THEN
8242: fnd_log.STRING (fnd_log.level_event,
8243: c_log_module || '.' || l_stmt_num,
8244: 'Creating txns For RECEIVE transaction'
8245: );
8246: END IF;
8261: )
8262: THEN
8263: l_stmt_num := 90;
8264:
8265: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8266: THEN
8267: fnd_log.STRING (fnd_log.level_event,
8268: c_log_module || l_stmt_num,
8269: 'Creating Txns For DELIVER transaction'
8263: l_stmt_num := 90;
8264:
8265: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8266: THEN
8267: fnd_log.STRING (fnd_log.level_event,
8268: c_log_module || l_stmt_num,
8269: 'Creating Txns For DELIVER transaction'
8270: );
8271: END IF;
8286: )
8287: THEN
8288: l_stmt_num := 100;
8289:
8290: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8291: THEN
8292: fnd_log.STRING
8293: (fnd_log.level_event,
8294: c_log_module || l_stmt_num,
8288: l_stmt_num := 100;
8289:
8290: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8291: THEN
8292: fnd_log.STRING
8293: (fnd_log.level_event,
8294: c_log_module || l_stmt_num,
8295: 'Creating Txns For RETURN TO RECEIVING transaction'
8296: );
8289:
8290: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8291: THEN
8292: fnd_log.STRING
8293: (fnd_log.level_event,
8294: c_log_module || l_stmt_num,
8295: 'Creating Txns For RETURN TO RECEIVING transaction'
8296: );
8297: END IF;
8310: )
8311: THEN
8312: l_stmt_num := 110;
8313:
8314: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8315: THEN
8316: fnd_log.STRING
8317: (fnd_log.level_event,
8318: c_log_module || l_stmt_num,
8312: l_stmt_num := 110;
8313:
8314: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8315: THEN
8316: fnd_log.STRING
8317: (fnd_log.level_event,
8318: c_log_module || l_stmt_num,
8319: 'Creating transactions For RETURN TO VENDOR transaction'
8320: );
8313:
8314: IF (fnd_log.level_event >= fnd_log.g_current_runtime_level)
8315: THEN
8316: fnd_log.STRING
8317: (fnd_log.level_event,
8318: c_log_module || l_stmt_num,
8319: 'Creating transactions For RETURN TO VENDOR transaction'
8320: );
8321: END IF;
8333: THEN
8334: l_api_message := 'Error creating event';
8335:
8336: IF g_debug = 'Y'
8337: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8338: THEN
8339: fnd_log.STRING (fnd_log.level_unexpected,
8340: c_log_module || l_stmt_num,
8341: 'Create_ReceivingEvents : '
8335:
8336: IF g_debug = 'Y'
8337: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8338: THEN
8339: fnd_log.STRING (fnd_log.level_unexpected,
8340: c_log_module || l_stmt_num,
8341: 'Create_ReceivingEvents : '
8342: || l_stmt_num
8343: || ' : '
8359: -- Standard Call to get message count and if count = 1, get message info
8360: fnd_msg_pub.count_and_get (p_count => x_msg_count,
8361: p_data => x_msg_data);
8362:
8363: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
8364: THEN
8365: fnd_log.STRING (fnd_log.level_procedure, c_log_module, '...End');
8366: END IF;
8367:
8361: p_data => x_msg_data);
8362:
8363: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
8364: THEN
8365: fnd_log.STRING (fnd_log.level_procedure, c_log_module, '...End');
8366: END IF;
8367:
8368: EXCEPTION
8369: -- rseshadr - return error back to caller
8379: ROLLBACK TO s_create_accounting_txns;
8380: x_return_status := fnd_api.g_ret_sts_unexp_error;
8381:
8382: IF g_debug = 'Y'
8383: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8384: THEN
8385: fnd_log.STRING (fnd_log.level_unexpected,
8386: g_log_head || '.' || l_api_name || l_stmt_num,
8387: 'Create_Accounting_Txns : '
8381:
8382: IF g_debug = 'Y'
8383: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8384: THEN
8385: fnd_log.STRING (fnd_log.level_unexpected,
8386: g_log_head || '.' || l_api_name || l_stmt_num,
8387: 'Create_Accounting_Txns : '
8388: || l_stmt_num
8389: || ' : '
8545: SAVEPOINT create_adjust_txns_pvt;
8546: l_stmt_num := 0;
8547:
8548: IF g_debug = 'Y'
8549: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
8550: THEN
8551: fnd_log.STRING (fnd_log.level_procedure,
8552: g_log_head || '.' || l_api_name || '.begin',
8553: 'Create_Adjust_Txns <<'
8547:
8548: IF g_debug = 'Y'
8549: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
8550: THEN
8551: fnd_log.STRING (fnd_log.level_procedure,
8552: g_log_head || '.' || l_api_name || '.begin',
8553: 'Create_Adjust_Txns <<'
8554: );
8555: END IF;
8576: -- If the old and new price are the same, return
8577: IF p_old_po_price = p_new_po_price
8578: THEN
8579: IF g_debug = 'Y'
8580: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8581: THEN
8582: fnd_log.STRING
8583: (fnd_log.level_statement,
8584: g_log_head || '.' || l_api_name,
8578: THEN
8579: IF g_debug = 'Y'
8580: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8581: THEN
8582: fnd_log.STRING
8583: (fnd_log.level_statement,
8584: g_log_head || '.' || l_api_name,
8585: 'Old and New Prices are same. No Adjust Transactions created'
8586: );
8579: IF g_debug = 'Y'
8580: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8581: THEN
8582: fnd_log.STRING
8583: (fnd_log.level_statement,
8584: g_log_head || '.' || l_api_name,
8585: 'Old and New Prices are same. No Adjust Transactions created'
8586: );
8587: END IF;
8614: -- If Line Type is Service (matching basis = AMOUNT), then return without doing anything
8615: IF (l_matching_basis IS NOT NULL AND l_matching_basis = 'AMOUNT')
8616: THEN
8617: IF g_debug = 'Y'
8618: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8619: THEN
8620: fnd_log.STRING
8621: (fnd_log.level_statement,
8622: g_log_head || '.' || l_api_name,
8616: THEN
8617: IF g_debug = 'Y'
8618: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8619: THEN
8620: fnd_log.STRING
8621: (fnd_log.level_statement,
8622: g_log_head || '.' || l_api_name,
8623: 'Service Line Type. No Adjust Transactions created'
8624: );
8617: IF g_debug = 'Y'
8618: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8619: THEN
8620: fnd_log.STRING
8621: (fnd_log.level_statement,
8622: g_log_head || '.' || l_api_name,
8623: 'Service Line Type. No Adjust Transactions created'
8624: );
8625: END IF;
8632: -- If Shipment Type is Prepayment, then return without doing anything
8633: IF (l_shipment_type = 'PREPAYMENT')
8634: THEN
8635: IF g_debug = 'Y'
8636: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8637: THEN
8638: fnd_log.STRING
8639: (fnd_log.level_statement,
8640: g_log_head || '.' || l_api_name,
8634: THEN
8635: IF g_debug = 'Y'
8636: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8637: THEN
8638: fnd_log.STRING
8639: (fnd_log.level_statement,
8640: g_log_head || '.' || l_api_name,
8641: 'Shipment Type is Prepayment. No Adjust Transactions created'
8642: );
8635: IF g_debug = 'Y'
8636: AND fnd_log.level_statement >= fnd_log.g_current_runtime_level
8637: THEN
8638: fnd_log.STRING
8639: (fnd_log.level_statement,
8640: g_log_head || '.' || l_api_name,
8641: 'Shipment Type is Prepayment. No Adjust Transactions created'
8642: );
8643: END IF;
8737: THEN
8738: l_api_message := 'Error seeding Transactions';
8739:
8740: IF g_debug = 'Y'
8741: AND fnd_log.level_unexpected >=
8742: fnd_log.g_current_runtime_level
8743: THEN
8744: fnd_log.STRING (fnd_log.level_unexpected,
8745: g_log_head || '.' || l_api_name
8738: l_api_message := 'Error seeding Transactions';
8739:
8740: IF g_debug = 'Y'
8741: AND fnd_log.level_unexpected >=
8742: fnd_log.g_current_runtime_level
8743: THEN
8744: fnd_log.STRING (fnd_log.level_unexpected,
8745: g_log_head || '.' || l_api_name
8746: || l_stmt_num,
8740: IF g_debug = 'Y'
8741: AND fnd_log.level_unexpected >=
8742: fnd_log.g_current_runtime_level
8743: THEN
8744: fnd_log.STRING (fnd_log.level_unexpected,
8745: g_log_head || '.' || l_api_name
8746: || l_stmt_num,
8747: 'Create_Adjust_Txns : '
8748: || l_stmt_num
8796: THEN
8797: l_api_message := 'Error seeding Transactions';
8798:
8799: IF g_debug = 'Y'
8800: AND fnd_log.level_unexpected >=
8801: fnd_log.g_current_runtime_level
8802: THEN
8803: fnd_log.STRING (fnd_log.level_unexpected,
8804: g_log_head
8797: l_api_message := 'Error seeding Transactions';
8798:
8799: IF g_debug = 'Y'
8800: AND fnd_log.level_unexpected >=
8801: fnd_log.g_current_runtime_level
8802: THEN
8803: fnd_log.STRING (fnd_log.level_unexpected,
8804: g_log_head
8805: || '.'
8799: IF g_debug = 'Y'
8800: AND fnd_log.level_unexpected >=
8801: fnd_log.g_current_runtime_level
8802: THEN
8803: fnd_log.STRING (fnd_log.level_unexpected,
8804: g_log_head
8805: || '.'
8806: || l_api_name
8807: || l_stmt_num,
8866: THEN
8867: l_api_message := 'Error seeding Transactions';
8868:
8869: IF g_debug = 'Y'
8870: AND fnd_log.level_unexpected >=
8871: fnd_log.g_current_runtime_level
8872: THEN
8873: fnd_log.STRING (fnd_log.level_unexpected,
8874: g_log_head
8867: l_api_message := 'Error seeding Transactions';
8868:
8869: IF g_debug = 'Y'
8870: AND fnd_log.level_unexpected >=
8871: fnd_log.g_current_runtime_level
8872: THEN
8873: fnd_log.STRING (fnd_log.level_unexpected,
8874: g_log_head
8875: || '.'
8869: IF g_debug = 'Y'
8870: AND fnd_log.level_unexpected >=
8871: fnd_log.g_current_runtime_level
8872: THEN
8873: fnd_log.STRING (fnd_log.level_unexpected,
8874: g_log_head
8875: || '.'
8876: || l_api_name
8877: || l_stmt_num,
8901: THEN
8902: l_api_message := 'Error inserting Transactions into GRAT';
8903:
8904: IF g_debug = 'Y'
8905: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8906: THEN
8907: fnd_log.STRING (fnd_log.level_unexpected,
8908: g_log_head || '.' || l_api_name || l_stmt_num,
8909: 'Create_Adjust_Txns : '
8903:
8904: IF g_debug = 'Y'
8905: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8906: THEN
8907: fnd_log.STRING (fnd_log.level_unexpected,
8908: g_log_head || '.' || l_api_name || l_stmt_num,
8909: 'Create_Adjust_Txns : '
8910: || l_stmt_num
8911: || ' : '
8927: fnd_msg_pub.count_and_get (p_count => x_msg_count,
8928: p_data => x_msg_data);
8929:
8930: IF g_debug = 'Y'
8931: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
8932: THEN
8933: fnd_log.STRING (fnd_log.level_procedure,
8934: g_log_head || '.' || l_api_name || '.end',
8935: 'Create_Adjust_Txns >>'
8929:
8930: IF g_debug = 'Y'
8931: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
8932: THEN
8933: fnd_log.STRING (fnd_log.level_procedure,
8934: g_log_head || '.' || l_api_name || '.end',
8935: 'Create_Adjust_Txns >>'
8936: );
8937: END IF;
8955: ROLLBACK TO create_adjust_txns_pvt;
8956: x_return_status := fnd_api.g_ret_sts_unexp_error;
8957:
8958: IF g_debug = 'Y'
8959: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8960: THEN
8961: fnd_log.STRING (fnd_log.level_unexpected,
8962: g_log_head || '.' || l_api_name || l_stmt_num,
8963: 'Create_Adjust_Txns : '
8957:
8958: IF g_debug = 'Y'
8959: AND fnd_log.level_unexpected >= fnd_log.g_current_runtime_level
8960: THEN
8961: fnd_log.STRING (fnd_log.level_unexpected,
8962: g_log_head || '.' || l_api_name || l_stmt_num,
8963: 'Create_Adjust_Txns : '
8964: || l_stmt_num
8965: || ' : '