69: l_parent_txn_id NUMBER;
70: l_par_rcv_txn_type RCV_Transactions.transaction_type%TYPE;
71: BEGIN
72: /**********************************
73: * Standard start of API savepoint *
74: **********************************/
75: SAVEPOINT Get_TransactionAmount_PVT;
76:
77: l_stmt_num := 0;
80: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin','Get_TransactionAmount <<');
81: END IF;
82:
83: /************************************************
84: * Standard call to check for call compatibility *
85: ************************************************/
86: IF NOT FND_API.Compatible_API_Call (l_api_version,p_api_version,l_api_name,G_PKG_NAME ) THEN
87: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
88: END IF;
207: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
208: END IF;
209:
210: /*****************************
211: * Standard check of p_commit *
212: *****************************/
213: IF FND_API.to_Boolean(p_commit) THEN
214: COMMIT WORK;
215: END IF;
214: COMMIT WORK;
215: END IF;
216:
217: /************************************************************************
218: * Standard Call to get message count and if count = 1, get message info *
219: ************************************************************************/
220: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,p_data => x_msg_data );
221:
222: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
295: l_dist_acct_id NUMBER;
296: l_account_flag NUMBER;
297: BEGIN
298: /**********************************
299: * Standard start of API savepoint *
300: **********************************/
301: SAVEPOINT Get_HookAccount_PVT;
302:
303: l_stmt_num := 0;
306: FND_LOG.string(FND_LOG.LEVEL_PROCEDURE,G_LOG_HEAD || '.'||l_api_name||'.begin','Get_HookAccount <<');
307: END IF;
308:
309: /************************************************
310: * Standard call to check for call compatibility *
311: ************************************************/
312: IF NOT FND_API.Compatible_API_Call (l_api_version,p_api_version,l_api_name,G_PKG_NAME ) THEN
313: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
314: END IF;
372: FND_LOG.string(FND_LOG.LEVEL_STATEMENT,G_LOG_HEAD||'.'||l_api_name||'.'||l_stmt_num,l_api_message);
373: END IF;
374:
375: /*****************************
376: * Standard check of p_commit *
377: *****************************/
378: IF FND_API.to_Boolean(p_commit) THEN
379: COMMIT WORK;
380: END IF;
379: COMMIT WORK;
380: END IF;
381:
382: /************************************************************************
383: * Standard Call to get message count and if count = 1, get message info *
384: ************************************************************************/
385: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,p_data => x_msg_data );
386:
387: IF G_DEBUG = 'Y' AND FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL THEN
462: l_parent_txn_id NUMBER;
463: l_par_rcv_txn_type rcv_transactions.transaction_type%TYPE;
464: BEGIN
465: /**********************************
466: * Standard start of API savepoint *
467: **********************************/
468: SAVEPOINT get_quantity_pvt;
469: l_stmt_num := 0;
470:
476: 'Get_Quantity <<'
477: );
478: END IF;
479:
480: -- Standard call to check for call compatibility
481: IF NOT fnd_api.compatible_api_call (l_api_version,
482: p_api_version,
483: l_api_name,
484: g_pkg_name
676: l_api_message
677: );
678: END IF;
679:
680: --- Standard check of p_commit
681: IF fnd_api.to_boolean (p_commit)
682: THEN
683: COMMIT WORK;
684: END IF;
682: THEN
683: COMMIT WORK;
684: END IF;
685:
686: -- Standard Call to get message count and if count = 1, get message info
687: fnd_msg_pub.count_and_get (p_count => x_msg_count,
688: p_data => x_msg_data);
689:
690: IF g_debug = 'Y'
811: l_to_org_id NUMBER;
812: l_incr_currency_code gmf_rcv_accounting_txns.currency_code%TYPE;
813: l_incr_transfer_price NUMBER;
814: BEGIN
815: -- Standard start of API savepoint
816: SAVEPOINT get_unitprice_pvt;
817: l_stmt_num := 0;
818:
819: IF g_debug = 'Y'
824: 'Get_UnitPrice <<'
825: );
826: END IF;
827:
828: -- Standard call to check for call compatibility
829: IF NOT fnd_api.compatible_api_call (l_api_version,
830: p_api_version,
831: l_api_name,
832: g_pkg_name
1110: l_api_message
1111: );
1112: END IF;
1113:
1114: -- Standard check of p_commit
1115: IF fnd_api.to_boolean (p_commit)
1116: THEN
1117: COMMIT WORK;
1118: END IF;
1116: THEN
1117: COMMIT WORK;
1118: END IF;
1119:
1120: -- Standard Call to get message count and if count = 1, get message info
1121: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1122: p_data => x_msg_data);
1123:
1124: IF g_debug = 'Y'
1235: l_non_recoverable_tax NUMBER := 0;
1236: l_old_recoverable_tax NUMBER := 0;
1237: l_old_non_recoverable_tax NUMBER := 0;
1238: BEGIN
1239: -- Standard start of API savepoint
1240: SAVEPOINT get_unittax_pvt;
1241: l_stmt_num := 0;
1242:
1243: IF g_debug = 'Y'
1248: 'Get_UnitTax <<'
1249: );
1250: END IF;
1251:
1252: -- Standard call to check for call compatibility
1253: IF NOT fnd_api.compatible_api_call (l_api_version,
1254: p_api_version,
1255: l_api_name,
1256: g_pkg_name
1396: l_api_message
1397: );
1398: END IF;
1399:
1400: --- Standard check of p_commit
1401: IF fnd_api.to_boolean (p_commit)
1402: THEN
1403: COMMIT WORK;
1404: END IF;
1402: THEN
1403: COMMIT WORK;
1404: END IF;
1405:
1406: -- Standard Call to get message count and if count = 1, get message info
1407: fnd_msg_pub.count_and_get (p_count => x_msg_count,
1408: p_data => x_msg_data);
1409:
1410: IF g_debug = 'Y'
1542: 'Convert_UOM <<'
1543: );
1544: END IF;
1545:
1546: -- Standard check for compatibility
1547: IF NOT fnd_api.compatible_api_call (l_api_version,
1548: p_api_version,
1549: l_api_name,
1550: g_pkg_name
1680: END IF;
1681:
1682: -- End of API body
1683:
1684: -- Standard check of P_COMMIT
1685: IF fnd_api.to_boolean (p_commit)
1686: THEN
1687: COMMIT WORK;
1688: END IF;
1842: l_rcv_transaction_id NUMBER;
1843: BEGIN
1844: SAVEPOINT get_currency_pvt;
1845:
1846: -- Standard call to check for call compatibility
1847: IF NOT fnd_api.compatible_api_call (l_api_version,
1848: p_api_version,
1849: l_api_name,
1850: g_pkg_name
1966: p_count => x_msg_count,
1967: p_data => x_msg_data
1968: );
1969:
1970: -- Standard check of P_COMMIT
1971: IF fnd_api.to_boolean (p_commit)
1972: THEN
1973: COMMIT WORK;
1974: END IF;
2127: l_parent_trx_type rcv_transactions.transaction_type%TYPE;
2128: l_parent_trx_id NUMBER;
2129: l_account_flag NUMBER := 0;
2130: BEGIN
2131: -- Standard start of API savepoint
2132: SAVEPOINT get_accounts_pvt;
2133: l_stmt_num := 0;
2134:
2135: IF g_debug = 'Y'
2140: 'Get_Accounts <<'
2141: );
2142: END IF;
2143:
2144: -- Standard call to check for call compatibility
2145: IF NOT fnd_api.compatible_api_call (l_api_version,
2146: p_api_version,
2147: l_api_name,
2148: g_pkg_name
2684:
2685: RAISE fnd_api.g_exc_error;
2686: END IF;
2687:
2688: -- Standard check of p_commit
2689: IF fnd_api.to_boolean (p_commit)
2690: THEN
2691: COMMIT WORK;
2692: END IF;
2690: THEN
2691: COMMIT WORK;
2692: END IF;
2693:
2694: -- Standard Call to get message count and if count = 1, get message info
2695: fnd_msg_pub.count_and_get (p_count => x_msg_count,
2696: p_data => x_msg_data);
2697:
2698: IF g_debug = 'Y'
2798: l_api_message VARCHAR2 (1000);
2799: l_ussgl_tc VARCHAR2 (30);
2800: l_ussgl_option VARCHAR2 (1);
2801: BEGIN
2802: -- Standard start of API savepoint
2803: SAVEPOINT get_ussgltc_pvt;
2804: l_stmt_num := 0;
2805:
2806: IF g_debug = 'Y'
2811: 'Get_UssglTC <<'
2812: );
2813: END IF;
2814:
2815: -- Standard call to check for call compatibility
2816: IF NOT fnd_api.compatible_api_call (l_api_version,
2817: p_api_version,
2818: l_api_name,
2819: g_pkg_name
2866: l_api_message
2867: );
2868: END IF;
2869:
2870: --- Standard check of p_commit
2871: IF fnd_api.to_boolean (p_commit)
2872: THEN
2873: COMMIT WORK;
2874: END IF;
2872: THEN
2873: COMMIT WORK;
2874: END IF;
2875:
2876: -- Standard Call to get message count and if count = 1, get message info
2877: fnd_msg_pub.count_and_get (p_count => x_msg_count,
2878: p_data => x_msg_data);
2879:
2880: IF g_debug = 'Y'
2984: l_stmt_num NUMBER := 0;
2985: l_api_message VARCHAR2 (1000);
2986: l_encumbrance_flag VARCHAR2 (1);
2987: BEGIN
2988: -- Standard start of API savepoint
2989: SAVEPOINT check_encumbranceflag_pvt;
2990: l_stmt_num := 0;
2991:
2992: IF g_debug = 'Y'
2997: 'Check_EncumbranceFlag <<'
2998: );
2999: END IF;
3000:
3001: -- Standard call to check for call compatibility
3002: IF NOT fnd_api.compatible_api_call (l_api_version,
3003: p_api_version,
3004: l_api_name,
3005: g_pkg_name
3039: l_api_message
3040: );
3041: END IF;
3042:
3043: -- Standard check of p_commit
3044: IF fnd_api.to_boolean (p_commit)
3045: THEN
3046: COMMIT WORK;
3047: END IF;
3045: THEN
3046: COMMIT WORK;
3047: END IF;
3048:
3049: -- Standard Call to get message count and if count = 1, get message info
3050: fnd_msg_pub.count_and_get (p_count => x_msg_count,
3051: p_data => x_msg_data);
3052:
3053: IF g_debug = 'Y'
3179: l_le_txn_date DATE;
3180: -- transaction date truncated and converted to legal entity timezone
3181: invalid_txn_type EXCEPTION;
3182: BEGIN
3183: -- Standard start of API savepoint
3184: SAVEPOINT create_mmtrecord_pvt;
3185:
3186: IF g_debug = 'Y'
3187: AND fnd_log.level_procedure >= fnd_log.g_current_runtime_level
3191: 'Create_MMTRecord <<'
3192: );
3193: END IF;
3194:
3195: -- Standard call to check for call compatibility
3196: IF NOT fnd_api.compatible_api_call (l_api_version,
3197: p_api_version,
3198: l_api_name,
3199: g_pkg_name
3420: x_inv_trx := l_inv_trx;
3421:
3422: -- ***************
3423:
3424: -- Standard check of p_commit
3425: IF fnd_api.to_boolean (p_commit)
3426: THEN
3427: COMMIT WORK;
3428: END IF;
3426: THEN
3427: COMMIT WORK;
3428: END IF;
3429:
3430: -- Standard Call to get message count and if count = 1, get message info
3431: fnd_msg_pub.count_and_get (p_count => x_msg_count,
3432: p_data => x_msg_data);
3433:
3434: IF g_debug = 'Y'
3609: l_transfer_organization_id NUMBER := NULL;
3610: l_rcv_accttxn gmf_rcv_accounting_pkg.rcv_accttxn_rec_type;
3611: invalid_event EXCEPTION;
3612: BEGIN
3613: -- Standard start of API savepoint
3614: SAVEPOINT insert_mmt_pvt;
3615: l_stmt_num := 0;
3616:
3617: IF g_debug = 'Y'
3622: 'Insert_MMT <<'
3623: );
3624: END IF;
3625:
3626: -- Standard call to check for call compatibility
3627: IF NOT fnd_api.compatible_api_call (l_api_version,
3628: p_api_version,
3629: l_api_name,
3630: g_pkg_name
4079: END IF;
4080:
4081: -- End API Body
4082:
4083: -- Standard check of p_commit
4084: IF fnd_api.to_boolean (p_commit)
4085: THEN
4086: COMMIT WORK;
4087: END IF;
4271: l_oracle_schema VARCHAR2 (30);
4272: l_encumbrance_flag VARCHAR2 (1);
4273: l_ussgl_option VARCHAR2 (1);
4274: BEGIN
4275: -- Standard start of API savepoint
4276: SAVEPOINT insert_txn_pvt;
4277: l_stmt_num := 0;
4278:
4279: IF g_debug = 'Y'
4284: 'Insert_Txn <<'
4285: );
4286: END IF;
4287:
4288: -- Standard call to check for call compatibility
4289: IF NOT fnd_api.compatible_api_call (l_api_version,
4290: p_api_version,
4291: l_api_name,
4292: g_pkg_name
4982:
4983: l_rcv_accttxn.ussgl_transaction_code := l_ussgl_tc;
4984: x_rcv_accttxn := l_rcv_accttxn;
4985:
4986: --- Standard check of p_commit
4987: IF fnd_api.to_boolean (p_commit)
4988: THEN
4989: COMMIT WORK;
4990: END IF;
4988: THEN
4989: COMMIT WORK;
4990: END IF;
4991:
4992: -- Standard Call to get message count and if count = 1, get message info
4993: fnd_msg_pub.count_and_get (p_count => x_msg_count,
4994: p_data => x_msg_data);
4995:
4996: IF g_debug = 'Y'
5080: l_accrue_on_receipt_flag VARCHAR2 (1) := 'N';
5081: l_accounting_txn_id NUMBER;
5082: l_ctr_first NUMBER;
5083: BEGIN
5084: -- Standard start of API savepoint
5085: SAVEPOINT insert_txn2_pvt;
5086: l_stmt_num := 0;
5087:
5088: IF g_debug = 'Y'
5093: 'Insert_Txn2 <<'
5094: );
5095: END IF;
5096:
5097: -- Standard call to check for call compatibility
5098: IF NOT fnd_api.compatible_api_call (l_api_version,
5099: p_api_version,
5100: l_api_name,
5101: g_pkg_name
5328: **/
5329:
5330: END LOOP grat_insert;
5331:
5332: --- Standard check of p_commit
5333: IF fnd_api.to_boolean (p_commit)
5334: THEN
5335: COMMIT WORK;
5336: END IF;
5334: THEN
5335: COMMIT WORK;
5336: END IF;
5337:
5338: -- Standard Call to get message count and if count = 1, get message info
5339: fnd_msg_pub.count_and_get (p_count => x_msg_count,
5340: p_data => x_msg_data);
5341:
5342: IF g_debug = 'Y'
5460: WHERE pod.po_distribution_id =
5461: NVL (p_po_distribution_id, pod.po_distribution_id)
5462: AND pod.line_location_id = p_po_line_location_id;
5463: BEGIN
5464: -- Standard start of API savepoint
5465: SAVEPOINT create_receiveevents_pvt;
5466: l_stmt_num := 0;
5467:
5468: IF g_debug = 'Y'
5473: 'Create_ReceiveEvents <<'
5474: );
5475: END IF;
5476:
5477: -- Standard call to check for call compatibility
5478: IF NOT fnd_api.compatible_api_call (l_api_version,
5479: p_api_version,
5480: l_api_name,
5481: g_pkg_name
5691: END IF; -- IF l_return_status
5692: END IF; -- IF l_po_org_id
5693:
5694: -- For the receive transaction, the PO distribution may not be available in the
5695: -- case of Standard Receipt. Hence perform all steps for each applicable distribution.
5696: -- If distribution is not available the quantity will be prorated. Furthermore, if
5697: -- there is a project on any of the distributions, and the destination_type_code is
5698: -- expense, the transaction flow should be ignored for just that distribution.
5699: FOR rec_pod IN c_po_distributions_csr (l_po_distribution_id,
6159: RAISE fnd_api.g_exc_unexpected_error;
6160: END IF;
6161: END IF;
6162:
6163: --- Standard check of p_commit
6164: IF fnd_api.to_boolean (p_commit)
6165: THEN
6166: COMMIT WORK;
6167: END IF;
6165: THEN
6166: COMMIT WORK;
6167: END IF;
6168:
6169: -- Standard Call to get message count and if count = 1, get message info
6170: fnd_msg_pub.count_and_get (p_count => x_msg_count,
6171: p_data => x_msg_data);
6172:
6173: IF g_debug = 'Y'
6280: l_rcv_quantity NUMBER := 0; /* Bug 8517463 */
6281: l_rcv_transaction_type VARCHAR2(25); /* Bug 8517463 */
6282:
6283: BEGIN
6284: -- Standard start of API savepoint
6285: SAVEPOINT create_deliver_txns;
6286: l_stmt_num := 0;
6287:
6288: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
6728: THEN
6729: COMMIT WORK;
6730: END IF;
6731:
6732: -- Standard Call to get message count and if count = 1, get message info
6733: fnd_msg_pub.count_and_get (p_count => x_msg_count,
6734: p_data => x_msg_data);
6735:
6736: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
6831: l_qualifier_value_tbl inv_transaction_flow_pub.number_tbl;
6832: l_encumbrance_flag VARCHAR2 (1);
6833: l_ussgl_option VARCHAR2 (1);
6834: BEGIN
6835: -- Standard start of API savepoint
6836: SAVEPOINT create_rtrevents_pvt;
6837: l_stmt_num := 0;
6838:
6839: IF g_debug = 'Y'
6844: 'Create_RTREvents <<'
6845: );
6846: END IF;
6847:
6848: -- Standard call to check for call compatibility
6849: IF NOT fnd_api.compatible_api_call (l_api_version,
6850: p_api_version,
6851: l_api_name,
6852: g_pkg_name
7302:
7303: RAISE fnd_api.g_exc_unexpected_error;
7304: END IF;
7305:
7306: -- Standard check of p_commit
7307: IF fnd_api.to_boolean (p_commit)
7308: THEN
7309: COMMIT WORK;
7310: END IF;
7308: THEN
7309: COMMIT WORK;
7310: END IF;
7311:
7312: -- Standard Call to get message count and if count = 1, get message info
7313: fnd_msg_pub.count_and_get (p_count => x_msg_count,
7314: p_data => x_msg_data);
7315:
7316: IF g_debug = 'Y'
7461: WHERE pod.po_distribution_id =
7462: NVL (p_po_distribution_id, pod.po_distribution_id)
7463: AND pod.line_location_id = p_po_line_location_id;
7464: BEGIN
7465: -- Standard start of API savepoint
7466: SAVEPOINT create_rtvevents_pvt;
7467: l_stmt_num := 0;
7468:
7469: IF g_debug = 'Y'
7474: 'Create_RTVEvents <<'
7475: );
7476: END IF;
7477:
7478: -- Standard call to check for call compatibility
7479: IF NOT fnd_api.compatible_api_call (l_api_version,
7480: p_api_version,
7481: l_api_name,
7482: g_pkg_name
7679: END IF; -- IF l_return_status
7680: END IF; -- IF l_po_org_id
7681:
7682: -- For the RTV transaction, the PO distribution may not be available in the
7683: -- case of Standard Receipt. Hence perform all steps for each applicable distribution.
7684: -- If distribution is not available the quantity will be prorated. Furthermore, if
7685: -- there is a project on any of the distributions, and the destination_type_code is
7686: -- expense, the transaction flow should be ignored for just that distribution.
7687: FOR rec_pod IN c_po_distributions_csr (l_po_distribution_id,
8071: RAISE fnd_api.g_exc_unexpected_error;
8072: END IF;
8073: END IF;
8074:
8075: -- Standard check of p_commit
8076: IF fnd_api.to_boolean (p_commit)
8077: THEN
8078: COMMIT WORK;
8079: END IF;
8077: THEN
8078: COMMIT WORK;
8079: END IF;
8080:
8081: -- Standard Call to get message count and if count = 1, get message info
8082: fnd_msg_pub.count_and_get (p_count => x_msg_count,
8083: p_data => x_msg_data);
8084:
8085: IF g_debug = 'Y'
8179: THEN
8180: fnd_log.STRING (fnd_log.level_procedure, c_log_module, 'Begin...');
8181: END IF;
8182:
8183: -- Standard call to check for call compatibility
8184: IF NOT fnd_api.compatible_api_call (l_api_version,
8185: p_api_version,
8186: l_api_name,
8187: g_pkg_name
8407: END IF;
8408:
8409: l_stmt_num := 120;
8410:
8411: --- Standard check of p_commit
8412: IF fnd_api.to_boolean (p_commit)
8413: THEN
8414: COMMIT WORK;
8415: END IF;
8413: THEN
8414: COMMIT WORK;
8415: END IF;
8416:
8417: -- Standard Call to get message count and if count = 1, get message info
8418: fnd_msg_pub.count_and_get (p_count => x_msg_count,
8419: p_data => x_msg_data);
8420:
8421: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)
8598: RETURN;
8599: END IF;
8600: /* INVCONV ANTHIYAG Bug#5529309 18-Sep-2006 End */
8601:
8602: -- Standard start of API savepoint
8603: SAVEPOINT create_adjust_txns_pvt;
8604: l_stmt_num := 0;
8605:
8606: IF g_debug = 'Y'
8611: 'Create_Adjust_Txns <<'
8612: );
8613: END IF;
8614:
8615: -- Standard call to check for call compatibility
8616: IF NOT fnd_api.compatible_api_call (l_api_version,
8617: p_api_version,
8618: l_api_name,
8619: g_pkg_name
8974: RAISE fnd_api.g_exc_unexpected_error;
8975: END IF;
8976: END IF;
8977:
8978: --- Standard check of p_commit
8979: IF fnd_api.to_boolean (p_commit)
8980: THEN
8981: COMMIT WORK;
8982: END IF;
8980: THEN
8981: COMMIT WORK;
8982: END IF;
8983:
8984: -- Standard Call to get message count and if count = 1, get message info
8985: fnd_msg_pub.count_and_get (p_count => x_msg_count,
8986: p_data => x_msg_data);
8987:
8988: IF g_debug = 'Y'