DBA Data[Home] [Help]

APPS.OKL_REPORT_GENERATOR_PVT dependencies on GL_BALANCES

Line 5063: -- Function Name : populate_gl_balances

5059:
5060:
5061: -- Start of comments
5062: --
5063: -- Function Name : populate_gl_balances
5064: -- Description : API to populate the GL Opening and Closing Balances
5065: --
5066: -- Business Rules : Called from prepare_gross_rec_report
5067: -- Parameters :

Line 5072: PROCEDURE populate_gl_balances(

5068: -- Version : 1.0
5069: -- History : Ravindranath Gooty created.
5070: -- End of comments
5071:
5072: PROCEDURE populate_gl_balances(
5073: p_api_version IN NUMBER
5074: ,p_init_msg_list IN VARCHAR2
5075: ,x_return_status OUT NOCOPY VARCHAR2
5076: ,x_msg_count OUT NOCOPY NUMBER

Line 5086: l_api_name CONSTANT VARCHAR2(30) := 'populate_gl_balances';

5082: -----------------------------------------------------------------
5083: -- Declare Process Variable
5084: -----------------------------------------------------------------
5085: l_api_version CONSTANT NUMBER := 1;
5086: l_api_name CONSTANT VARCHAR2(30) := 'populate_gl_balances';
5087: l_return_status VARCHAR2(1) := OKL_API.G_RET_STS_SUCCESS;
5088: -- Debug related parameters
5089: l_module CONSTANT fnd_log_messages.module%TYPE := G_MODULE || l_api_name;
5090: l_debug_enabled VARCHAR2(10);

Line 5145: -- Query Segment to fetch the GL Balances for Non-Ledger Currency

5141: ,SUM(opening_bal_trx_curr) --value1_num
5142: ,SUM(opening_bal_led_curr) --value2_num
5143: FROM
5144: (
5145: -- Query Segment to fetch the GL Balances for Non-Ledger Currency
5146: SELECT cc_gt.account_number account_number -- Stores the Segment Number
5147: ,cc_gt.ccid ccid
5148: ,bal.currency_code currency_code
5149: ,bal.period_name period_name

Line 5154: FROM gl_balances bal

5150: ,( begin_balance_dr
5151: - begin_balance_cr ) opening_bal_trx_curr
5152: ,( begin_balance_dr_beq
5153: - begin_balance_cr_beq ) opening_bal_led_curr
5154: FROM gl_balances bal
5155: ,gl_ledgers led
5156: ,okl_code_cmbns_gt cc_gt
5157: WHERE led.ledger_id = p_ledger_id
5158: AND bal.ledger_id = led.ledger_id

Line 5168: -- Query Segment to fetch the GL Balances for Ledger Currency

5164: AND bal.currency_code <> led.currency_code
5165: AND bal.currency_code <> 'STAT'
5166: AND bal.code_combination_id = cc_gt.ccid
5167: UNION ALL
5168: -- Query Segment to fetch the GL Balances for Ledger Currency
5169: -- Logic: GL Balances store thes Accumulated Balance of all Currencies
5170: -- in the Ledger Currency. Hence need to deduct the non-ledger
5171: -- currency Total from the GL Balance
5172: SELECT account_number account_number -- Stores the Segment Number

Line 5169: -- Logic: GL Balances store thes Accumulated Balance of all Currencies

5165: AND bal.currency_code <> 'STAT'
5166: AND bal.code_combination_id = cc_gt.ccid
5167: UNION ALL
5168: -- Query Segment to fetch the GL Balances for Ledger Currency
5169: -- Logic: GL Balances store thes Accumulated Balance of all Currencies
5170: -- in the Ledger Currency. Hence need to deduct the non-ledger
5171: -- currency Total from the GL Balance
5172: SELECT account_number account_number -- Stores the Segment Number
5173: ,ccid ccid

Line 5186: FROM gl_balances bal

5182: ,bal.currency_code currency_code
5183: ,bal.period_name period_name
5184: ,( begin_balance_dr
5185: - begin_balance_cr ) opening_bal_led_curr
5186: FROM gl_balances bal
5187: ,gl_ledgers led
5188: ,okl_code_cmbns_gt cc_gt
5189: WHERE led.ledger_id = p_ledger_id
5190: AND bal.ledger_id = led.ledger_id

Line 5325: FROM gl_balances bal

5321: ,period_net_dr -
5322: period_net_cr period_activity_trx_curr
5323: ,period_net_dr_beq -
5324: period_net_cr_beq period_activity_led_curr
5325: FROM gl_balances bal
5326: ,gl_ledgers led
5327: ,okl_code_cmbns_gt cc_gt
5328: ,gl_period_statuses gps
5329: WHERE led.ledger_id = p_ledger_id

Line 5356: -- Logic: GL Balances store thes Accumulated Balance of all Currencies

5352: AND bal.currency_code <> 'STAT'
5353: AND bal.code_combination_id = cc_gt.ccid
5354: UNION ALL
5355: -- Query Segment to fetch the GL Closing Balances for Ledger Currency
5356: -- Logic: GL Balances store thes Accumulated Balance of all Currencies
5357: -- in the Ledger Currency. Hence need to deduct the non-ledger
5358: -- currency Total from the GL Balance
5359: SELECT account_number account_number -- Stores the Segment Number
5360: ,ccid ccid

Line 5373: FROM gl_balances bal

5369: ,bal.currency_code currency_code
5370: ,bal.period_name period_name
5371: ,period_net_dr -
5372: period_net_cr period_activity_led_curr
5373: FROM gl_balances bal
5374: ,gl_ledgers led
5375: ,okl_code_cmbns_gt cc_gt
5376: ,gl_period_statuses gps
5377: WHERE led.ledger_id = p_ledger_id

Line 5546: FROM gl_balances bal

5542: ( period_net_cr_beq
5543: + begin_balance_cr_beq
5544: )
5545: ) closing_bal_led_curr
5546: FROM gl_balances bal
5547: ,gl_ledgers led
5548: ,okl_code_cmbns_gt cc_gt
5549: WHERE led.ledger_id = p_ledger_id
5550: AND bal.ledger_id = led.ledger_id

Line 5561: -- Logic: GL Balances store thes Accumulated Balance of all Currencies

5557: AND bal.currency_code <> 'STAT'
5558: AND bal.code_combination_id = cc_gt.ccid
5559: UNION ALL
5560: -- Query Segment to fetch the GL Closing Balances for Ledger Currency
5561: -- Logic: GL Balances store thes Accumulated Balance of all Currencies
5562: -- in the Ledger Currency. Hence need to deduct the non-ledger
5563: -- currency Total from the GL Balance
5564: SELECT account_number account_number -- Stores the Segment Number
5565: ,ccid ccid

Line 5585: FROM gl_balances bal

5581: ( period_net_cr
5582: + begin_balance_cr
5583: )
5584: ) closing_bal_led_curr
5585: FROM gl_balances bal
5586: ,gl_ledgers led
5587: ,okl_code_cmbns_gt cc_gt
5588: WHERE led.ledger_id = p_ledger_id
5589: AND bal.ledger_id = led.ledger_id

Line 5680: 'Time taken for Populating GL Balances '

5676: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
5677: 'After Inserting the GL Closing Balances End Time:'
5678: || TO_CHAR(SYSDATE, 'DD-MON-YYY HH:MM:SS') );
5679: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
5680: 'Time taken for Populating GL Balances '
5681: || ( SYSDATE - l_trace_time ) * 86400 || ' Seconds' );
5682:
5683: -- Requirement:
5684: -- Always need to show the GL Closing and Opening Balances, when there are entries

