DBA Data[Home] [Help]

APPS.AP_TRIAL_BALANCE_PKG dependencies on AP_LIABILITY_BALANCE

Line 16: represents alias to ap_liability_balance.

12: p_reporting_entity_id - Will be org_id, legal_entity_id or set_of_books_id
13: according to the reporting level. This is the cross
14: reporting paramter.
15: p_org_where_alb - Multi ORG WHERE condition for cross org reporting
16: represents alias to ap_liability_balance.
17: p_org_where_ael - Multi ORG WHERE condition for cross org reporting
18: represents alias to ap_ae_lines_all.
19: p_org_where_asp - Multi ORG WHERE condition for cross org reporting
20: represents alias to ap_system_parameters_all.

Line 211: For AP the insert gets the information from the AP_LIABILITY_BALANCE. As of

207: This procedure inserts records into AP_TRIAL_BAL table for a given org_id or
208: for set of orgs as per the parameter for AP and AX set of books. This inserts
209: invoices that have not been fully paid on or before for a given as of date.
210:
211: For AP the insert gets the information from the AP_LIABILITY_BALANCE. As of
212: now this table is populated only by AP, While transferring information to
213: GL.
214: For AX the insert gets the information from the AX views namely:
215: ax_ap_ae_lines_all_v and ax_ap_ae_headers_all_v.

Line 252: || ' FROM ap_liability_balance alb '

