DBA Data[Home] [Help]

APPS.JA_CN_CFS_CALCULATE_PKG dependencies on JA_CN_CFS_ROW_CGS_GT

Line 386: ja_cn_cfs_row_cgs_gt

382: SELECT
383: axis_seq
384: ,type
385: FROM
386: ja_cn_cfs_row_cgs_gt
387: WHERE application_id=l_application_id
388: AND axis_set_id=l_axis_set_id
389: AND calculation_flag='Y'
390: ORDER BY axis_seq;

Line 397: ja_cn_cfs_row_cgs_gt crcg

393: IS
394: SELECT
395: count(DISTINCT ccg.axis_seq)
396: FROM
397: ja_cn_cfs_row_cgs_gt crcg
398: ,ja_cn_cfs_calculations_gt ccg
399: WHERE crcg.application_id=l_application_id
400: AND crcg.axis_set_id=l_axis_set_id
401: AND (crcg.type IS NULL) OR (crcg.type<>'E')

Line 412: ja_cn_cfs_row_cgs_gt crcg

408: IS
409: SELECT
410: DISTINCT ccg.axis_seq
411: FROM
412: ja_cn_cfs_row_cgs_gt crcg
413: ,ja_cn_cfs_calculations_gt ccg
414: WHERE crcg.application_id=l_application_id
415: AND crcg.axis_set_id=l_axis_set_id
416: AND (crcg.type IS NULL) OR (crcg.type<>'E')

Line 627: --Insert into current item into the tempoary table 'ja_cn_cfs_row_cgs_gt'

623: END LOOP; --WHILE c_report_calculation%FOUND
624:
625: CLOSE c_report_calculations;
626:
627: --Insert into current item into the tempoary table 'ja_cn_cfs_row_cgs_gt'
628: --and set value of the column 'CALCULATION_FLAG' as 'Y'. If current item has calcuation lines with
629: --wrong operator, then set value of the column 'TYPE' as 'E'
630:
631: IF l_exit_flag='Y'

Line 640: ja_cn_cfs_row_cgs_gt

636: END IF; --l_exit_flag='Y'
637:
638: INSERT
639: INTO
640: ja_cn_cfs_row_cgs_gt
641: (application_id
642: ,axis_set_id
643: ,axis_seq
644: ,type

Line 669: --Retrive calculated items from the temporary table 'ja_cn_cfs_row_cgs_gt'

665:
666: --It is possible that a row in calculation lines of a item is also a calcuated item, so the following
667: --steps will translate rows in calculation lines into most detail rows
668:
669: --Retrive calculated items from the temporary table 'ja_cn_cfs_row_cgs_gt'
670:
671: OPEN c_calculation_rows;
672: FETCH c_calculation_rows INTO l_cal_axis_seq,l_type;
673: WHILE c_calculation_rows%FOUND

Line 690: ja_cn_cfs_row_cgs_gt crcg

686: --If current row with type 'E', then all other calculation rows that has this row as operand should be with type 'E' as well
687: IF l_type='E'
688: THEN
689: UPDATE
690: ja_cn_cfs_row_cgs_gt crcg
691: SET
692: crcg.type='E'
693: WHERE crcg.application_id=l_application_id
694: AND crcg.axis_set_id=l_axis_set_id

Line 787: FROM ja_cn_cfs_row_cgs_gt;

783:
784: -----------FOR TEST--------------------
785: SELECT COUNT(*)
786: INTO l_gt_counts1
787: FROM ja_cn_cfs_row_cgs_gt;
788: ---------------------------------------
789:
790:
791:

Line 899: ja_cn_cfs_row_cgs_gt jccrcg

895: AND jccaa.axis_seq=rra.axis_seq
896: AND jccaa.axis_seq NOT IN (SELECT
897: jccrcg.axis_seq
898: FROM
899: ja_cn_cfs_row_cgs_gt jccrcg
900: WHERE axis_set_id=l_axis_set_id
901: );
902:
903: CURSOR c_axis_seq_desc

Line 918: ja_cn_cfs_row_cgs_gt crcg

914: WHERE rra.axis_set_id=l_axis_set_id
915: AND NOT EXISTS(SELECT
916: crcg.axis_seq
917: FROM
918: ja_cn_cfs_row_cgs_gt crcg
919: WHERE crcg.axis_set_id=rra.axis_set_id
920: AND crcg.axis_seq=rra.axis_seq
921: );
922:

Line 929: ja_cn_cfs_row_cgs_gt

925: SELECT
926: application_id
927: ,axis_seq
928: FROM
929: ja_cn_cfs_row_cgs_gt
930: WHERE axis_set_id=l_axis_set_id
931: AND calculation_flag='Y'
932: AND (type IS NULL OR type<>'E')
933: FOR UPDATE;

Line 960: --part of Cash flow Statement, and then insert these rows into the temporary table 'ja_cn_cfs_row_cgs_gt'

956: ,'p_axis_set_id '||p_axis_set_id
957: );
958: END IF; --(l_proc_level >= l_dbg_level)
959: --Retrive rows that have account assignment in FSG rowset,which are most detailed items for subsidiary
960: --part of Cash flow Statement, and then insert these rows into the temporary table 'ja_cn_cfs_row_cgs_gt'
961: --with type 'F'
962:
963: FOR l_axis_seq_fsg IN c_axis_seq_fsg
964: LOOP