Line 5821: END populate_gl_balances;

5817: p_token1 => g_sqlcode_token,
5818: p_token1_value => SQLCODE,
5819: p_token2 => g_sqlerrm_token,
5820: p_token2_value => SQLERRM);
5821: END populate_gl_balances;
5822:
5823: -- Start of comments
5824: --
5825: -- Function Name : validate_orgs_access.

Line 7581: 'Before call to the populate_gl_balances ' );

7577: -- and GL Closing Balances as on Period To both in Transaction and
7578: -- Functional Currency
7579: ---------------------------------------------------------------------------
7580: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
7581: 'Before call to the populate_gl_balances ' );
7582: populate_gl_balances(
7583: p_api_version => l_api_version
7584: ,p_init_msg_list => l_init_msg_list
7585: ,x_return_status => l_return_status

Line 7582: populate_gl_balances(

7578: -- Functional Currency
7579: ---------------------------------------------------------------------------
7580: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
7581: 'Before call to the populate_gl_balances ' );
7582: populate_gl_balances(
7583: p_api_version => l_api_version
7584: ,p_init_msg_list => l_init_msg_list
7585: ,x_return_status => l_return_status
7586: ,x_msg_count => l_msg_count

Line 7592: 'After call to the populate_gl_balances ' || l_return_status );

7588: ,p_ledger_id => p_ledger_id
7589: ,p_period_from => p_gl_period_from
7590: ,p_period_to => p_gl_period_to );
7591: put_in_log(l_debug_enabled,is_debug_procedure_on,is_debug_statement_on,l_module, 'S',
7592: 'After call to the populate_gl_balances ' || l_return_status );
7593: IF (l_return_status = okl_api.g_ret_sts_unexp_error) THEN
7594: RAISE okl_api.g_exception_unexpected_error;
7595: ELSIF (l_return_status = okl_api.g_ret_sts_error) THEN
7596: RAISE okl_api.g_exception_error;