248: || ' alb.set_of_books_id set_of_books_id, '
249: || ' alb.org_id org_id, '
250: || ' '||p_request_id||' request_id, '
251: || ' SUM(ae_invoice_amount) invoice_amount '
252: || ' FROM ap_liability_balance alb '
253: || ' WHERE trunc(accounting_date) <= '
254: || ' trunc(to_date('''||p_accounting_date||''',''YYYY/MM/DD'')) '
255: || p_org_where_alb
256: || ' GROUP BY '

Line 320: || ' FROM ap_liability_balance alb, '

316: || ' alb.set_of_books_id set_of_books_id, '
317: || ' alb.org_id org_id, '
318: || ' '||p_request_id||' request_id, '
319: || ' SUM(ae_invoice_amount) invoice_amount '
320: || ' FROM ap_liability_balance alb, '
321: || ' ap_invoices_all ai '
322: || ' WHERE ai.invoice_id = alb.invoice_id '
323: || ' AND trunc(alb.accounting_date) <= '
324: || ' trunc(to_date('''||p_accounting_date||''',''YYYY/MM/DD'')) '

Line 773: Insert_AP_Liability_Balance function is used to populate the

769:
770: END Use_Future_Dated;
771:
772: /*=============================================================================
773: Insert_AP_Liability_Balance function is used to populate the
774: AP_LIABILITY_BALANCE table. This will be called from the APXGLTRN.rdf report
775: after the GL transfer has been completed successfully.
776:
777: It takes the following arguments:

Line 774: AP_LIABILITY_BALANCE table. This will be called from the APXGLTRN.rdf report

770: END Use_Future_Dated;
771:
772: /*=============================================================================
773: Insert_AP_Liability_Balance function is used to populate the
774: AP_LIABILITY_BALANCE table. This will be called from the APXGLTRN.rdf report
775: after the GL transfer has been completed successfully.
776:
777: It takes the following arguments:
778:

Line 791: 2) Inserts the AP_LIABILITY_BALANCE with the denormalized information

787: ======
788:
789: 1) For a given request_id the function first determines the list of
790: gl_transfer_run_id from xla_gl_transfer_batches_all.
791: 2) Inserts the AP_LIABILITY_BALANCE with the denormalized information
792: from ap_ae_lines_all and ap_ae_headers_all for a given gl_transfer_run_id.
793: 3) Calls the Update trial_balance_flag of ap_ae_headers_all for the same
794: gl_transfer_run_id, so that we can make sure that accounting entry
795: lines of type LIABILITY associsted with the header record have been

Line 796: transferred to the AP_LIABILITY_BALANCE table.

792: from ap_ae_lines_all and ap_ae_headers_all for a given gl_transfer_run_id.
793: 3) Calls the Update trial_balance_flag of ap_ae_headers_all for the same
794: gl_transfer_run_id, so that we can make sure that accounting entry
795: lines of type LIABILITY associsted with the header record have been
796: transferred to the AP_LIABILITY_BALANCE table.
797:
798: Bug Fixes:
799:
800: Bug 2284841

Line 805: FUNCTION Insert_AP_Liability_Balance (

801: Bug 2319648 - Prepayment Application Case, Standard Invoice is
802: not displayed with the right invoice_amount.
803: =============================================================================*/
804:
805: FUNCTION Insert_AP_Liability_Balance (
806: p_request_id IN NUMBER,
807: p_user_id IN NUMBER,
808: p_resp_appl_id IN NUMBER,
809: p_login_id IN NUMBER,

Line 828: fnd_file.put_line(fnd_file.log,'Into Insert_AP_Liability_Balance Procedure');

824: l_gl_transfer_run_id xla_gl_transfer_batches_all.gl_transfer_run_id%TYPE;
825:
826: BEGIN
827:
828: fnd_file.put_line(fnd_file.log,'Into Insert_AP_Liability_Balance Procedure');
829:
830: fnd_file.put_line(fnd_file.log,'Open transfer_info cursor');
831:
832: OPEN transfer_info;

Line 839: fnd_file.put_line(fnd_file.log,'Insert ap_liability_balance for every'

835:
836: FETCH transfer_info INTO l_gl_transfer_run_id;
837: EXIT WHEN transfer_info%NOTFOUND;
838:
839: fnd_file.put_line(fnd_file.log,'Insert ap_liability_balance for every'
840: ||'gl_transfer_run_id');
841:
842: fnd_file.put_line(fnd_file.log,'Processing gl_transfer_run_id : '
843: ||l_gl_transfer_run_id);

Line 845: INSERT INTO ap_liability_balance

841:
842: fnd_file.put_line(fnd_file.log,'Processing gl_transfer_run_id : '
843: ||l_gl_transfer_run_id);
844:
845: INSERT INTO ap_liability_balance
846: (ae_line_id,
847: ae_header_id,
848: invoice_id,
849: code_combination_id,

Line 935: ||'Insert_AP_Liability_Balance '

931:
932: WHEN OTHERS THEN
933:
934: fnd_file.put_line(fnd_file.log,'Error Occured in '
935: ||'Insert_AP_Liability_Balance '
936: ||'Procedure');
937: fnd_file.put_line(fnd_file.log, 'Error Code: '||SQLCODE);
938: fnd_file.put_line(fnd_file.log, 'Error Message: '|| SQLERRM);
939:

Line 947: END Insert_AP_Liability_Balance;

943:
944: RETURN (FALSE);
945:
946:
947: END Insert_AP_Liability_Balance;
948:
949: /*=============================================================================
950: Update_Trial_Balance_Flag Function - is a local function called by the
951: Insert_AP_Liability_Balance to update the ap_ae_header_all trial_balance_flag

Line 951: Insert_AP_Liability_Balance to update the ap_ae_header_all trial_balance_flag

947: END Insert_AP_Liability_Balance;
948:
949: /*=============================================================================
950: Update_Trial_Balance_Flag Function - is a local function called by the
951: Insert_AP_Liability_Balance to update the ap_ae_header_all trial_balance_flag
952: . This flag represents the accounting entry lines of type LIABILTIY have been
953: successfully inserted for a header record to the AP_LIABILTY_BALANCE table.
954: =============================================================================*/
955:

Line 1065: ae_invoice_amount in the AP_LIABILITY_BALANCE table. This will store the

1061: with Trial balance report not displaying the Invoice_amount in the funcitonal
1062: currency with the right proportion when customer uses automatic offsets.
1063:
1064: As a part of enhancement to the trial balance we have added new column named
1065: ae_invoice_amount in the AP_LIABILITY_BALANCE table. This will store the
1066: invoice amount in the functional currency (for the appropriate set of books
1067: includes MRC books as trial balance reports on MRC books as well) from the
1068: accounting tables, not only at the invoice level but also at the CCID (Liability)
1069: within the invoice. But the same cannot be directly applied in couple of cases

Line 1071: 1) As of now AX does not populate the AP_LIABILITY_BALANCE table. So we will

1067: includes MRC books as trial balance reports on MRC books as well) from the
1068: accounting tables, not only at the invoice level but also at the CCID (Liability)
1069: within the invoice. But the same cannot be directly applied in couple of cases
1070: like
1071: 1) As of now AX does not populate the AP_LIABILITY_BALANCE table. So we will
1072: not be able to derive the amounts per liability CCID within an
1073: Invoice for AX. So we will substitute the Actual invoice_amount in functional
1074: currency using this API.
1075:

Line 1082: gets the information from AP_LIABILITY_BALANCE table.

1078: So based on the discussion (Omar and Lauren) , we will again report the
1079: invoice_amount in functional currency.
1080:
1081: This Function will be called in all the Insert statements except the one that
1082: gets the information from AP_LIABILITY_BALANCE table.
1083:
1084: It takes the following Arguments:
1085:
1086: p_set_of_books_id - Set of Books Identifier.