Line 967: ja_cn_cfs_row_cgs_gt

963: FOR l_axis_seq_fsg IN c_axis_seq_fsg
964: LOOP
965: INSERT
966: INTO
967: ja_cn_cfs_row_cgs_gt
968: (application_id
969: ,axis_set_id
970: ,axis_seq
971: ,type

Line 996: --these rows into the temporary table 'ja_cn_cfs_row_cgs_gt' with type 'C' after they are identified

992:
993:
994: --If rows in FSG rowset have not account assignment and calculation, but have assignments by Cash Flow Item
995: --Assignment form, they should be regarded as most detailed items for main part of Cash Flow Statement. Insert
996: --these rows into the temporary table 'ja_cn_cfs_row_cgs_gt' with type 'C' after they are identified
997:
998: --So rows that are most detailed item for main part of Cash flow statement, shoud be those in the table
999: --JA_CN_CFS_ASSIGNMENTS_ALL for current legal entity and row set, and not in the table 'ja_cn_cfs_row_cgs_gt'
1000: FOR l_axis_seq_cfs IN c_axis_seq_cfs

Line 999: --JA_CN_CFS_ASSIGNMENTS_ALL for current legal entity and row set, and not in the table 'ja_cn_cfs_row_cgs_gt'

995: --Assignment form, they should be regarded as most detailed items for main part of Cash Flow Statement. Insert
996: --these rows into the temporary table 'ja_cn_cfs_row_cgs_gt' with type 'C' after they are identified
997:
998: --So rows that are most detailed item for main part of Cash flow statement, shoud be those in the table
999: --JA_CN_CFS_ASSIGNMENTS_ALL for current legal entity and row set, and not in the table 'ja_cn_cfs_row_cgs_gt'
1000: FOR l_axis_seq_cfs IN c_axis_seq_cfs
1001: LOOP
1002: INSERT
1003: INTO

Line 1004: ja_cn_cfs_row_cgs_gt

1000: FOR l_axis_seq_cfs IN c_axis_seq_cfs
1001: LOOP
1002: INSERT
1003: INTO
1004: ja_cn_cfs_row_cgs_gt
1005: (application_id
1006: ,axis_set_id
1007: ,axis_seq
1008: ,type

Line 1034: --'ja_cn_cfs_row_cgs_gt' and mark them with type 'F'.

1030:
1031: --For all rows in FSG rowset that do not have calculation, account
1032: --assignments and cash flow item assignments,-they are description
1033: --lines in cash flow statment, we will store them into table
1034: --'ja_cn_cfs_row_cgs_gt' and mark them with type 'F'.
1035:
1036: FOR l_axis_seq_desc IN c_axis_seq_desc
1037: LOOP
1038: INSERT

Line 1040: ja_cn_cfs_row_cgs_gt

1036: FOR l_axis_seq_desc IN c_axis_seq_desc
1037: LOOP
1038: INSERT
1039: INTO
1040: ja_cn_cfs_row_cgs_gt
1041: (application_id
1042: ,axis_set_id
1043: ,axis_seq
1044: ,type

Line 1068: --For a row with calculation_flag 'Y' in the table ja_cn_cfs_row_cgs_gt,

1064:
1065:
1066:
1067:
1068: --For a row with calculation_flag 'Y' in the table ja_cn_cfs_row_cgs_gt,
1069: --it means this row is a item which amount is calcuated by other rows.
1070: --In this case, if all rows that are involved in calculation for it belong to
1071: --main part of cash flow statment, then this row should belong to main part of
1072: --cash flow statemnt too, it should be marked as type 'C' in the table

Line 1073: --'ja_cn_cfs_row_cgs_gt'.Else, if all rows that are involved in

1069: --it means this row is a item which amount is calcuated by other rows.
1070: --In this case, if all rows that are involved in calculation for it belong to
1071: --main part of cash flow statment, then this row should belong to main part of
1072: --cash flow statemnt too, it should be marked as type 'C' in the table
1073: --'ja_cn_cfs_row_cgs_gt'.Else, if all rows that are involved in
1074: --calculation for it are belong to subsidiary part of cash flow statement,
1075: --then this row should belong to subsidiary part of cash flow statemnt as well,
1076: --it should be marked as type 'F' in the table 'ja_cn_cfs_row_cgs_gt'.
1077: --Else, if some rows that are involved in calcuation for it belong to main part

Line 1076: --it should be marked as type 'F' in the table 'ja_cn_cfs_row_cgs_gt'.

1072: --cash flow statemnt too, it should be marked as type 'C' in the table
1073: --'ja_cn_cfs_row_cgs_gt'.Else, if all rows that are involved in
1074: --calculation for it are belong to subsidiary part of cash flow statement,
1075: --then this row should belong to subsidiary part of cash flow statemnt as well,
1076: --it should be marked as type 'F' in the table 'ja_cn_cfs_row_cgs_gt'.
1077: --Else, if some rows that are involved in calcuation for it belong to main part
1078: --of cash flow statement, but others belong to subsidiary part of cash flow
1079: --statement, this row should be marked as type 'M', it would be processed by
1080: --procedure Generate_Cfs_Xml.

Line 1091: ja_cn_cfs_row_cgs_gt crcg

1087: DISTINCT crcg.type
1088: INTO
1089: l_cal_type
1090: FROM
1091: ja_cn_cfs_row_cgs_gt crcg
1092: ,ja_cn_cfs_calculations_gt ccg
1093: WHERE ccg.application_id=l_cal_axis_seq.application_id
1094: AND ccg.axis_set_id=l_axis_set_id
1095: AND ccg.axis_seq=l_cal_axis_seq.axis_seq

Line 1133: --Update type of current row in the table ja_cn_cfs_row_cgs_gt

1129: WHEN OTHERS THEN
1130: RAISE;
1131: END;
1132:
1133: --Update type of current row in the table ja_cn_cfs_row_cgs_gt
1134: UPDATE
1135: ja_cn_cfs_row_cgs_gt
1136: SET
1137: type=l_type

Line 1135: ja_cn_cfs_row_cgs_gt

1131: END;
1132:
1133: --Update type of current row in the table ja_cn_cfs_row_cgs_gt
1134: UPDATE
1135: ja_cn_cfs_row_cgs_gt
1136: SET
1137: type=l_type
1138: WHERE CURRENT OF c_cal_axis_seqs;
1139:

Line 1497: ja_cn_cfs_row_cgs_gt

1493: IS
1494: SELECT
1495: axis_seq
1496: FROM
1497: ja_cn_cfs_row_cgs_gt
1498: WHERE axis_set_id=l_axis_set_id
1499: AND type='C'
1500: AND calculation_flag='N'
1501: FOR UPDATE;

Line 1508: ja_cn_cfs_row_cgs_gt

1504: IS
1505: SELECT
1506: axis_seq
1507: FROM
1508: ja_cn_cfs_row_cgs_gt
1509: WHERE axis_set_id=l_axis_set_id
1510: AND type='C'
1511: AND calculation_flag='Y'
1512: FOR UPDATE;

Line 1532: ja_cn_cfs_row_cgs_gt

1528: SELECT
1529: nvl(amount,0)
1530: ,nvl(last_year_amount,0)
1531: FROM
1532: ja_cn_cfs_row_cgs_gt
1533: WHERE axis_set_id=l_axis_set_id
1534: AND axis_seq=l_cal_axis_seq;
1535:
1536: l_dbg_level NUMBER :=FND_LOG.G_Current_Runtime_Level;

Line 1622: -- in the table ja_cn_cfs_row_cgs_gt,-which are items in main

1618: p_coa,
1619: l_segment_override);
1620:
1621: --Calculate amount for rows with type 'C' and calculation flag 'N'
1622: -- in the table ja_cn_cfs_row_cgs_gt,-which are items in main
1623: --part of cash flow statment and formula are defined by Cash Flow
1624: --Statement Assignment form
1625: FOR l_detailed_cfs_row IN c_detailed_cfs_rows
1626: LOOP

Line 1641: --keep the amount to ja_cn_cfs_row_cgs_gt

1637: -- ,p_internal_trx_flag => l_internal_trx_flag
1638: ,x_amount => l_amount
1639: );
1640:
1641: --keep the amount to ja_cn_cfs_row_cgs_gt
1642: UPDATE
1643: ja_cn_cfs_row_cgs_gt
1644: SET
1645: amount=l_amount

Line 1643: ja_cn_cfs_row_cgs_gt

1639: );
1640:
1641: --keep the amount to ja_cn_cfs_row_cgs_gt
1642: UPDATE
1643: ja_cn_cfs_row_cgs_gt
1644: SET
1645: amount=l_amount
1646: WHERE CURRENT OF c_detailed_cfs_rows;
1647: --If the parameter l_lastyear_period_names is not null, then calculate last year amount for current row

