316: , gp.period_year
317: , decode(gp.period_num,1,'Y','N')
318: , 'O'
319: , SYSDATE
320: , fnd_global.USER_ID
321: , SYSDATE
322: , fnd_global.USER_ID
323: , fnd_global.LOGIN_ID
324: FROM gl_ledgers led
318: , 'O'
319: , SYSDATE
320: , fnd_global.USER_ID
321: , SYSDATE
322: , fnd_global.USER_ID
323: , fnd_global.LOGIN_ID
324: FROM gl_ledgers led
325: , gl_periods gp
326: WHERE led.ledger_id=p_ledger_id
319: , SYSDATE
320: , fnd_global.USER_ID
321: , SYSDATE
322: , fnd_global.USER_ID
323: , fnd_global.LOGIN_ID
324: FROM gl_ledgers led
325: , gl_periods gp
326: WHERE led.ledger_id=p_ledger_id
327: AND led.period_set_name = gp.period_set_name
491: , 0
492: , 0
493: , 0
494: , l_period_month
495: , fnd_global.USER_ID
496: , SYSDATE
497: , fnd_global.USER_ID
498: , SYSDATE
499: , fnd_global.LOGIN_ID
493: , 0
494: , l_period_month
495: , fnd_global.USER_ID
496: , SYSDATE
497: , fnd_global.USER_ID
498: , SYSDATE
499: , fnd_global.LOGIN_ID
500: FROM ja_cn_account_balances_v a
501: WHERE a.ledger_id = p_ledger_id
495: , fnd_global.USER_ID
496: , SYSDATE
497: , fnd_global.USER_ID
498: , SYSDATE
499: , fnd_global.LOGIN_ID
500: FROM ja_cn_account_balances_v a
501: WHERE a.ledger_id = p_ledger_id
502: AND a.legal_entity_id = p_legal_entity_ID
503: AND a.period_name = l_prior_period_name;
625: SET func_begin_balance_dr = l_ret_acct_balance_dr_beq
626: , func_begin_balance_cr = l_ret_acct_balance_cr_beq
627: , orig_begin_balance_dr = l_ret_acct_balance_dr
628: , Orig_Begin_Balance_Cr = l_ret_acct_balance_cr
629: , last_updated_by = fnd_global.USER_ID
630: , last_update_date = SYSDATE
631: , last_update_login = fnd_global.LOGIN_ID
632: WHERE ledger_id = p_ledger_id
633: AND legal_entity_id = p_legal_entity_ID
627: , orig_begin_balance_dr = l_ret_acct_balance_dr
628: , Orig_Begin_Balance_Cr = l_ret_acct_balance_cr
629: , last_updated_by = fnd_global.USER_ID
630: , last_update_date = SYSDATE
631: , last_update_login = fnd_global.LOGIN_ID
632: WHERE ledger_id = p_ledger_id
633: AND legal_entity_id = p_legal_entity_ID
634: AND company_segment = l_ret_company_segment
635: AND period_name = p_period_name
697: , 0
698: , 0
699: , 0
700: , l_period_month
701: , fnd_global.USER_ID
702: , SYSDATE
703: , fnd_global.USER_ID
704: , SYSDATE
705: , fnd_global.LOGIN_ID);
699: , 0
700: , l_period_month
701: , fnd_global.USER_ID
702: , SYSDATE
703: , fnd_global.USER_ID
704: , SYSDATE
705: , fnd_global.LOGIN_ID);
706: END IF;
707: EXCEPTION --get retain ccid and its balance
701: , fnd_global.USER_ID
702: , SYSDATE
703: , fnd_global.USER_ID
704: , SYSDATE
705: , fnd_global.LOGIN_ID);
706: END IF;
707: EXCEPTION --get retain ccid and its balance
708: WHEN NO_DATA_FOUND THEN
709: IF( G_PROC_LEVEL >= g_debug_devel )
796: SET FUNC_PERIOD_NET_DR = FUNC_PERIOD_NET_DR + p_balance_rec.FUNC_PERIOD_NET_DR
797: , FUNC_PERIOD_NET_CR = FUNC_PERIOD_NET_CR + p_balance_rec.FUNC_PERIOD_NET_CR
798: , ORIG_PERIOD_NET_DR = ORIG_PERIOD_NET_DR + p_balance_rec.ORIG_PERIOD_NET_DR
799: , ORIG_PERIOD_NET_CR = ORIG_PERIOD_NET_CR + p_balance_rec.ORIG_PERIOD_NET_CR
800: , LAST_UPDATED_BY = fnd_global.USER_ID
801: , LAST_UPDATE_DATE = SYSDATE
802: , LAST_UPDATE_LOGIN = fnd_global.login_id
803: WHERE ledger_id = p_balance_rec.ledger_id
804: AND LEGAL_ENTITY_ID = p_balance_rec.LEGAL_ENTITY_ID
798: , ORIG_PERIOD_NET_DR = ORIG_PERIOD_NET_DR + p_balance_rec.ORIG_PERIOD_NET_DR
799: , ORIG_PERIOD_NET_CR = ORIG_PERIOD_NET_CR + p_balance_rec.ORIG_PERIOD_NET_CR
800: , LAST_UPDATED_BY = fnd_global.USER_ID
801: , LAST_UPDATE_DATE = SYSDATE
802: , LAST_UPDATE_LOGIN = fnd_global.login_id
803: WHERE ledger_id = p_balance_rec.ledger_id
804: AND LEGAL_ENTITY_ID = p_balance_rec.LEGAL_ENTITY_ID
805: AND COMPANY_SEGMENT = p_balance_rec.COMPANY_SEGMENT
806: AND PERIOD_NAME = p_balance_rec.PERIOD_NAME
1022: , p_balance_rec.FUNC_PERIOD_NET_CR
1023: , p_balance_rec.ORIG_PERIOD_NET_DR
1024: , p_balance_rec.ORIG_PERIOD_NET_CR
1025: , p_balance_rec.PERIOD_MON
1026: , fnd_global.USER_ID
1027: , SYSDATE
1028: , fnd_global.USER_ID
1029: , SYSDATE
1030: , fnd_global.login_id
1024: , p_balance_rec.ORIG_PERIOD_NET_CR
1025: , p_balance_rec.PERIOD_MON
1026: , fnd_global.USER_ID
1027: , SYSDATE
1028: , fnd_global.USER_ID
1029: , SYSDATE
1030: , fnd_global.login_id
1031: );
1032: END IF; --SQL%ROWCOUNT = 0
1026: , fnd_global.USER_ID
1027: , SYSDATE
1028: , fnd_global.USER_ID
1029: , SYSDATE
1030: , fnd_global.login_id
1031: );
1032: END IF; --SQL%ROWCOUNT = 0
1033: ELSE --p_current_period_flag='Y'
1034: UPDATE ja_cn_account_balances
1038: --, ORIG_begin_BALANCE_DR = FUNC_begin_BALANCE_DR + p_balance_rec.ORIG_PERIOD_NET_DR
1039: --, ORIG_begin_BALANCE_CR = FUNC_begin_BALANCE_cR + p_balance_rec.ORIG_PERIOD_NET_CR
1040: ,ORIG_begin_BALANCE_DR = ORIG_begin_BALANCE_DR + p_balance_rec.ORIG_PERIOD_NET_DR
1041: , ORIG_begin_BALANCE_CR = ORIG_begin_BALANCE_CR + p_balance_rec.ORIG_PERIOD_NET_CR
1042: , LAST_UPDATED_BY = fnd_global.USER_ID
1043: , LAST_UPDATE_DATE = SYSDATE
1044: , LAST_UPDATE_LOGIN = fnd_global.login_id
1045: WHERE ledger_id = p_balance_rec.ledger_id
1046: AND LEGAL_ENTITY_ID = p_balance_rec.LEGAL_ENTITY_ID
1040: ,ORIG_begin_BALANCE_DR = ORIG_begin_BALANCE_DR + p_balance_rec.ORIG_PERIOD_NET_DR
1041: , ORIG_begin_BALANCE_CR = ORIG_begin_BALANCE_CR + p_balance_rec.ORIG_PERIOD_NET_CR
1042: , LAST_UPDATED_BY = fnd_global.USER_ID
1043: , LAST_UPDATE_DATE = SYSDATE
1044: , LAST_UPDATE_LOGIN = fnd_global.login_id
1045: WHERE ledger_id = p_balance_rec.ledger_id
1046: AND LEGAL_ENTITY_ID = p_balance_rec.LEGAL_ENTITY_ID
1047: AND COMPANY_SEGMENT = p_balance_rec.COMPANY_SEGMENT
1048: AND PERIOD_NAME = p_balance_rec.PERIOD_NAME
1260: , 0
1261: , 0
1262: , 0
1263: , p_balance_rec.PERIOD_MON
1264: , fnd_global.USER_ID
1265: , SYSDATE
1266: , fnd_global.USER_ID
1267: , SYSDATE
1268: , fnd_global.login_id
1262: , 0
1263: , p_balance_rec.PERIOD_MON
1264: , fnd_global.USER_ID
1265: , SYSDATE
1266: , fnd_global.USER_ID
1267: , SYSDATE
1268: , fnd_global.login_id
1269: );
1270: END IF; --SQL%ROWCOUNT = 0
1264: , fnd_global.USER_ID
1265: , SYSDATE
1266: , fnd_global.USER_ID
1267: , SYSDATE
1268: , fnd_global.login_id
1269: );
1270: END IF; --SQL%ROWCOUNT = 0
1271: END IF;--p_current_period_flag='Y'
1272:
1495: , sum(gb.PERIOD_NET_CR)
1496: , jcp.period_num - jcp.period_year*1000
1497: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1498: , jcp.period_num
1499: , fnd_global.USER_ID
1500: , SYSDATE
1501: , fnd_global.USER_ID
1502: , SYSDATE
1503: , fnd_global.LOGIN_ID
1497: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1498: , jcp.period_num
1499: , fnd_global.USER_ID
1500: , SYSDATE
1501: , fnd_global.USER_ID
1502: , SYSDATE
1503: , fnd_global.LOGIN_ID
1504: , jcc.SEGMENT1
1505: , jcc.SEGMENT2
1499: , fnd_global.USER_ID
1500: , SYSDATE
1501: , fnd_global.USER_ID
1502: , SYSDATE
1503: , fnd_global.LOGIN_ID
1504: , jcc.SEGMENT1
1505: , jcc.SEGMENT2
1506: , jcc.SEGMENT3
1507: , jcc.SEGMENT4
1594: , jcc.account_segment
1595: , jcp.period_num - jcp.period_year*1000
1596: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1597: , jcp.period_num
1598: /*, fnd_global.USER_ID
1599: , SYSDATE
1600: , fnd_global.USER_ID
1601: , SYSDATE
1602: , fnd_global.LOGIN_ID*/
1596: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1597: , jcp.period_num
1598: /*, fnd_global.USER_ID
1599: , SYSDATE
1600: , fnd_global.USER_ID
1601: , SYSDATE
1602: , fnd_global.LOGIN_ID*/
1603: , jcc.SEGMENT1
1604: , jcc.SEGMENT2
1598: /*, fnd_global.USER_ID
1599: , SYSDATE
1600: , fnd_global.USER_ID
1601: , SYSDATE
1602: , fnd_global.LOGIN_ID*/
1603: , jcc.SEGMENT1
1604: , jcc.SEGMENT2
1605: , jcc.SEGMENT3
1606: , jcc.SEGMENT4
1722: , 0
1723: , jcp.period_num - jcp.period_year*1000
1724: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1725: , jcp.period_num
1726: , fnd_global.USER_ID
1727: , SYSDATE
1728: , fnd_global.USER_ID
1729: , SYSDATE
1730: , fnd_global.LOGIN_ID
1724: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1725: , jcp.period_num
1726: , fnd_global.USER_ID
1727: , SYSDATE
1728: , fnd_global.USER_ID
1729: , SYSDATE
1730: , fnd_global.LOGIN_ID
1731: , jcc.SEGMENT1
1732: , jcc.SEGMENT2
1726: , fnd_global.USER_ID
1727: , SYSDATE
1728: , fnd_global.USER_ID
1729: , SYSDATE
1730: , fnd_global.LOGIN_ID
1731: , jcc.SEGMENT1
1732: , jcc.SEGMENT2
1733: , jcc.SEGMENT3
1734: , jcc.SEGMENT4
1862: , 0
1863: , jcp.period_num - jcp.period_year*1000
1864: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1865: , jcp.period_num
1866: , fnd_global.USER_ID
1867: , SYSDATE
1868: , fnd_global.USER_ID
1869: , SYSDATE
1870: , fnd_global.LOGIN_ID
1864: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
1865: , jcp.period_num
1866: , fnd_global.USER_ID
1867: , SYSDATE
1868: , fnd_global.USER_ID
1869: , SYSDATE
1870: , fnd_global.LOGIN_ID
1871: , jcc.SEGMENT1
1872: , jcc.SEGMENT2
1866: , fnd_global.USER_ID
1867: , SYSDATE
1868: , fnd_global.USER_ID
1869: , SYSDATE
1870: , fnd_global.LOGIN_ID
1871: , jcc.SEGMENT1
1872: , jcc.SEGMENT2
1873: , jcc.SEGMENT3
1874: , jcc.SEGMENT4
2259: , ORIG_PERIOD_NET_DR
2260: , ORIG_PERIOD_NET_CR
2261: , PERIOD_MON
2262: , ACCOUNT_TYPE
2263: , fnd_global.USER_ID
2264: , SYSDATE
2265: , fnd_global.USER_ID
2266: , SYSDATE
2267: , fnd_global.LOGIN_ID
2261: , PERIOD_MON
2262: , ACCOUNT_TYPE
2263: , fnd_global.USER_ID
2264: , SYSDATE
2265: , fnd_global.USER_ID
2266: , SYSDATE
2267: , fnd_global.LOGIN_ID
2268: , SEGMENT1
2269: , SEGMENT2
2263: , fnd_global.USER_ID
2264: , SYSDATE
2265: , fnd_global.USER_ID
2266: , SYSDATE
2267: , fnd_global.LOGIN_ID
2268: , SEGMENT1
2269: , SEGMENT2
2270: , SEGMENT3
2271: , SEGMENT4
2367: , SUM(nvl(gb.period_net_dr,0))
2368: , SUM(nvl(gb.period_net_cr,0))
2369: , gb.period_num
2370: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
2371: , fnd_global.USER_ID
2372: , SYSDATE
2373: , fnd_global.USER_ID
2374: , SYSDATE
2375: , fnd_global.LOGIN_ID
2369: , gb.period_num
2370: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
2371: , fnd_global.USER_ID
2372: , SYSDATE
2373: , fnd_global.USER_ID
2374: , SYSDATE
2375: , fnd_global.LOGIN_ID
2376: FROM gl_balances gb
2377: , ja_cn_code_combination_v jcc
2371: , fnd_global.USER_ID
2372: , SYSDATE
2373: , fnd_global.USER_ID
2374: , SYSDATE
2375: , fnd_global.LOGIN_ID
2376: FROM gl_balances gb
2377: , ja_cn_code_combination_v jcc
2378: , fnd_flex_values ffv
2379: WHERE gb.ledger_id = p_ledger_id
2561: , SUM(nvl(FUNC_PERIOD_NET_DR,0))
2562: , SUM(nvl(FUNC_PERIOD_NET_CR,0))
2563: , jcb.period_mon
2564: , jcc.parent_type
2565: , fnd_global.USER_ID
2566: , SYSDATE
2567: , fnd_global.USER_ID
2568: , SYSDATE
2569: , fnd_global.LOGIN_ID
2563: , jcb.period_mon
2564: , jcc.parent_type
2565: , fnd_global.USER_ID
2566: , SYSDATE
2567: , fnd_global.USER_ID
2568: , SYSDATE
2569: , fnd_global.LOGIN_ID
2570: , NULL
2571: , NULL
2565: , fnd_global.USER_ID
2566: , SYSDATE
2567: , fnd_global.USER_ID
2568: , SYSDATE
2569: , fnd_global.LOGIN_ID
2570: , NULL
2571: , NULL
2572: , NULL
2573: , NULL
2674: , SUM(nvl(gb.period_net_dr,0))
2675: , SUM(nvl(gb.period_net_cr,0))
2676: , gb.period_num
2677: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
2678: , fnd_global.USER_ID
2679: , SYSDATE
2680: , fnd_global.USER_ID
2681: , SYSDATE
2682: , fnd_global.LOGIN_ID
2676: , gb.period_num
2677: , substr(ffv.COMPILED_VALUE_ATTRIBUTES,5,1)
2678: , fnd_global.USER_ID
2679: , SYSDATE
2680: , fnd_global.USER_ID
2681: , SYSDATE
2682: , fnd_global.LOGIN_ID
2683: FROM ja_cn_periods jcp
2684: , ja_cn_account_balances jca
2678: , fnd_global.USER_ID
2679: , SYSDATE
2680: , fnd_global.USER_ID
2681: , SYSDATE
2682: , fnd_global.LOGIN_ID
2683: FROM ja_cn_periods jcp
2684: , ja_cn_account_balances jca
2685: , FND_FLEX_VALUE_CHILDREN_V ffvc
2686: , fnd_flex_values ffv