DBA Data[Home] [Help]

APPS.PA_FUNDS_CONTROL_PKG dependencies on GL_BC_PACKETS

Line 556: -- This procedure will mark gl_bc_packets records to a status such that GL does

552: P_allowed_flag IN g_tab_allow_flag%TYPE,
553: P_result_code IN OUT NOCOPY VARCHAR2);
554:
555: -- --------------------------------------------------------------------------------+
556: -- This procedure will mark gl_bc_packets records to a status such that GL does
557: -- not execute funds available validation. Previously we used to create liquidation
558: -- entries. Instead of that, we're executing the following procedure.
559: -- This is for NO/SEPARATE LINE BURDENING only.
560: -- This procedure is called from function pa_funds_check

Line 562: -- PROCEDURE Mark_gl_bc_packets_for_no_fc (p_packet_id IN Number);

558: -- entries. Instead of that, we're executing the following procedure.
559: -- This is for NO/SEPARATE LINE BURDENING only.
560: -- This procedure is called from function pa_funds_check
561: -- --------------------------------------------------------------------------------+
562: -- PROCEDURE Mark_gl_bc_packets_for_no_fc (p_packet_id IN Number);
563:
564: -- --------------------------------------------------------------------------------+
565: -- This procedure will determine whether funds check/ funds check tieback
566: -- has been called for non-project related/project related txn. or budget

Line 580: -- A. pa_bc_packet records have been extracted into gl_bc_packets

