DBA Data[Home] [Help]

APPS.PA_FUNDS_CONTROL_PKG1 dependencies on PA_BC_COMMITMENTS

Line 299: from pa_bc_commitments_all com

295: ,sum(decode(com.parent_bc_packet_id, NULL,(nvl(com.accounted_dr,0) - nvl(com.accounted_cr,0)),0)
296: ) ComRawAmt
297: Into l_combdamt
298: ,l_comrawamt
299: from pa_bc_commitments_all com
300: where com.project_id = p_project_id
301: and com.task_id = p_task_id
302: and com.budget_version_id = p_budget_version_id
303: and com.document_line_id = p_document_line_id

Line 629: from pa_bc_commitments_all comm

625: select 'Y'
626: from dual
627: Where exists
628: (select null
629: from pa_bc_commitments_all comm
630: where comm.project_id = l_project_id
631: and comm.task_id = l_task_id
632: and comm.budget_version_id = l_budget_version_id
633: and comm.document_line_id = l_document_line_id

Line 789: UPDATE pa_bc_commitments_all com

785: CLOSE cur_cwk_amts;
786: pa_funds_control_pkg.log_message(p_msg_token1 => 'CommRawAmt['||l_comm_raw_amt||']CommbdAmt['||l_comm_bd_amt||
787: ']RelvdComm['||l_relvd_comm_raw_amt||']RelvdBd['||l_relvd_comm_bd_amt||']');
788: l_rows_updated := 0;
789: UPDATE pa_bc_commitments_all com
790: SET com.comm_tot_raw_amt = nvl(com.comm_tot_raw_amt,0) +
791: decode(p_calling_module,'GL',decode(cwk.line_type,'RAW',nvl(l_comm_raw_amt,0),0),0)
792: ,com.comm_tot_bd_amt = nvl(com.comm_tot_bd_amt,0) +
793: decode(p_calling_module,'GL'

Line 982: UPDATE pa_bc_commitments_all cmt

978: If l_cwk_multiplier is NOT NULL Then
979: l_cwk_multiplier := pa_currency.round_trans_currency_amt
980: (l_cwk_multiplier,g_acct_currency_code);
981: End If;
982: UPDATE pa_bc_commitments_all cmt
983: SET cmt.compiled_multiplier = decode (cmt.document_line_id,NULL,cmt.compiled_multiplier,
984: l_cwk_multiplier)
985: WHERE cmt.summary_record_flag = 'Y'
986: AND cmt.document_line_id is NOT NULL

Line 1433: -- the period and commitment id from pa_bc_commitments

1429: END create_unrsvd_lines;
1430:
1431: ------------------------------------------------------------------------------------
1432: --This Api checks whether the Purchase order is based on the requisiton if
1433: -- the period and commitment id from pa_bc_commitments
1434: ------------------------------------------------------------------------------------
1435: FUNCTION is_req_based_po( p_req_distribution_id IN NUMBER
1436: ,p_req_header_id IN NUMBER
1437: ,p_req_prevent_enc_flipped IN VARCHAR2

Line 1462: FROM pa_bc_commitments comm

1458: CURSOR c_req_raw_burden IS
1459: SELECT parent_bc_packet_id
1460: FROM ( SELECT comm.bc_commitment_id,
1461: comm.parent_bc_packet_id
1462: FROM pa_bc_commitments comm
1463: WHERE comm.document_distribution_id = p_req_distribution_id
1464: AND comm.document_header_id = p_req_header_id
1465: AND comm.document_type = 'REQ'
1466: UNION ALL

Line 1563: -- and bc_commitment_id from pa_bc_commitments

1559:
1560: --------------------------------------------------------------------------------
1561: --This api checks whether the Invoice is based on the Purchase order
1562: -- if so then it takes the po_header_id,po_distribution_id,period_name
1563: -- and bc_commitment_id from pa_bc_commitments
1564: --------------------------------------------------------------------------------
1565: FUNCTION is_po_based_invoice( p_po_distribution_id IN NUMBER
1566: ,p_po_header_id IN NUMBER
1567: ,p_po_release_id IN NUMBER

Line 1581: -- take the calculated burden amount from pa_bc_commitments table

1577: L_CC_HEADER_ID varchar2(30); --Bug 6393954 changed from PO_DISTRIBUTIONS_ALL.PO_HEADER_ID%TYPE to varchar2
1578: L_PO_DESTINATION_TYPE PO_DISTRIBUTIONS_ALL.DESTINATION_TYPE_CODE%TYPE;
1579:
1580: -- this cursor checks whehter the AP is based on Purchase Order if so then
1581: -- take the calculated burden amount from pa_bc_commitments table
1582: CURSOR po_cur is
1583: SELECT po.req_header_reference_num
1584: ,po.req_line_reference_num
1585: ,po.destination_type_code

Line 1594: FROM pa_bc_commitments comm

1590: p_header_id NUMBER,
1591: p_document_type VARCHAR2) IS
1592: SELECT parent_bc_packet_id
1593: FROM ( SELECT comm.parent_bc_packet_id
1594: FROM pa_bc_commitments comm
1595: WHERE comm.document_distribution_id = p_distribution_id
1596: AND comm.document_header_id = p_header_id
1597: AND comm.document_type = p_document_type
1598: AND NVL(comm.document_header_id_2 ,-99) = NVL(p_po_release_id,-99)

Line 4291: from pa_bc_commitments pbc,

4287: l_amt_balance_tab,
4288: g_bdamt_balance_tab,
4289: g_doc_line_id_tab,
4290: g_burden_type_tab
4291: from pa_bc_commitments pbc,
4292: pa_projects_all pp,
4293: pa_project_types ppt
4294: where pbc.document_type = 'PO'
4295: and pbc.summary_record_flag = 'Y'

Line 4821: -- pa_bc_packets /pa_bc_commitments_all. We are using the amounts in the summary

4817: --
4818: -- Bug : 3703180
4819: -- PJ.M:B5:P1:QA:CWK: PAXBLRSL- -VE COMMITMENT CREATED WHEN PO CANCELLED AFTER
4820: -- Resolution : Compare the burden cost calculated with the summary record in
4821: -- pa_bc_packets /pa_bc_commitments_all. We are using the amounts in the summary
4822: -- table if summary has amounts less than the calculated in pa bc packets.
4823: -- If we have zero burden in pa bc packets then we use the entire amounts in
4824: -- the summary record.
4825: --

Line 4930: -- We determine the summary record from pa bc packets or pa bc commitments all table.

4926:
4927: --
4928: -- BUG 3703180
4929: -- Different line burdening setup.
4930: -- We determine the summary record from pa bc packets or pa bc commitments all table.
4931: -- compare the summary amounts with the pa bc packets burden and use the one less than
4932: -- the other. If pa bc packets burden cost is ZERO than we use the burden cost from the
4933: -- summary table record.
4934: --

Line 4956: -- Determine the summary amounts from pa bc packets or pa bc commitments table.

4952:
4953: IF l_exp_type_tab.count > 0 THEN
4954: --
4955: -- BUG 3703180
4956: -- Determine the summary amounts from pa bc packets or pa bc commitments table.
4957: --
4958: for indx in 1..l_exp_type_tab.count loop
4959:
4960: g_bdamt_balance_tab.delete ;

Line 4981: from pa_bc_commitments

4977:
4978: IF g_bdamt_balance_tab.count = 0 THEN
4979: select (nvl(comm_tot_bd_amt,0) - nvl(comm_bd_amt_relieved,0) ) bd_amount
4980: bulk collect into g_bdamt_balance_tab
4981: from pa_bc_commitments
4982: where document_type = 'PO'
4983: and summary_record_flag = 'Y'
4984: -- and burden_cost_flag = 'O'
4985: and parent_bc_packet_id is not NULL

Line 5218: from pa_bc_commitments pbc

5214: pa_funds_control_pkg.log_message(p_msg_token1 =>'Use Existing Multiplier Credit found :'||l_prev_multiplier);
5215:
5216: select NVL(max(pbc.packet_id) ,0)
5217: into l_max_packet_id
5218: from pa_bc_commitments pbc
5219: where pbc.document_header_id = l_doc_header_id
5220: and pbc.document_distribution_id = l_doc_distribution_id
5221: and pbc.document_type = p_doc_type
5222: and pbc.packet_id <> p_packet_id ;

Line 5224: pa_funds_control_pkg.log_message(p_msg_token1 =>'OLD Multiplier: pa_bc_commitments packet id '||l_max_packet_id);

5220: and pbc.document_distribution_id = l_doc_distribution_id
5221: and pbc.document_type = p_doc_type
5222: and pbc.packet_id <> p_packet_id ;
5223:
5224: pa_funds_control_pkg.log_message(p_msg_token1 =>'OLD Multiplier: pa_bc_commitments packet id '||l_max_packet_id);
5225:
5226: select max(packet_id)
5227: into l_max_packet_id_b
5228: from pa_bc_packets gbc1

Line 5245: from pa_bc_commitments

5241: select compiled_multiplier ,
5242: expenditure_type
5243: bulk collect into l_tab_multiplier,
5244: l_tab_icc_exp_type
5245: from pa_bc_commitments
5246: where packet_id = l_max_packet_id
5247: and document_header_id = l_doc_header_id
5248: and document_distribution_id = l_doc_distribution_id
5249: and document_type = p_doc_type

Line 5256: FROM pa_bc_commitments bc1

5252: -- pa_bc_packets/bc commitments with same header_id and distribution_id.In such scenario
5253: -- we should pick burden lines against one of the raw line else it will result in burden
5254: -- duplication
5255: and parent_bc_packet_id IN ( SELECT bc1.bc_packet_id -- SQL to fetch single raw record
5256: FROM pa_bc_commitments bc1
5257: WHERE bc1.packet_id = l_max_packet_id
5258: AND bc1.document_header_id = l_doc_header_id
5259: AND bc1.document_distribution_id = l_doc_distribution_id
5260: AND bc1.document_type = p_doc_type

Line 5264: pa_funds_control_pkg.log_message(p_msg_token1 =>'OLD Multiplier: pa_bc_commitments multiplier used');

5260: AND bc1.document_type = p_doc_type
5261: AND bc1.parent_bc_packet_id IS NULL
5262: AND ROWNUM = 1 );
5263:
5264: pa_funds_control_pkg.log_message(p_msg_token1 =>'OLD Multiplier: pa_bc_commitments multiplier used');
5265: ELSE
5266:
5267: select compiled_multiplier ,
5268: expenditure_type

Line 5680: -- amount from pa_bc_commitments (flip the amts)

5676: pbc.status_code,
5677: /* Incorrect Burden amts Bug fix:
5678: pa_currency.round_trans_currency_amt
5679: (p_entered_cr,g_acct_currency_code),
5680: -- amount from pa_bc_commitments (flip the amts)
5681: pa_currency.round_trans_currency_amt
5682: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
5683: pa_currency.round_trans_currency_amt
5684: (p_accounted_cr,g_acct_currency_code),-- amount from pa_bc_commitments

Line 5682: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments

5678: pa_currency.round_trans_currency_amt
5679: (p_entered_cr,g_acct_currency_code),
5680: -- amount from pa_bc_commitments (flip the amts)
5681: pa_currency.round_trans_currency_amt
5682: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
5683: pa_currency.round_trans_currency_amt
5684: (p_accounted_cr,g_acct_currency_code),-- amount from pa_bc_commitments
5685: pa_currency.round_trans_currency_amt
5686: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments

Line 5684: (p_accounted_cr,g_acct_currency_code),-- amount from pa_bc_commitments

5680: -- amount from pa_bc_commitments (flip the amts)
5681: pa_currency.round_trans_currency_amt
5682: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
5683: pa_currency.round_trans_currency_amt
5684: (p_accounted_cr,g_acct_currency_code),-- amount from pa_bc_commitments
5685: pa_currency.round_trans_currency_amt
5686: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments
5687: End Of bug fix: */
5688: pa_currency.round_trans_currency_amt

Line 5686: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments

5682: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
5683: pa_currency.round_trans_currency_amt
5684: (p_accounted_cr,g_acct_currency_code),-- amount from pa_bc_commitments
5685: pa_currency.round_trans_currency_amt
5686: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments
5687: End Of bug fix: */
5688: pa_currency.round_trans_currency_amt
5689: (p_entered_dr,g_acct_currency_code),
5690: pa_currency.round_trans_currency_amt

Line 6054: -- amount from pa_bc_commitments (flip amts)

6050: pbc.status_code,
6051: /* Incorrect Burden amts Bug fix:
6052: pa_currency.round_trans_currency_amt
6053: (p_entered_cr,g_acct_currency_code),
6054: -- amount from pa_bc_commitments (flip amts)
6055: pa_currency.round_trans_currency_amt
6056: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
6057: pa_currency.round_trans_currency_amt
6058: (p_accounted_cr,g_acct_currency_code), -- amount from pa_bc_commitments

Line 6056: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments

6052: pa_currency.round_trans_currency_amt
6053: (p_entered_cr,g_acct_currency_code),
6054: -- amount from pa_bc_commitments (flip amts)
6055: pa_currency.round_trans_currency_amt
6056: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
6057: pa_currency.round_trans_currency_amt
6058: (p_accounted_cr,g_acct_currency_code), -- amount from pa_bc_commitments
6059: pa_currency.round_trans_currency_amt
6060: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments

Line 6058: (p_accounted_cr,g_acct_currency_code), -- amount from pa_bc_commitments

6054: -- amount from pa_bc_commitments (flip amts)
6055: pa_currency.round_trans_currency_amt
6056: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
6057: pa_currency.round_trans_currency_amt
6058: (p_accounted_cr,g_acct_currency_code), -- amount from pa_bc_commitments
6059: pa_currency.round_trans_currency_amt
6060: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments
6061: End of Bug fix: */
6062: pa_currency.round_trans_currency_amt

Line 6060: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments

6056: (p_entered_dr,g_acct_currency_code), -- amount from pa_bc_commitments
6057: pa_currency.round_trans_currency_amt
6058: (p_accounted_cr,g_acct_currency_code), -- amount from pa_bc_commitments
6059: pa_currency.round_trans_currency_amt
6060: (p_accounted_dr,g_acct_currency_code), -- amount from pa_bc_commitments
6061: End of Bug fix: */
6062: pa_currency.round_trans_currency_amt
6063: (p_entered_dr,g_acct_currency_code),
6064: pa_currency.round_trans_currency_amt

Line 6139: --Invoice is based on PO then it takes the burden amount for the REQ or PO from pa_bc_commitments table

6135: END create_ap_po_bdn_lines;
6136:
6137: ------------------------------------------------------------------------------------------------------------------
6138: --This Api insert new records into pa bc packets if the project type is burdened.If the PO is based on REQ, or
6139: --Invoice is based on PO then it takes the burden amount for the REQ or PO from pa_bc_commitments table
6140: --and ensures that for req or po the old burden amount is used when reversing lines are passed in gl_bc_packets
6141: ------------------------------------------------------------------------------------------------------------------
6142: PROCEDURE Populate_burden_cost
6143: (p_packet_id IN NUMBER

Line 6190: -- this cursor picks up the burden amount and details from pa_bc_commitments table

6186: /*** Bug Fix : 1904319 added this for burden proportional calculations
6187: * cursor po_amount and pkt_po_amount is modified to calculate burden cost
6188: * if the invoice line is partially matched to purchase order
6189: **/
6190: -- this cursor picks up the burden amount and details from pa_bc_commitments table
6191: -- for the given distribution id ,document type and document header id
6192: CURSOR pkt_po_amount(l_req_id NUMBER,
6193: l_bc_packet_id NUMBER,
6194: l_po_header_id NUMBER,

Line 6223: FROM pa_bc_commitments_all pktburd

6219: 'BCCMT',
6220: 'A')) accounted_cr,
6221: pktburd.expenditure_type,
6222: pktburd.compiled_multiplier
6223: FROM pa_bc_commitments_all pktburd
6224: ,pa_bc_commitments_all pktraw
6225: ,pa_bc_packets pkttrx
6226: WHERE pktburd.document_distribution_id = l_req_id
6227: AND pktburd.document_header_id = l_po_header_id

Line 6224: ,pa_bc_commitments_all pktraw

6220: 'A')) accounted_cr,
6221: pktburd.expenditure_type,
6222: pktburd.compiled_multiplier
6223: FROM pa_bc_commitments_all pktburd
6224: ,pa_bc_commitments_all pktraw
6225: ,pa_bc_packets pkttrx
6226: WHERE pktburd.document_distribution_id = l_req_id
6227: AND pktburd.document_header_id = l_po_header_id
6228: AND pktburd.document_type = l_comm_doc_type

Line 6232: FROM pa_bc_commitments comm

6228: AND pktburd.document_type = l_comm_doc_type
6229: AND pktburd.parent_bc_packet_id is NOT NULL
6230: AND (pktburd.packet_id ,pktburd.parent_bc_packet_id ) in
6231: ( SELECT max(comm.packet_id),max(comm.bc_packet_id)
6232: FROM pa_bc_commitments comm
6233: WHERE comm.document_distribution_id = pktburd.document_distribution_id
6234: ANd comm.document_header_id = pktburd.document_header_id
6235: AND comm.document_type = pktburd.document_type
6236: AND comm.parent_bc_packet_id is NULL

Line 8059: FROM pa_bc_commitments_all pbc,

8055: AND gl.set_of_books_id = pbc.set_of_books_id
8056: AND gl.period_name = pbc.period_name) gl_start_date,
8057: pbc.exp_item_id,
8058: pbc.transfer_status_code
8059: FROM pa_bc_commitments_all pbc,
8060: pa_tasks pt,
8061: pa_budget_versions bv,
8062: pa_budget_entry_methods pm
8063: WHERE pbc.document_header_id = p_doc_header_id

Line 8123: -- from PA_BC_PACKETS to PA_BC_BALANCES and PA_BC_COMMITMENTS

8119: End if;
8120:
8121: -----------------------------------------------------------------------------------+
8122: -- Invoke the Sweeper process to sweep all the encumbrance etries
8123: -- from PA_BC_PACKETS to PA_BC_BALANCES and PA_BC_COMMITMENTS
8124: -----------------------------------------------------------------------------------+
8125: PA_Sweeper.Update_Act_Enc_Balance (
8126: X_Return_Status => l_Return_Status,
8127: X_Error_Message_Code => l_Msg_Data

Line 8214: -- pa_bc_commitments budget_line_id Not Supported Not Supported

8210: -- Table name column name Prior FP.M In FP.M
8211: -- -----------------------------------------------------------------------------
8212: -- pa_cost_distribution_line budget_version_id Not Supported Not Supported
8213: -- budget_line_id Not Supported Not Supported
8214: -- pa_bc_commitments budget_line_id Not Supported Not Supported
8215: -- exp_item_id Not Supported Supported
8216:
8217: -- Below logic has been added to populate above columns for expenditures interfaced to
8218: -- projects prior R12

Line 8295: UPDATE pa_bc_commitments

8291:
8292: END IF;
8293:
8294: FORALL i in 1..l_bc_commitment_id_tbl.count
8295: UPDATE pa_bc_commitments
8296: SET budget_line_id = l_budget_line_id
8297: WHERE bc_commitment_id = l_bc_commitment_id_tbl(i)
8298: AND budget_line_id IS NULL;
8299:

Line 8349: UPDATE pa_bc_commitments

8345: pa_funds_control_pkg.log_message(p_msg_token1 => 'INTERFACE_TBC_BTC_COMT_UPDATE : # of cdl records updated'||SQL%ROWCOUNT);
8346: End if;
8347:
8348: FORALL i in 1..l_bc_commitment_id_tbl.count
8349: UPDATE pa_bc_commitments
8350: SET exp_item_id = l_Exp_Item_Id_tbl(cdl_rec)
8351: WHERE bc_commitment_id = l_bc_commitment_id_tbl(i)
8352: AND exp_item_id IS NULL
8353: AND transfer_status_code in ('P','R','X');

Line 8368: UPDATE pa_bc_commitments bc_cm

8364: pa_funds_control_pkg.log_message(p_msg_token1 => 'INTERFACE_TBC_BTC_COMT_UPDATE : updating eligible AP commitments for liq encumbrance ');
8365: End if;
8366:
8367: FORALL i in 1..l_count_of_records
8368: UPDATE pa_bc_commitments bc_cm
8369: SET bc_cm.bc_event_id = l_cdl_acct_event_id_tbl(i),
8370: bc_cm.transfer_status_code = 'A',
8371: bc_cm.request_id = p_request_id,
8372: bc_cm.transferred_date = SYSDATE,

Line 8474: UPDATE pa_bc_commitments bc_cm

8470: pa_funds_control_pkg.log_message(p_msg_token1 => 'INTERFACE_TBC_BTC_COMT_UPDATE : updating eligible AP commitments for liq encumbrance ');
8471: End if;
8472:
8473: FORALL i in 1..l_count_of_records
8474: UPDATE pa_bc_commitments bc_cm
8475: SET bc_cm.bc_event_id = l_cdl_acct_event_id_tbl(i),
8476: bc_cm.transfer_status_code = 'A',
8477: bc_cm.request_id = p_request_id,
8478: bc_cm.transferred_date = SYSDATE,

Line 8662: FROM pa_bc_commitments comm1

8658: decode(p_dr_cr,'A',abs(nvl(accounted_dr,0)-nvl(accounted_cr,0)),
8659: 'E',abs(nvl(entered_dr,0)-nvl(entered_cr,0)))
8660: ,0))
8661: INTO l_ratio
8662: FROM pa_bc_commitments comm1
8663: WHERE comm1.packet_id = ( SELECT max(comm.packet_id)
8664: FROM pa_bc_commitments comm
8665: WHERE comm.document_distribution_id = l_document_distribution_id
8666: AND comm.document_header_id = l_document_header_id

Line 8664: FROM pa_bc_commitments comm

8660: ,0))
8661: INTO l_ratio
8662: FROM pa_bc_commitments comm1
8663: WHERE comm1.packet_id = ( SELECT max(comm.packet_id)
8664: FROM pa_bc_commitments comm
8665: WHERE comm.document_distribution_id = l_document_distribution_id
8666: AND comm.document_header_id = l_document_header_id
8667: AND comm.document_type = l_document_type
8668: AND comm.parent_bc_packet_id is NULL)