DBA Data[Home] [Help]

APPS.PSP_ENC_SUM_TRAN dependencies on GL_INTERFACE

Line 1822: -- with gl_project_flag = 'G' to gl_interface

1818: END;
1819:
1820: -- ##########################################################################
1821: -- This procedure transfers the summarized lines from psp_enc_summary_lines
1822: -- with gl_project_flag = 'G' to gl_interface
1823:
1824: -- This procedure transfers the summarized lines from PSP_ENC_SUMMARY_LINES table
1825: -- to GL_INTERFACE table and kicks off the JOURNAL IMPORT program in GL and sends
1826: -- ENC_CONTROL_ID and END_DATE for the relevant TIME_PERIOD_ID

Line 1825: -- to GL_INTERFACE table and kicks off the JOURNAL IMPORT program in GL and sends

1821: -- This procedure transfers the summarized lines from psp_enc_summary_lines
1822: -- with gl_project_flag = 'G' to gl_interface
1823:
1824: -- This procedure transfers the summarized lines from PSP_ENC_SUMMARY_LINES table
1825: -- to GL_INTERFACE table and kicks off the JOURNAL IMPORT program in GL and sends
1826: -- ENC_CONTROL_ID and END_DATE for the relevant TIME_PERIOD_ID
1827: -- and GROUP_ID into the tie back procedure
1828: -- ##########################################################################
1829: /****** Commented for Create and Update multi thread enh.

Line 1979: SELECT gl_interface_control_s.nextval

1975: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1976: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1977: END IF;
1978:
1979: SELECT gl_interface_control_s.nextval
1980: INTO l_group_id
1981: FROM dual;
1982:
1983: OPEN enc_control_cur;

Line 2156: insert into gl_interface_control(

2152: SELECT GL_JOURNAL_IMPORT_S.NEXTVAL
2153: INTO l_int_run_id
2154: FROM dual;
2155:
2156: insert into gl_interface_control(
2157: je_source_name,
2158: status,
2159: interface_run_id,
2160: group_id,

Line 2252: --- added this wrapper loop on delete gl_interface for 2444657

2248:
2249: For Bug fix 1776606
2250: * /
2251:
2252: --- added this wrapper loop on delete gl_interface for 2444657
2253: --- this is to ensure that all interface recs are purged, incase
2254: -- the previous Ssummarize and Transfer did not
2255: for i in 1..gl_tie_tab.count
2256: loop

Line 2258: delete gl_interface

2254: -- the previous Ssummarize and Transfer did not
2255: for i in 1..gl_tie_tab.count
2256: loop
2257: if gl_tie_tab(i).r_group_id is not null then
2258: delete gl_interface
2259: where group_id = gl_tie_tab(i).r_group_id
2260: and user_je_source_name = l_user_je_source
2261: and set_of_books_id = l_sob_id;
2262:

Line 2340: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Entering Transfer to GL Interface');

2336: SELECT enc_control_id
2337: FROM psp_enc_controls
2338: WHERE payroll_action_id = p_payroll_action_id;
2339: BEGIN
2340: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Entering Transfer to GL Interface');
2341:
2342: l_created_by := fnd_global.user_id;
2343: l_tie_back_failed := NULL;
2344: l_summarization_option := NVL(fnd_profile.value('PSP_ENABLE_ENC_SUMM_GL'),'N');

Line 2371: SELECT gl_interface_control_s.nextval

2367: END IF;
2368:
2369: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_enc_type_id: ' || l_enc_type_id);
2370:
2371: SELECT gl_interface_control_s.nextval
2372: INTO l_group_id
2373: FROM dual;
2374:
2375: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_group_id: ' || l_group_id);

Line 2394: INSERT INTO gl_interface

2390: AND payroll_action_id = p_payroll_action_id;
2391:
2392: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated group_id in psp_enc_summary_lines for new liquidation lines');
2393:
2394: INSERT INTO gl_interface
2395: (status, set_of_books_id, accounting_date,
2396: currency_code, date_created, created_by,
2397: actual_flag, user_je_category_name, user_je_source_name,
2398: encumbrance_type_id, code_combination_id, entered_dr,

Line 2441: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Number of records inserted into GL_INTERFACE: ' || SQL%ROWCOUNT);

2437: AND pesl.superceded_line_id IS NULL
2438: AND pesl.group_id = l_group_id
2439: AND pesl.payroll_action_id = p_payroll_action_id;
2440:
2441: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Number of records inserted into GL_INTERFACE: ' || SQL%ROWCOUNT);
2442:
2443: IF (SQL%ROWCOUNT > 0) THEN
2444: SELECT GL_JOURNAL_IMPORT_S.NEXTVAL
2445: INTO l_int_run_id

Line 2450: INSERT INTO gl_interface_control

2446: FROM DUAL;
2447:
2448: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_int_run_id: ' || l_int_run_id);
2449:
2450: INSERT INTO gl_interface_control
2451: (je_source_name, status, interface_run_id,
2452: group_id, set_of_books_id)
2453: VALUES (l_user_je_source, 'S', l_int_run_id,
2454: l_group_id, g_set_of_books_id);

Line 2456: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Inserted control record into gl_interface_control');

2452: group_id, set_of_books_id)
2453: VALUES (l_user_je_source, 'S', l_int_run_id,
2454: l_group_id, g_set_of_books_id);
2455:
2456: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Inserted control record into gl_interface_control');
2457: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Journal Import');
2458:
2459: req_id := fnd_request.submit_request( 'SQLGL',
2460: 'GLLEZL',

Line 2540: DELETE gl_interface

2536: END IF;
2537: END LOOP;
2538:
2539: FORALL recno IN 1..r_groups.group_id.COUNT
2540: DELETE gl_interface
2541: WHERE group_id = r_groups.group_id(recno)
2542: AND user_je_source_name = l_user_je_source
2543: AND set_of_books_id = g_set_of_books_id;
2544:

Line 2545: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted groups from gl_interface for which gl_enc_tie_back is complete');

2541: WHERE group_id = r_groups.group_id(recno)
2542: AND user_je_source_name = l_user_je_source
2543: AND set_of_books_id = g_set_of_books_id;
2544:
2545: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted groups from gl_interface for which gl_enc_tie_back is complete');
2546:
2547: FORALL recno IN 1..r_groups.group_id.COUNT
2548: UPDATE psp_enc_summary_lines
2549: SET group_id = NULL

Line 2704: FROM gl_interface

2700:
2701: CURSOR gl_tie_back_reject_cur IS
2702: SELECT status,
2703: reference6
2704: FROM gl_interface
2705: WHERE user_je_source_name = 'OLD'
2706: AND set_of_books_id = p_set_of_books_id
2707: AND group_id = p_group_id
2708: AND reference6 IN (SELECT 'E:' || enc_summary_line_id -- Introduced for bug fix 3953230

Line 2836: l_cnt_gl_interface NUMBER;

2832: l_task_id NUMBER(15);
2833: l_status VARCHAR2(50);
2834: l_reference6 VARCHAR2(100);
2835: l_enc_ref VARCHAR2(100);
2836: l_cnt_gl_interface NUMBER;
2837: l_enc_summary_line_id NUMBER(10);
2838: l_gl_project_flag VARCHAR2(1);
2839: l_suspense_ac_failed VARCHAR2(1) := 'N';
2840: l_suspense_ac_not_found VARCHAR2(1) := 'N';

Line 2871: from gl_interface

2867: l_status VARCHAR2(30);
2868: begin
2869: select count(*)
2870: into l_cnt
2871: from gl_interface
2872: where user_je_source_name = 'OLD'
2873: and set_of_books_id = p_set_of_books_id
2874: and group_id = p_group_id
2875: and status = 'NEW';

Line 2886: delete from gl_interface

2882: -- for some reason. Return FALSE in this case. So cleanup the tables and try to transfer
2883: -- again after summarization in the second pass.
2884: -- -------------------------------------------------------------------------------------------
2885:
2886: delete from gl_interface
2887: where user_je_source_name = 'OLD'
2888: and set_of_books_id = p_set_of_books_id
2889: and group_id = p_group_id;
2890:

Line 2908: INTO l_cnt_gl_interface

2904:
2905: IF (PROCESS_COMPLETE) THEN
2906:
2907: SELECT count(*)
2908: INTO l_cnt_gl_interface
2909: FROM gl_interface
2910: WHERE user_je_source_name = 'OLD'
2911: AND set_of_books_id = p_set_of_books_id
2912: AND group_id = p_group_id;

Line 2909: FROM gl_interface

2905: IF (PROCESS_COMPLETE) THEN
2906:
2907: SELECT count(*)
2908: INTO l_cnt_gl_interface
2909: FROM gl_interface
2910: WHERE user_je_source_name = 'OLD'
2911: AND set_of_books_id = p_set_of_books_id
2912: AND group_id = p_group_id;
2913:

Line 2914: IF l_cnt_gl_interface > 0 THEN

2910: WHERE user_je_source_name = 'OLD'
2911: AND set_of_books_id = p_set_of_books_id
2912: AND group_id = p_group_id;
2913:
2914: IF l_cnt_gl_interface > 0 THEN
2915: / * Start bug#2142865 Moved the code after loop to above * /
2916: UPDATE psp_enc_controls
2917: SET gl_phase = 'TieBack'
2918: WHERE run_id = g_run_id;

Line 3168: ELSIF l_cnt_gl_interface = 0 THEN

3164: END IF;
3165:
3166: END IF;
3167:
3168: ELSIF l_cnt_gl_interface = 0 THEN
3169: --
3170: OPEN gl_tie_back_success_cur;
3171: LOOP
3172: FETCH gl_tie_back_success_cur INTO l_enc_summary_line_id,

Line 3305: FROM gl_interface

3301: p_mode IN VARCHAR2,
3302: p_return_status OUT NOCOPY VARCHAR2) IS
3303: CURSOR int_count_cur IS
3304: SELECT COUNT(1)
3305: FROM gl_interface
3306: WHERE user_je_source_name = 'OLD'
3307: AND set_of_books_id = p_set_of_books_id
3308: AND group_id = p_group_id;
3309:

Line 3321: FROM gl_interface

3317:
3318: CURSOR gl_tie_back_reject_cur IS
3319: SELECT status,
3320: TO_NUMBER(trim(substr(reference6,3)))
3321: FROM gl_interface
3322: WHERE user_je_source_name = 'OLD'
3323: AND set_of_books_id = p_set_of_books_id
3324: AND group_id = p_group_id;
3325:

Line 3402: l_cnt_gl_interface NUMBER;

3398: l_organization_account_id NUMBER(9);
3399: l_susp_glccid NUMBER(15);
3400: l_orig_org_name hr_all_organization_units_tl.name%TYPE;
3401: l_orig_org_id NUMBER(15);
3402: l_cnt_gl_interface NUMBER;
3403: l_gl_project_flag VARCHAR2(1);
3404: l_suspense_ac_failed VARCHAR2(1);
3405: l_suspense_ac_not_found VARCHAR2(1);
3406: l_susp_ac_found VARCHAR2(10);

Line 3454: FROM gl_interface

3450: FUNCTION PROCESS_COMPLETE RETURN BOOLEAN IS
3451: l_cnt NUMBER;
3452: CURSOR int_count_cur IS
3453: SELECT COUNT(1)
3454: FROM gl_interface
3455: WHERE user_je_source_name = 'OLD'
3456: AND set_of_books_id = p_set_of_books_id
3457: AND group_id = p_group_id
3458: AND status = 'NEW';

Line 3486: DELETE FROM gl_interface

3482: IF l_cnt = 0 THEN
3483: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving GL_ENC_TIE_BACK.PROCESS_COMPLETE');
3484: RETURN TRUE;
3485: ELSIF l_cnt > 0 THEN
3486: DELETE FROM gl_interface
3487: WHERE user_je_source_name = 'OLD'
3488: AND set_of_books_id = p_set_of_books_id
3489: AND group_id = p_group_id;
3490: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted from gl_interface');

Line 3490: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted from gl_interface');

3486: DELETE FROM gl_interface
3487: WHERE user_je_source_name = 'OLD'
3488: AND set_of_books_id = p_set_of_books_id
3489: AND group_id = p_group_id;
3490: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted from gl_interface');
3491: DELETE FROM psp_enc_summary_lines
3492: WHERE group_id = p_group_id;
3493: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Deleted from psp_enc_summary_lines');
3494: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Leaving GL_ENC_TIE_BACK.PROCESS_COMPLETE');

Line 3513: FETCH int_count_cur INTO l_cnt_gl_interface;

3509: l_suspense_ac_not_found := 'N';
3510:
3511: IF (PROCESS_COMPLETE) THEN
3512: OPEN int_count_cur;
3513: FETCH int_count_cur INTO l_cnt_gl_interface;
3514: CLOSE int_count_cur;
3515:
3516: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_cnt_gl_interface: ' || l_cnt_gl_interface);
3517:

Line 3516: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_cnt_gl_interface: ' || l_cnt_gl_interface);

3512: OPEN int_count_cur;
3513: FETCH int_count_cur INTO l_cnt_gl_interface;
3514: CLOSE int_count_cur;
3515:
3516: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_cnt_gl_interface: ' || l_cnt_gl_interface);
3517:
3518: IF (l_cnt_gl_interface > 0) THEN
3519: OPEN gl_tie_back_reject_cur;
3520: FETCH gl_tie_back_reject_cur BULK COLLECT INTO r_interface.status, r_interface.enc_summary_line_id;

Line 3518: IF (l_cnt_gl_interface > 0) THEN

3514: CLOSE int_count_cur;
3515:
3516: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' l_cnt_gl_interface: ' || l_cnt_gl_interface);
3517:
3518: IF (l_cnt_gl_interface > 0) THEN
3519: OPEN gl_tie_back_reject_cur;
3520: FETCH gl_tie_back_reject_cur BULK COLLECT INTO r_interface.status, r_interface.enc_summary_line_id;
3521: CLOSE gl_tie_back_reject_cur;
3522:

Line 3717: ELSIF (l_cnt_gl_interface = 0) THEN

3713: WHERE pesl.enc_summary_line_id = r_interface.enc_summary_line_id(recno)
3714: AND pesl.status_code = 'N');
3715:
3716: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Summarize SQL%ROWCOUNT: ' || SQL%ROWCOUNT);
3717: ELSIF (l_cnt_gl_interface = 0) THEN
3718: OPEN gl_tie_back_success_cur;
3719: FETCH gl_tie_back_success_cur BULK COLLECT INTO r_interface.enc_summary_line_id, r_interface.enc_control_id, r_interface.dr_cr_flag, r_interface.summary_amount;
3720: CLOSE gl_tie_back_success_cur;
3721:

Line 3819: -- This procedure inserts data into gl_interface

3815: END gl_enc_tie_back;
3816: -- End of changes for Create and Update multi thread enh.
3817:
3818: -- ##########################################################################
3819: -- This procedure inserts data into gl_interface
3820: -- ##########################################################################
3821:
3822:
3823: PROCEDURE insert_into_gl_int (

Line 3872: INSERT INTO GL_INTERFACE(

3868: P_ATTRIBUTE30 IN VARCHAR2,
3869: P_RETURN_STATUS OUT NOCOPY VARCHAR2) IS
3870: BEGIN
3871:
3872: INSERT INTO GL_INTERFACE(
3873: STATUS,
3874: SET_OF_BOOKS_ID,
3875: ACCOUNTING_DATE,
3876: CURRENCY_CODE,

Line 3977: -- dbms_output.put_line('Error while inserting into gl_interface..........');

3973: p_return_status := fnd_api.g_ret_sts_success;
3974:
3975: EXCEPTION
3976: WHEN OTHERS THEN
3977: -- dbms_output.put_line('Error while inserting into gl_interface..........');
3978: g_error_api_path := 'insert_into_gl_int:'||g_error_api_path;
3979: fnd_msg_pub.add_exc_msg('psp_enc_sum_tran','insert_into_gl_int');
3980: p_return_status := fnd_api.g_ret_sts_unexp_error;
3981:

Line 5852: l_cnt_gl_interface NUMBER;

5848: l_susp_glccid NUMBER(15);
5849: l_new_gl_code_combination_id NUMBER(15);
5850: l_orig_org_name hr_all_organization_units_tl.name%TYPE;
5851: l_orig_org_id NUMBER(15);
5852: l_cnt_gl_interface NUMBER;
5853: l_autopop_status VARCHAR2(1);
5854: l_gl_project_flag VARCHAR2(1);
5855: l_suspense_ac_failed VARCHAR2(1);
5856: l_suspense_ac_not_found VARCHAR2(1);