576: -- This procedure will update the following columns in pa_bc_packets: serial_id,
577: -- session_id,actual_flag,packet_id and status. Status will be upated from I to P.
578: -- Called from pa_funds_check
579: -- This procedure will also check if the extracts were successful, meaning that:
580: -- A. pa_bc_packet records have been extracted into gl_bc_packets
581: -- B. core records have been extracted into gl_bc_packets
582: -- C. project relieveing entries are created in gl_bc_packets
583: -- --------------------------------------------------------------------------------+
584: PROCEDURE Synch_pa_gl_packets(x_packet_id IN Number,

Line 581: -- B. core records have been extracted into gl_bc_packets

577: -- session_id,actual_flag,packet_id and status. Status will be upated from I to P.
578: -- Called from pa_funds_check
579: -- This procedure will also check if the extracts were successful, meaning that:
580: -- A. pa_bc_packet records have been extracted into gl_bc_packets
581: -- B. core records have been extracted into gl_bc_packets
582: -- C. project relieveing entries are created in gl_bc_packets
583: -- --------------------------------------------------------------------------------+
584: PROCEDURE Synch_pa_gl_packets(x_packet_id IN Number,
585: x_partial_flag IN VARCHAR2,

Line 582: -- C. project relieveing entries are created in gl_bc_packets

578: -- Called from pa_funds_check
579: -- This procedure will also check if the extracts were successful, meaning that:
580: -- A. pa_bc_packet records have been extracted into gl_bc_packets
581: -- B. core records have been extracted into gl_bc_packets
582: -- C. project relieveing entries are created in gl_bc_packets
583: -- --------------------------------------------------------------------------------+
584: PROCEDURE Synch_pa_gl_packets(x_packet_id IN Number,
585: x_partial_flag IN VARCHAR2,
586: x_mode IN VARCHAR2,

Line 10492: * to gl_bc_packets and igc_cc_interface tables

10488: If g_debug_mode = 'Y' Then
10489: log_message(p_msg_token1 => 'Inside the create_liqd_entry api ');
10490: End if;
10491: /** Bug fix : 1900229 During Check mode also insert liquidation and burden transaction
10492: * to gl_bc_packets and igc_cc_interface tables
10493: */
10494: IF g_debug_mode = 'Y' THEN
10495: log_message(p_msg_token1 => 'p_calling_module'||p_calling_module||' p_mode= '||p_mode);
10496: End if;

Line 10794: l_GLRowNumber GL_BC_Packets.Originating_RowID%Type;

10790: x_return_status OUT NOCOPY VARCHAR2
10791: ) IS
10792:
10793: l_BCPacketID Number(15);
10794: l_GLRowNumber GL_BC_Packets.Originating_RowID%Type;
10795: l_cbcrownumber urowid;
10796: l_max_batch_line_id number(15);
10797:
10798: --This cursor is defined to pick up all the burden cost lines

Line 10807: -- This cursor is defined to pick up the Row Number in the GL_BC_Packets

10803: FROM PA_BC_Packets
10804: WHERE Packet_ID=p_Packet_ID AND
10805: Parent_BC_Packet_ID IS NOT NULL;
10806:
10807: -- This cursor is defined to pick up the Row Number in the GL_BC_Packets
10808: -- table that corresponds to the BCPacket ID stored in PA_BC_Packets table.
10809:
10810: CURSOR c_Row_Number(
10811: l_BCPacketID IN Number) IS

Line 10813: FROM GL_BC_Packets

10809:
10810: CURSOR c_Row_Number(
10811: l_BCPacketID IN Number) IS
10812: SELECT RowID
10813: FROM GL_BC_Packets
10814: WHERE Template_ID=l_BCPacketID;
10815:
10816: l_rowcount NUMBER := 0;
10817:

Line 11030: FROM gl_bc_packets gl

11026:
11027: CURSOR gl_status is
11028: SELECT decode(count(*), count(decode(substr(nvl
11029: (gl.result_code,'P'),1,1),'P',1)),'P','F')
11030: FROM gl_bc_packets gl
11031: WHERE gl.packet_id = p_packet_id;
11032: BEGIN
11033:
11034: --Initialize the err stack

Line 11058: UPDATE gl_bc_packets gl

11054: IF p_calling_module in ('GL','GL_TIEBACK') and p_mode in ('R','U','C','F') then
11055: If g_debug_mode = 'Y' Then
11056: log_message(p_msg_token1 =>' update gl bc packet with result code ');
11057: End if;
11058: UPDATE gl_bc_packets gl
11059: SET gl.result_code =
11060: (select MAX(
11061: decode(substr(nvl(gl.result_code,'P'),1,1),'P',
11062: decode( pbc.result_code,'F100','X00',

Line 11282: -- Following code is being added as in case of AP-PO matched case, in gl_bc_packets

11278: If g_debug_mode = 'Y' Then
11279: log_message(p_msg_token1 =>'no of rows result code updated after= '||sql%rowcount);
11280: End if;
11281:
11282: -- Following code is being added as in case of AP-PO matched case, in gl_bc_packets
11283: -- source_distribution_id_num_1 points to AP
11284: -- this is only reqd. in case of non-integrated budgets as for non-integrated budgets we do
11285: -- not create "PA_PO_BURDEN" records so no records in gl_bc_packets gets updated ..
11286:

Line 11285: -- not create "PA_PO_BURDEN" records so no records in gl_bc_packets gets updated ..

11281:
11282: -- Following code is being added as in case of AP-PO matched case, in gl_bc_packets
11283: -- source_distribution_id_num_1 points to AP
11284: -- this is only reqd. in case of non-integrated budgets as for non-integrated budgets we do
11285: -- not create "PA_PO_BURDEN" records so no records in gl_bc_packets gets updated ..
11286:
11287: If nvl(g_ap_matched_case,'N') = 'Y' then
11288: If g_debug_mode = 'Y' Then
11289: log_message(p_msg_token1 =>' update gl bc packet with result code for PO for AP matched');

Line 11292: UPDATE gl_bc_packets gl

11288: If g_debug_mode = 'Y' Then
11289: log_message(p_msg_token1 =>' update gl bc packet with result code for PO for AP matched');
11290: End if;
11291:
11292: UPDATE gl_bc_packets gl
11293: SET gl.result_code =
11294: (select MAX(
11295: decode(substr(nvl(gl.result_code,'P'),1,1),'P',
11296: decode( pbc.result_code,'F100','X00',

Line 11491: UPDATE gl_bc_packets gl

11487: If g_debug_mode = 'Y' Then
11488: log_message(p_msg_token1 =>'p_calling_module ['||p_calling_module||']l_gl_status ['||l_igc_status||']');
11489: End if;
11490:
11491: UPDATE gl_bc_packets gl
11492: SET gl.result_code = decode(substr(gl.result_code,1,1),'P',
11493: decode(sign(nvl(gl.accounted_dr,0) - nvl(gl.accounted_cr,0)),
11494: -1, 'P32',
11495: gl.result_code),gl.result_code),

Line 12053: SELECT gl_bc_packets_s.nextval

12049: x_e_code VARCHAR2(10);
12050: x_e_stage VARCHAR2(2000);
12051:
12052: CURSOR cur_packets IS
12053: SELECT gl_bc_packets_s.nextval
12054: FROM dual;
12055:
12056: CURSOR cur_sob(v_packet_id number) IS
12057: SELECT set_of_books_id

Line 12170: -- from gl_bc_packets to pa_bc_packets ..

12166: -------->6599207 ------END
12167:
12168: -- -----------------------------------------------------------------------------------+
12169: -- This procedure will synch packet_id, serial_id, session_id, actual_flag,status_code
12170: -- from gl_bc_packets to pa_bc_packets ..
12171: -- Synch up only required for Commitment Funds check ..
12172: -- -----------------------------------------------------------------------------------+
12173:
12174: If p_calling_module not in

Line 12643: -- Update gl_bc_packets status such that GL FC will not execute funds

12639: log_message(p_msg_token1 => 'The return code of the FC process :'||l_packet_status);
12640: end if;
12641:
12642: -- --------------------------------------------------------------------------+
12643: -- Update gl_bc_packets status such that GL FC will not execute funds
12644: -- avaialble validation ... This is for no/separate line burdening
12645: -- --------------------------------------------------------------------------+
12646: --IF p_calling_module in ('GL','CBC') and l_mode IN ('R','C','F') then
12647:

Line 12648: -- MARK_GL_BC_PACKETS_FOR_NO_FC(p_packet_id => l_packet_id);

12644: -- avaialble validation ... This is for no/separate line burdening
12645: -- --------------------------------------------------------------------------+
12646: --IF p_calling_module in ('GL','CBC') and l_mode IN ('R','C','F') then
12647:
12648: -- MARK_GL_BC_PACKETS_FOR_NO_FC(p_packet_id => l_packet_id);
12649:
12650: --End if;
12651:
12652: -------->6599207 ------As part of CC Enhancements

Line 12684: -- entries in gl bc packets and igc cc interface tables

12680: end if;
12681:
12682: ----------------------------------------------------------------------------------
12683: -- if the project funds check is success full then call encumbrance liquidation
12684: -- entries in gl bc packets and igc cc interface tables
12685: ----------------------------------------------------------------------------------
12686: If g_debug_mode = 'Y' then
12687: log_message(p_stage => 120, p_msg_token1 => 'Calling create_liqd_entry API');
12688: end if;

Line 12922: FROM gl_bc_packets a

12918:
12919: -- check for fatal error for the transactions in full mode
12920: cursor gl_status_fatal_error is
12921: SELECT 1
12922: FROM gl_bc_packets a
12923: WHERE a.packet_id = p_packet_id
12924: AND EXISTS (
12925: SELECT 'Y'
12926: FROM gl_bc_packets b

Line 12926: FROM gl_bc_packets b

12922: FROM gl_bc_packets a
12923: WHERE a.packet_id = p_packet_id
12924: AND EXISTS (
12925: SELECT 'Y'
12926: FROM gl_bc_packets b
12927: WHERE b.status_code = 'T'
12928: AND b.packet_id = a.packet_id
12929: );
12930:

Line 12934: FROM gl_bc_packets a

12930:
12931: -- check for normal error for the transaction in full mode
12932: cursor gl_status_normal_error is
12933: SELECT 1
12934: FROM gl_bc_packets a
12935: WHERE a.packet_id = p_packet_id
12936: AND EXISTS (
12937: SELECT 'Y'
12938: FROM gl_bc_packets b

Line 12938: FROM gl_bc_packets b

12934: FROM gl_bc_packets a
12935: WHERE a.packet_id = p_packet_id
12936: AND EXISTS (
12937: SELECT 'Y'
12938: FROM gl_bc_packets b
12939: WHERE b.packet_id = a.packet_id
12940: AND ((b.status_code in ('R','F','T')
12941: AND substr(b.result_code,1,1) = ('F')
12942: ) OR

Line 12951: FROM gl_bc_packets a

12947: -- Check for at least on passed transaction in gl in partial mode
12948: -- if not found then all transactions are rejected
12949: cursor gl_status_partial is
12950: SELECT 1
12951: FROM gl_bc_packets a
12952: WHERE a.packet_id = p_packet_id
12953: AND EXISTS
12954: (SELECT 'Y'
12955: FROM gl_bc_packets b

Line 12955: FROM gl_bc_packets b

12951: FROM gl_bc_packets a
12952: WHERE a.packet_id = p_packet_id
12953: AND EXISTS
12954: (SELECT 'Y'
12955: FROM gl_bc_packets b
12956: WHERE b.status_code in ('S','A','P')
12957: AND substr(b.result_code,1,1) IN ('P','A')
12958: AND b.packet_id = a.packet_id
12959: );

Line 13201: FROM gl_bc_packets gl

13197: 'PO_DISTRIBUTIONS_ALL','PO',
13198: 'PA_PO_BURDEN','PO',
13199: 'PA_REQ_BURDEN','REQ',
13200: 'PO_REQ_DISTRIBUTIONS_ALL','REQ') source_distribution_type
13201: FROM gl_bc_packets gl
13202: WHERE gl.packet_id = v_packet_id
13203: AND ( (nvl(substr(gl.result_code,1,1),'P') = 'F'
13204: AND gl.status_code in ('F','R'))
13205: OR (gl.status_code = 'T')

Line 13210: -- gl bc packets status code based on partial flag.

13206: );
13207:
13208: -- Cursor to check the number of failed/passed records in gl and accordingly pass return status back to PSA.
13209: -- Note : No need to have partial flag logic here as procedure update_GL_CBC_result_code has already stamped
13210: -- gl bc packets status code based on partial flag.
13211: -- Output values :
13212: -- return 'F' if all have failed --fail
13213: -- return 'P' if some of the records have failed --partial
13214: -- return 'S' if all have success --success

Line 13221: FROM gl_bc_packets gl

13217: SELECT decode(count(*)
13218: ,count(decode(substr(nvl(gl.result_code,'P'),1,1),'P',1)),'S'
13219: ,count(decode(substr(nvl(gl.result_code,'P'),1,1),'F',1,'X',1)),'F'
13220: ,decode(p_partial_flag,'N','F','P')) -- Bug 5522810 : p_partial_flag is also checked before returning partial mode
13221: FROM gl_bc_packets gl
13222: WHERE gl.packet_id = p_packet_id;
13223:
13224: -------->6599207 ------As part of CC Enhancements
13225: CURSOR cbc_cur IS

Line 14075: FROM gl_bc_packets

14071:
14072: CURSOR cur_get_gl_data IS
14073: SELECT session_id,
14074: serial_id ,event_id , source_distribution_type
14075: FROM gl_bc_packets
14076: WHERE packet_id = p_gl_packet_id
14077: AND ROWNUM =1 ;
14078:
14079: -- Note: bc_event_id is null being used as for integrated case, the balancing

Line 14100: l_source_distribution_type gl_bc_packets.source_distribution_type%TYPE;

14096:
14097: l_session_id pa_bc_packets.session_id%TYPE;
14098: l_serial_id pa_bc_packets.serial_id%TYPE;
14099: l_event_id pa_bc_packets.source_event_id%TYPE;
14100: l_source_distribution_type gl_bc_packets.source_distribution_type%TYPE;
14101:
14102: PRAGMA AUTONOMOUS_TRANSACTION;
14103: BEGIN
14104: l_program_name := 'Synch_data:';

Line 14134: from gl_bc_packets where packet_id = p_gl_packet_id)

14130: pb.session_id = DECODE(pb.session_id,NULL,l_session_id,pb.session_id),
14131: pb.serial_id = DECODE(pb.serial_id,NULL,l_serial_id,pb.serial_id)
14132: where pb.packet_id = p_pa_packet_id --Bug 14408086 Added the condition to check event_id and document type
14133: and ( pb.source_event_id in (select distinct event_id
14134: from gl_bc_packets where packet_id = p_gl_packet_id)
14135: or pb.bc_event_id in (select distinct event_id
14136: from gl_bc_packets where packet_id = p_gl_packet_id)
14137: );
14138:

Line 14136: from gl_bc_packets where packet_id = p_gl_packet_id)

14132: where pb.packet_id = p_pa_packet_id --Bug 14408086 Added the condition to check event_id and document type
14133: and ( pb.source_event_id in (select distinct event_id
14134: from gl_bc_packets where packet_id = p_gl_packet_id)
14135: or pb.bc_event_id in (select distinct event_id
14136: from gl_bc_packets where packet_id = p_gl_packet_id)
14137: );
14138:
14139: /*( pb.source_event_id = l_event_id or pb.bc_event_id = l_event_id
14140: ); */ -- Modified for bug 14665683

Line 14197: -- A. pa_bc_packet records have been extracted into gl_bc_packets

14193: -- This procedure will update the following columns in pa_bc_packets: serial_id,
14194: -- session_id,actual_flag,packet_id and status. Status will be upated from I to P.
14195: -- Called from pa_funds_check
14196: -- This procedure will also check if the extracts were successful, meaning that:
14197: -- A. pa_bc_packet records have been extracted into gl_bc_packets
14198: -- B. core records have been extracted into gl_bc_packets
14199: -- C. project relieveing entries are created in gl_bc_packets
14200: -- --------------------------------------------------------------------------------+
14201: PROCEDURE Synch_pa_gl_packets(x_packet_id IN Number,

Line 14198: -- B. core records have been extracted into gl_bc_packets

14194: -- session_id,actual_flag,packet_id and status. Status will be upated from I to P.
14195: -- Called from pa_funds_check
14196: -- This procedure will also check if the extracts were successful, meaning that:
14197: -- A. pa_bc_packet records have been extracted into gl_bc_packets
14198: -- B. core records have been extracted into gl_bc_packets
14199: -- C. project relieveing entries are created in gl_bc_packets
14200: -- --------------------------------------------------------------------------------+
14201: PROCEDURE Synch_pa_gl_packets(x_packet_id IN Number,
14202: x_partial_flag IN VARCHAR2,

Line 14199: -- C. project relieveing entries are created in gl_bc_packets

14195: -- Called from pa_funds_check
14196: -- This procedure will also check if the extracts were successful, meaning that:
14197: -- A. pa_bc_packet records have been extracted into gl_bc_packets
14198: -- B. core records have been extracted into gl_bc_packets
14199: -- C. project relieveing entries are created in gl_bc_packets
14200: -- --------------------------------------------------------------------------------+
14201: PROCEDURE Synch_pa_gl_packets(x_packet_id IN Number,
14202: x_partial_flag IN VARCHAR2,
14203: x_mode IN VARCHAR2,

Line 14213: from gl_bc_packets glbc

14209: Select pb.packet_id
14210: from pa_bc_packets pb
14211: where pb.bc_event_id in
14212: (select glbc.event_id
14213: from gl_bc_packets glbc
14214: where glbc.packet_id = x_packet_id)
14215: union all
14216: Select pb.packet_id
14217: from pa_bc_packets pb

Line 14220: from gl_bc_packets glbc

14216: Select pb.packet_id
14217: from pa_bc_packets pb
14218: where pb.source_event_id in
14219: (select glbc.event_id
14220: from gl_bc_packets glbc
14221: where glbc.packet_id = x_packet_id);
14222:
14223: -- 1st select reqd. in the case where core distribution not in gl_bc_packets
14224: -- 2nd select reqd. in the case where PA distribution not in gl_bc_packets

Line 14223: -- 1st select reqd. in the case where core distribution not in gl_bc_packets

14219: (select glbc.event_id
14220: from gl_bc_packets glbc
14221: where glbc.packet_id = x_packet_id);
14222:
14223: -- 1st select reqd. in the case where core distribution not in gl_bc_packets
14224: -- 2nd select reqd. in the case where PA distribution not in gl_bc_packets
14225:
14226: BEGIN
14227:

Line 14224: -- 2nd select reqd. in the case where PA distribution not in gl_bc_packets

14220: from gl_bc_packets glbc
14221: where glbc.packet_id = x_packet_id);
14222:
14223: -- 1st select reqd. in the case where core distribution not in gl_bc_packets
14224: -- 2nd select reqd. in the case where PA distribution not in gl_bc_packets
14225:
14226: BEGIN
14227:
14228: l_program_name := 'Synch_pa_gl_packets:';

Line 14262: from gl_bc_packets glbc--,

14258: where packet_id = l_pa_packet_id
14259: and pbc.bc_event_id is not null -- to filter out non-integrated budgets ...
14260: group by pbc.bc_event_id,pbc.document_distribution_id,pbc.document_type
14261: having count(pbc.bc_event_id) > (select count(glbc.event_id)
14262: from gl_bc_packets glbc--,
14263: --xla_distribution_links xlad
14264: where glbc.packet_id = x_packet_id
14265: and glbc.event_id = pbc.bc_event_id
14266: and glbc.source_distribution_id_num_1 = pbc.document_distribution_id

Line 14343: from gl_bc_packets glbc

14339: where pbc.packet_id = l_pa_packet_id
14340: and pbc.status_code = 'I'
14341: and pbc.source_event_id is not null
14342: and not exists (select 1
14343: from gl_bc_packets glbc
14344: where glbc.packet_id = x_packet_id
14345: and glbc.event_id = pbc.source_event_id
14346: and glbc.source_distribution_id_num_1 = pbc.document_distribution_id);
14347:

Line 14418: from gl_bc_packets glbc

14414: and pbc.status_code = 'I'
14415: and pbc.bc_event_id is not null
14416: and (document_type not like 'CC%' or parent_bc_packet_id is not null) -- added for bug 10429325
14417: and not exists (select glbc.source_distribution_id_num_1
14418: from gl_bc_packets glbc
14419: where glbc.packet_id = x_packet_id
14420: and (glbc.event_id = pbc.bc_event_id
14421: OR
14422: glbc.event_id = pbc.source_event_id)

Line 14494: -- This procedure will mark gl_bc_packets records to a status such that GL does

14490:
14491: End Synch_pa_gl_packets;
14492:
14493: -- --------------------------------------------------------------------------------+
14494: -- This procedure will mark gl_bc_packets records to a status such that GL does
14495: -- not execute funds available validation. Previously we used to create liquidation
14496: -- entries. Instead of that, we're executing the following procedure.
14497: -- This is for NO/SEPARATE LINE BURDENING only.
14498: -- This procedure is called from function pa_funds_check

Line 14501: PROCEDURE Mark_gl_bc_packets_for_no_fc (p_packet_id IN Number)

14497: -- This is for NO/SEPARATE LINE BURDENING only.
14498: -- This procedure is called from function pa_funds_check
14499: -- --------------------------------------------------------------------------------+
14500: /*
14501: PROCEDURE Mark_gl_bc_packets_for_no_fc (p_packet_id IN Number)
14502: IS
14503: -- At this point we should not check for result code ...
14504: Cursor c_bc_packet_id is
14505: select distinct pabc.project_id

Line 14513: log_message(p_msg_token1 =>'In Mark_gl_bc_packets_for_no_fc - Start');

14509: l_project_burden_method VARCHAR2(15);
14510:
14511: Begin
14512: If g_debug_mode = 'Y' Then
14513: log_message(p_msg_token1 =>'In Mark_gl_bc_packets_for_no_fc - Start');
14514: End if;
14515:
14516: for x in c_bc_packet_id loop
14517:

Line 14522: Update gl_bc_packets glbc

14518: l_project_burden_method := pa_funds_control_pkg.check_bdn_on_sep_item(x.project_id);
14519:
14520: If (l_project_burden_method <> 'DIFFERENT') then
14521:
14522: Update gl_bc_packets glbc
14523: set status_code = 'P' -- Open Issue no 4 in DLD: Check if this is final ?????
14524: where glbc.rowid in
14525: (select pabc.gl_row_number
14526: from pa_bc_packets pabc

Line 14535: log_message(p_msg_token1 =>'In Mark_gl_bc_packets_for_no_fc - End');

14531: End If;
14532: end loop;
14533:
14534: If g_debug_mode = 'Y' Then
14535: log_message(p_msg_token1 =>'In Mark_gl_bc_packets_for_no_fc - End');
14536: End if;
14537:
14538: End Mark_gl_bc_packets_for_no_fc;
14539: */

Line 14538: End Mark_gl_bc_packets_for_no_fc;

14534: If g_debug_mode = 'Y' Then
14535: log_message(p_msg_token1 =>'In Mark_gl_bc_packets_for_no_fc - End');
14536: End if;
14537:
14538: End Mark_gl_bc_packets_for_no_fc;
14539: */
14540: -- --------------------------------------------------------------------------------+
14541: -- This procedure will determine whether funds check/ funds check tieback
14542: -- has been called for non-project related/project related txn. or budget

Line 14934: -- Step 3.0: Identify records that have failed in gl_bc_packets ..

14930: -- pra.task_id = 0)
14931: -- and glps.period_name = pbc.period_name
14932: -- );
14933:
14934: -- Step 3.0: Identify records that have failed in gl_bc_packets ..
14935: Cursor c_gl_failure(p_budget_version_id in number) is
14936: select pbl.code_combination_id budget_ccid,
14937: pbl.period_name period_name,
14938: 'N' allow_flag ,

Line 14944: from gl_bc_packets glbc,

14940: pra.task_id,
14941: pra.resource_list_member_id rlmi,
14942: pbl.start_date,
14943: pbl.txn_currency_code
14944: from gl_bc_packets glbc,
14945: pa_budget_lines pbl,
14946: pa_resource_assignments pra
14947: where glbc.packet_id = p_packet_id
14948: and pbl.budget_version_id = p_budget_version_id

Line 14955: -- Step 4.0: This cursor is used to synch account data between gl_bc_packets and the budget ..

14951: and pra.resource_assignment_id = pbl.resource_assignment_id
14952: and pra.budget_version_id = pbl.budget_version_id;
14953: --and nvl(glbc.result_code,'P) <> 'F35';
14954:
14955: -- Step 4.0: This cursor is used to synch account data between gl_bc_packets and the budget ..
14956: Cursor c_budget_lines_synch(p_budget_version_id in number) is
14957: select glbc.code_combination_id sla_ccid,
14958: glbc.rowid gl_rowid,
14959: pbl.code_combination_id budget_ccid,

Line 14972: from gl_bc_packets glbc,

14968: pra.project_id,
14969: pra.task_id,
14970: pra.resource_list_member_id,
14971: nvl(prlm.parent_member_id,-99) parent_rlmi
14972: from gl_bc_packets glbc,
14973: pa_budget_lines pbl,
14974: pa_resource_assignments pra,
14975: pa_resource_list_members prlm
14976: where glbc.packet_id = p_packet_id

Line 15025: from gl_bc_packets glbc

15021: -- 10.0: Cursor used to select records to fail all records ....
15022: -- As data split between packet, records were not being failed in the credit packet ..
15023: Cursor c_gl_records is
15024: select glbc.rowid,glbc.ae_header_id,glbc.ledger_id
15025: from gl_bc_packets glbc
15026: where glbc.event_id in
15027: (select event_id from psa_bc_xla_events_gt);
15028:
15029: l_dummy_value number(1);

Line 15057: from gl_bc_packets glbc,

15053: Begin
15054:
15055: Select 1 into l_dummy_value from dual
15056: where exists (Select 1
15057: from gl_bc_packets glbc,
15058: pa_budget_lines pbl
15059: where glbc.packet_id = p_packet_id
15060: and pbl.budget_version_id = pa_budget_fund_pkg.g_cost_current_bvid
15061: and pbl.budget_line_id = glbc.source_distribution_id_num_1);

Line 15343: (select 1 from gl_bc_packets

15339:
15340: Begin
15341:
15342: Select 'Y' into l_gl_failure_flag from dual where exists
15343: (select 1 from gl_bc_packets
15344: where packet_id = p_packet_id
15345: and substr(nvl(result_code,'P'),1,1) = 'F');
15346: Exception
15347: When no_data_found then

Line 15550: -- that has txn.s against it. If any found, fail gl_bc_packets with F35

15546: -- -------------------------- STEP 4 -----------------------------------------+
15547: -- If (Top-Down and re-baseline and "reserve"/"check funds"/"year end")
15548: -- execute "budget account validation" (for the latest budget
15549: -- version only). i.e. account change not allowed on a budget line
15550: -- that has txn.s against it. If any found, fail gl_bc_packets with F35
15551: --
15552: -- IF ACCOUNT CHANGE ALLOWED, then update the account information on
15553: -- pa_budget_lines
15554: -- Note: We however have to synch data for all modes and all budget types ..

Line 15833: -- ## Fail gl_bc_packets ..

15829:
15830: If l_validation_failed = 'Y' then
15831:
15832: -- ----------------------------------------------------------------------------------+
15833: -- ## Fail gl_bc_packets ..
15834: If g_debug_mode = 'Y' then
15835: log_message(p_msg_token1=>l_program_name||': Acct. val. failed - Fail gl_bc_packets');
15836: End If;
15837: -- ----------------------------------------------------------------------------------+

Line 15835: log_message(p_msg_token1=>l_program_name||': Acct. val. failed - Fail gl_bc_packets');

15831:
15832: -- ----------------------------------------------------------------------------------+
15833: -- ## Fail gl_bc_packets ..
15834: If g_debug_mode = 'Y' then
15835: log_message(p_msg_token1=>l_program_name||': Acct. val. failed - Fail gl_bc_packets');
15836: End If;
15837: -- ----------------------------------------------------------------------------------+
15838:
15839: Forall x in t_bud_ccid.FIRST..t_bud_ccid.LAST

Line 15840: Update gl_bc_packets glbc

15836: End If;
15837: -- ----------------------------------------------------------------------------------+
15838:
15839: Forall x in t_bud_ccid.FIRST..t_bud_ccid.LAST
15840: Update gl_bc_packets glbc
15841: set glbc.result_code = 'F35'
15842: where glbc.packet_id = p_packet_id
15843: and glbc.source_distribution_id_num_1 = g_tab_budget_line_id(x)
15844: and g_tab_allow_flag(x) = 'N';

Line 16177: log_message(p_msg_token1=>l_program_name||':Account Level Funds Check failed - Fail gl_bc_packets');

16173: If l_count > 0 then
16174:
16175: -- ----------------------------------------------------------------------------------+
16176: If g_debug_mode = 'Y' then
16177: log_message(p_msg_token1=>l_program_name||':Account Level Funds Check failed - Fail gl_bc_packets');
16178:
16179: For x in g_tab_budget_ccid.FIRST..g_tab_budget_ccid.LAST loop
16180: log_message(p_msg_token1=>l_program_name||':g_tab_budget_ccid'||g_tab_budget_ccid(x)
16181: ||'g_tab_period_name'|| g_tab_period_name(x));

Line 16186: -- A. Fail gl_bc_packets:

16182: end loop;
16183: End If;
16184: -- ----------------------------------------------------------------------------------+
16185:
16186: -- A. Fail gl_bc_packets:
16187: Forall x in g_tab_budget_ccid.FIRST..g_tab_budget_ccid.LAST
16188: Update gl_bc_packets glbc
16189: set glbc.result_code = 'F35'
16190: where glbc.packet_id = p_packet_id

Line 16188: Update gl_bc_packets glbc

16184: -- ----------------------------------------------------------------------------------+
16185:
16186: -- A. Fail gl_bc_packets:
16187: Forall x in g_tab_budget_ccid.FIRST..g_tab_budget_ccid.LAST
16188: Update gl_bc_packets glbc
16189: set glbc.result_code = 'F35'
16190: where glbc.packet_id = p_packet_id
16191: and glbc.code_combination_id = g_tab_budget_ccid(x)
16192: and glbc.period_name = g_tab_period_name(x);

Line 16869: from gl_bc_packets glbc

16865: -- Cursor used to select records to fail all records ....
16866: -- As data split between packet, records were not being failed in the credit packet ..
16867: Cursor c_gl_records is
16868: select glbc.rowid,glbc.ae_header_id,glbc.ledger_id
16869: from gl_bc_packets glbc
16870: where glbc.event_id in
16871: (select event_id from psa_bc_xla_events_gt);
16872:
16873: l_baseline_failed Varchar2(1);

Line 16897: from gl_bc_packets glbc

16893: into l_baseline_failed
16894: from dual
16895: where exists
16896: (select packet_id
16897: from gl_bc_packets glbc
16898: where glbc.event_id in
16899: (select event_id from psa_bc_xla_events_gt)
16900: and glbc.result_code like 'F%');
16901: Exception

Line 16937: Update gl_bc_packets glbc

16933: -- -------------------------------------------------------------------------- +
16934: -- Fail gl_bc_packet records ...
16935: -- -------------------------------------------------------------------------- +
16936: forall i in t_glrowid.FIRST..t_glrowid.LAST
16937: Update gl_bc_packets glbc
16938: set glbc.result_code = decode(substr(glbc.result_code,1,1),'F',glbc.result_code,'F35'),
16939: glbc.status_code = decode(pa_budget_fund_pkg.g_processing_mode,
16940: 'CHECK_FUNDS','F','R')
16941: where rowid = t_glrowid(i);