Line 1663: --keep the last year amount to ja_cn_cfs_row_cgs_gt

1659: -- ,p_internal_trx_flag => l_internal_trx_flag
1660: ,x_amount => l_lastyear_amount
1661: );
1662:
1663: --keep the last year amount to ja_cn_cfs_row_cgs_gt
1664: UPDATE
1665: ja_cn_cfs_row_cgs_gt
1666: SET
1667: last_year_amount=l_lastyear_amount

Line 1665: ja_cn_cfs_row_cgs_gt

1661: );
1662:
1663: --keep the last year amount to ja_cn_cfs_row_cgs_gt
1664: UPDATE
1665: ja_cn_cfs_row_cgs_gt
1666: SET
1667: last_year_amount=l_lastyear_amount
1668: WHERE CURRENT OF c_detailed_cfs_rows;
1669: END IF; --l_lastyear_period_names IS NOT NULL

Line 1679: -- in the table ja_cn_cfs_row_cgs_gt,which are items in main

1675:
1676:
1677:
1678: --Calculate amount for rows with type 'C' and calculation flag 'Y'
1679: -- in the table ja_cn_cfs_row_cgs_gt,which are items in main
1680: --part of cash flow statment. These row can calculated by other rows
1681: --with formula defined in FSG row set
1682:
1683: FOR l_cal_cfs_row IN c_cal_cfs_rows

