Documente Academic
Documente Profesional
Documente Cultură
Project Documentation
1
Table of Contents
1. Project Description.................................................................................................................................................2
2. All Parameters in Project....................................................................................................................................... 3
3. Project Business Flows and Cartridges................................................................................................................. 13
3.1. Business Flow ReceivablesArchive 7.51.1.12.68.68......................................................................................... 13
3.1.1. Business Flow Description..............................................................................................................................13
3.1.1.1. Business Flow Diagram............................................................................................................................... 33
3.1.1.2. Parameters used in Business Flow Actvities (and Model Compatibilities)....................................................35
3.1.1.3. Order of Parameters for Business Flow Activities.........................................................................................35
3.1.2. Business Flow Activities..................................................................................................................................35
3.1.2.1. Script Activity "OptionalParameter" Description............................................................................................36
3.1.2.2. Condition Activity "SumaryTableConditio" Description................................................................................. 36
3.1.2.2.1. Condition Activity "SumaryTableConditio" Diagram...................................................................................36
3.1.2.2.2. Script Activity "CreateSummaryTable" Description....................................................................................36
3.1.2.3. Interrupt Activity: "Pause"............................................................................................................................. 39
3.1.2.4. Cartridge Activity "ReceivableTransactionsArchive" Description..................................................................39
3.1.2.5. Interrupt Activity: "Pause"............................................................................................................................. 39
3.1.2.6. Script Activity "updateOltpTables" Description............................................................................................. 40
3.1.2.7. Cartridge Activity "ReceivableTransactionsArchive" Description..................................................................42
3.1.2.8. Cartridge Activity "TransactionBatchesArchive" Description........................................................................ 42
3.1.2.9. Cartridge Activity "ReceiptBatchesArchive" Description............................................................................... 43
3.1.2.10. Cartridge Activity "LockboxTransmissionsArchive" Description..................................................................43
3.1.2.11. Cartridge Activity "CorrespondencesArchive" Description..........................................................................43
3.2. Business Flow ReceivablesReload 7.51.1.12.68.68..........................................................................................43
3.2.1. Business Flow Description..............................................................................................................................43
3.2.1.1. Business Flow Diagram............................................................................................................................... 43
3.2.1.2. Parameters used in Business Flow Actvities (and Model Compatibilities)....................................................45
3.2.1.3. Order of Parameters for Business Flow Activities.........................................................................................45
3.2.2. Business Flow Activities..................................................................................................................................45
3.2.2.1. Cartridge Activity "ReceivableTransactionsReload" Description.................................................................. 45
3.2.2.2. Script Activity "getReloadSelTabName" Description.................................................................................... 45
3.2.2.3. Cartridge Activity "TransactionBatchesReload" Description......................................................................... 47
3.2.2.4. Cartridge Activity "ReceiptBatchesReload" Description................................................................................47
3.2.2.5. Cartridge Activity "CorrespondencesReload" Description............................................................................ 48
3.2.2.6. Script Activity "updateBatches" Description..................................................................................................48
3.2.2.7. Cartridge Activity "TransactionBatchesReload" Description......................................................................... 52
3.2.2.8. Cartridge Activity "ReceiptBatchesReload" Description................................................................................52
3.2.2.9. Cartridge Activity "LockboxTransmissionsReload" Description.................................................................... 52
3.2.2.10. Cartridge Activity "CorrespondencesReload" Description.......................................................................... 53
3.2.2.11. Cartridge Activity "ReceivableTransactionsReload" Description................................................................ 53
3.3. Undo Business Flow ReceivablesUndo 7.51.1.12.68.68.................................................................................... 53
3.3.1. Undo Business Flow Description..................................................................................................................... 53
3.3.1.1. Undo Business Flow Diagram.......................................................................................................................53
3.3.2. Undo Business Flow Activities......................................................................................................................... 54
3.3.2.1. Script Activity "undoUpdates" Description.................................................................................................... 54
3.3.2.2. Cartridge Activity "CorrespondencesArchive" Description............................................................................60
3.3.2.3. Cartridge Activity "LockboxTransmissionsArchive" Description....................................................................60
3.3.2.4. Cartridge Activity "ReceiptBatchesArchive" Description............................................................................... 60
3.3.2.5. Cartridge Activity "TransactionBatchesArchive" Description........................................................................ 60
3.3.2.6. Cartridge Activity "ReceivableTransactionsArchive" Description..................................................................60
3.4. Database to Database Cartridge CorrespondencesArchive 7.51.1.12.68.68..................................................... 60
3.4.1. Cartridge CorrespondencesArchive.................................................................................................................60
3.4.1.1. Cartridge operations..................................................................................................................................... 61
3.4.1.2. Cartridge-specific data movement key warnings.......................................................................................... 61
3.4.1.3. Parameters used in the Source Model and Cartridge...................................................................................61
3.4.1.4. Rules in Cartridge......................................................................................................................................... 61
3.5. Database to Database Cartridge CorrespondencesReload 7.51.1.12.68.68......................................................61
3.5.1. Cartridge CorrespondencesReload................................................................................................................. 61
3.5.1.1. Cartridge operations..................................................................................................................................... 62
3.5.1.2. Cartridge-specific data movement key warnings.......................................................................................... 62
3.5.1.3. Data Sources................................................................................................................................................ 62
3.5.1.4. Parameters used in the Source Model and Cartridge...................................................................................62
3.5.1.5. Rules in Cartridge......................................................................................................................................... 62
3.5.1.6. Custom selection.......................................................................................................................................... 62
3.6. Database to Database Cartridge LockboxTransmissionsArchive 7.51.1.12.68.68.............................................63
3.6.1. Cartridge LockboxTransmissionsArchive.........................................................................................................63
3.6.1.1. Cartridge operations..................................................................................................................................... 63
3.6.1.2. Cartridge-specific data movement key warnings.......................................................................................... 63
3.6.1.3. Parameters used in the Source Model and Cartridge...................................................................................64
3.6.1.4. Rules in Cartridge......................................................................................................................................... 64
3.7. Database to Database Cartridge LockboxTransmissionsReload 7.51.1.12.68.68............................................. 64
3.7.1. Cartridge LockboxTransmissionsReload......................................................................................................... 64
3.7.1.1. Cartridge operations..................................................................................................................................... 64
3.7.1.2. Cartridge-specific data movement key warnings.......................................................................................... 64
3.7.1.3. Data Sources................................................................................................................................................ 64
3.7.1.4. Rules in Cartridge......................................................................................................................................... 65
3.8. Database to Database Cartridge ReceiptBatchesArchive 7.51.1.12.68.68........................................................ 65
3.8.1. Cartridge ReceiptBatchesArchive.................................................................................................................... 65
3.8.1.1. Cartridge operations..................................................................................................................................... 65
3.8.1.2. Cartridge-specific data movement key warnings.......................................................................................... 65
3.8.1.3. Parameters used in the Source Model and Cartridge...................................................................................65
3.8.1.4. Rules in Cartridge......................................................................................................................................... 65
3.9. Database to Database Cartridge ReceiptBatchesReload 7.51.1.12.68.68.........................................................66
3.9.1. Cartridge ReceiptBatchesReload.....................................................................................................................66
3.9.1.1. Cartridge operations..................................................................................................................................... 66
3.9.1.2. Cartridge-specific data movement key warnings.......................................................................................... 66
3.9.1.3. Data Sources................................................................................................................................................ 66
3.9.1.4. Parameters used in the Source Model and Cartridge...................................................................................66
3.9.1.5. Rules in Cartridge......................................................................................................................................... 66
3.9.1.6. Custom selection.......................................................................................................................................... 66
3.10. Database to Database Cartridge ReceivableTransactionsArchive 7.51.1.12.68.68......................................... 67
3.10.1. Cartridge ReceivableTransactionsArchive.....................................................................................................67
3.10.1.1. Cartridge operations................................................................................................................................... 67
3.10.1.2. Cartridge-specific data movement key warnings........................................................................................ 68
3.10.1.3. Parameters used in the Source Model and Cartridge.................................................................................68
3.10.1.4. Rules in Cartridge....................................................................................................................................... 69
3.11. Database to Database Cartridge ReceivableTransactionsReload 7.51.1.12.68.68..........................................69
3.11.1. Cartridge ReceivableTransactionsReload..................................................................................................... 69
3.11.1.1. Cartridge operations................................................................................................................................... 70
3.11.1.2. Cartridge-specific data movement key warnings........................................................................................ 70
3.11.1.3. Data Sources.............................................................................................................................................. 70
3.11.1.4. Parameters used in the Source Model and Cartridge.................................................................................71
3.11.1.5. Rules in Cartridge....................................................................................................................................... 71
3.12. Database to Database Cartridge TransactionBatchesArchive 7.51.1.12.68.68................................................72
3.12.1. Cartridge TransactionBatchesArchive........................................................................................................... 72
3.12.1.1. Cartridge operations................................................................................................................................... 72
3.12.1.2. Cartridge-specific data movement key warnings........................................................................................ 72
3.12.1.3. Parameters used in the Source Model and Cartridge.................................................................................72
3.12.1.4. Rules in Cartridge....................................................................................................................................... 72
3.13. Database to Database Cartridge TransactionBatchesReload 7.51.1.12.68.68................................................ 73
3.13.1. Cartridge TransactionBatchesReload............................................................................................................ 73
3.13.1.1. Cartridge operations................................................................................................................................... 73
3.13.1.2. Cartridge-specific data movement key warnings........................................................................................ 73
3.13.1.3. Data Sources.............................................................................................................................................. 73
3.13.1.4. Parameters used in the Source Model and Cartridge.................................................................................73
3.13.1.5. Rules in Cartridge....................................................................................................................................... 73
3.13.1.6. Custom selection........................................................................................................................................ 74
4. Source Models....................................................................................................................................................... 75
4.1. Source Model Correspondences....................................................................................................................... 75
4.1.1. ER Diagram..................................................................................................................................................... 75
4.1.2. Table use List...................................................................................................................................................75
4.1.2.1. Table use AR_CORRESPONDENCES_ALL................................................................................................75
4.1.2.2. Table use AR_CORR_PAY_SCHED_ALL................................................................................................... 76
4.2. Source Model LockboxTransmissions............................................................................................................... 76
4.2.1. ER Diagram..................................................................................................................................................... 77
4.2.2. Table use List...................................................................................................................................................77
4.2.2.1. Table use AR_TRANSMISSIONS_ALL........................................................................................................ 77
4.2.2.2. Table use AR_BATCHES_ALL.....................................................................................................................77
4.3. Source Model ReceiptBatches...........................................................................................................................78
4.3.1. ER Diagram..................................................................................................................................................... 78
4.3.2. Table use List...................................................................................................................................................79
4.3.2.1. Table use AR_BATCHES_ALL.....................................................................................................................79
4.3.2.2. Table use AR_CASH_RECEIPT_HISTORY_ALL........................................................................................ 79
4.4. Source Model ReceivableTransactions............................................................................................................. 80
4.4.1. ER Diagram..................................................................................................................................................... 81
4.4.2. Table use List...................................................................................................................................................83
4.4.2.1. Table use RA_CUSTOMER_TRX_ALL........................................................................................................ 83
4.4.2.2. Table use RA_CUSTOMER_TRX_LINES_ALL............................................................................................85
4.4.2.3. Table use AR_LINE_CONTS_ALL............................................................................................................... 86
4.4.2.4. Table use JAI_AR_TRXS............................................................................................................................. 86
4.4.2.5. Table use JAI_AR_TRX_TAX_LINES.......................................................................................................... 87
4.4.2.6. Table use JAI_AR_TRX_LINES................................................................................................................... 87
4.4.2.7. Table use JAI_AR_TRX_INS_LINES_T....................................................................................................... 88
4.4.2.8. Table use AR_PAYMENT_SCHEDULES_ALL............................................................................................ 89
4.4.2.9. Table use AR_CORR_PAY_SCHED_ALL................................................................................................... 90
4.4.2.10. Table use RA_CUST_TRX_LINE_GL_DIST_ALL......................................................................................90
4.4.2.11. Table use AR_RECEIVABLE_APPLICATIONS_ALL................................................................................. 91
4.4.2.12. Table use AR_CASH_RECEIPTS_ALL......................................................................................................92
4.4.2.13. Table use AR_CASH_RECEIPT_HISTORY_ALL...................................................................................... 93
4.4.2.14. Table use CE_STATEMENT_RECONCILS_ALL....................................................................................... 94
4.4.2.15. Table use AR_DISTRIBUTIONS_ALL........................................................................................................ 95
4.4.2.16. Table use AR_PAYMENT_SCHEDULES_ALL_2...................................................................................... 96
4.4.2.17. Table use AR_RATE_ADJUSTMENTS_ALL..............................................................................................97
4.4.2.18. Table use JAI_AR_CASH_RECEIPTS_ALL...............................................................................................97
4.4.2.19. Table use JAI_CMN_DOCUMENT_TAXES............................................................................................... 98
4.4.2.20. Table use RA_CUSTOMER_TRX_ALL_2.................................................................................................. 99
4.4.2.21. Table use AR_DISTRIBUTIONS_ALL_2.................................................................................................... 101
4.4.2.22. Table use RA_CUST_TRX_LINE_SALESREPS_ALL............................................................................... 101
4.4.2.23. Table use RA_CUST_TRX_TYPES_ALL................................................................................................... 102
4.4.2.24. Table use AR_ADJUSTMENTS_ALL......................................................................................................... 103
4.4.2.25. Table use AR_DISTRIBUTIONS_ALL_3.................................................................................................... 104
4.4.2.26. Table use AR_NOTES................................................................................................................................105
4.4.2.27. Table use AR_CUSTOMER_CALL_TOPICS_ALL.....................................................................................105
4.4.2.28. Table use AR_CALL_ACTIONS................................................................................................................. 106
4.4.2.29. Table use AR_ACTION_NOTIFICATIONS.................................................................................................106
4.4.2.30. Table use AR_DEFERRED_LINES_ALL....................................................................................................107
4.4.2.31. Table use JAI_AR_TRXS_2....................................................................................................................... 108
4.5. Source Model TransactionBatches.................................................................................................................... 108
4.5.1. ER Diagram..................................................................................................................................................... 108
4.5.2. Table use List...................................................................................................................................................108
4.5.2.1. Table use RA_BATCHES_ALL.....................................................................................................................109
4.5.2.2. Table use RA_CUSTOMER_TRX_ALL........................................................................................................ 109
1. Project Description
Project Info
Annotation
2
2. All Parameters in Project
Parameter: pcAdjustmentGLDate
Label Receivables: Override Rule for Adjustment GL Date?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule for checking GL
Date on Postable and Unpostable Adjustments, if you want to purge
postable transactions having adjustments whose GL Date is after the cut
off date or has unpurgable adjustments with posting_control_id=-3. Also
to allow purge for unpostable approved adjustments whose GL Posted
Date is after the cut off date. Default value is No.
Parameter: pcCommitmentRelatedTrx
Label Receivables: Override Rule for Commitment Related Transaction or
Credit Memo?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule -
TrxnNotCommitmentRelated and CMTrxnNotCommitmentRelated, if you
want to purge transactions related to Commitment invoices. Default value
is No.
Parameter: pcCommitmentTrx
Label Receivables: Override Rule for Commitment Type Transactions?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Transaction Type
Not Commitment, if you want to purge Commitment invoices. Default
value is No.
3
Parameter: pcCompletedTrx
Label Receivables: Override Rule - Transaction and Credit Memo Must be
Completed?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rules -
TransactionMustBeComplete and CMTransactionMustBeComplete, if you
want to purge invoices and credit memos which are not completed.
Default value is No.
Parameter: pcCreateSummaryTableAR
Label Receivables : Create Summary table for Rule (RunningTotalMustBeZero)
?:
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default Y
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter: pcMonthsToRetain
Label Receivables: Months to Retain
UID DFC9-BE20-D47B-FFC0
Parameter Type Configuration
Data Type NUMBER
Length 9
Default 12
Validation Mandatory
List of Values <None>
Parameter Annotation Configuration parameter to change the retention policy for AR. Default
value is 12 months.
Parameter: pcPauseAfterSelectionAR
Label Receivables: Pause after Selection?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
4
Parameter: pcPauseAfterSelectionAR
Static List of Values Id Label
Y Yes
N No
Parameter Annotation This configuration parameter enables pausing the ReceivablesArchive
business flow after the selection job has completed for the cartridge
ReceivableTransactionsArchive.
Parameter: pcPauseAfterSummaryTablePopAR
Label Receivables: Pause after Summary table population ?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter: pcPostableApplicationGLDate
Label Receivables: Override Rule for Postable Applications GL Date?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule for Postable
Applications, if you want to purge postable transactions having
applications whose GL Date is after the cut off date or has unpurgable
applications with posting_control_id=-3. Default value is No.
Parameter: pcPostableDistributionGLDate
Label Receivables: Override Rule for Postable Distributions GL Date?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
5
Parameter: pcPostableDistributionGLDate
Parameter Annotation Configuration parameter to override the eligiblity rule for Postable
Distributions, if you want to purge postable transactions having
distributions whose GL Date is after the cut off date or has unpurgable
distributions with posting_control_id=-3. Default value is No.
Parameter: pcPostableReceiptHistoryGLDate
Label Receivables: Override Rule for Postable Cash Receipt History?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule for Postable Cash
Receipt History, if you want to purge postable transactions having receipt
history whose date is after the cut off date or has unpurgable history with
posting_control_id=-3. Default value is No.
Parameter: pcReceiptCurrHistStatus
Label Receivables: Override Rule for Current Receipt History Status?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Current Receipt
History Status, if you want to purge a Receipt that has unpurgeable
history records with status as cleared and not risk eliminated or approved,
remitted, confirmed or reversed. Default value is No.
Parameter: pcReceiptPaySchedClosed
Label Receivables: Override Rule - Payment Schedule Not Open for Receipts?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Payment Schedule
Not Open for Receipts, if you want to purge Receipt that has open
payment schedules. Default value is No.
6
Parameter: pcReceiptRefInCE
Label Receivables: Override Rule - Reconciled Bank Statement Should Not
Exist for Receipt?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Reconciled Bank
Statement Should Not Exist for Receipt, if you want to purge receipts
when reconciled bank statements exist in Oracle Cash Management.
Default value is No.
Parameter: pcRunningTotal
Label Receivables: Override Rule - Running Total should be Zero?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule for Running Total, if
you want to purge the transactions for which Running Total (comprising:
gl_dist_total + adjustment_total + CM_appl_total - Cash_appl_total ) is not
zero.. Default value is No.
Parameter: pcRunTotalNumericPrecision
Label Receivables: Rounding Factor for Running Total
UID DFC9-BE20-D47B-FFC0
Parameter Type Configuration
Data Type NUMBER
Length 9
Default 99
Validation Mandatory
List of Values <None>
Parameter Annotation Configuration parameter to change Rounding Factor for Running Total.
Default value is 99.
Parameter: pcTrxInPaySched
Label Receivables: Override Rule - Transaction and Credit Memo Should have
Payment Schedules?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
7
Parameter: pcTrxInPaySched
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule -
TransactionMustHavePaySched and CMTransactionMustHavePaySched,
if you want to purge Invoices and credit memos which do not exists in
AR_PAYMENT_SCHEDULES table per limitation in the Oracle AR Purge
program. Default value is No.
Parameter: pcTrxLineAutoruleComplete
Label Receivables: Override Rule - Transaction Line Autorule Complete?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Line Autorule
Complete, if you want to purge the transactions for which Autorule is not
completed (i.e if account assignments are not done). Default value is No.
Parameter: pcTrxPaySchedClass
Label Receivables: Override Rule - Transaction Payment Schedule Class?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Payment Schedule
Class, if you want to purge the the transaction for which payment
schedule is not of class - Invoice or Credit Memo or Debit Memo. Default
value is No.
Parameter: pcTrxPaySchedClosed
Label Receivables: Override Rule - Closed Payment Schedule for invoices and
credit memos?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
8
Parameter: pcTrxPaySchedClosed
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule -
TrxnPaySchedMustBeClosed and CMTrxnPaySchedMustBeClosed, if
you want to purge invoices and credit memos for which payment
schedules are not closed. Default value is No.
Parameter: pcTrxPaySchedGLDate
Label Receivables: Override Rule for Payment Schedule GL Date?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule for Transaction
Payment Schedule GL Date, if you want to purge transactions without
regard to gl closed date in payment schedules. Otherwise this
gl_closed_date must be less than the Cutoff date parameter in the purge
run. Default value is No.
Parameter: pcTrxRevenueComplete
Label Receivables: Override Rule - Line Revenue Complete?
UID 3DA4-BDDB-A225-9E4E
Parameter Type Configuration
Data Type STRING
Length 30
Default N
Validation Mandatory
Static List of Values Id Label
Y Yes
N No
Parameter Annotation Configuration parameter to override the eligiblity rule - Line Revenue
Complete, if you want to purge transactions with revenue not completely
recognized for some of its lines (i.e acctd_amount_due_original is not
equal to acctd_amount_recognized). Default value is No.
Parameter: pdReloadCorrespondenceSelTab
Label P_D_Rel_APS_Sel_Tab
UID DC47-E18E-1ACD-F2B0
Parameter Type Dynamic
Data Type STRING
Code
9
Parameter: pdReloadCorrespondenceSelTab
Parameter Annotation
Dynamic parameter to get the selection table name for ar_corr_pay_sched_all table in target database. This is
required in the custom selection program for cartridge CorrespondencesReload.
Parameter: pdReloadReceiptBatchSelTab
Label P_D_Rel_ACRH_Sel_Tab
UID DC47-E18E-1ACD-F2B0
Parameter Type Dynamic
Data Type STRING
Code
Parameter Annotation
Dynamic parameter to get the selection table name for ar_cash_receipt_history_all table in target database.
This is required in the custom selection program for cartridge ReceiptBatchesReload.
Parameter: pdReloadTransactionBatchSelTab
Label Reload selection table name for ra_customer_trx_all
UID 90F0-9969-7F6B-A37E
Parameter Type Dynamic
Data Type STRING
Code
Parameter Annotation
Dynamic parameter to get the selection table name for ra_customer_trx_all table in target database. This is
required in the custom selection program for cartridge TransactionBatchesReload.
Parameter: prCustomerId
Label Customer Name
UID 4212-7F8B-019C-4FEC
Parameter Type Runtime
Data Type NUMBER
Length 30
Default
Validation <None>
Dynamic List Definition
Query Expression
DB Connection Annotation
Connection Query
Source ansi select cust.cust_account_id,
party.party_name||'
('||cust.account_number||')'
from AR.HZ_CUST_ACCOUNTS cust,
AR.HZ_PARTIES party
where cust.party_id = party.party_id
and upper(party.party_name||'
('||cust.account_number||')') like
upper(:FilterPattern) || '%'
order by party.party_name,
cust.account_number, cust.cust_account_id
10
Parameter: prCustomerId
Parameter Annotation Run time parameter to accept value for the customer for whom the purge
job is to be run.
Parameter: prCutOffDate
Label CutOff Date
UID E3E9-F866-E67D-F9EF
Parameter Type Runtime
Data Type DATE
Length
Default
Validation Script Code
import groovy.time.*
import groovy.runtime.TimeCategory.*
use( [TimeCategory] ){
Integer retPrd = pcMonthsToRetain
if (prCutOffDate == null){
return "Cutoff Date cannot be empty"
}
else if (prCutOffDate > maxDate){
return "Cutoff Date must be older than ${pcMonthsToRetain} months."
}
}
Parameter: prOrgId
Label Operating Unit
UID 4214-0E51-24D4-CC10
Parameter Type Runtime
Data Type NUMBER
Length 30
Default
Validation Mandatory
Dynamic List Definition
Query Expression
DB Connection Annotation
Connection Query
Source ansi select organization_id, name from
APPS.HR_OPERATING_UNITS where
upper(name) like upper(:FilterPattern)||'%'
order by name
Parameter Annotation Run time parameter to accept value for the operating unit for which the
purge job is to be run.
11
Parameter: prReloadTransactionId
Label Reload Transaction Id
UID 14B4-DAF7-75EA-9462
Parameter Type Runtime
Data Type NUMBER
Length 9
Default
Validation Script Code
import groovy.sql.*
def cntVal = 0;
String cntQry = """ select count(*) cnt from ${HIST.AR.RA_CUSTOMER_TRX_ALL} a where a.customer_trx_id
= ${prReloadTransactionId}""";
cntVal = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntVal == 0) {
return "Transaction ID: ${prReloadTransactionId} is not valid. Please enter a valid Transaction ID for reload"
}
Validation Annotation
This groovy script would validate the value entered for parameter Reload Transaction Id against the
ra_customer_trx_all table in target db/schema. If the value does not exist in target instance then it will error out
prompting to enter a valid transaction id for reload.
Parameter: prTrxDateFrom
Label Trx Date From
UID E3E9-F873-2909-8B6A
Parameter Type Runtime
Data Type DATE
Length
Default
Validation <None>
List of Values <None>
Parameter: prTrxDateTo
Label Trx Date To
UID E3E9-F873-2909-8B6A
Parameter Type Runtime
Data Type DATE
Length
Default
Validation <None>
List of Values <None>
12
3. Project Business Flows and Cartridges
3.1. Business Flow ReceivablesArchive 7.51.1.12.68.68
3.1.1. Business Flow Description
This business flow is basically used to archive eligible transactions, receipts, and related
activities like adjustments, credits, reversals and calls.
It accepts the following parameters:
1. Customer Name
2. CutOff Date
3. Operating Unit
A batch is eligible for archiving when all the transactions associated with it are assigned
a status of archived. Because a batch is not considered to be part of a transaction chain,
transactions that are part of a batch can be archived even if all transactions in the batch
are not eligible to be archived. That is the reason we have separate cartridges for
batches - TrnasactionBatchesArchive, ReceiptBatchesArchive and
CorrespondencesArchive.
13
Business Flow Info
Install script import com.outerbay.api.*;
import com.outerbay.foundation.components.datamovers.PreExecCodeDAO
import groovy.sql.*
import java.util.jar.*;
import groovy.lang.GroovyClassLoader;
try
{
def gcl = new GroovyClassLoader();
Class sst = gcl.parseClass(new File("${PRODUCT_HOME}/lib/oebsUtils.groovy")) ;
utils = sst.newInstance();
}
catch(FileNotFoundException cex)
{
println "Please Deploy EBSIntegrationCreateArchiveAccess Businessflow before
module deployment.";
throw new IllegalStateException("Please Deploy EBSIntegrationCreateArchiveAccess
Businessflow before module deployment");
}
catch(Exception ex)
{
println "Exception while loading oebsUtils class"+ex;
throw new IllegalStateException("Exception while loading oebsUtils class"+ex);
}
// oebsUtils loaded
14
Business Flow Info
ConfigurationProperties.createSession("", ENVIRONMENT_NAME);
dblinkName =
ConfigurationProperties.getProductConfigValue("LA","REMOTE_ACCESS_DBLINK");
packageOwner =
ConfigurationProperties.getProductConfigValue("BusinessFlow","pcEBSPackageOwner"
);
ConfigurationProperties.closeSession();
if
(!(utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"TABLE","OBT_RA_
CUSTOMER_TRX_RUNING_TOT")))
{
String a1 ="""create table OBT_RA_CUSTOMER_TRX_RUNING_TOT
(CUSTOMER_TRX_ID NUMBER(15) NOT NULL, cust_SUM NUMBER NOT NULL)
nologging """
INTF_DB.execute(a1);
String a2 ="""create synonym
${packageOwner}.OBT_RA_CUSTOMER_TRX_RUNING_TOT for
OBT_RA_CUSTOMER_TRX_RUNING_TOT """
INTF_DB.execute(a2);
}
appRelease = INTF_DB.firstRow(appRelQry).appRel;
println("Oracle E-biz Release: "+appRelease);
arPatchLevel = INTF_DB.firstRow(appRelQry).arPatchlvl;
println("Patch Level for Oracle Receivables: "+arPatchLevel);
br.close();
isr.close();
is.close();
println("successfully created package oebs_ar_apps_init");
// Read the package body from file and create the package body oebs_ar_apps_init
InputStream is2 = getClass().getResourceAsStream("oebs_ar_apps_init_pb.sql");
InputStreamReader isr2 = new InputStreamReader(is2);
BufferedReader br2 = new BufferedReader(isr2);
String line2;
String sqltext2 = "";
while ((line2 = br2.readLine()) != null)
15
Business Flow Info
{
sqltext2 = sqltext2 + line2 + "\n";
}
sqltext2 = sqltext2.replaceAll("&pkg_owner",packageOwner);
INTF_DB.execute(sqltext2);
br2.close();
isr2.close();
is2.close();
println("successfully created package body oebs_ar_apps_init");
PreExecCodeDAO preExecCodeDAO =
LiveArchiveJobManager.getPreExecCodeDAO();
preExecCodeDAO.createPreExecCode(ENVIRONMENT_NAME, "ar_apps_init",
preExecCodeValue);
LiveArchiveJobManager.commit();
LiveArchiveJobManager.closeSession();
println("Loaded ar_apps_init code");
println("");
println("Archive Access stuff starts...");
ArchiveAccessConfiguration.createSession(" ",ENVIRONMENT_NAME);
//ArchiveAccessConfiguration.addObjectOwnerPair(null, "APPS", null, "APPS_AA", true,
null);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_PROCESS_HEADER",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_PS_PKG",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_PROCESS_RCTS",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
16
Business Flow Info
packageOwner,
"ARP_CASH_RECEIPTS_PKG",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_CT_PKG",
"PACKAGE"
);
if (appRelease == "11i") {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_PROCESS_TAX",
"PACKAGE"
);
}
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_CTLGD_PKG",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_CTL_PKG",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_CTL_PRIVATE_PKG",
"PACKAGE"
);
if (appRelease == "11i") {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_TAX",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_TAX_CRM_INTEGRATION_PKG",
"PACKAGE"
);
}
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_BAL_UTIL",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_TRX_SUM_UTIL",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_MISC_CASH_DIST",
"PACKAGE"
);
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_DISTRIBUTIONS_PKG",
"PACKAGE"
17
Business Flow Info
);
if (utils.objectExists(INTF_DB,"APPS",
"PACKAGE","AR_BILLS_MAINTAIN_STATUS_PUB")) {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"AR_BILLS_MAINTAIN_STATUS_PUB",
"PACKAGE"
);
}
if (utils.objectExists(INTF_DB,"APPS", "PACKAGE","ARP_CR_HISTORY_PKG")) {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_CR_HISTORY_PKG",
"PACKAGE"
);
if (utils.objectExists(INTF_DB,"APPS", "PACKAGE","ARP_APP_PKG")) {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"ARP_APP_PKG",
"PACKAGE"
);
}
//} // if (appRelease == "11i")
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"AR_APP_ADJ_V",
"VIEW"
);
if (utils.objectExists(INTF_DB,"APPS", "VIEW","HZ_PARTY_WF_USER_ROLES_V")) {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"HZ_PARTY_WF_USER_ROLES_V",
"VIEW"
);
}
if (appRelease == "R12") {
ArchiveAccessConfiguration.addPrimaryObject(null,
packageOwner,
"AR_ADD_FETCH_SELECT",
"PACKAGE"
);
}
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_PROCESS_HEADER",
"PACKAGE_BODY",
2,
"(?i)ct_prev\\.rowid",
18
Business Flow Info
"ct_prev.row_id",
true,
true);
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARPT_SQL_FUNC_UTIL",
"PACKAGE_BODY",
1,
"(?i)ct\\.rowid",
"ct.row_id",
true,
true);
fromString =
"(?i)SELECT\\s*?COUNT\\(\\*\\)\n\\s*?INTO\\s*?l_auto_rec_count\n\\s*?FROM\\s*?ar_pa
yment_schedules";
toString = "SELECT /*+ index (a ar_payment_schedules_n2 ) */ COUNT(*) " + "\n";
toString = toString + "INTO l_auto_rec_count " + "\n";
toString = toString + "FROM ar_payment_schedules a";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARPT_SQL_FUNC_UTIL",
"PACKAGE_BODY",
3,
fromString,
toString,
true,
false);
if (appRelease == "11i") {
fromString =
"(?i)SELECT\\s*?NVL\\(MIN\\(ps\\.due_date\\),*.\n*.arpt_sql_func_util\\.get_first_due_dat
e\\(p_term_id,\\s*?p_trx_date\\)\\)\n\\s*?INTO\\s*?l_term_due_date\n\\s*?FROM\\s*?ar_p
ayment_schedules\\s*?ps,\n\\s*?ra_customer_trx ct";
toString = "SELECT /*+ ORDERED */ NVL(MIN(ps.due_date), " + "\n";
toString = toString + "arpt_sql_func_util.get_first_due_date(p_term_id, p_trx_date)) " +
"\n";
toString = toString + "INTO l_term_due_date " + "\n";
toString = toString + "FROM ra_customer_trx ct, " + "\n";
toString = toString + " ar_payment_schedules ps";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARPT_SQL_FUNC_UTIL",
"PACKAGE_BODY",
4,
fromString,
toString,
true,
false);
}
//fromString =
19
Business Flow Info
"(?i)SELECT\\s*?DECODE\\(\\s*?MAX\\(\\s*?other_ps.payment_schedule_id\\).*.\n\\s*NU
LL,\\s*?'N',\n\\s*'Y'\\)\\s*INTO.*.l_activity_flag\\s*FROM.*.this_ps,\\s*.*\\s*.*\\s*.*\\s*.*\\s*.*\
\s*.*\\s*AND\\s*other_ps.creation_date\\s*>\\s*this_ps.creation_date;"
// below can be used if fromstring size limitation is fixed
fromString =
"(?i)SELECT\\s*?DECODE\\(\\s*?MAX\\(\\s*?other_ps.payment_schedule_id\\).*.\n\\s*NU
LL,\\s*?'N',\n\\s*'Y'\\)\\s*INTO.*.l_activity_flag\\s*FROM.*.this_ps,\\s*.*other_ps,\\s*.*other
_ct\\s*WHERE\\s*.*p_customer_trx_id\\s*AND.*=\\s*p_previous_customer_trx_id.*\\s*AN
D.*other_ps.customer_trx_id\\s*AND\\s*other_ps.creation_date\\s*>\\s*this_ps.creation_
date;"
toString = "SELECT /*+ ORDERED */ DECODE( MAX(
OTHER_PS.PAYMENT_SCHEDULE_ID),NULL,'N','Y') " + "\n";
toString = toString + "INTO l_activity_flag " + "\n";
toString = toString + "FROM RA_CUSTOMER_TRX_ALL OTHER_CT, " + "\n";
toString = toString + " AR_PAYMENT_SCHEDULES_ALL OTHER_PS, " + "\n";
toString = toString + " AR_PAYMENT_SCHEDULES_ALL THIS_PS " + "\n";
toString = toString + "WHERE THIS_PS.CUSTOMER_TRX_ID = p_customer_trx_id " +
"\n";
toString = toString + "AND OTHER_CT.PREVIOUS_CUSTOMER_TRX_ID =
p_previous_customer_trx_id " + "\n";
toString = toString + "AND OTHER_CT.CUSTOMER_TRX_ID =
OTHER_PS.CUSTOMER_TRX_ID " + "\n";
toString = toString + "AND OTHER_PS.CREATION_DATE >
THIS_PS.CREATION_DATE;";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARPT_SQL_FUNC_UTIL",
"PACKAGE_BODY",
5,
fromString,
toString,
true,
false);
// below text mod works only for 11i -- need to check if r12 also has same performance
issue in bug35628
fromString =
"(?i)select\\s*bs\\.name\\s*into\\s*l_bs_name\\s*from\\s*ra_customer_trx\\s*ct,\\s*.*\\s*.*\\
s*and\\s*ct\\.customer_trx_id\\s*=\\s*\\(select\\s*max\\(ctt\\.customer_trx_id\\)\\s*.*\\s*.*\\s
*.*\\s*and\\s*aa\\.customer_trx_id\\s*=\\s*ctt\\.customer_trx_id\\s*\\)";
toString = "SELECT /*+ ordered */ bs.NAME" + "\n";
toString = toString + " into l_bs_name" + "\n";
toString = toString + " FROM" + "\n";
toString = toString + " (SELECT /*+ ordered */ MAX(CTT.CUSTOMER_TRX_ID)
CUSTOMER_TRX_ID" + "\n";
toString = toString + " FROM AR_ADJUSTMENTS AA,RA_CUSTOMER_TRX CTT
" + "\n";
toString = toString + " WHERE AA.CHARGEBACK_CUSTOMER_TRX_ID =
p_customer_trx_id" + "\n";
toString = toString + " AND AA.CUSTOMER_TRX_ID = CTT.CUSTOMER_TRX_ID
) ct1," + "\n";
toString = toString + " RA_CUSTOMER_TRX ct, RA_BATCH_SOURCES bs " +
"\n";
toString = toString + " WHERE ct.BATCH_SOURCE_ID = bs.BATCH_SOURCE_ID
" + "\n";
toString = toString + " AND ct.CUSTOMER_TRX_ID = ct1.CUSTOMER_TRX_ID";
/*ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARPT_SQL_FUNC_UTIL",
"PACKAGE_BODY",
6,
fromString,
toString,
true,
false);
removing the text mod for now for r12*/
} // 111.N and r12
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_PS_PKG",
"PACKAGE_BODY",
20
Business Flow Info
1,
"(?i)FOR UPDATE OF PS.STATUS NOWAIT",
"/* FOR UPDATE OF PS.STATUS NOWAIT */ ",
true,
true);
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_PS_PKG",
"PACKAGE_BODY",
2,
"(?i)FOR UPDATE OF payment_schedule_id NOWAIT",
"/* FOR UPDATE OF payment_schedule_id NOWAIT */ ",
true,
false);
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_PS_PKG",
"PACKAGE_BODY",
3,
"(?i)FOR UPDATE OF PS.amount_due_remaining
NOWAIT",
"/* FOR UPDATE OF PS.amount_due_remaining NOWAIT */
",
true,
false);
21
Business Flow Info
1);
} // SI specific text mod for RA_CUSTOMER_TRX_PARTIAL_V
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"RA_CUSTOMER_TRX_V",
"VIEW",
1,
"(?i)SELECT CT",
"SELECT /*+ ORDERED */ CT",
true,
true);
if (utils.objectExists(INTF_DB,"APPS", "VIEW","RA_CUST_TRX_LINE_V")) {
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"RA_CUST_TRX_LINE_V",
"VIEW",
1,
"(?i)SELECT RCTL",
"SELECT /*+ ORDERED */ RCTL",
true,
true);
}
fromString = "nvl\\(sum\\(rec\\.acctd_amount_applied_from";
toString = "/*+ ORDERED */ nvl(sum(rec.acctd_amount_applied_from";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_BAL_UTIL",
"PACKAGE_BODY",
1,
fromString,
toString,
true,
true);
fromString = "nvl\\(sum\\(rec\\.line_applied";
toString = "/*+ ORDERED */ nvl(sum(rec.line_applied";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_BAL_UTIL",
"PACKAGE_BODY",
2,
fromString,
toString,
true,
true);
22
Business Flow Info
1,
fromString,
toString,
true,
true,
null,
1);
if (appRelease == "11i") {
fromString = "(?i)ar_lookups al_risk_receipt, ar_cons_inv_all cons, ar_receipt_methods
rm, ar_batch_sources_all bs, ar_batches_all arb2, ar_cash_receipt_history_all crh,
ar_cash_receipt_history_all crh_current,.*.ar_cash_receipts_all cr, hz_cust_site_uses_all
su, hz_cust_accounts cust_acct, hz_parties party, ar_payment_schedules_all ps,
ar_cash_receipt_history_all crh_remit, ar_batches_all arb_remit, fnd_currencies fc";
toString = "ar_payment_schedules_all ps, ar_cons_inv_all cons, ar_cash_receipts_all cr,
hz_cust_site_uses_all su, hz_cust_accounts cust_acct, hz_parties party,
ar_cash_receipt_history_all crh, ar_batches_all arb2, ar_batch_sources_all bs,
ar_receipt_methods rm, ar_cash_receipt_history_all crh_current, /* current_record */
ar_lookups al_risk_receipt, ar_cash_receipt_history_all crh_remit, ar_batches_all
arb_remit, fnd_currencies fc";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"AR_PAYMENT_SCHEDULES_PMT_V",
"VIEW",
2,
fromString,
toString,
true,
false,
null,
1);
}
else if (appRelease == "R12") {
fromString = "(?i)ar_lookups al_risk_receipt, ar_cons_inv_all cons, ar_receipt_methods
rm, ar_batch_sources_all bs, ar_batches_all arb2, ar_cash_receipt_history_all crh,
ar_cash_receipt_history_all crh_current,.*.ar_cash_receipts_all cr, hz_cust_site_uses_all
su, hz_cust_accounts cust_acct, hz_parties party, ar_payment_schedules ps,
ar_cash_receipt_history_all crh_remit, ar_batches_all arb_remit, fnd_currencies fc";
toString = "ar_payment_schedules ps, ar_cons_inv_all cons, ar_cash_receipts_all cr,
hz_cust_site_uses_all su, hz_cust_accounts cust_acct, hz_parties party,
ar_cash_receipt_history_all crh, ar_batches_all arb2, ar_batch_sources_all bs,
ar_receipt_methods rm, ar_cash_receipt_history_all crh_current, /* current_record */
ar_lookups al_risk_receipt, ar_cash_receipt_history_all crh_remit, ar_batches_all
arb_remit, fnd_currencies fc";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"AR_PAYMENT_SCHEDULES_PMT_V",
"VIEW",
2,
fromString,
toString,
true,
false,
null,
1);
} // R12 text mod for AR_PAYMENT_SCHEDULES_PMT_V
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"AR_PAYMENT_SCHEDULES_V",
"VIEW",
1,
fromString,
toString,
false,
true,
null,
23
Business Flow Info
1);
if (appRelease == "11i") {
fromString = "ar_lookups al_status, ar_collectors ar_coll, ar_cons_inv_all cons,
ra_cust_trx_types_all ctt, ra_batch_sources_all bs, ra_customer_trx_all ct,
hz_cust_site_uses_all su, hz_cust_accounts cust_acct, hz_parties party,
ar_payment_schedules_all ps";
toString = "ar_payment_schedules_all ps, ar_lookups al_status, ar_collectors ar_coll,
ar_cons_inv_all cons, hz_cust_site_uses_all su, ra_customer_trx_all ct,
ra_cust_trx_types_all ctt, ra_batch_sources_all bs, hz_cust_accounts cust_acct,
hz_parties party";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"AR_PAYMENT_SCHEDULES_V",
"VIEW",
2,
fromString,
toString,
true,
false);
24
Business Flow Info
fromString,
toString,
true,
false,
null,
1);
if (appRelease == "11i") {
fromString = "ar_lookups al_status, ar_collectors ar_coll, ar_cons_inv_all cons,
ra_cust_trx_types_all ctt, ra_batch_sources_all bs, ra_customer_trx_all ct,
hz_cust_site_uses_all su, hz_cust_accounts cust_acct, hz_parties party,
ar_payment_schedules_all ps";
toString = "ar_payment_schedules_all ps, ar_lookups al_status, ar_collectors ar_coll,
ar_cons_inv_all cons, hz_cust_site_uses_all su, ra_customer_trx_all ct,
ra_cust_trx_types_all ctt, ra_batch_sources_all bs, hz_cust_accounts cust_acct,
hz_parties party";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"AR_PAYMENT_SCHEDULES_TRX2_V",
"VIEW",
2,
fromString,
toString,
true,
false);
}
fromString = "(?i)ar_mrc_engine2.maintain_mrc_data2";
25
Business Flow Info
toString = "/* ar_mrc_engine2.maintain_mrc_data2";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_MISC_CASH_DIST",
"PACKAGE_BODY",
2,
fromString,
toString,
false,
true);
26
Business Flow Info
fromString = "(?i)arp_misc_cash_dist_pkg";
toString = "null; -- arp_misc_cash_dist_pkg";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_MISC_CASH_DIST",
"PACKAGE_BODY",
8,
fromString,
toString,
false,
true);
fromString = "(?i)ARP_DISTRIBUTIONS_PKG";
toString = "null; -- ARP_DISTRIBUTIONS_PKG";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_MISC_CASH_DIST",
"PACKAGE_BODY",
9,
fromString,
toString,
false,
true);
27
Business Flow Info
false);
if (utils.objectExists(INTF_DB,"APPS", "PACKAGE","ARP_ARXVASUM")) {
fromString = "(?i)select\\s*?decode\\(p_currency_code";
toString = "select /*+ ORDERED */ decode(p_currency_code";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_ARXVASUM",
"PACKAGE_BODY",
1,
fromString,
toString,
true,
false,
null,
2);
fromString =
"(?i)from\\s*?ar_cash_receipts\\s*?cr,.*\n\\s*?ar_payment_schedules\\s*?ps.*\n\\s*?wher
e ";
toString = "from ar_payment_schedules ps, ar_cash_receipts cr where";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_ARXVASUM",
"PACKAGE_BODY",
3,
fromString,
toString,
true,
false,
null,
1);
} // if ARP_ARXVASUM exists
28
Business Flow Info
fromString,
toString,
false,
false);
29
Business Flow Info
3,
fromString,
toString,
false,
true);
if (utils.objectExists(INTF_DB,"APPS", "VIEW","HZ_PARTY_WF_USER_ROLES_V")) {
String partQry = """select partition_position-1 part_pos from all_tab_partitions where
table_name = 'WF_LOCAL_ROLES' and partition_name = 'HZ_PARTY'""";
def partitionId = INTF_DB.firstRow(partQry).part_pos;
fromString = "(?i)PARTITION \\(HZ_PARTY\\)";
toString = "where partition_id = " + partitionId;
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"HZ_PARTY_WF_USER_ROLES_V",
"VIEW",
1,
fromString,
toString,
true,
true);
}
if (appRelease == "R12") {
fromString = "(?i)app\\.rowid";
toString = "app.row_id";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"AR_ADD_FETCH_SELECT",
"PACKAGE_BODY",
1,
fromString,
toString,
true,
false);
}
30
Business Flow Info
where e.name = '${ENVIRONMENT_NAME}'
and om.environment_source_id = e.id
and om.owner_type = 'HISTORY'
and om.base_schema = 'AR'
"""
def histSchema = "";
if (histSchema == "") {
// its not a multi-source configuration
// so we pickup the default value for history schema
histSchema = "AR_HIST";
// throw new IllegalStateException("Hist Schema name is:"+ histSchema);
}
println("AR Hist Schema: "+histSchema);
fromString =
"SELECT\\s*?SUM\\(.*\n\\s*?DECODE\\(.*\n\\s*?ct\\.complete_flag,\n.*\n\\s*?DECODE\\(.
*\n\\s*?ctl\\.line_type,\n.*\n.*\n\\s*?ctl\\.extended_amount";
fromString = fromString +
"\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*\n.*
\n.*\n.*\n.*";
fromString = fromString +
"FROM\\s*?ra_customer_trx_lines\\s*?ctl,\n\\s*?ra_cust_trx_line_gl_dist\\s*?rec,\n\\s*?ra
_customer_trx\\s*?ct\n\\s*?";
fromString = fromString +
"WHERE\\s*?ct\\.customer_trx_id.*\n.*AND\\s*?ct\\.customer_trx_id.*\n.*rec\\.account_cl
ass.*\n.*rec\\.latest_rec_flag.*\n.*";
fromString = fromString + "ct\\.previous_customer_trx_id\\s*?=\\s*?p_customer_trx_id";
31
Business Flow Info
toString = toString + "from " + packageOwner + ".RA_CUSTOMER_TRX CT, " + "\n";
toString = toString + packageOwner + ".RA_CUSTOMER_TRX_LINES CTL , " + "\n";
toString = toString + packageOwner + ".RA_CUST_TRX_LINE_GL_DIST REC " + "\n";
toString = toString + "WHERE CT.CUSTOMER_TRX_ID = CTL.CUSTOMER_TRX_ID "
+ "\n";
toString = toString + "AND CT.CUSTOMER_TRX_ID = REC.CUSTOMER_TRX_ID AND
REC.ACCOUNT_CLASS = 'REC'" + "\n";
toString = toString + "AND REC.LATEST_REC_FLAG = 'Y'" + "\n";
toString = toString + "group by ct.complete_flag, ctl.line_type,
ct.previous_customer_trx_id" + "\n";
toString = toString + ") ctall" + "\n";
toString = toString + "where CTall.PREVIOUS_CUSTOMER_TRX_ID =
p_customer_trx_id" + "\n";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_BAL_UTIL",
"PACKAGE_BODY",
3,
fromString,
toString,
true,
false);
fromString = "'_obt_temp_string_'";
toString = "SUM( DECODE( ctall.complete_flag, 'N', 0, DECODE( ctall.line_type, 'TAX',
0, 'FREIGHT', 0, ctall.extended_amount)))," + "\n";
toString = toString + "SUM( DECODE( ctall.complete_flag, 'N', 0, DECODE(
ctall.line_type, 'TAX', ctall.extended_amount, 0)))," + "\n";
toString = toString + "SUM( DECODE( ctall.complete_flag, 'N', 0, DECODE(
ctall.line_type, 'FREIGHT', ctall.extended_amount, 0)))";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_BAL_UTIL",
"PACKAGE_BODY",
4,
fromString,
toString,
true,
false);
fromString =
"SELECT\\s*?SUM\\(\\s*?\n\\s*?DECODE\\(\n\\s*?ct\\.complete_flag,\\s*?\n.*\n\\s*?DEC
ODE.*\n\\s*?ctl\\.customer_trx_line_id";
toString = "SELECT /*+ ORDERED USE_CONCAT */ SUM( DECODE(
ct.complete_flag,'N', 0," + "\n";
toString = toString + "DECODE( -- only use the original lines" + "\n";
toString = toString + " ctl.customer_trx_line_id";
ArchiveAccessConfiguration.addTextReplacer(null,
packageOwner,
"ARP_BAL_UTIL",
"PACKAGE_BODY",
5,
fromString,
toString,
true,
false);
ArchiveAccessConfiguration.commit();
ArchiveAccessConfiguration.closeSession();
32
Business Flow Info
if (configName == "DI") {
LiveArchiveJobManager.createSession("",ENVIRONMENT_NAME);
//usage - LiveArchiveJobManager.addExcludedIndex(envID, tableCatalog, tableSchema,
tableName, indexCatalog, indexSchema, indexName);
LiveArchiveJobManager.addExcludedIndex(ENVIRONMENT_NAME,
null,
"AR",
"RA_CUSTOMER_TRX_ALL",
null,
"AR",
"RA_CUSTOMER_TRX_N14"
);
if (utils.objectExists(INTF_DB,"AR", "INDEX","RA_CUSTOMER_TRX_N21")) {
LiveArchiveJobManager.addExcludedIndex(ENVIRONMENT_NAME,
null,
"AR",
"RA_CUSTOMER_TRX_ALL",
null,
"AR",
"RA_CUSTOMER_TRX_N21"
);
}
if (utils.objectExists(INTF_DB,"AR", "INDEX","RA_CUSTOMER_TRX_N23")) {
LiveArchiveJobManager.addExcludedIndex(ENVIRONMENT_NAME,
null,
"AR",
"RA_CUSTOMER_TRX_ALL",
null,
"AR",
"RA_CUSTOMER_TRX_N23"
);
}
LiveArchiveJobManager.commit();
LiveArchiveJobManager.closeSession();
}
33
34
3.1.1.2. Parameters used in Business Flow Actvities (and Model Compatibilities)
Parameters used
pcAdjustmentGLDate,
pcCommitmentRelatedTrx,
pcCommitmentTrx,
pcCompletedTrx,
pcCreateSummaryTableAR,
pcMonthsToRetain,
pcPauseAfterSelectionAR,
pcPauseAfterSummaryTablePopAR,
pcPostableApplicationGLDate,
pcPostableDistributionGLDate,
pcPostableReceiptHistoryGLDate,
pcReceiptCurrHistStatus,
pcReceiptPaySchedClosed,
pcReceiptRefInCE,
pcRunningTotal,
pcTrxInPaySched,
pcTrxLineAutoruleComplete,
pcTrxPaySchedClass,
pcTrxPaySchedClosed,
pcTrxPaySchedGLDate,
pcTrxRevenueComplete,
prCustomerId,
prCutOffDate,
prOrgId,
prTrxDateFrom,
prTrxDateTo
Parameter Order
pcCommitmentTrx,
pcCompletedTrx,
pcMonthsToRetain,
pcRunningTotal,
pcTrxInPaySched,
pcTrxPaySchedClosed,
prCustomerId,
prCutOffDate,
prOrgId,
pcCommitmentRelatedTrx,
pcReceiptCurrHistStatus,
pcReceiptPaySchedClosed,
pcReceiptRefInCE,
pcAdjustmentGLDate,
pcPostableApplicationGLDate,
pcPostableDistributionGLDate,
pcPostableReceiptHistoryGLDate,
pcTrxLineAutoruleComplete,
pcTrxPaySchedClass,
pcTrxPaySchedGLDate,
pcTrxRevenueComplete,
pcPauseAfterSelectionAR,
pcCreateSummaryTableAR,
pcPauseAfterSummaryTablePopAR,
prTrxDateFrom,
prTrxDateTo
35
3.1.2.1. Script Activity "OptionalParameter" Description
Code
import com.outerbay.api.*;
import groovy.sql.*
import java.text.SimpleDateFormat;
import java.lang.Float
if (prTrxDateFrom == NULL)
{
prTrxDateFrom=prTrxDateFrom=format.parse("1950.01.01")
}
if (prTrxDateTo == NULL)
{
prTrxDateTo=prCutOffDate
}
Code
pcCreateSummaryTableAR=="Y"
36
Code
import com.outerbay.api.*;
import groovy.sql.*
import java.text.SimpleDateFormat;
import java.lang.Float
p_TRX_DATE_FROM = format.format(prTrxDateFrom)
p_TRX_DATE_TO = format.format(prTrxDateTo)
try
{
intfOwner = utils.getConnectionOwner(INTF_DB) ;
}
catch (Exception e)
{
println("Exception occured while getting the DB handlers.");
e.printStackTrace();
throw new IllegalStateException(println(e.getMessage()));
try
{
ConfigurationProperties.createSession("", ENVIRONMENT_NAME);
numWorkers = ConfigurationProperties.getProductConfigValue("LA","NUM_WORKERS");
/*selectionBatchSize = ConfigurationProperties.getProductConfigValue("LA","SEL_BATCH_SIZE");
packageOwner = ConfigurationProperties.getProductConfigValue("BusinessFlow", "pcEBSPackageOwner");
*/
ConfigurationProperties.closeSession();
println("numWorkers : "+numWorkers);
/*println("selectionBatchSize : "+selectionBatchSize);
println("packageOwner : "+packageOwner);
*/
}
catch (Exception e)
{
println("Exception occured while getting the config param values :"+ packageOwner+ " "+ "
"+selectionBatchSize+" "+numWorkers );
e.printStackTrace();
throw new IllegalStateException(println(e.getMessage()));
}
if
((utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"TABLE","OBT_RA_CUSTOMER_TRX_RU
NING_TOT")))
{
String a2 ="""truncate table OBT_RA_CUSTOMER_TRX_RUNING_TOT """
INTF_DB.execute(a2)
if
((utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"INDEX","OBT_CUSTOMER_TRX_ID_U1"))
)
{
String a3 ="""drop index OBT_CUSTOMER_TRX_ID_U1"""
37
Code
INTF_DB.execute(a3);
}
}
if (!(utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"TABLE","rct_temp")))
{
String a30 ="""CREATE TABLE RCT_TEMP (SEQNO NUMBER, CUSTOMER_TRX_ID NUMBER)"""
println(a30)
INTF_DB.execute(a30);
}
if ((utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"TABLE","rct_temp")))
{
String a22 ="""truncate table rct_temp """
println(a22)
INTF_DB.execute(a22);
String a2 ="""insert /*+ parallel(RCT,${numWorkers}) */ into rct_temp rct select /*+
parallel(RCTl,${numWorkers}) */ ROWNUM SEQNO, customer_trx_id from ar.ra_customer_trx_all rctl
where org_id= ${prOrgId} and trx_date between cast(to_date('${p_TRX_DATE_FROM}','mm/dd/yyyy')
as date)
and cast(to_date('${p_TRX_DATE_TO}','mm/dd/yyyy') as date) """
println(a2)
INTF_DB.execute(a2);
INTF_DB.execute("COMMIT");
if (!(utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"INDEX","rct_temp_u1")))
{
String a3 ="""create /*+ parallel(${numWorkers}) */ unique index rct_temp_u1 on rct_temp(seqno)"""
println(a3)
INTF_DB.execute(a3);
}
}
String insertRunningTot =
""" INSERT /*+ parallel(OBT_RCT,${numWorkers}) */ INTO OBT_RA_CUSTOMER_TRX_RUNING_TOT
obt_rct
select /*+ parallel(a,${numWorkers}) */ A.CUSTOMER_TRX_ID , ROUND(
( select /*+ parallel(gld,${numWorkers}) */ nvl(sum(nvl(gld.acctd_amount,0)),0) total
from ${arSchema}.RA_CUST_TRX_LINE_GL_DIST_ALL gld
where gld.customer_trx_id = A.CUSTOMER_TRX_ID
and gld.account_class = 'REC'
and gld.latest_rec_flag = 'Y'
)
+
(select /*+ parallel(adj,${numWorkers}) */ nvl(sum(nvl(adj.acctd_amount,0)),0) total
from ${arSchema}.AR_ADJUSTMENTS_ALL adj
where adj.customer_trx_id = A.CUSTOMER_TRX_ID
and adj.status in ('A', 'M', 'W')
)
+
( select /*+ parallel(rec,${numWorkers}) */ -1*nvl(sum(NVL(rec.acctd_amount_applied_to,0)), 0) total
from ${arSchema}.AR_RECEIVABLE_APPLICATIONS_ALL rec
where rec.applied_customer_trx_id = A.CUSTOMER_TRX_ID
and rec.application_type = 'CM'
)
+
( select /*+ parallel(rec,${numWorkers}) */ nvl(sum(NVL(rec.acctd_amount_applied_from,0)), 0) total
from ${arSchema}.AR_RECEIVABLE_APPLICATIONS_ALL rec
where rec.customer_trx_id = A.customer_trx_id
and rec.application_type = 'CM'
)
38
Code
+
(
select /*+ parallel(rec,${numWorkers}) */ -1 * nvl(sum(nvl(rec.acctd_amount_applied_to,0) +
NVL(rec.acctd_earned_discount_taken,0) + NVL(rec.acctd_unearned_discount_taken,0)),0) total
from ${arSchema}.AR_RECEIVABLE_APPLICATIONS_ALL rec
where rec.applied_customer_trx_id = A.CUSTOMER_TRX_ID
and rec.application_type = 'CASH'
and rec.status = 'APP'
), 99) a
from rct_temp A
"""
println(insertRunningTot)
INTF_DB.execute(insertRunningTot);
INTF_DB.execute("COMMIT")
if
((utils.objectExists(INTF_DB,utils.getConnectionOwner(INTF_DB),"TABLE","OBT_RA_CUSTOMER_TRX_RU
NING_TOT")))
{
String a4 ="""CREATE UNIQUE INDEX /*+ parallel(${numWorkers}) */ OBT_CUSTOMER_TRX_ID_U1 ON
OBT_RA_CUSTOMER_TRX_RUNING_TOT(CUSTOMER_TRX_ID)"""
INTF_DB.execute(a4);
String a5 ="""begin
dbms_stats.gather_table_stats(ownname=>'${intfOwner}',tabname=>'OBT_RA_CUSTOMER_TRX_RUNING_T
OT',estimate_percent=>5,cascade=>true); end;"""
INTF_DB.execute(a5);
}
Interrupt Activity
Type Pause
Message Job Paused
Condition
pcPauseAfterSummaryTablePopAR=="Y"
Interrupt Activity
Type Pause
Message Job Paused
39
Interrupt Activity
Condition
pcPauseAfterSelectionAR=="Y"
Annotation
This Pause Activity would enable temporary pausing of the ReceivablesArchive business flow after the
selection job has completed for the cartridge ReceivableTransactionsArchive. One can resume the
businessflow by pressing the continue button for the job.
40
Code
import groovy.sql.*
"""
//println(query)
println("current runid:"+CURRENT_RUN_ID);
oltpSchema = row.BASE_TABLE_SCHEMA
oltpTable = row.BASE_TABLE_NAME
intfSchema = row.SHADOW_TABLE_SCHEMA
selTable = row.SHADOW_TABLE_NAME
if (oltpTable == "RA_CUSTOMER_TRX_ALL") {
// update ra_batches on oltp
"""
// println(updStmnt)
INTF_DB.execute(updStmnt)
// println("Updated data")
INTF_DB.execute("COMMIT")
// println("commited")
}
else if (oltpTable == "AR_CASH_RECEIPT_HISTORY_ALL") {
41
Code
// update ar_batches on oltp
"""
// println(updStmnt)
INTF_DB.execute(updStmnt)
// println("Updated data")
INTF_DB.execute("COMMIT")
// println("commited")
println("Done updating ar_batches");
}
else if (oltpTable == "AR_CORR_PAY_SCHED_ALL") {
// update ar_correspondences on oltp
"""
// println(updStmnt)
INTF_DB.execute(updStmnt)
//println("Updated data")
INTF_DB.execute("COMMIT")
//println("commited")
println("Done updating ar_correspondences");
}
42
3.1.2.9. Cartridge Activity "ReceiptBatchesArchive" Description
Based on the above parameters the initial transaction is decided and using a PDM
algorithm the BF will reload other members of the chain too.
The updates done during archive will be re-evaluated based on the transactions for the
batch being in source or target database or both. This will be done by a groovy script
updateBatches.
43
44
3.2.1.2. Parameters used in Business Flow Actvities (and Model Compatibilities)
Parameters used
pdReloadCorrespondenceSelTab,
pdReloadReceiptBatchSelTab,
pdReloadTransactionBatchSelTab,
prReloadTransactionId
Parameter Order
pdReloadCorrespondenceSelTab,
pdReloadReceiptBatchSelTab,
pdReloadTransactionBatchSelTab,
prReloadTransactionId
45
Code
// Get the reload selection table names and populate the dynamic parameters with same values
import groovy.sql.*
"""
//println(query)
println("current runid:"+CURRENT_RUN_ID);
oltpSchema = row.BASE_TABLE_SCHEMA
oltpTable = row.BASE_TABLE_NAME
intfSchema = row.HIST_SEL_SCHEMA
selTable = row.HIST_SEL_TABLE
histSchema = row.HIST_TABLE_SCHEMA
histTable = row.HIST_TABLE_NAME
if (oltpTable == "RA_CUSTOMER_TRX_ALL") {
46
Code
cntSelTab = 0;
String cntQry = """ select count(*) cnt from ${intfSchema}.${selTable} """;
cntSelTab = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntSelTab > 0) {
pdReloadTransactionBatchSelTab = intfSchema + "." + selTable;
rctCnt = 1;
}
else if (rctCnt == 0) {
pdReloadTransactionBatchSelTab = intfSchema + "." + selTable;
} // if rct
else if (oltpTable == "AR_CASH_RECEIPT_HISTORY_ALL") {
cntSelTab = 0;
String cntQry = """ select count(*) cnt from ${intfSchema}.${selTable} """;
cntSelTab = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntSelTab > 0) {
pdReloadReceiptBatchSelTab = intfSchema + "." + selTable;
crhCnt = 1;
}
else if (crhCnt == 0) {
pdReloadReceiptBatchSelTab = intfSchema + "." + selTable;
} // if acrh
else if (oltpTable == "AR_CORR_PAY_SCHED_ALL") {
cntSelTab = 0;
String cntQry = """ select count(*) cnt from ${intfSchema}.${selTable} """;
cntSelTab = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntSelTab > 0) {
pdReloadCorrespondenceSelTab = intfSchema + "." + selTable;
cpsCnt = 0;
}
else if (cpsCnt == 0) {
pdReloadCorrespondenceSelTab = intfSchema + "." + selTable;
} // if aps
} // end of query cursor
Annotation
This script returns the selection table name for ra_customer_trx_all, ar_cash_receipt_history_all and
ar_corr_pay_sched_all in the interface schema on history side which is populated with data. If none of the
selection tables are populated then the last selection tablename is returned for a table. The table names are
required in the custom selection programs for reload cartridges.
47
3.2.2.5. Cartridge Activity "CorrespondencesReload" Description
48
Code
// Update the purged_children_flag to Y for those batches that have some transactions in history and some in
oltp
import groovy.sql.*
"""
//println(query)
println("current runid:"+CURRENT_RUN_ID);
oltpSchema = row.BASE_TABLE_SCHEMA
oltpTable = row.BASE_TABLE_NAME
intfSchema = row.HIST_SEL_SCHEMA
selTable = row.HIST_SEL_TABLE
histSchema = row.HIST_TABLE_SCHEMA
histTable = row.HIST_TABLE_NAME
if (oltpTable == "RA_CUSTOMER_TRX_ALL") {
49
Code
cntSelTab = 0;
String cntQry = """ select count(*) cnt from ${intfSchema}.${selTable} """
cntSelTab = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntSelTab > 0) {
println("Updating ra_batches...");
// update ra_batches on history
INTF_RELOC_DB.execute(updStmnt)
// println("Updated data")
INTF_RELOC_DB.execute("COMMIT")
//println("commited")
updStmnt = """
Update ${rb_oltp} rb
set purged_children_flag = null
where batch_id in ( Select distinct nvl(rcth1.batch_id,-1) batch_id
from ${histSchema}.${histTable} rcth1, ${intfSchema}.${selTable} rcth_sel
where rcth1.rowid = rcth_sel.obt_saved_rowid
and not exists (select rcth.rowid
from ${histSchema}.${histTable} rcth
where rcth.batch_id = rcth1.batch_id
minus
select rcth_sel.obt_saved_rowid
from ${histSchema}.${histTable} rcth, ${intfSchema}.${selTable} rcth_sel
where rcth.rowid = rcth_sel.obt_saved_rowid
and rcth.batch_id = rcth1.batch_id
)
)
"""
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
cntSelTab = 0;
String cntQry = """ select count(*) cnt from ${intfSchema}.${selTable} """
cntSelTab = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntSelTab > 0) {
println("Updating ar_batches...");
// update ar_batches on history
50
Code
Update ${histSchema}.ar_batches_all abh
set abh.purged_children_flag = null
where not exists (select crhh.rowid
from ${histSchema}.${histTable} crhh
where crhh.batch_id = abh.batch_id
minus
select crhh_sel.obt_saved_rowid
from ${histSchema}.${histTable} crhh, ${intfSchema}.${selTable} crhh_sel
where crhh.rowid = crhh_sel.obt_saved_rowid
and crhh.batch_id = abh.batch_id
)
"""
// println(updStmnt)
INTF_RELOC_DB.execute(updStmnt)
// println("Updated data")
INTF_RELOC_DB.execute("COMMIT")
// println("commited")
cntSelTab = 0;
String cntQry = """ select count(*) cnt from ${intfSchema}.${selTable} """
cntSelTab = INTF_RELOC_DB.firstRow(cntQry).cnt;
if (cntSelTab > 0) {
println("Updating ar_correspondences...");
// update ar_correspondences on history
51
Code
"""
// println(updStmnt)
INTF_RELOC_DB.execute(updStmnt)
// println("Updated data")
INTF_RELOC_DB.execute("COMMIT")
// println("commited")
updStmnt = """
Update ${ar_oltp} rb
set purged_children_flag = null
where correspondence_id in ( Select distinct nvl(cpsh1.correspondence_id,-1) batch_id
from ${histSchema}.${histTable} cpsh1, ${intfSchema}.${selTable} cpsh_sel
where cpsh1.rowid = cpsh_sel.obt_saved_rowid
and not exists (select cpsh.correspondence_pay_sched_id
from ${histSchema}.${histTable} cpsh
where cpsh.correspondence_id = cpsh1.correspondence_id
minus
select cpsh.correspondence_pay_sched_id
from ${histSchema}.${histTable} cpsh, ${intfSchema}.${selTable} cpsh_sel
where cpsh.rowid = cpsh_sel.obt_saved_rowid
and cpsh.correspondence_id = cpsh1.correspondence_id
)
)
"""
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
println("Done updating ar_correspondences");
} // if cntSelTab
} // if aps
52
Cartridge Activity Info
Subjobs <All SubJobs>
Cartridge reference Cartridge "LockboxTransmissionsReload" definition
It reverses the activities performed by the following cartridges for a particular run of
ReceivablesArchive business flow:
1. RecivableTransactionsArchive
2. TransactionBatchesArchive
3. ReceiptBatchesArchive
4. LockboxTransmissionsArchive
5. CorrespondencesArchive
The updates done during archive will be re-evaluated based on the transactions for the
batch being in source or target database or both. This will be done by a groovy script
undoUpdates.
53
3.3.2. Undo Business Flow Activities
3.3.2.1. Script Activity "undoUpdates" Description
54
Code
// Update the purged_children_flag to null for those batches that have all transactions in oltp
import groovy.sql.*
import com.outerbay.api.*;
def l = [ groupRunId ];
def WFRunIds = "";
while (!l.isEmpty()) {
def runId = l.remove(0)
def bindVar1 = [ runId, cartInstName ]
// get runid
dbConn.eachRow(getCartridgeInstanceSql, bindVar1) { row ->
if (!l.isEmpty) {
WFRunIds = WFRunIds + ", ";
}
}
} // while l.isempty
if (WFRunIds != "") {
WFRunIds = "( " + WFRunIds + " )";
}
return WFRunIds
} // end of getCartridgeInstanceRuns
55
Code
println "Current Run Id = ${CURRENT_RUN_ID}";
println "bfGroupRunId = ${bfGroupRunId}";
cartInstName = "ReceivableTransactionsArchive";
ARMainWFRunIds = getCartridgeInstanceRuns(REPOS_DB, cartInstName, bfGroupRunId);
println("ARMainWFRunIds = " + ARMainWFRunIds);
cartInstName = "TransactionBatchesArchive";
txnBatWFRunIds = getCartridgeInstanceRuns(REPOS_DB, cartInstName, bfGroupRunId);
println("txnBatWFRunIds = " + txnBatWFRunIds);
cartInstName = "ReceiptBatchesArchive";
rcptBatWFRunIds = getCartridgeInstanceRuns(REPOS_DB, cartInstName, bfGroupRunId);
println("rcptBatWFRunIds = " + rcptBatWFRunIds);
cartInstName = "CorrespondencesArchive";
corrWFRunIds = getCartridgeInstanceRuns(REPOS_DB, cartInstName, bfGroupRunId);
println("corrWFRunIds = " + corrWFRunIds);
productConfig = row.confName
}
if (productConfig == "DI") {
ConfigurationProperties.createSession("", ENVIRONMENT_NAME);
dblinkName = ConfigurationProperties.getProductConfigValue("LA","HIST_TO_OLTP_LINK");
ConfigurationProperties.closeSession();
println("dblinkName: "+dblinkName);
56
Code
OBTREP_PRODUCT_CONFIGURATIONS c
where b.product_name = 'LiveArchive'
and e.name = '${ENVIRONMENT_NAME}'
and b.id = p.product_id
and b.id = c.product_id
and p.environment_source_id = e.id
and p.ID = a.INSTALLED_PRODUCT_ID
and p.ID = pc.INSTALLED_PRODUCT_ID
and pc.product_configuration_id = c.id
and a.id = bc.component_id
and bc.businessflow_id = bf1.id
and bc.component_name = 'ReceivableTransactionsArchive'
and bf.businessflow_name = '${BUSINESS_FLOW_NAME}'
and bf.base_busflow = bf1.businessflow_name
and m2.appspack_id = a.id
and m2.base_table_name in
('RA_CUSTOMER_TRX_ALL','AR_CASH_RECEIPT_HISTORY_ALL','AR_CORR_PAY_SCHED_ALL')
and m2.table_type ='history'
"""
//println(query)
oltpSchema = row.BASE_TABLE_SCHEMA
oltpTable = row.BASE_TABLE_NAME
histSchema = row.HIST_TABLE_SCHEMA
histTable = row.HIST_TABLE_NAME
if (oltpTable == "RA_CUSTOMER_TRX_ALL") {
println("Updating ra_batches...");
// update ra_batches on history
String updStmnt = """
Update ${histSchema}.ra_batches_all rbh
set rbh.purged_children_flag = null
where rbh.obt_wf_run_id in ${txnBatWFRunIds}
and not exists (select rcth.rowid
from ${histSchema}.${histTable} rcth
where rcth.batch_id = rbh.batch_id
minus
select rcth.rowid
from ${histSchema}.${histTable} rcth
where rcth.batch_id = rbh.batch_id
and rcth.obt_wf_run_id in ${ARMainWFRunIds}
)
"""
// println(updStmnt)
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
// println("commited")
updStmnt = """
Update ${rb_oltp} rb
set purged_children_flag = null
where batch_id in (Select distinct nvl(rcth1.batch_id,-1) batch_id
from ${histSchema}.${histTable} rcth1
where rcth1.obt_wf_run_id in ${ARMainWFRunIds}
and not exists (select rbh.batch_id
from ${histSchema}.ra_batches_all rbh
where rbh.obt_wf_run_id in ${txnBatWFRunIds}
and rbh.batch_id = rcth1.batch_id)
57
Code
and not exists (select rcth.rowid
from ${histSchema}.${histTable} rcth
where rcth.batch_id = rcth1.batch_id
minus
select rcth.rowid
from ${histSchema}.${histTable} rcth
where rcth.batch_id = rcth1.batch_id
and rcth.obt_wf_run_id in ${ARMainWFRunIds}
)
)
"""
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
//println("commited")
58
Code
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
println("Done updating ar_batches");
} // if crh
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
//println("commited")
updStmnt = """
Update ${ar_oltp} rb
set purged_children_flag = null
where correspondence_id in ( Select distinct nvl(cpsh1.correspondence_id,-1) batch_id
from ${histSchema}.${histTable} cpsh1
where cpsh1.obt_wf_run_id in ${ARMainWFRunIds}
and not exists (select ach.correspondence_id
from ${histSchema}.ar_correspondences_all ach
where ach.obt_wf_run_id in ${corrWFRunIds}
and ach.correspondence_id = cpsh1.correspondence_id)
and not exists (select cpsh.correspondence_pay_sched_id
from ${histSchema}.${histTable} cpsh
where cpsh.correspondence_id = cpsh1.correspondence_id
minus
select cpsh.correspondence_pay_sched_id
from ${histSchema}.${histTable} cpsh
where cpsh.obt_wf_run_id in ${ARMainWFRunIds}
and cpsh.correspondence_id = cpsh1.correspondence_id
)
)
"""
INTF_RELOC_DB.execute(updStmnt)
INTF_RELOC_DB.execute("COMMIT")
println("Done updating ar_correspondences");
} // if aps
59
Code
This script will set the purged_children_flag to null for the batches in history and oltp side for the rows in
transaction tables which got archived by a particular run of ReceivablesArchive BF. Basically the updates will
happen based on the rows which are going to be reloaded back by the ReceivablesUndo BF. This is done for 3
tables ra_batches_all, ar_batches_all and ar_correspondences_all based on the selected records in the tables
ra_customer_trx_all, ar_cash_Receipt_history_all and ar_corr_pay_sched_all respectively.
Cartridge Info
Source Model Correspondences
reference
60
Cartridge Info
Version 7.51.1.12.68.68
UID C3CC-64F4-9BE1-123A
Annotation This cartridge is based on the model Correspondences. It is defined as a Database to
Database cartridge meant for archiving data in the underlying tables from source to a
target database. It copies data from ar_correspondences_all table in oracle receivables
to the target database and then purges the same rows in the source database.
Parameters used
prOrgId
Cartridge Info
Source Model Correspondences
reference
Version 7.51.1.12.68.68
UID C97A-8583-2187-BB9C
Annotation This cartridge is based on the model Correspondences. It is defined as a Reload from
Database cartridge meant for archiving data in the underlying tables from target to
source database. It has a custom selection program to populate a custom selection table
AR_CORRESPOND_REL_CS based on the rows selected in ar_corr_pay_sched_all
table for reload and for which the batch exists in target database. It copies data from
ar_correspondences_all table in target database to the source database and then
purges the same rows in the target database.
61
3.5.1.1. Cartridge operations
Parameters used
pdReloadCorrespondenceSelTab
Custom Selection
Table Name AR_CORRESPOND_REL_CS
62
Custom Selection
Database Code Annotation
oracle declare This custom selection program will populate
stmt varchar2(2000); a custom selection table
dummy number; AR_CORRESPOND_REL_CS based on
c integer; the rows selected in ar_corr_pay_sched_all
begin table for reload and for which the batch
stmt := 'INSERT INTO exists in target database.
AR_CORRESPOND_REL_CS
(OBT_WF_RUN_ID, OBT_SAVED_ROWID
)'
|| ' SELECT DISTINCT
'||:OBT_WF_RUN_ID ||', ach.ROWID '||
' FROM
${HIST.AR.AR_CORRESPONDENCES_AL
L} ach,
${HIST.AR.AR_CORR_PAY_SCHED_ALL}
cpshh, '
|| :pdReloadCorrespondenceSelTab || '
cpshh_sel '||
' WHERE cpshh.rowid =
cpshh_sel.obt_saved_rowid '||
' AND cpshh.correspondence_id =
ach.correspondence_id ';
c := dbms_sql.open_cursor;
dbms_sql.parse(c, stmt,
dbms_sql.NATIVE);
dummy := dbms_sql.execute(c);
dbms_sql.close_cursor(c);
end;
Cartridge Info
Source Model LockboxTransmissions
reference
Version 7.51.1.12.68.68
UID D122-3C09-4E55-45A2
Annotation This cartridge is based on the model LockboxTransmissions. It is defined as a Database
to Database cartridge meant for archiving data in the underlying tables from source to a
target database. It copies data from ar_transmissions_all table in oracle receivables to
the target database and then purges the same rows in the source database.
63
Data movement key warnings
Reload could result in duplicate rows. This is because some tables in the cartridge do not have a unique key
set or auto-chosen as the data movement key.
Parameters used
prOrgId
Cartridge Info
Source Model LockboxTransmissions
reference
Version 7.51.1.12.68.68
UID 4931-7EB1-9644-F15C
Annotation This cartridge is based on the model LockboxTransmission. It is defined as a Reload
from Database cartridge meant for archiving data in the underlying tables from target to
source database. It copies data from ar_transmissions_all table in target database to the
source database and then purges the same rows in the target database.
64
3.7.1.4. Rules in Cartridge
Cartridge Info
Source Model ReceiptBatches
reference
Version 7.51.1.12.68.68
UID 9F68-3ED4-3767-1655
Annotation This cartridge is based on the model ReceiptBatches. It is defined as a Database to
Database cartridge meant for archiving data in the underlying tables from source to a
target database. It copies data from ar_batches_all table in oracle receivables to the
target database and then purges the same rows in the source database.
Parameters used
prOrgId
65
3.9. Database to Database Cartridge ReceiptBatchesReload
7.51.1.12.68.68
3.9.1. Cartridge ReceiptBatchesReload
Cartridge Info
Source Model ReceiptBatches
reference
Version 7.51.1.12.68.68
UID 3F6B-A7D9-2B86-0701
Annotation This cartridge is based on the model ReceiptBatches. It is defined as a Reload from
Database cartridge meant for archiving data in the underlying tables from target to
source database. It has a custom selection program to populate a custom selection table
AR_BATCHES_REL_CS based on the rows selected in ar_cash_receipt_history_all
table for reload and for which the batch exists in target database. It copies data from
ar_batches_all table in target database to the source database and then purges the
same rows in the target database.
Parameters used
pdReloadReceiptBatchSelTab
66
Custom Selection
Table Name AR_BATCHES_REL_CS
Database Code Annotation
oracle declare This custom selection program will populate
stmt varchar2(2000); a custom selection table
dummy number; AR_BATCHES_REL_CS based on the
c integer; rows selected in
begin ar_cash_receipt_history_all table for reload
stmt := 'INSERT INTO and for which the batch exists in target
AR_BATCHES_REL_CS database.
(OBT_WF_RUN_ID, OBT_SAVED_ROWID
)'
|| ' SELECT DISTINCT
'||:OBT_WF_RUN_ID ||', abh.ROWID '||
' FROM ${HIST.AR.AR_BATCHES_ALL}
abh,
${HIST.AR.AR_CASH_RECEIPT_HISTOR
Y_ALL} acrhh, '
|| :pdReloadReceiptBatchSelTab || '
acrhh_sel '||
' WHERE acrhh.rowid =
acrhh_sel.obt_saved_rowid '||
' AND acrhh.batch_id = abh.batch_id ';
c := dbms_sql.open_cursor;
dbms_sql.parse(c, stmt,
dbms_sql.NATIVE);
dummy := dbms_sql.execute(c);
dbms_sql.close_cursor(c);
end;
Cartridge Info
Source Model ReceivableTransactions
reference
Version 7.51.1.12.68.68
UID 9ADF-F475-6E46-D66D
Annotation This cartridge is based on the model AR_Main. It is defined as a Database to Database
cartridge meant for archiving data in the underlying tables from source to a target
database. It copies data from all the main tables for oracle receivables which does not
include the batch related tables, to the target database and then purges the same rows
in the source database.
67
Table use name Copy Purge Annotation
AR_CUSTOMER_CALL_TOPICS_ALL Yes Yes
AR_DEFERRED_LINES_ALL Yes Yes
AR_DISTRIBUTIONS_ALL Yes Yes
AR_DISTRIBUTIONS_ALL_2 Yes Yes
AR_DISTRIBUTIONS_ALL_3 Yes Yes
AR_LINE_CONTS_ALL Yes Yes
AR_NOTES Yes Yes
AR_PAYMENT_SCHEDULES_ALL Yes Yes
AR_PAYMENT_SCHEDULES_ALL_2 Yes Yes
AR_RATE_ADJUSTMENTS_ALL Yes Yes
AR_RECEIVABLE_APPLICATIONS_ALL Yes Yes
JAI_AR_CASH_RECEIPTS_ALL Yes Yes
JAI_AR_TRX_INS_LINES_T Yes Yes
JAI_AR_TRX_LINES Yes Yes
JAI_AR_TRX_TAX_LINES Yes Yes
JAI_AR_TRXS Yes Yes
JAI_AR_TRXS_2 Yes Yes
JAI_CMN_DOCUMENT_TAXES Yes Yes
RA_CUST_TRX_LINE_GL_DIST_ALL Yes Yes
RA_CUST_TRX_LINE_SALESREPS_ALL Yes Yes
RA_CUSTOMER_TRX_ALL Yes Yes
RA_CUSTOMER_TRX_ALL_2 Yes Yes
RA_CUSTOMER_TRX_LINES_ALL Yes Yes
Parameters used
pcAdjustmentGLDate,
pcCommitmentRelatedTrx,
pcCommitmentTrx,
pcCompletedTrx,
pcPostableApplicationGLDate,
pcPostableDistributionGLDate,
pcPostableReceiptHistoryGLDate,
pcReceiptCurrHistStatus,
pcReceiptPaySchedClosed,
pcReceiptRefInCE,
pcRunningTotal,
pcTrxInPaySched,
pcTrxLineAutoruleComplete,
pcTrxPaySchedClass,
pcTrxPaySchedClosed,
pcTrxPaySchedGLDate,
pcTrxRevenueComplete,
prCustomerId,
prCutOffDate,
prOrgId,
prTrxDateFrom,
prTrxDateTo
68
3.10.1.4. Rules in Cartridge
Cartridge Info
Source Model ReceivableTransactions
reference
Version 7.51.1.12.68.68
UID B564-178B-3115-1359
Annotation This cartridge is based on the model AR_Main. It is defined as a Reload from Database
cartridge meant for reloading data in the underlying tables from target database back to
source database. It copies data from all the main tables for oracle receivables which
does not include the batch related tables, to the source database and then purges the
same rows in the target database.
69
3.11.1.1. Cartridge operations
70
Table use name Data Source Annotation
AR_DISTRIBUTIONS_ALL History
AR_DISTRIBUTIONS_ALL_2 History
AR_DISTRIBUTIONS_ALL_3 History
AR_LINE_CONTS_ALL History
AR_NOTES History
AR_PAYMENT_SCHEDULES_ALL History
AR_PAYMENT_SCHEDULES_ALL_2 History
AR_RATE_ADJUSTMENTS_ALL History
AR_RECEIVABLE_APPLICATIONS_ALL History
CE_STATEMENT_RECONCILS_ALL History
JAI_AR_CASH_RECEIPTS_ALL History
JAI_AR_TRX_INS_LINES_T History
JAI_AR_TRX_LINES History
JAI_AR_TRX_TAX_LINES History
JAI_AR_TRXS History
JAI_AR_TRXS_2 History
JAI_CMN_DOCUMENT_TAXES History
RA_CUST_TRX_LINE_GL_DIST_ALL History
RA_CUST_TRX_LINE_SALESREPS_ALL History
RA_CUST_TRX_TYPES_ALL History
RA_CUSTOMER_TRX_ALL History
RA_CUSTOMER_TRX_ALL_2 History
RA_CUSTOMER_TRX_LINES_ALL History
Parameters used
prReloadTransactionId
71
Included Rules Excluded Rules
ReceiptPaySchedMustBeClosed
CMRunningTotalMustBeZero
CMTransactionCustomerNameParam
CMTransactionDateParam
CMTransactionMustBeComplete
CMTransactionMustHavePaySched
CMTrxnNotCommitmentRelated
CMTrxnPaySchedMustBeClosed
TrxnTypeShudNotBeCommitment
AdjustmentGLDateParam
TrxRevenueCompletelyRecognized
Cartridge Info
Source Model TransactionBatches
reference
Version 7.51.1.12.68.68
UID 71F5-998F-D164-3D23
Annotation This cartridge is based on the model TransactionBatches. It is defined as a Database to
Database cartridge meant for archiving data in the underlying tables from source to a
target database. It copies data from ra_batches_all table in oracle receivables to the
target database and then purges the same rows in the source database.
Parameters used
prOrgId
72
Included Rules Excluded Rules
OperatingUnitParam
AllTrxnArchivedForBatch
Cartridge Info
Source Model TransactionBatches
reference
Version 7.51.1.12.68.68
UID B26A-82F2-628D-8F4C
Annotation This cartridge is based on the model TransactionBatches. It is defined as a Reload from
Database cartridge meant for archiving data in the underlying tables from target to
source database. It has a custom selection program to populate a custom selection table
RA_BATCHES_REL_CS based on the rows selected in ra_customer_trx_all table for
reload and for which the batch exists in target database. It copies data from
ra_batches_all table in target database to the source database and then purges the
same rows in the target database.
Parameters used
pdReloadTransactionBatchSelTab
73
Included Rules Excluded Rules
OperatingUnitParam
AllTrxnArchivedForBatch
Custom Selection
Table Name RA_BATCHES_REL_CS
Database Code Annotation
oracle declare This custom selection program will populate
stmt varchar2(2000); a custom selection table
dummy number; RA_BATCHES_REL_CS based on the
c integer; rows selected in ra_customer_trx_all table
begin for reload and for which the batch exists in
stmt := 'INSERT INTO target database.
RA_BATCHES_REL_CS
(OBT_WF_RUN_ID, OBT_SAVED_ROWID
)'
|| ' SELECT DISTINCT
'||:OBT_WF_RUN_ID ||', rbh.ROWID '||
' FROM ${HIST.AR.RA_BATCHES_ALL}
rbh,
${HIST.AR.RA_CUSTOMER_TRX_ALL}
rcth, '
|| :pdReloadTransactionBatchSelTab || '
rcth_sel '||
' WHERE rcth.rowid =
rcth_sel.obt_saved_rowid '||
' AND rcth.batch_id = rbh.batch_id ';
c := dbms_sql.open_cursor;
dbms_sql.parse(c, stmt,
dbms_sql.NATIVE);
dummy := dbms_sql.execute(c);
dbms_sql.close_cursor(c);
end;
74
4. Source Models
4.1. Source Model Correspondences
Source Model Info
UID 8259-8A6E-652F-F09E
Annotation This model has a driving table AR.AR_CORRESPONDENCES_ALL and a lookup table
AR.AR_CORR_PAY_SCHED_ALL. A correspondence is eligible for archiving when all
the correspondence payment schedule associated with it are assigned a status of
archived. Data movement only happens for the driving table based on related rows exist
in the lookup table. If there are no rows in ar_corr_pay_sched_all for a particular
correspondence_id then the same row from AR_CORRESPONDENCES_ALL gets
archived to the target database. If for a particular correspondence_id some rows are in
target and some in source database then purged_children_flag is set to Y in the business
flow groovy scripts which use this model.
4.1.1. ER Diagram
AR_CORRESPONDENCES_ALL
Table Name AR.AR_CORRESPONDENCES_ALL
Table Alias AR_CORRESPONDENCES_ALL
Use Type Transactional
Annotation This table stores one record for each dunning letter you send to a
customer. Each row includes dunning letter information, date, customer,
and site use. The primary key for this table is CORRESPONDENCE_ID. It
is a driving table for model Correspondences. Please refer to Oracle E-Biz
TRM for more information about this table.
Rules on AR_CORRESPONDENCES_ALL
Name Attributes Annotation
OperatingUnitParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that correspondence is
eligible for purge if it belongs to the
Mode: Exclusive operation unit prOrgId, provided as
Customization: Mandatory parameter. This rule cannot be
overridden.
Query Expression
Database ansi
Query
75
Rules on AR_CORRESPONDENCES_ALL
AR_CORRESPONDENCES_ALL.PURGED_CHILDREN_FLAG = 'Y'
and AR_CORRESPONDENCES_ALL.ORG_ID = :prOrgId
AR_CORR_PAY_SCHED_ALL
Table Name AR.AR_CORR_PAY_SCHED_ALL
Table Alias AR_CORR_PAY_SCHED_ALL
Use Type Lookup
Annotation This is added as a lookup table in model Correspondences. It is basically
used to check for the existence of payment schedules for a particular
correspondence on source database for archive and target database for
reload. Please refer to Oracle E-Biz TRM for more information about this
table.
Rules on AR_CORR_PAY_SCHED_ALL
Name Attributes Annotation
AllPaySchedArchivedForCorr Category:
Analytics: Disabled
Mode: Exclusive
Customization: Mandatory
Query Expression
Database ansi
Query
(1=2)
76
Source Model Info
Annotation This model has a driving table AR.AR_TRANSMISSIONS_ALL and a lookup table
AR.AR_BATCHES_ALL. A lockbox transmission record is eligible for archiving when all
the receipt batches associated with it are assigned a status of archived. Data movement
only happens for the driving table based on related rows exist in the lookup table. If there
are no rows in AR_BATCHES_ALL for a particular transmission_request_id then the
same row from AR_TRANSMISSIONS_ALL gets archived to the target database.
4.2.1. ER Diagram
AR_TRANSMISSIONS_ALL
Table Name AR.AR_TRANSMISSIONS_ALL
Table Alias AR_TRANSMISSIONS_ALL
Use Type Transactional
Annotation This table stores information about each Lockbox transmission. Each row
includes the original transmission request ID, the transmission date, time,
count, and amount. The primary key for this table is
TRANSMISSION_REQUEST_ID. It is a driving table for model
RcptTransmission. Please refer to Oracle E-Biz TRM for more information
about this table.
Rules on AR_TRANSMISSIONS_ALL
Name Attributes Annotation
OperatingUnitParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that receipt transmission is
eligible for purge if it belongs to the
Mode: Exclusive operation unit prOrgId, provided as
Customization: Mandatory parameter. This rule cannot be
overridden.
Query Expression
Database ansi
Query
AR_TRANSMISSIONS_ALL.ORG_ID = :prOrgId
AR_BATCHES_ALL
Table Name AR.AR_BATCHES_ALL
Table Alias AR_BATCHES_ALL
77
AR_BATCHES_ALL
Use Type Lookup
Annotation This is added as a lookup table in model RcptTransmission. It is basically
used to check for the existence of receipt batches for a particular
transmission on source database for archive and target database for
reload. Please refer to Oracle E-Biz TRM for more information about this
table.
Rules on AR_BATCHES_ALL
Name Attributes Annotation
AllRcptBatchArchived4Transmisn Category:
Analytics: Disabled
Mode: Exclusive
Customization: Mandatory
Query Expression
Database ansi
Query
(1=2)
4.3.1. ER Diagram
78
4.3.2. Table use List
4.3.2.1. Table use AR_BATCHES_ALL
AR_BATCHES_ALL
Table Name AR.AR_BATCHES_ALL
Table Alias AR_BATCHES_ALL
Use Type Transactional
Annotation This table stores information about each receipt batch that you create in
Oracle Receivables. Each row includes information about a specific batch
such as batch source, status, batch type, control count, and control
amount. The primary key for this table is BATCH_ID. It is a driving table
for model ReceiptBatches. Please refer to Oracle E-Biz TRM for more
information about this table.
Rules on AR_BATCHES_ALL
Name Attributes Annotation
OperatingUnitParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that receipt batch is eligible
for purge if it belongs to the
Mode: Exclusive operation unit prOrgId, provided as
Customization: Mandatory parameter. This rule cannot be
overridden.
Query Expression
Database ansi
Query
AR_BATCHES_ALL.PURGED_CHILDREN_FLAG = 'Y'
and AR_BATCHES_ALL.ORG_ID = :prOrgId
AR_CASH_RECEIPT_HISTORY_ALL
Table Name AR.AR_CASH_RECEIPT_HISTORY_ALL
Table Alias AR_CASH_RECEIPT_HISTORY_ALL
Use Type Lookup
Annotation This is added as a lookup table in model ReceiptBatches. It is basically
used to check for the existence of receipts for a particular batch on source
database for archive and target database for reload. Please refer to
Oracle E-Biz TRM for more information about this table.
79
Relation between AR_CASH_RECEIPT_HISTORY_ALL and parent AR_BATCHES_ALL
Parent Table Alias AR_BATCHES_ALL
Unique Key Name AR_CASH_RECEIPT_HISTORY_ALL_UK
Foreign Key Name AR_CASH_RECEIPT_HISTORY_ALL_AR_BATCHES_ALL_FK
UK Columns FK Columns (FK is on parent)
BATCH_ID BATCH_ID
Rules on AR_CASH_RECEIPT_HISTORY_ALL
Name Attributes Annotation
AllReceiptsArchivedForBatch Category:
Analytics: Disabled
Mode: Exclusive
Customization: Mandatory
Query Expression
Database ansi
Query
(1=2)
80
Source Model Info
Annotation This model has one driving table AR.RA_CUSTOMER_TRX_ALL. It also contains other
main transaction tables in oracle receivables module which store data about
transactions, receipts and other related information.
AR_ACTION_NOTIFICATIONS
AR_ADJUSTMENTS_ALL
AR_CALL_ACTIONS
AR_CASH_RECEIPT_HISTORY_ALL
AR_CASH_RECEIPTS_ALL
AR_CORR_PAY_SCHED_ALL
AR_CUSTOMER_CALL_TOPICS_ALL
AR_DEFERRED_LINES_ALL
AR_DISTRIBUTIONS_ALL
AR_LINE_CONTS_ALL
AR_MC_ADJUSTMENTS
AR_MC_CASH_RECEIPT_HIST
AR_MC_CASH_RECEIPTS
AR_MC_DISTRIBUTIONS_ALL
AR_MC_PAYMENT_SCHEDULES
AR_MC_RATE_ADJUSTMENTS
AR_MC_RECEIVABLE_APPS
AR_NOTES
AR_PAYMENT_SCHEDULES_ALL
AR_RATE_ADJUSTMENTS_ALL
AR_RECEIVABLE_APPLICATIONS_ALL
RA_CUST_TRX_LINE_GL_DIST_ALL
RA_CUST_TRX_LINE_SALESREPS_ALL
RA_CUSTOMER_TRX_ALL
RA_CUSTOMER_TRX_LINES_ALL
RA_MC_CUSTOMER_TRX
RA_MC_TRX_LINE_GL_DIST
All the tables are added as transaction table in the model with following exception.
There wont be any data movement for the above two tables.
4.4.1. ER Diagram
81
82
4.4.2. Table use List
4.4.2.1. Table use RA_CUSTOMER_TRX_ALL
RA_CUSTOMER_TRX_ALL
Table Name AR.RA_CUSTOMER_TRX_ALL
Table Alias RCT
Use Type Transactional
Annotation This table stores invoice, debit memo, commitment, and credit memo
header information. Each row includes general invoice information such
as customer, transaction type, and printing instructions. You need one
row for each invoice, debit memo, commitment, and credit memo you
create in Oracle Receivables. The primary key for this table is
CUSTOMER_TRX_ID. This table appears as a driving table and also as a
chaining table for AR_RECEIVABLE_APPLICATIONS_ALL. Please refer
to Oracle E-Biz TRM for more information about this table.
Rules on RA_CUSTOMER_TRX_ALL
Name Attributes Annotation
OperatingUnitParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that transaction is eligible for
purge if it belongs to the operation
Mode: Exclusive unit prOrgId, provided as parameter.
Customization: Mandatory This rule cannot be overridden.
Query Expression
Database ansi
Query
RCT.ORG_ID = :prOrgId
Name Attributes Annotation
TransactionCustomerNameParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that transaction is eligible for
purge if the bill to customer is same
Mode: Exclusive as prCustomerId. This rule cannot
Customization: Mandatory be overridden.
Query Expression
Database ansi
Query
RCT.BILL_TO_CUSTOMER_ID=NVL(:prCustomerId,RCT.BILL_TO_CUSTOMER_ID)
Name Attributes Annotation
TrxnNotCommitmentRelated Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if it is not related to a
Mode: Exclusive commitment type of invoice or if this
Customization: Mandatory rule is overridden by means of
configuration parameter
pcCommitmentRelatedTrx.
Query Expression
Database ansi
Query
83
Rules on RA_CUSTOMER_TRX_ALL
(RCT.INITIAL_CUSTOMER_TRX_ID is null
OR upper(:pcCommitmentRelatedTrx) = 'Y')
Name Attributes Annotation
TransactionMustBeComplete Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if invoice is in complete status
Mode: Exclusive or if this rule is overridden by means
Customization: Mandatory of configuration parameter
pcCompletedTrx.
Query Expression
Database ansi
Query
(RCT.COMPLETE_FLAG = 'Y'
OR
upper(:pcCompletedTrx) = 'Y')
Name Attributes Annotation
TransactionMustHavePaySched Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if there exists at least one
Mode: Exclusive payent schedule for this transaction
Customization: Mandatory or if this rule is overridden by means
of configuration parameter
pcTrxInPaySched.
Query Expression
Database ansi
Query
(exists (select 1 from AR.ar_payment_schedules_all APSA where APSA.customer_trx_id =
RCT.CUSTOMER_TRX_ID and APSA.org_id = RCT.ORG_ID)
OR upper(:pcTrxInPaySched) = 'Y')
Name Attributes Annotation
TrxnPaySchedMustBeClosed Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if the corresponding payment
Mode: Exclusive schedules are in closed status or if
Customization: Mandatory this rule is overridden by means of
configuration parameter
pcTrxPaySchedClosed.
Query Expression
Database ansi
Query
(0= (select NVL(SUM(ABS(A.amount_due_remaining)),0) from AR.AR_PAYMENT_SCHEDULES_ALL A
WHERE A.customer_trx_id = RCT.CUSTOMER_TRX_ID)
OR upper(:pcTrxPaySchedClosed) = 'Y')
Name Attributes Annotation
ReloadTransactionIdParam Category: Data Integrity This Reload Only inclusive eligiblity
Analytics: Disabled rule states that transaction provided
as parameter
Mode: Inclusive prReloadTransactionId is eligible for
Customization: Mandatory reload. At the same time it also
makes eligible all the other
members of the chain consisting of
transactions, receipts and credit
memos. This rule cannot be
overridden.
Query Expression
Database ansi
Query
RCT.CUSTOMER_TRX_ID = :prReloadTransactionId
Name Attributes Annotation
84
Rules on RA_CUSTOMER_TRX_ALL
RunningTotalMustBeZero Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if the Running Total
Mode: Exclusive (comprising: gl_dist_total +
Customization: Mandatory adjustment_total + CM_appl_total -
Cash_appl_total ) is zero or if this
rule is overridden by means of
configuration parameter
pcRunningTotal.
Query Expression
Database ansi
Query
(exists (select 1 from apps.OBT_RA_CUSTOMER_TRX_RUNING_TOT a where a.customer_trx_id =
RCT.CUSTOMER_TRX_ID and cust_sum=0) OR upper(:pcRunningTotal) = 'Y')
Name Attributes Annotation
TrxDateFromToParam Category:
Analytics: Disabled
Mode: Inclusive
Customization: Optional
Query Expression
Database ansi
Query
RCT.TRX_DATE >= cast(:prTrxDateFrom as date) and RCT.TRX_DATE <= cast(:prTrxDateTo as date)
RA_CUSTOMER_TRX_LINES_ALL
Table Name AR.RA_CUSTOMER_TRX_LINES_ALL
Table Alias RCTL
Use Type Transactional
Annotation This table stores information about invoice, debit memo, credit memo, and
commitment lines. For example, an invoice can have one line for Product
A and another line for Product B. You need one row for each line. The
primary key for this table is CUSTOMER_TRX_LINE_ID. It is a
transaction table to RA_CUSTOMER_TRX_ALL. Please refer to Oracle
E-Biz TRM for more information about this table.
85
Rules on RA_CUSTOMER_TRX_LINES_ALL
Name Attributes Annotation
TrxnLineAutoruleMustBeComplete Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if the corresponding lines
Mode: Exclusive have autorule flag in completed
Customization: Mandatory status or if this rule is overridden by
means of configuration parameter
pcTrxLineAutoruleComplete.
Query Expression
Database ansi
Query
(NVL(RCTL.autorule_complete_flag,
'Y') = decode(RCTL.line_type,'LINE','Y',
NVL(RCTL.autorule_complete_flag,
'Y')
)
OR upper(:pcTrxLineAutoruleComplete) = 'Y')
AR_LINE_CONTS_ALL
Table Name AR.AR_LINE_CONTS_ALL
Table Alias AR_LINE_CONTS_ALL
Use Type Transactional
Annotation This table exists only for oracle receivables patch level 11i.AR.O and
higher. The AR_LINE_CONTS_ALL table stores, for each line,
contingencies that impact revenue. It is a transaction table to
RA_CUSTOMER_TRX_LINES_ALL. Please refer to Oracle E-Biz TRM
for more information about this table.
JAI_AR_TRXS
Table Name JA.JAI_AR_TRXS
Table Alias JAI_AR_TRXS
Use Type Transactional
86
Relation between JAI_AR_TRXS and parent RA_CUSTOMER_TRX_LINES_ALL
Parent Table Name AR.RA_CUSTOMER_TRX_LINES_ALL
Parent Table Alias RCTL
Unique Key Name RA_CUSTOMER_TRX_LINES_ALL_UK
Foreign Key Name RA_CUSTOMER_TRX_LINES_ALL_JAI_AR_TRXS_FK
UK Columns (UK is on parent) FK Columns
CUSTOMER_TRX_ID CUSTOMER_TRX_ID
Conditional Relationship on foreign key
Database Code
ansi 'INR' = (select a.currency_code from ${SOURCE.GL.GL_LEDGERS} a,
${SOURCE.APPS.HR_OPERATING_UNITS} b where a.ledger_id =
b.set_of_books_id and b.organization_id = ${PK_ALIAS}.ORG_ID)
JAI_AR_TRX_TAX_LINES
Table Name JA.JAI_AR_TRX_TAX_LINES
Table Alias JAI_AR_TRX_TAX_LINES
Use Type Transactional
JAI_AR_TRX_LINES
Table Name JA.JAI_AR_TRX_LINES
Table Alias JAI_AR_TRX_LINES
87
JAI_AR_TRX_LINES
Use Type Transactional
JAI_AR_TRX_INS_LINES_T
Table Name JA.JAI_AR_TRX_INS_LINES_T
Table Alias JAI_AR_TRX_INS_LINES_T
Use Type Transactional
88
4.4.2.8. Table use AR_PAYMENT_SCHEDULES_ALL
AR_PAYMENT_SCHEDULES_ALL
Table Name AR.AR_PAYMENT_SCHEDULES_ALL
Table Alias APS
Use Type Transactional
Annotation This table stores all transactions except adjustments and miscellaneous
cash receipts. Oracle Receivables groups different transactions by the
column CLASS. These classes include invoice (INV), debit memos (DM),
guarantees (GUAR), credit memos (CM), deposits (DEP), chargebacks
(CB), and receipts (PMT). The primary key for this table is
PAYMENT_SCHEDULE_ID. It is a transaction table to
RA_CUSTOMER_TRX_ALL and AR_CASH_RECEIPTS_ALL. Please
refer to Oracle E-Biz TRM for more information about this table.
Rules on AR_PAYMENT_SCHEDULES_ALL
Name Attributes Annotation
TrxnPaySchedGLDateParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if the corresponding payment
Mode: Exclusive schedule's gl_date_closed must be
Customization: Mandatory less than the Cutoff date parameter
or if this rule is overridden by means
of configuration parameter
pcTrxPaySchedGLDate.
Query Expression
Database ansi
Query
(APS.GL_DATE_CLOSED<=cast(:prCutOffDate as date)
OR upper(:pcTrxPaySchedGLDate) = 'Y')
Name Attributes Annotation
TrxnPaySchedClassShudBeInvCM Category: Data Integrity This Archive Only eligiblity rule
DM Analytics: Enabled states that transaction is eligible for
purge if the corresponding payment
Mode: Exclusive schedules have class as Invoice,
Customization: Mandatory Credit Memo or Debit Memo or if
this rule is overridden by means of
configuration parameter
pcTrxPaySchedClass.
Query Expression
Database ansi
89
Rules on AR_PAYMENT_SCHEDULES_ALL
Query
(APS.CLASS IN ('INV','CM', 'DM')
OR upper(:pcTrxPaySchedClass) = 'Y')
AR_CORR_PAY_SCHED_ALL
Table Name AR.AR_CORR_PAY_SCHED_ALL
Table Alias ACPS
Use Type Transactional
Annotation This table stores one record for each invoice selected for dunning by
Oracle Receivables. Each row includes invoice and correspondence
information. The primary key for this table is
CORRESPONDENCE_PAY_SCHED_ID. It is a transaction table to
AR_PAYMENT_SCHEDULES_ALL. Please refer to Oracle E-Biz TRM for
more information about this table.
RA_CUST_TRX_LINE_GL_DIST_ALL
Table Name AR.RA_CUST_TRX_LINE_GL_DIST_ALL
Table Alias RCTLGD
Use Type Transactional
Annotation This table stores the accounting records for revenue, unearned revenue
and unbilled receivables for each invoice or credit memo line. Each row
includes the GL account and the amount of the accounting entry. The
ACCOUNT_CLASS REC represents the receivable account and is for the
total amount of the invoice. The primary key for this table is
CUST_TRX_LINE_GL_DIST_ID. It is a transaction table to
RA_CUSTOMER_TRX_ALL and AR_CASH_RECEIPTS_ALL. Please
refer to Oracle E-Biz TRM for more information about this table.
90
Relation between RA_CUST_TRX_LINE_GL_DIST_ALL and parent RA_CUSTOMER_TRX_ALL
UK Columns (UK is on parent) FK Columns
CUSTOMER_TRX_ID CUSTOMER_TRX_ID
Rules on RA_CUST_TRX_LINE_GL_DIST_ALL
Name Attributes Annotation
PostableDistributinGLDateParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that postable transactions are
eligible for purge if corresponding
Mode: Exclusive distributions have GL Date less than
Customization: Mandatory cutoff date and posting_control_id
<> -3 or if this rule is overridden by
means of configuration parameter
pcPostableDistributionGLDate.
Query Expression
Database ansi
Query
-- for postable trx_types
((('Y' = (select a.post_to_gl
from ar.ra_cust_trx_types_all a,
ar.ra_customer_trx_all b
where
RCTLGD.CUSTOMER_TRX_ID=b.CUSTOMER_TRX_ID and
a.cust_trx_type_id=b.cust_trx_type_id
and a.org_id=b.org_id)
and (
RCTLGD.ACCOUNT_SET_FLAG != 'N'
OR ( RCTLGD.POSTING_CONTROL_ID != -3 and
RCTLGD.GL_DATE <= cast(:prCutOffDate as date) )
)
)
OR
upper(:pcPostableDistributionGLDate) = 'Y'
)
OR -- for unpostable trx_types
('N' = (select a.post_to_gl
from ar.ra_cust_trx_types_all a,
ar.ra_customer_trx_all b
where
RCTLGD.CUSTOMER_TRX_ID=b.CUSTOMER_TRX_ID and
a.cust_trx_type_id=b.cust_trx_type_id
and a.org_id=b.org_id)
))
AR_RECEIVABLE_APPLICATIONS_ALL
Table Name AR.AR_RECEIVABLE_APPLICATIONS_ALL
Table Alias ARA
Use Type Transactional
91
AR_RECEIVABLE_APPLICATIONS_ALL
Annotation This table stores all accounting entries for your cash and credit memo
applications. Each row includes the amount applied, status, and
accounting flexfield information. Possible statuses of your applications
include APP, UNAPP, ACC, and UNID. CUSTOMER_TRX_ID,
CASH_RECEIPT_ID, and PAYMENT_SCHEDULE_ID identify the
transaction that you are actually applying.
APPLIED_CUSTOMER_TRX_ID and
APPLIED_PAYMENT_SCHEDULE_ID identify the invoice or credit memo
that receives the application. The primary key for this table is
RECEIVABLE_APPLICATION_ID. The two parents for this table are
RA_CUSTOMER_TRX_ALL and AR_CASH_RECEIPTS_ALL. Please
refer to Oracle E-Biz TRM for more information about this table.
Rules on AR_RECEIVABLE_APPLICATIONS_ALL
Name Attributes Annotation
PostableApplicationGLDateParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that postable transactions are
eligible for purge if corresponding
Mode: Exclusive applications have GL Date less than
Customization: Mandatory cutoff date and posting_control_id
<> -3 or if this rule is overridden by
means of configuration parameter
pcPostableApplicationGLDate.
Query Expression
Database ansi
Query
((decode(NVL(ARA.POSTABLE,'Y'),'Y',ARA.POSTING_CONTROL_ID,0)!= -3
and decode(NVL(ARA.POSTABLE,'Y'),'Y', ARA.GL_DATE, cast(:prCutOffDate as date)-1) <=
cast(:prCutOffDate as date)
)
OR upper(:pcPostableApplicationGLDate) = 'Y')
AR_CASH_RECEIPTS_ALL
Table Name AR.AR_CASH_RECEIPTS_ALL
Table Alias ACR
Use Type Chaining
92
AR_CASH_RECEIPTS_ALL
Annotation This table stores one record for each receipt that you enter. Oracle
Receivables associates a STATUS with each receipt. These statuses
include applied (APP), unapplied (UNAPP), unidentified (UNID), non-
sufficient funds (NSF), reversed receipt (REV), and stop payment
(STOP). The primary key for this table is CASH_RECEIPT_ID. It is added
as a chaining table to AR_RECEIVABLE_APPLICATIONS_ALL in the
model AR_Main. Please refer to Oracle E-Biz TRM for more information
about this table.
Rules on AR_CASH_RECEIPTS_ALL
Name Attributes Annotation
ReceiptCustomerNameParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that receipt is eligible for
purge if the pay from customer is
Mode: Exclusive same as P_R_CustomerId. This rule
Customization: Mandatory cannot be overridden.
Query Expression
Database ansi
Query
(:prCustomerId IS NULL
OR
NVL(ACR.PAY_FROM_CUSTOMER,:prCustomerId) = :prCustomerId)
AR_CASH_RECEIPT_HISTORY_ALL
Table Name AR.AR_CASH_RECEIPT_HISTORY_ALL
Table Alias ACRH
Use Type Transactional
Annotation This table contains each step in the life cycle of a receipt. The status field
tells you which step the receipt has reached which could be APPROVED,
CONFIRMED, REMITTED, CLEARED or REVERSED. The
CURRENT_RECORD_FLAG points you to the current row that is, the
current status of the cash receipt. The primary key for this table is
CASH_RECEIPT_HISTORY_ID. It is a transaction table to
AR_CASH_RECEIPTS_ALL. Please refer to Oracle E-Biz TRM for more
information about this table.
93
Relation between AR_CASH_RECEIPT_HISTORY_ALL and parent AR_CASH_RECEIPTS_ALL
Parent Table Name AR.AR_CASH_RECEIPTS_ALL
Parent Table Alias ACR
Unique Key Name AR_CASH_RECEIPTS_U1
Foreign Key Name AR_CASH_RECEIPTS_ALL_AR_CASH_RECEIPT_HISTORY_ALL_FK
UK Columns (UK is on parent) FK Columns
CASH_RECEIPT_ID CASH_RECEIPT_ID
Rules on AR_CASH_RECEIPT_HISTORY_ALL
Name Attributes Annotation
PostableReceiptHistGLDateParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that postable receipt is
eligible for purge if the
Mode: Exclusive corresponding history records have
Customization: Mandatory GL Date less than cutoff date and
posting_control_id <> -3 or if this
rule is overridden by means of
configuration parameter
pcPostableReceiptHistoryGLDate.
Query Expression
Database ansi
Query
((ACRH.POSTING_CONTROL_ID != -3 and
ACRH.GL_DATE <= cast(:prCutOffDate as date)
)
OR upper(:pcPostableReceiptHistoryGLDate) = 'Y'
)
Name Attributes Annotation
ReceiptMustBeClearedWithNoRisk Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that receipt is eligible for
purge if the current history status is
Mode: Exclusive in cleared state and is risk
Customization: Mandatory eliminated (determined by
factor_flag=N) or if this rule is
overridden by means of
configuration parameter
pcReceiptCurrHistStatus.
Query Expression
Database ansi
Query
(
NVL(ACRH.CURRENT_RECORD_FLAG,'N') <> 'Y'
OR
(ACRH.STATUS = 'CLEARED' AND ACRH.FACTOR_FLAG = 'N')
OR upper(:pcReceiptCurrHistStatus) = 'Y'
)
CE_STATEMENT_RECONCILS_ALL
Table Name CE.CE_STATEMENT_RECONCILS_ALL
94
CE_STATEMENT_RECONCILS_ALL
Table Alias CSR
Use Type Lookup
Annotation The CE_STATEMENT_RECONCILS_ALL table stores information about
reconciliation history or audit trail. Each row represents an action
performed against a statement line. This is a lookup table to
AR_CASH_RECEIPT_HISTORY_ALL. Please refer to Oracle E-Biz TRM
for more information about this table.
Rules on CE_STATEMENT_RECONCILS_ALL
Name Attributes Annotation
ReceipttShudntHaveRefInCashMgt Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that receipt is eligible for
purge if reconciled bank statements
Mode: Exclusive does not exist in Oracle Cash
Customization: Mandatory Management or if this rule is
overridden by means of
configuration parameter
pcReceiptRefInCE.
Query Expression
Database ansi
Query
(CSR.STATUS_FLAG <> 'M'
OR upper(:pcReceiptRefInCE) = 'Y'
)
AR_DISTRIBUTIONS_ALL
Table Name AR.AR_DISTRIBUTIONS_ALL
Table Alias AD
95
AR_DISTRIBUTIONS_ALL
Use Type Transactional
Annotation This table stores the distributions generated by the different steps in the
life cycle of a cash receipt. The primary key for this table is SOURCE_ID,
SOURCE_TABLE, SOURCE_TYPE. It is added as a transaction table to
AR_CASH_RECEIPT_HISTORY_ALL,
AR_RECEIVABLE_APPLICATIONS_ALL and AR_ADJUSTMENTS_ALL
based on conditional relationship being (SOURCE_TABLE = 'CRH',
SOURCE_TABLE = 'RA' or SOURCE_TABLE = 'ADJ') respectively for
each parent table. SOURCE_ID and SOURCE_TABLE will have values
based on the parent. Please refer to Oracle E-Biz TRM for more
information about this table.
AR_PAYMENT_SCHEDULES_ALL_2
Table Name AR.AR_PAYMENT_SCHEDULES_ALL
Table Alias APS2
Use Type Transactional
Annotation This table stores all transactions except adjustments and miscellaneous
cash receipts. Oracle Receivables groups different transactions by the
column CLASS. These classes include invoice (INV), debit memos (DM),
guarantees (GUAR), credit memos (CM), deposits (DEP), chargebacks
(CB), and receipts (PMT). The primary key for this table is
PAYMENT_SCHEDULE_ID. It is a transaction table to
RA_CUSTOMER_TRX_ALL and AR_CASH_RECEIPTS_ALL. Please
refer to Oracle E-Biz TRM for more information about this table.
96
Data movement key for AR_PAYMENT_SCHEDULES_ALL_2
DM Key name <Row ID>
DM Key Info "AR_PAYMENT_SCHEDULES_ALL_2" is set to have data movement
done by row ID.
Rules on AR_PAYMENT_SCHEDULES_ALL_2
Name Attributes Annotation
ReceiptPaySchedMustBeClosed Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that receipt is eligible for
purge if the corresponding payment
Mode: Exclusive schedules are in closed status or if
Customization: Mandatory this rule is overridden by means of
configuration parameter
pcReceiptPaySchedClosed.
Query Expression
Database ansi
Query
("APS2".STATUS != 'OP'
OR upper(:pcReceiptPaySchedClosed) = 'Y')
AR_RATE_ADJUSTMENTS_ALL
Table Name AR.AR_RATE_ADJUSTMENTS_ALL
Table Alias AR_RATE_ADJUSTMENTS_ALL
Use Type Transactional
Annotation This table stores information about your currency exchange rate
adjustments. The primary key for this table is RATE_ADJUSTMENT_ID. It
is a transaction table to AR_CASH_RECEIPTS_ALL. Please refer to
Oracle E-Biz TRM for more information about this table.
JAI_AR_CASH_RECEIPTS_ALL
Table Name JA.JAI_AR_CASH_RECEIPTS_ALL
Table Alias JAI_AR_CASH_RECEIPTS_ALL
Use Type Transactional
97
Relation between JAI_AR_CASH_RECEIPTS_ALL and parent AR_CASH_RECEIPTS_ALL
Parent Table Name AR.AR_CASH_RECEIPTS_ALL
Parent Table Alias ACR
Unique Key Name AR_CASH_RECEIPTS_U1
Foreign Key Name AR_CASH_RECEIPTS_ALL_JAI_AR_CASH_RECEIPTS_ALL_FK
UK Columns (UK is on parent) FK Columns
CASH_RECEIPT_ID CASH_RECEIPT_ID
Conditional Relationship on foreign key
Database Code
ansi 'INR' = (select a.currency_code from ${SOURCE.GL.GL_LEDGERS} a,
${SOURCE.APPS.HR_OPERATING_UNITS} b where a.ledger_id =
b.set_of_books_id and b.organization_id = ${PK_ALIAS}.ORG_ID) and exists
(select'1' flag FROM ${SOURCE.AR.AR_RECEIPT_CLASSES} a,
${SOURCE.AR.AR_RECEIPT_METHODS} bWHERE a.receipt_class_id =
b.receipt_class_idAND a.name = (SELECT a.attribute_value receipt_class FROM
${SOURCE.JA.JAI_RGM_REGISTRATIONS} a,
${SOURCE.JA.JAI_RGM_DEFINITIONS} b
WHEREa.attribute_code = 'AR_RECEIPT_CLASS'
AND a.registration_type = 'OTHERS'
ANDa.attribute_type_code = 'OTHERS'
AND a.regime_id = b.regime_id
ANDb.regime_code = 'TCS'
)
AND b.receipt_method_id = ${PK_ALIAS}.RECEIPT_METHOD_ID
)
and NVL(${FK_ALIAS}.CONFIRM_FLAG,'N') in ('N','I')
JAI_CMN_DOCUMENT_TAXES
Table Name JA.JAI_CMN_DOCUMENT_TAXES
Table Alias JAI_CMN_DOCUMENT_TAXES
Use Type Transactional
98
Data movement key for JAI_CMN_DOCUMENT_TAXES
DM Key Info "JAI_CMN_DOCUMENT_TAXES" is set to have data movement done by
row ID.
RA_CUSTOMER_TRX_ALL_2
Table Name AR.RA_CUSTOMER_TRX_ALL
Table Alias RCT2
Use Type Chaining
Rules on RA_CUSTOMER_TRX_ALL_2
Name Attributes Annotation
CMRunningTotalMustBeZero Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that a Credit Memo
transaction is eligible for purge if the
Mode: Exclusive Running Total (comprising:
Customization: Mandatory gl_dist_total + adjustment_total +
CM_appl_total - Cash_appl_total ) is
zero or if this rule is overridden by
means of configuration parameter
pcRunningTotal.
Query Expression
Database ansi
Query
(exists (select 1 from apps.OBT_RA_CUSTOMER_TRX_RUNING_TOT a where a.customer_trx_id =
RCT2.CUSTOMER_TRX_ID and cust_sum=0) OR upper(:pcRunningTotal) = 'Y')
Name Attributes Annotation
CMTransactionCustomerNamePara Category: Data Integrity This Archive Only eligiblity rule
m Analytics: Disabled states that a credit memo
transaction is eligible for purge if the
Mode: Exclusive bill to customer is same as
Customization: Mandatory prCustomerId. This rule cannot be
overridden.
Query Expression
Database ansi
Query
RCT2.BILL_TO_CUSTOMER_ID=NVL(:prCustomerId,RCT2.BILL_TO_CUSTOMER_ID)
Name Attributes Annotation
99
Rules on RA_CUSTOMER_TRX_ALL_2
CMTransactionDateParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that a credit memo
transaction is eligible for purge if the
Mode: Exclusive transaction_date is less than the
Customization: Mandatory cutoff date - prCutOffDate. This rule
cannot be overridden.
Query Expression
Database ansi
Query
RCT2.TRX_DATE<=cast(:prCutOffDate as date)
Name Attributes Annotation
CMTransactionMustBeComplete Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that a credit memo
transaction is eligible for purge if
Mode: Exclusive invoice is in complete status or if
Customization: Mandatory this rule is overridden by means of
configuration parameter
pcCompletedTrx.
Query Expression
Database ansi
Query
(RCT2.COMPLETE_FLAG = 'Y'
OR
upper(:pcCompletedTrx) = 'Y')
Name Attributes Annotation
CMTransactionMustHavePaySched Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that a credit memo
transaction is eligible for purge if
Mode: Exclusive there exists at least one payent
Customization: Mandatory schedule for this transaction or if
this rule is overridden by means of
configuration parameter
pcTrxInPaySched.
Query Expression
Database ansi
Query
(exists (select 1 from AR.ar_payment_schedules_all APSA where APSA.customer_trx_id =
RCT2.CUSTOMER_TRX_ID and APSA.org_id = RCT2.ORG_ID)
OR upper(:pcTrxInPaySched) = 'Y')
Name Attributes Annotation
CMTrxnNotCommitmentRelated Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that a credit memo
transaction is eligible for purge if it is
Mode: Exclusive not related to a commitment type of
Customization: Mandatory invoice or if this rule is overridden by
means of configuration parameter
pcCommitmentRelatedTrx.
Query Expression
Database ansi
Query
(RCT2.INITIAL_CUSTOMER_TRX_ID is null
OR upper(:pcCommitmentRelatedTrx) = 'Y')
Name Attributes Annotation
CMTrxnPaySchedMustBeClosed Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that a credit memo
transaction is eligible for purge if the
Mode: Exclusive corresponding payment schedules
Customization: Mandatory are in closed status or if this rule is
overridden by means of
configuration parameter
pcTrxPaySchedClosed.
100
Rules on RA_CUSTOMER_TRX_ALL_2
Query Expression
Database ansi
Query
(0= (select NVL(SUM(ABS(A.amount_due_remaining)),0) from AR.AR_PAYMENT_SCHEDULES_ALL A
WHERE A.customer_trx_id = RCT2.CUSTOMER_TRX_ID)
OR upper(:pcTrxPaySchedClosed) = 'Y')
AR_DISTRIBUTIONS_ALL_2
Table Name AR.AR_DISTRIBUTIONS_ALL
Table Alias AD2
Use Type Transactional
Annotation This table stores the distributions generated by the different steps in the
life cycle of a cash receipt. The primary key for this table is SOURCE_ID,
SOURCE_TABLE, SOURCE_TYPE. It is added as a transaction table to
AR_CASH_RECEIPT_HISTORY_ALL,
AR_RECEIVABLE_APPLICATIONS_ALL and AR_ADJUSTMENTS_ALL
based on conditional relationship being (SOURCE_TABLE = 'CRH',
SOURCE_TABLE = 'RA' or SOURCE_TABLE = 'ADJ') respectively for
each parent table. SOURCE_ID and SOURCE_TABLE will have values
based on the parent. Please refer to Oracle E-Biz TRM for more
information about this table.
RA_CUST_TRX_LINE_SALESREPS_ALL
Table Name AR.RA_CUST_TRX_LINE_SALESREPS_ALL
Table Alias RCTLS
Use Type Transactional
Annotation This table stores sales credit assignments for invoice lines. The primary
key for this table is CUST_TRX_LINE_SALESREP_ID. It is a transaction
table to RA_CUSTOMER_TRX_ALL. Please refer to Oracle E-Biz TRM
for more information about this table.
101
Relation between RA_CUST_TRX_LINE_SALESREPS_ALL and parent RA_CUSTOMER_TRX_ALL
Parent Table Name AR.RA_CUSTOMER_TRX_ALL
Parent Table Alias RCT
Unique Key Name RA_CUSTOMER_TRX_U1
Foreign Key Name RA_CUSTOMER_TRX_ALL_RA_CUST_TRX_LINE_SALESREPS_ALL_
FK
UK Columns (UK is on parent) FK Columns
CUSTOMER_TRX_ID CUSTOMER_TRX_ID
RA_CUST_TRX_TYPES_ALL
Table Name AR.RA_CUST_TRX_TYPES_ALL
Table Alias RCTT
Use Type Lookup
Annotation This table stores information about each transaction type used for
invoices, commitments and credit memos. Each row includes
AutoAccounting information as well as standard defaults for the resulting
invoices. POST_TO_GL stores Y for Yes and N for No to indicate
whether this transaction can post to your general ledger. This is a lookup
table to RA_CUSTOMER_TRX_ALL. Please refer to Oracle E-Biz TRM
for more information about this table.
Rules on RA_CUST_TRX_TYPES_ALL
Name Attributes Annotation
TrxnTypeShudNotBeCommitment Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if Transaction Type Not
Mode: Exclusive Commitment (i.e. Deposit or
Customization: Mandatory gaurantee) or if this rule is
overridden by means of
configuration parameter
pcCommitmentTrx.
102
Rules on RA_CUST_TRX_TYPES_ALL
Query Expression
Database ansi
Query
(RCTT.TYPE not in ('DEP', 'GUAR' )
OR
upper(:pcCommitmentTrx) = 'Y')
AR_ADJUSTMENTS_ALL
Table Name AR.AR_ADJUSTMENTS_ALL
Table Alias AA
Use Type Transactional
Annotation This table stores information about your invoice adjustments. The primary
key for this table is ADJUSTMENT_ID. It is a transaction table to the table
RA_CUSTOMER_TRX_ALL. Please refer to Oracle E-Biz TRM for more
information about this table.
Rules on AR_ADJUSTMENTS_ALL
Name Attributes Annotation
AdjustmentGLDateParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that postable transaction is
eligible for purge if the
Mode: Exclusive corresponding adjustments have GL
Customization: Mandatory Date less than cutoff date and
posting_control_id <> -3 and
unpostable approved adjustment is
eligible for purge if Gl Posted Date
is less than cutoff date or if this rule
is overridden by means of
configuration parameter
pcAdjustmentGLDate.
Query Expression
Database ansi
Query
103
Rules on AR_ADJUSTMENTS_ALL
-- postable trx_types
(('Y' = (select a.post_to_gl
from ar.ra_cust_trx_types_all a,
ar.ra_customer_trx_all b
where
AA.CUSTOMER_TRX_ID=b.CUSTOMER_TRX_ID and
a.cust_trx_type_id=b.cust_trx_type_id
and a.org_id=b.org_id)
and (AA.STATUS not in ('A','M','W')
OR ( AA.POSTING_CONTROL_ID != -3 and
AA.GL_DATE <= cast(:prCutOffDate as date) )
)
)
OR -- unpostable trx_types
AR_DISTRIBUTIONS_ALL_3
Table Name AR.AR_DISTRIBUTIONS_ALL
Table Alias AD3
Use Type Transactional
Annotation This table stores the distributions generated by the different steps in the
life cycle of a cash receipt. The primary key for this table is SOURCE_ID,
SOURCE_TABLE, SOURCE_TYPE. It is added as a transaction table to
AR_CASH_RECEIPT_HISTORY_ALL,
AR_RECEIVABLE_APPLICATIONS_ALL and AR_ADJUSTMENTS_ALL
based on conditional relationship being (SOURCE_TABLE = 'CRH',
SOURCE_TABLE = 'RA' or SOURCE_TABLE = 'ADJ') respectively for
each parent table. SOURCE_ID and SOURCE_TABLE will have values
based on the parent. Please refer to Oracle E-Biz TRM for more
information about this table.
104
Data movement key for AR_DISTRIBUTIONS_ALL_3
DM Key name <Row ID>
DM Key Info "AR_DISTRIBUTIONS_ALL_3" is set to have data movement done by
row ID.
AR_NOTES
Table Name AR.AR_NOTES
Table Alias AN
Use Type Transactional
Annotation This table stores MemoPad information for customer calls that are
entered in the Customer Calls window. The primary key for this table is
NOTE_ID. It is a transaction table to RA_CUSTOMER_TRX_ALL. Please
refer to Oracle E-Biz TRM for more information about this table.
AR_CUSTOMER_CALL_TOPICS_ALL
Table Name AR.AR_CUSTOMER_CALL_TOPICS_ALL
Table Alias ACCT
Use Type Transactional
Annotation This table stores information about the topic of customer calls, such as
the outcome of the call, the customer
105
Data movement key for AR_CUSTOMER_CALL_TOPICS_ALL
DM Key Info "AR_CUSTOMER_CALL_TOPICS_ALL" is set to have data movement
done by row ID.
AR_CALL_ACTIONS
Table Name AR.AR_CALL_ACTIONS
Table Alias ACA
Use Type Transactional
Annotation This table stores information about each call action you enter in the
Customer Calls window. Each row includes the action and amount of a
call action. The primary key for this table is CALL_ACTION_ID. It is a
transaction table to AR_CUSTOMER_CALL_TOPICS_ALL. Please refer
to Oracle E-Biz TRM for more information about this table.
AR_ACTION_NOTIFICATIONS
Table Name AR.AR_ACTION_NOTIFICATIONS
Table Alias AAN
Use Type Transactional
Annotation AR_ACTION_NOTIFICATIONS identifies which employees are to be
notified concerning a particular customer call action. The primary key for
this table is ACTION_NOTIFICATION_ID. It is a transaction table to table
AR_CALL_ACTIONS. Please refer to Oracle E-Biz TRM for more
information about this table.
106
Data movement key for AR_ACTION_NOTIFICATIONS
DM Key name <Row ID>
DM Key Info "AR_ACTION_NOTIFICATIONS" is set to have data movement done by
row ID.
AR_DEFERRED_LINES_ALL
Table Name AR.AR_DEFERRED_LINES_ALL
Table Alias AR_DEFERRED_LINES_ALL
Use Type Transactional
Annotation This table exists only for oracle receivables patch level 11i.AR.O and
higher. The AR_DEFERRED_LINES_ALL table records invoice status
changes, as invoices move through the revenue management life cycle.
It is a transaction table to RA_CUSTOMER_TRX_ALL. Please refer to
Oracle E-Biz TRM for more information about this table.
Rules on AR_DEFERRED_LINES_ALL
Name Attributes Annotation
TrxRevenueCompletelyRecognized Category: Data Integrity This Archive Only eligiblity rule
Analytics: Enabled states that transaction is eligible for
purge if revenue is recognized
Mode: Exclusive completely for each line or if this
Customization: Mandatory rule is overridden by means of
configuration parameter
pcTrxRevenueComplete.
Query Expression
Database ansi
Query
( ("AR_DEFERRED_LINES_ALL"."LINE_COLLECTIBLE_FLAG" != 'N')
OR
("AR_DEFERRED_LINES_ALL"."MANUAL_OVERRIDE_FLAG" != 'N')
OR
("AR_DEFERRED_LINES_ALL"."ACCTD_AMOUNT_DUE_ORIGINAL" =
"AR_DEFERRED_LINES_ALL"."ACCTD_AMOUNT_RECOGNIZED")
OR
(upper(:pcTrxRevenueComplete) = 'Y' ) )
107
4.4.2.31. Table use JAI_AR_TRXS_2
JAI_AR_TRXS_2
Table Name JA.JAI_AR_TRXS
Table Alias JAI_AR_TRXS_2
Use Type Transactional
4.5.1. ER Diagram
108
4.5.2.1. Table use RA_BATCHES_ALL
RA_BATCHES_ALL
Table Name AR.RA_BATCHES_ALL
Table Alias RA_BATCHES_ALL
Use Type Transactional
Annotation This table stores information about each batch of invoices you enter in
Oracle Receivables. The primary key for this table is BATCH_ID. It is a
driving table for model TransactionBatches. Please refer to Oracle E-Biz
TRM for more information about this table.
Rules on RA_BATCHES_ALL
Name Attributes Annotation
OperatingUnitParam Category: Data Integrity This Archive Only eligiblity rule
Analytics: Disabled states that transaction batch is
eligible for purge if it belongs to the
Mode: Exclusive operation unit prOrgId, provided as
Customization: Mandatory parameter. This rule cannot be
overridden.
Query Expression
Database ansi
Query
RA_BATCHES_ALL.PURGED_CHILDREN_FLAG = 'Y'
and RA_BATCHES_ALL.ORG_ID = :prOrgId
RA_CUSTOMER_TRX_ALL
Table Name AR.RA_CUSTOMER_TRX_ALL
Table Alias RA_CUSTOMER_TRX_ALL
Use Type Lookup
Annotation This is added as a lookup table in model TransactionBatches. It is
basically used to check for the existence of transactions for a particular
batch on source database for archive and target database for reload.
Please refer to Oracle E-Biz TRM for more information about this table.
109
Data movement key for RA_CUSTOMER_TRX_ALL
DM Key Info "RA_CUSTOMER_TRX_ALL" is set to have data movement done by row
ID.
Rules on RA_CUSTOMER_TRX_ALL
Name Attributes Annotation
AllTrxnArchivedForBatch Category:
Analytics: Disabled
Mode: Exclusive
Customization: Mandatory
Query Expression
Database ansi
Query
(1=2)
110