Documente Academic
Documente Profesional
Documente Cultură
This document is intended as a guide to using the Cash Management Open Interface for reconciling
Receipts and Payments generated in external systems. This interface can also be used over a cutover
period to migrate Closed Receipts and Payments that are not going to be migrated into their individual
sub ledgers, but are required in Cash Management to Reconcile to Bank Statements. The guide also
includes necessary set up steps for creating and maintaining Internal Bank Accounts
The document is not intended as a one stop guide to implementing this solution as it includes set up
relating to specific client requirements. It can however, be used as a guide to point CE Consultants in
the right direction regarding setup and code needed in order to implement the solution. To this end,
there are also a number of sample scripts provided in the CE document set.
3.
Lee Taylor
19/08/2008
www.LTSolutions.eu
4.
5.
6.
7.
8.
Search on the Objects available using the Magnifying Glass. Search on Bank%. The available
Objects are
Bank Account Access
Bank Account Maintenance
Bank Account Transfer
Bank Account Use
Only one Object can be assigned to a grant. Select the first object and Save the changes.
Repeat the action for all required Cash Management Objects.
We now created a Role and granted access to the Cash Management Objects required to
maintain the Bank Accounts. We now need to assign the role to each individual user we want
to give access to. This is done by navigating to the user using User Management=>Users
Search on the Oracle Username you want to grant access to. Once the user is displayed, click
on the Update Icon and simply add the new Role to the User.
3.
4.
5.
Lee Taylor
19/08/2008
www.LTSolutions.eu
6.
7.
Repeat for each Bank Account requiring access to the Open Interface.
Providing that the CE_999_INTERFACE_V displays valid records for the Bank Accounts
enabled, we should be able to see the Receipts and Payments through Cash Management.
Navigate to View => Available Transactions in forms. Click on the Open Interface Radio
Button and enter one of the Bank Accounts covered by the Open Interface. The Transactions
for that Bank should be visible through the form.
www.LTSolutions.eu
CREATED_BY
LAST_UPDATE_DATE
LAST_UPDATED_BY
ORG_ID
NUMBER,
DATE,
NUMBER,
NUMBER
)
CREATE OR REPLACE FORCE VIEW apps.ce_999_interface_v (row_id,
trx_id,
bank_account_id,
trx_type,
trx_type_dsp,
trx_number,
trx_date,
currency_code,
status,
status_dsp,
exchange_rate_type,
exchange_rate_date,
exchange_rate,
amount,
cleared_amount,
charges_amount,
error_amount,
acctd_amount,
acctd_cleared_amount,
acctd_charges_amount,
acctd_error_amount,
gl_date,
cleared_date,
creation_date,
created_by,
last_update_date,
last_updated_by
)
AS
SELECT recon.rowid
,
recon.trx_id
,
cba.bank_account_id
,
recon.trx_type
,
recon.trx_type_dsp
,
TO_CHAR(recon.trx_number)
,
recon.trx_date
,
recon.currency_code
,
recon.status
,
recon.status_dsp
,
recon.exchange_rate_type
,
recon.exchange_rate_date
,
recon.exchange_rate
,
recon.amount
,
recon.cleared_amount
,
recon.cleared_charges_amount
,
recon.cleared_error_amount
,
recon.acctd_amount
,
recon.acctd_cleared_amount
,
recon.acctd_cleared_charges_amount
,
recon.acctd_cleared_error_amount
,
recon.gl_date
,
recon.cleared_date
,
recon.creation_date
,
fsu.user_id created_by
,
recon.last_update_date
,
fsu.user_id last_updated_by
FROM
xxlts_ce11i_recon_all recon
,
ce_bank_accounts cba
,
fnd_user fsu
WHERE 1=1
AND
fsu.user_name = 'DATA_MIGRATION'
AND
recon.bank_account_num = cba.bank_account_num;
Lee Taylor
19/08/2008
www.LTSolutions.eu
Provides a procedure for updating the status on reversed rows in our custom table
(Receipts/Payments that were reconciled being set to Un-reconciled). This also generates
Journals into GL Interface off the back of each Receipt/Payment being set back to Unreconciled.
Note: Set of Books ID is now called Ledger ID in R12. Whilst the Profile Option Name
remains the same (GL_SET_OF_BKS_ID), the User Profile Option Name is now GL Ledger
ID.
www.LTSolutions.eu
X_gl_date
X_bank_currency
X_cleared_amount
X_cleared_date
X_charges_amount
X_errors_amount
X_exchange_date
X_exchange_type
X_exchange_rate
DATE,
-- gl date
VARCHAR2, -- bank currency code
NUMBER,
-- amount to be cleared
DATE,
-- cleared date
NUMBER,
-- charges amount
NUMBER,
-- errors amount
DATE,
-- exchange rate date
VARCHAR2, -- exchange rate type
NUMBER
-- exchange rate
)IS
lv_period_name gl_period_statuses.period_name%TYPE;
ln_ledger_id
gl_interface.ledger_id%TYPE :=
fnd_profile.value('GL_SET_OF_BKS_ID');
BEGIN
/* Note: ce_999_interface_v is the base table of ce_999_interface_v in this
example */
/* Note: You are required to pass the status column to your proprietary
database. The Reconciliation Open Interface feature requires a
non-null status column to function correctly. */
/* Note: If you have not defined the value for the open interface clear status
in the System Parameter Form, i.e. OPEN_INTERFACE_CLEAR_STATUS column
in the CE_SYSTEM_PARAMETERS_ALL table, you are required to do so. */
UPDATE xxlts_ce11i_recon_all
SET status
= X_status,
gl_date
= X_gl_date,
cleared_amount
= X_cleared_amount,
cleared_date
= X_cleared_date,
cleared_charges_amount
= X_charges_amount,
cleared_error_amount
= X_errors_amount,
exchange_rate_date = X_exchange_date,
exchange_rate_type = X_exchange_type,
exchange_rate
= X_exchange_rate
WHERE trx_id = X_trx_id;
--- --------------------------------------------------------------------- This section created all the accounting entries for clearing
-- -------------------------------------------------------------------BEGIN
-- --------------------------------------------------------------------- Calculate the Current Period
-- -------------------------------------------------------------------SELECT period_name
INTO
lv_period_name
FROM
gl_period_statuses
WHERE 1=1
AND
start_date <= SYSDATE
AND
end_date
> SYSDATE
AND
application_id = (
SELECT application_id
FROM
fnd_application
WHERE application_short_name = 'SQLGL'
)
AND
set_of_books_id = ln_ledger_id;
EXCEPTION
WHEN OTHERS THEN
lv_period_name := NULL;
END;
IF X_trx_type = 'PAYMENT'
THEN
-BEGIN
-- --------------------------------------------------------------------- Insert the Credit to Cash
-- -------------------------------------------------------------------INSERT INTO gl_interface
(ledger_id
,status
,accounting_date
,currency_code
,date_created
,created_by
,period_name
,actual_flag
,user_je_source_name
Lee Taylor
19/08/2008
www.LTSolutions.eu
,user_je_category_name
,entered_dr
,entered_cr
,segment1
,segment2
,segment3
,segment4
,segment5
,reference1
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
0
entered_dr
,
cpa.cleared_amount
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
' Recon @ '||TRUNC(SYSDATE)
reference1
,
cpa.trx_type_dsp
reference10
FROM
xxlts_ce11i_recon_all cpa
,
ce_bank_accounts
cba
,
gl_code_combinations
gcc
WHERE cpa.bank_account_num = cba.bank_account_num
AND
gcc.code_combination_id = cba.asset_code_combination_id
AND
cpa.trx_id = x_trx_id;
-- --------------------------------------------------------------------- Insert the Debit to Cash Clearing
-- -------------------------------------------------------------------INSERT INTO gl_interface
(ledger_id
,status
,accounting_date
,currency_code
,date_created
,created_by
,period_name
,actual_flag
,user_je_source_name
,user_je_category_name
,entered_dr
,entered_cr
,segment1
,segment2
,segment3
,segment4
,segment5
,reference1
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
cpa.cleared_amount
entered_dr
,
0
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
Lee Taylor
19/08/2008
www.LTSolutions.eu
www.LTSolutions.eu
,segment2
,segment3
,segment4
,segment5
,reference1
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
0
entered_dr
,
cpa.cleared_amount
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
' Recon @ '||TRUNC(SYSDATE)
reference1
,
cpa.trx_type_dsp
reference10
FROM
xxlts_ce11i_recon_all cpa
,
ce_bank_accounts
cba
,
gl_code_combinations
gcc
WHERE cpa.bank_account_num = cba.bank_account_num
AND
gcc.code_combination_id = cba.cash_clearing_ccid
AND
cpa.trx_id = x_trx_id;
END;
END IF;
END clear;
/* --------------------------------------------------------------------| PUBLIC PROCEDURE
|
|
unclear
|
|
|
| DESCRIPTION
|
|
This procedure would be called during unclearing phase
|
|
|
| HISTORY
|
--------------------------------------------------------------------- */
PROCEDURE unclear(
X_trx_id
NUMBER,
-- transaction id
X_trx_type
VARCHAR2, -- transaction type ('PAYMENT'/'CASH')
X_status
VARCHAR2, -- status
X_trx_date
DATE,
-- transaction date
X_gl_date
DATE
-- gl date
)IS
lv_period_name gl_period_statuses.period_name%TYPE;
ln_ledger_id
gl_interface.ledger_id%TYPE :=
fnd_profile.value('GL_SET_OF_BKS_ID');
BEGIN
/* Note: ce_999_interface_v is the base table of ce_999_interface_v in this
example */
/* Note: You are required to pass the status column to your proprietary
database. The Reconciliation Open Interface feature requires a
non-null status column to function correctly. */
/* Note: If you have not defined the value for the open interface float status
in the System Parameter Form, i.e. OPEN_INTERFACE_FLOAT_STATUS column
in the CE_SYSTEM_PARAMETERS_ALL table, you are required to do so. */
UPDATE xxlts_ce11i_recon_all
SET status
= X_status,
gl_date
= NULL,
cleared_amount
= NULL,
cleared_date
= NULL,
cleared_charges_amount
= NULL,
cleared_error_amount
= NULL,
exchange_rate_date = NULL,
exchange_rate_type = NULL,
Lee Taylor
19/08/2008
www.LTSolutions.eu
exchange_rate
= NULL
WHERE trx_id = X_trx_id;
-- --------------------------------------------------------------------- This section created all the accounting entries for clearing
-- -------------------------------------------------------------------BEGIN
-- --------------------------------------------------------------------- Calculate the Current Period
-- -------------------------------------------------------------------SELECT period_name
INTO
lv_period_name
FROM
gl_period_statuses
WHERE 1=1
AND
start_date <= SYSDATE
AND
end_date
> SYSDATE
AND
application_id = (
SELECT application_id
FROM
fnd_application
WHERE application_short_name = 'SQLGL'
)
AND
set_of_books_id = ln_ledger_id;
EXCEPTION
WHEN OTHERS THEN
lv_period_name := NULL;
END;
IF X_trx_type = 'PAYMENT'
THEN
-BEGIN
-- --------------------------------------------------------------------- Insert the Debit to Cash
-- -------------------------------------------------------------------INSERT INTO gl_interface
(ledger_id
,status
,accounting_date
,currency_code
,date_created
,created_by
,period_name
,actual_flag
,user_je_source_name
,user_je_category_name
,entered_dr
,entered_cr
,segment1
,segment2
,segment3
,segment4
,segment5
,reference1
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
cpa.amount
entered_dr
,
0
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
' Recon @ '||TRUNC(SYSDATE)
reference1
,
cpa.trx_type_dsp
reference10
FROM
xxlts_ce11i_recon_all cpa
,
ce_bank_accounts
cba
,
gl_code_combinations
gcc
WHERE cpa.bank_account_num = cba.bank_account_num
Lee Taylor
19/08/2008
www.LTSolutions.eu
AND
gcc.code_combination_id = cba.asset_code_combination_id
AND
cpa.trx_id = x_trx_id;
-- --------------------------------------------------------------------- Insert the Credit to Cash Clearing
-- -------------------------------------------------------------------INSERT INTO gl_interface
(ledger_id
,status
,accounting_date
,currency_code
,date_created
,created_by
,period_name
,actual_flag
,user_je_source_name
,user_je_category_name
,entered_dr
,entered_cr
,segment1
,segment2
,segment3
,segment4
,segment5
,reference1
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
0
entered_dr
,
cpa.amount
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
' Recon @ '||TRUNC(SYSDATE)
reference1
,
cpa.trx_type_dsp
reference10
FROM
xxlts_ce11i_recon_all cpa
,
ce_bank_accounts
cba
,
gl_code_combinations
gcc
WHERE cpa.bank_account_num = cba.bank_account_num
AND
gcc.code_combination_id = cba.cash_clearing_ccid
AND
cpa.trx_id = x_trx_id;
END;
ELSIF X_trx_type = 'CASH'
THEN
-BEGIN
-- --------------------------------------------------------------------- Insert the Credit to Cash
-- -------------------------------------------------------------------INSERT INTO gl_interface
(ledger_id
,status
,accounting_date
,currency_code
,date_created
,created_by
,period_name
,actual_flag
,user_je_source_name
,user_je_category_name
,entered_dr
,entered_cr
,segment1
,segment2
,segment3
,segment4
,segment5
,reference1
Lee Taylor
19/08/2008
www.LTSolutions.eu
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
0
entered_dr
,
cpa.amount
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
' Recon @ '||TRUNC(SYSDATE)
reference1
,
cpa.trx_type_dsp
reference10
FROM
xxlts_ce11i_recon_all cpa
,
ce_bank_accounts
cba
,
gl_code_combinations
gcc
WHERE cpa.bank_account_num = cba.bank_account_num
AND
gcc.code_combination_id = cba.asset_code_combination_id
AND
cpa.trx_id = x_trx_id;
-- --------------------------------------------------------------------- Insert the Debit to Cash Clearing
-- -------------------------------------------------------------------INSERT INTO gl_interface
(ledger_id
,status
,accounting_date
,currency_code
,date_created
,created_by
,period_name
,actual_flag
,user_je_source_name
,user_je_category_name
,entered_dr
,entered_cr
,segment1
,segment2
,segment3
,segment4
,segment5
,reference1
,reference10
)
SELECT fnd_profile.value('GL_SET_OF_BKS_ID') ledger_id
,
'NEW'
status
,
TRUNC(SYSDATE)
accounting_date
,
cpa.currency_code
currency_code
,
SYSDATE
date_created
,
fnd_global.user_id
created_by
,
lv_period_name
period_name
,
'A'
actual_flag
,
'Data Migration'
user_je_source_name
,
'Cash Management'
user_je_category_name
,
cpa.amount
entered_dr
,
0
entered_cr
,
gcc.segment1
segment1
,
gcc.segment2
segment2
,
gcc.segment3
segment3
,
gcc.segment4
segment4
,
gcc.segment5
segment5
,
cpa.trx_type_dsp||
' Recon @ '||TRUNC(SYSDATE)
reference1
,
cpa.trx_type_dsp
reference10
FROM
xxlts_ce11i_recon_all cpa
,
ce_bank_accounts
cba
,
gl_code_combinations
gcc
WHERE cpa.bank_account_num = cba.bank_account_num
AND
gcc.code_combination_id = cba.cash_clearing_ccid
AND
cpa.trx_id = x_trx_id;
END;
Lee Taylor
19/08/2008
www.LTSolutions.eu
END IF;
END unclear;
END CE_999_PKG;
/
Lee Taylor
19/08/2008
www.LTSolutions.eu