Line 1713: --keep the amount and last year amount for current row in ja_cn_cfs_row_cgs_gt

1709: l_lastyear_amount:=l_lastyear_amount-l_cal_seq_lastyear_amount; --Fix bug# 7481516 updated
1710: END IF; --l_operator='+'
1711: END LOOP; --FOR l_calculation_line IN c_calculation_lines
1712:
1713: --keep the amount and last year amount for current row in ja_cn_cfs_row_cgs_gt
1714: UPDATE
1715: ja_cn_cfs_row_cgs_gt
1716: SET
1717: amount=l_amount

Line 1715: ja_cn_cfs_row_cgs_gt

1711: END LOOP; --FOR l_calculation_line IN c_calculation_lines
1712:
1713: --keep the amount and last year amount for current row in ja_cn_cfs_row_cgs_gt
1714: UPDATE
1715: ja_cn_cfs_row_cgs_gt
1716: SET
1717: amount=l_amount
1718: ,last_year_amount=l_lastyear_amount
1719: WHERE CURRENT OF c_cal_cfs_rows;

Line 1839: ja_cn_cfs_row_cgs_gt

1835: IS
1836: SELECT
1837: axis_seq
1838: FROM
1839: ja_cn_cfs_row_cgs_gt
1840: WHERE axis_set_id=l_axis_set_id
1841: AND display_flag='Y'
1842: ORDER BY axis_seq
1843: FOR UPDATE;

Line 1858: ja_cn_cfs_row_cgs_gt

1854: ,amount
1855: ,rowcnt
1856: ,lincnt
1857: FROM
1858: ja_cn_cfs_row_cgs_gt
1859: WHERE axis_set_id=l_axis_set_id
1860: AND display_flag='Y'
1861: ORDER BY axis_seq;
1862:

Line 1871: ,ja_cn_cfs_row_cgs_gt jccrcg

1867: ,jccrcg.lincnt
1868: ,jccrcg.change_sign_flag
1869: FROM
1870: ja_cn_cfs_calculations_gt jcccg
1871: ,ja_cn_cfs_row_cgs_gt jccrcg
1872: WHERE jcccg.axis_set_id=l_axis_set_id
1873: AND jcccg.axis_seq=l_axis_seq
1874: AND jcccg.axis_set_id=jccrcg.axis_set_id
1875: AND jcccg.cal_axis_seq=jccrcg.axis_seq

Line 2007: ja_cn_cfs_row_cgs_gt

2003: l_lincnt:='l1'||lpad(to_char(l_row_count),5,'0');
2004:
2005: --Update current row with row count and line count
2006: UPDATE
2007: ja_cn_cfs_row_cgs_gt
2008: SET
2009: rowcnt=l_rowcnt
2010: ,lincnt=l_lincnt
2011: WHERE CURRENT OF c_axis_seq;

Line 2019: --the table ja_cn_cfs_row_cgs_gt by cursor c_rows in ascending order of axis_seq

2015:
2016: CLOSE c_axis_seq;
2017:
2018: --Retrive all rows which display_flag is 'Y' and belong to rowset 'l_rowset_id' from
2019: --the table ja_cn_cfs_row_cgs_gt by cursor c_rows in ascending order of axis_seq
2020:
2021:
2022: OPEN c_rows;
2023: FETCH